「App:Library:LVGL:docs:Overview:Styles」の版間の差分
(→Styles) |
|||
(同じ利用者による、間の3版が非表示) | |||
18行目: | 18行目: | ||
* Unlike CSS (where pseudo-classes describe different states, e.g. <code style="color: #bb0000;">:focus</code>), in LVGL a property is assigned to a given state. | * Unlike CSS (where pseudo-classes describe different states, e.g. <code style="color: #bb0000;">:focus</code>), in LVGL a property is assigned to a given state. | ||
* Transitions can be applied when the object changes state. | * Transitions can be applied when the object changes state. | ||
− | | | + | |スタイルは、オブジェクトの外観を設定するために使用されます。lvglのスタイルは、CSSに大きく影響されています。簡単に言うと、コンセプトは以下の通りです。 |
+ | |||
+ | * スタイルは、<code style="color: #bb0000;">lv_style_t</code>変数で、ボーダーの幅、テキストの色などのプロパティを保持することができます。CSSの <code style="color: #bb0000;">class</code>と同じようなものです。 | ||
+ | * オブジェクトにスタイルを付与し、見た目を変化させることができる。スタイルは、オブジェクトに割り当て、その外観を変えることができます。割り当てに際しては、ターゲット部分(CSSの擬似要素)とターゲット状態(擬似クラス)を指定することができます。例えば、スライダーのつまみが押された状態の時に <code style="color: #bb0000;">style_blue</code> を追加することができます。 | ||
+ | * 同じスタイルをいくつものオブジェクトで使用することができます。 | ||
+ | * スタイルはカスケード可能で、1つのオブジェクトに複数のスタイルを割り当てることができ、各スタイルは異なるプロパティを持つことができる。したがって、すべてのプロパティがスタイルで指定される必要はありません。LVGLは、スタイルで定義されるまでプロパティを検索し、どのスタイルでも指定されていない場合はデフォルトを使用します。例えば <code style="color: #bb0000;">style_btn</code> デフォルトのグレーのボタンになり、<code style="color: #bb0000;">style_btn_red</code> は背景色を上書きするために <code style="color: #bb0000;">background-color=red</code> だけを追加することができます。 | ||
+ | * 最近追加されたスタイルがより優先されます。つまり、あるプロパティが2つのスタイルで指定されている場合、オブジェクトの中で最も新しいスタイルが使用されます。 | ||
+ | * 一部のプロパティ(例:テキストカラー)は、オブジェクトで指定されていない場合、親から継承されることがあります。 | ||
+ | * オブジェクトは、"通常の "スタイルよりも高い優先順位を持つローカルスタイルを持つこともできる。 | ||
+ | * LVGLでは、CSS (擬似クラスで異なる状態を記述、例えば<code style="color: #bb0000;">:focus</code>)と異なり、プロパティは与えられた状態に割り当てられる。 | ||
+ | * オブジェクトの状態が変化したときに、トランジションを適用することができます。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
45行目: | 55行目: | ||
* <code style="color: #bb0000;">LV_STATE_USER_4</code> (0x8000) Custom state | * <code style="color: #bb0000;">LV_STATE_USER_4</code> (0x8000) Custom state | ||
− | An object can be in a combination of states such as being focused and pressed at the same time. This is represented as <code style="color: #bb0000;">LV_STATE_FOCUSED | LV_STATE_PRESSED</code>. | + | An object can be in a combination of states such as being focused and pressed at the same time. |
+ | |||
+ | This is represented as <code style="color: #bb0000;">LV_STATE_FOCUSED | LV_STATE_PRESSED</code>. | ||
+ | |||
+ | |||
+ | A style can be added to any state or state combination. | ||
+ | |||
+ | For example, setting a different background color for the default and pressed states. | ||
+ | |||
+ | If a property is not defined in a state the best matching state's property will be used. | ||
+ | |||
+ | |||
+ | Typically this means the property with <code style="color: #bb0000;">LV_STATE_DEFAULT</code> is used. | ||
+ | |||
+ | If the property is not set even for the default state the default value will be used. (See later) | ||
+ | |||
− | + | But what does the "best matching state's property" really mean? | |
− | + | States have a precedence which is shown by their value (see in the above list). | |
+ | |||
+ | A higher value means higher precedence. | ||
+ | |||
+ | To determine which state's property to use let's take an example. | ||
+ | |||
+ | Imagine the background color is defined like this: | ||
* <code style="color: #bb0000;">LV_STATE_DEFAULT</code>: white | * <code style="color: #bb0000;">LV_STATE_DEFAULT</code>: white | ||
61行目: | 92行目: | ||
# It's possible to set e.g. rose color for <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code>. In this case, this combined state has 0x0020 + 0x0002 = 0x0022 precedence, which is higher than the pressed state's precedence so rose color would be used. | # It's possible to set e.g. rose color for <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code>. In this case, this combined state has 0x0020 + 0x0002 = 0x0022 precedence, which is higher than the pressed state's precedence so rose color would be used. | ||
# When the object is in the checked state there is no property to set the background color for this state. So for lack of a better option, the object remains white from the default state's property. | # When the object is in the checked state there is no property to set the background color for this state. So for lack of a better option, the object remains white from the default state's property. | ||
+ | |||
Some practical notes: | Some practical notes: | ||
68行目: | 100行目: | ||
* Use ORed states to describe the properties for complex cases. (E.g. pressed + checked + focused) | * Use ORed states to describe the properties for complex cases. (E.g. pressed + checked + focused) | ||
* It might be a good idea to use different style elements for different states. For example, finding background colors for released, pressed, checked + pressed, focused, focused + pressed, focused + pressed + checked, etc. states is quite difficult. Instead, for example, use the background color for pressed and checked states and indicate the focused state with a different border color. | * It might be a good idea to use different style elements for different states. For example, finding background colors for released, pressed, checked + pressed, focused, focused + pressed, focused + pressed + checked, etc. states is quite difficult. Instead, for example, use the background color for pressed and checked states and indicate the focused state with a different border color. | ||
− | | | + | |オブジェクトは、以下の状態の組み合わせが可能である。 |
+ | |||
+ | *<code style="color: #bb0000;">LV_STATE_DEFAULT</code> (0x0000) 通常状態、解除状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_CHECKED</code> (0x0001) トグル状態またはチェック状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_FOCUSED</code> (0x0002) キーパッドまたはエンコーダでフォーカスされた状態、またはタッチパッド/マウスでクリックされた状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_FOCUS_KEY</code> (0x0004) キーパッドまたはエンコーダでフォーカスされ、タッチパッドやマウスではフォーカスされない状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_EDITED</code> (0x0008) エンコーダで編集中 | ||
+ | *<code style="color: #bb0000;">LV_STATE_HOVERED</code> (0x0010) マウスでホバリングした状態 (現在サポートされていません) | ||
+ | *<code style="color: #bb0000;">LV_STATE_PRESSED</code> (0x0020) 押された状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_SCROLLED</code> (0x0040) スクロールされている状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_DISABLED</code> (0x0080) 無効状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_USER_1</code> (0x1000) カスタム状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_USER_2</code> (0x2000) カスタム状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_USER_3</code> (0x4000) カスタム状態 | ||
+ | *<code style="color: #bb0000;">LV_STATE_USER_4</code> (0x8000) カスタム状態 | ||
+ | |||
+ | オブジェクトは、フォーカスされている状態と押されている状態が同時に存在することができる。 | ||
+ | |||
+ | これは、LV_STATE_FOCUSED|LV_STATE_PRESSEDと表現される。 | ||
+ | |||
+ | |||
+ | 任意の状態や状態の組み合わせにスタイルを追加することができる。 | ||
+ | |||
+ | 例えば、デフォルトの状態と押された状態で異なる背景色を設定する。 | ||
+ | |||
+ | プロパティがステートで定義されていない場合、最もマッチするステートのプロパティが使用されます。 | ||
+ | |||
+ | |||
+ | 通常はLV_STATE_DEFAULTのプロパティが使用されます。 | ||
+ | |||
+ | デフォルトの状態でもプロパティが設定されていない場合は、デフォルト値が使用されます。(後述) | ||
+ | |||
+ | |||
+ | しかし、「ベストマッチする状態のプロパティ」とは、実際にはどのようなものなのでしょうか? | ||
+ | |||
+ | 状態には優先順位があり、それは値で示されます(上のリスト参照)。 | ||
+ | |||
+ | 値が高いほど優先順位が高いことを意味します。 | ||
+ | |||
+ | どの状態のプロパティを使用するかを決定するために、例を挙げてみましょう。 | ||
+ | |||
+ | 背景色がこのように定義されているとします。 | ||
+ | *<code style="color: #bb0000;">LV_STATE_DEFAULT</code>: 白 | ||
+ | *<code style="color: #bb0000;">LV_STATE_PRESSED</code>: グレー | ||
+ | *<code style="color: #bb0000;">LV_STATE_FOCUSED</code>: 赤 | ||
+ | |||
+ | # 初期状態ではオブジェクトはデフォルトの状態なので、単純なケースです。オブジェクトの現在の状態では、プロパティは白として完全に定義されています。 | ||
+ | # オブジェクトが押されたとき、2つの関連するプロパティがあります:白のデフォルト(デフォルトはすべての状態に関連しています)とグレーの押された状態です。押された状態の優先順位は0x0020で、デフォルト状態の優先順位0x0000より高いので、グレーが使われます。 | ||
+ | # オブジェクトがフォーカスされているときは、pressed 状態と同じことが起こり、赤色が使用されます。(フォーカス状態の方がデフォルト状態より優先順位が高い)。 | ||
+ | # オブジェクトがフォーカスされており、かつプレスされている場合、グレーと赤の両方が機能しますが、プレスされた状態の方がフォーカスされた状態よりも優先順位が高いため、グレー色が使用されます。 | ||
+ | #<code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code>にローズ色などを設定することができます。この場合、この結合状態の優先順位は0x0020 + 0x0002 = 0x0022で、プレス状態の優先順位より高いので、ローズ色が使用されることになります。 | ||
+ | # オブジェクトがチェック状態にあるときは、この状態の背景色を設定するプロパティはありません。そのため、より良いオプションがない場合、オブジェクトはデフォルトの状態のプロパティから白のままとなります。 | ||
+ | |||
+ | |||
+ | 実用上の注意点 | ||
+ | |||
+ | * 状態の優先順位(値)は非常に直感的で、ユーザーが自然に期待するものです。例えば、オブジェクトがフォーカスされていても、ユーザーはそれが押されているかどうかを確認したいと思うだろうから、押された状態の方が優先される。もし、フォーカスされた状態の方が優先順位が高ければ、押された状態の色を上書きすることになります。 | ||
+ | * もし、あるプロパティをすべての状態に設定したい場合(例えば、赤の背景色)、デフォルトの状態に設定すればよい。オブジェクトが現在のステートに対応するプロパティを見つけられない場合は、デフォルト・ステートのプロパティにフォールバックします。 | ||
+ | * 複雑なケースのプロパティを記述するには、ORされたステートを使用します。(例:pressed + checked + focused) | ||
+ | * 状態ごとに異なるスタイル要素を使用するのもよいアイデアです。例えば、release, pressed, checked + pressed, focused, focused + pressed, focused + pressed + checked などの状態の背景色を見つけることは非常に困難です。例えば、pressedとcheckedの状態には背景色を使い、focusedの状態には別のボーダー色で表示するようにします。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
79行目: | 170行目: | ||
|- | |- | ||
| | | | ||
− | It's not required to set all the properties in one style. It's possible to add more styles to an object and have the latter added style modify or extend appearance. For example, create a general gray button style and create a new one for red buttons where only the new background color is set. | + | It's not required to set all the properties in one style. |
+ | |||
+ | It's possible to add more styles to an object and have the latter added style modify or extend appearance. | ||
+ | |||
+ | For example, create a general gray button style and create a new one for red buttons where only the new background color is set. | ||
This is much like in CSS when used classes are listed like <code style="color: #bb0000;"><nowiki><div class=".btn .btn-red"></nowiki></code>. | This is much like in CSS when used classes are listed like <code style="color: #bb0000;"><nowiki><div class=".btn .btn-red"></nowiki></code>. | ||
− | Styles added later have precedence over ones set earlier. So in the gray/red button example above, the normal button style should be added first and the red style second. However, the precedence of the states are still taken into account. So let's examine the following case: | + | Styles added later have precedence over ones set earlier. |
+ | |||
+ | So in the gray/red button example above, the normal button style should be added first and the red style second. | ||
+ | |||
+ | However, the precedence of the states are still taken into account. | ||
+ | |||
+ | |||
+ | So let's examine the following case: | ||
* the basic button style defines dark-gray color for the default state and light-gray color for the pressed state | * the basic button style defines dark-gray color for the default state and light-gray color for the pressed state | ||
* the red button style defines the background color as red only in the default state | * the red button style defines the background color as red only in the default state | ||
− | In this case, when the button is released (it's in default state) it will be red because a perfect match is found in the most recently added style (red). When the button is pressed the light-gray color is a better match because it describes the current state perfectly, so the button will be light-gray. | + | |
− | | | + | In this case, when the button is released (it's in default state) it will be red because a perfect match is found in the most recently added style (red). |
+ | |||
+ | When the button is pressed the light-gray color is a better match because it describes the current state perfectly, so the button will be light-gray. | ||
+ | |1つのスタイルですべてのプロパティを設定する必要はありません。 | ||
+ | |||
+ | オブジェクトにさらにスタイルを追加して、後から追加したスタイルで外観を変更または拡張することが可能です。 | ||
+ | |||
+ | たとえば、一般的な灰色のボタン スタイルを作成し、新しい背景色のみが設定された赤いボタン用のスタイルを新たに作成します。 | ||
+ | |||
+ | |||
+ | これは、CSS で使用されるクラスが <code style="color: #bb0000;"><nowiki><div class=".btn .btn-red"></nowiki></code>のように一覧表示される場合とほぼ同じです。 | ||
+ | |||
+ | 後から追加されたスタイルは、先に設定されたものよりも優先されます。 | ||
+ | |||
+ | したがって、上記の灰色と赤のボタンの例では、通常のボタンスタイルが先に追加され、赤のスタイルが後に追加されるべきです。 | ||
+ | |||
+ | ただし、状態の優先順位が考慮されることに変わりはありません。 | ||
+ | |||
+ | |||
+ | そこで、次のようなケースを検証してみましょう。 | ||
+ | |||
+ | * 基本ボタンスタイルでは、デフォルトの状態を濃い灰色、押された状態を薄い灰色で定義しています。 | ||
+ | * 赤のボタンスタイルでは、デフォルトの状態でのみ背景色を赤と定義します。 | ||
+ | |||
+ | この場合、ボタンが離されたとき(デフォルトの状態)には、最近追加されたスタイル(赤)に完全に一致するものが見つかるので、赤になります。 | ||
+ | |||
+ | ボタンが押されたときは、ライト グレー色の方が現在の状態を完璧に表現しているため、ボタンはライト グレー色になります。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
100行目: | 228行目: | ||
|- | |- | ||
| | | | ||
− | Some properties (typically those related to text) can be inherited from the parent object's styles. Inheritance is applied only if the given property is not set in the object's styles (even in default state). In this case, if the property is inheritable, the property's value will be searched in the parents until an object specifies a value for the property. The parents will use their own state to determine the value. So if a button is pressed, and the text color comes from here, the pressed text color will be used. | + | Some properties (typically those related to text) can be inherited from the parent object's styles. |
− | | | + | |
+ | Inheritance is applied only if the given property is not set in the object's styles (even in default state). | ||
+ | |||
+ | In this case, if the property is inheritable, the property's value will be searched in the parents until an object specifies a value for the property. | ||
+ | |||
+ | The parents will use their own state to determine the value. | ||
+ | |||
+ | So if a button is pressed, and the text color comes from here, the pressed text color will be used. | ||
+ | |いくつかのプロパティ(通常、テキストに関連するもの)は、親オブジェクトのスタイルから継承することができる。 | ||
+ | |||
+ | 継承は、与えられたプロパティがオブジェクトのスタイルに設定されていない場合(デフォルト状態であっても)にのみ適用される。 | ||
+ | |||
+ | この場合、プロパティが継承可能であれば、オブジェクトがそのプロパティの値を指定するまで、プロパティの値は親で検索されます。 | ||
+ | |||
+ | 親は自分自身の状態を利用して値を決定します。 | ||
+ | |||
+ | つまり、ボタンが押され、テキスト色がここから来た場合、押されたテキスト色が使用されます。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
125行目: | 269行目: | ||
* <code style="color: #bb0000;">LV_PART_CURSOR</code> Mark a specific place e.g. text area's or chart's cursor | * <code style="color: #bb0000;">LV_PART_CURSOR</code> Mark a specific place e.g. text area's or chart's cursor | ||
* <code style="color: #bb0000;">LV_PART_CUSTOM_FIRST</code> Custom part identifiers can be added starting from here. | * <code style="color: #bb0000;">LV_PART_CUSTOM_FIRST</code> Custom part identifiers can be added starting from here. | ||
+ | |||
For example a Slider has three parts: | For example a Slider has three parts: | ||
131行目: | 276行目: | ||
* Indicator | * Indicator | ||
* Knob | * Knob | ||
+ | |||
This means all three parts of the slider can have their own styles. See later how to add styles to objects and parts. | This means all three parts of the slider can have their own styles. See later how to add styles to objects and parts. | ||
− | | | + | |オブジェクトはパーツで構成され、それぞれ独自のスタイルを持つことができる。 |
+ | |||
+ | LVGLでは、以下のパーツが定義されています。 | ||
+ | *<code style="color: #bb0000;">LV_PART_MAIN</code> 矩形のような背景画像 | ||
+ | *<code style="color: #bb0000;">LV_PART_SCROLLBAR</code> スクロールバー。 | ||
+ | *<code style="color: #bb0000;">LV_PART_INDICATOR</code> スライダ、バー、スイッチ、チェックボックスなどのインジケータ | ||
+ | *<code style="color: #bb0000;">LV_PART_KNOB</code> 値を調整するためにつかむハンドルのようなもの | ||
+ | *<code style="color: #bb0000;">LV_PART_SELECTED</code> 現在選択されているオプションやセクションを表すもの | ||
+ | *<code style="color: #bb0000;">LV_PART_ITEMS</code> ウィジェットに複数の類似した要素がある場合に使用します(例:テーブルセル)。 | ||
+ | *<code style="color: #bb0000;">LV_PART_TICKS</code> グラフやメーターのような目盛りの刻み目 | ||
+ | *<code style="color: #bb0000;">LV_PART_CURSOR</code> テキストエリアやグラフのカーソルなど、特定の場所を示すマーク | ||
+ | *<code style="color: #bb0000;">LV_PART_CUSTOM_FIRST</code> ここからカスタム部品識別子を追加することができます。 | ||
+ | |||
+ | |||
+ | 例えば、スライダーは3つのパーツから構成されています。 | ||
+ | |||
+ | * 背景 | ||
+ | * インジケーター | ||
+ | * つまみ | ||
+ | |||
+ | |||
+ | つまり、スライダーの3つのパーツはすべて独自のスタイルを持つことができます。オブジェクトやパーツにスタイルを追加する方法については後述します。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
252行目: | 419行目: | ||
後の <code style="color: #bb0000;">const</code> スタイルは、他のスタイルと同様に使用できますが、(当然)新しいプロパティを追加することはできません。 | 後の <code style="color: #bb0000;">const</code> スタイルは、他のスタイルと同様に使用できますが、(当然)新しいプロパティを追加することはできません。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
264行目: | 431行目: | ||
|スタイル単体ではあまり意味がありません。効果を発揮するためには、オブジェクトに割り当てる必要があります。 | |スタイル単体ではあまり意味がありません。効果を発揮するためには、オブジェクトに割り当てる必要があります。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
314行目: | 481行目: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
350行目: | 517行目: | ||
<code style="color: #bb0000;">selector</code>は、<code style="color: #bb0000;">LV_STATE_ANY</code> と <code style="color: #bb0000;">LV_PART_ANY</code> 値を使用して、任意の状態または部分からスタイルを削除することができます。 | <code style="color: #bb0000;">selector</code>は、<code style="color: #bb0000;">LV_STATE_ANY</code> と <code style="color: #bb0000;">LV_PART_ANY</code> 値を使用して、任意の状態または部分からスタイルを削除することができます。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
370行目: | 537行目: | ||
# LVGLにすべてのオブジェクトがスタイルを使用しているかどうかをチェックさせ、必要なときにそれらを更新するには、<code style="color: #bb0000;">lv_obj_report_style_change(&style)</code>.を呼び出します。 <code style="color: #bb0000;">style</code> が <code style="color: #bb0000;">NULL</code> の場合、すべてのオブジェクトはスタイル変更について通知されます。 | # LVGLにすべてのオブジェクトがスタイルを使用しているかどうかをチェックさせ、必要なときにそれらを更新するには、<code style="color: #bb0000;">lv_obj_report_style_change(&style)</code>.を呼び出します。 <code style="color: #bb0000;">style</code> が <code style="color: #bb0000;">NULL</code> の場合、すべてのオブジェクトはスタイル変更について通知されます。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
389行目: | 556行目: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
438行目: | 605行目: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
450行目: | 617行目: | ||
|スタイルプロパティの一覧はこちらをご覧ください。 | |スタイルプロパティの一覧はこちらをご覧ください。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
478行目: | 645行目: | ||
* X・Y変換 | * X・Y変換 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
562行目: | 729行目: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
574行目: | 741行目: | ||
| | | | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
649行目: | 816行目: | ||
If the default theme is enabled by <code style="color: #bb0000;">LV_USE_THEME_DEFAULT 1</code> でデフォルトのテーマを有効にすると,ディスプレイ作成時にLVGLが自動的に初期化し設定する. | If the default theme is enabled by <code style="color: #bb0000;">LV_USE_THEME_DEFAULT 1</code> でデフォルトのテーマを有効にすると,ディスプレイ作成時にLVGLが自動的に初期化し設定する. | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
677行目: | 844行目: | ||
以下にその例を示します。 | 以下にその例を示します。 | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
755行目: | 922行目: | ||
| | | | ||
|} | |} | ||
− | :[[App:Library:LVGL# | + | :[[App:Library:LVGL:docs:Overview#Styles|戻る : Previous]] |
− | |||
− | |||
− | |||
− | |||
− | |||
== API == | == API == | ||
{| class="wikitable" | {| class="wikitable" |
2022年7月2日 (土) 10:12時点における最新版
https://docs.lvgl.io/8.2/overview/style.html
Styles
英文 | 自動翻訳 |
---|---|
Styles are used to set the appearance of objects. Styles in lvgl are heavily inspired by CSS. The concept in a nutshell is as follows:
|
スタイルは、オブジェクトの外観を設定するために使用されます。lvglのスタイルは、CSSに大きく影響されています。簡単に言うと、コンセプトは以下の通りです。
|
States
英文 | 自動翻訳 |
---|---|
The objects can be in the combination of the following states:
An object can be in a combination of states such as being focused and pressed at the same time. This is represented as
For example, setting a different background color for the default and pressed states. If a property is not defined in a state the best matching state's property will be used.
If the property is not set even for the default state the default value will be used. (See later)
States have a precedence which is shown by their value (see in the above list). A higher value means higher precedence. To determine which state's property to use let's take an example. Imagine the background color is defined like this:
|
オブジェクトは、以下の状態の組み合わせが可能である。
オブジェクトは、フォーカスされている状態と押されている状態が同時に存在することができる。 これは、LV_STATE_FOCUSED|LV_STATE_PRESSEDと表現される。
例えば、デフォルトの状態と押された状態で異なる背景色を設定する。 プロパティがステートで定義されていない場合、最もマッチするステートのプロパティが使用されます。
デフォルトの状態でもプロパティが設定されていない場合は、デフォルト値が使用されます。(後述)
状態には優先順位があり、それは値で示されます(上のリスト参照)。 値が高いほど優先順位が高いことを意味します。 どの状態のプロパティを使用するかを決定するために、例を挙げてみましょう。 背景色がこのように定義されているとします。
|
Cascading styles
英文 | 自動翻訳 |
---|---|
It's not required to set all the properties in one style. It's possible to add more styles to an object and have the latter added style modify or extend appearance. For example, create a general gray button style and create a new one for red buttons where only the new background color is set. This is much like in CSS when used classes are listed like Styles added later have precedence over ones set earlier. So in the gray/red button example above, the normal button style should be added first and the red style second. However, the precedence of the states are still taken into account.
When the button is pressed the light-gray color is a better match because it describes the current state perfectly, so the button will be light-gray. |
1つのスタイルですべてのプロパティを設定する必要はありません。
オブジェクトにさらにスタイルを追加して、後から追加したスタイルで外観を変更または拡張することが可能です。 たとえば、一般的な灰色のボタン スタイルを作成し、新しい背景色のみが設定された赤いボタン用のスタイルを新たに作成します。
後から追加されたスタイルは、先に設定されたものよりも優先されます。 したがって、上記の灰色と赤のボタンの例では、通常のボタンスタイルが先に追加され、赤のスタイルが後に追加されるべきです。 ただし、状態の優先順位が考慮されることに変わりはありません。
この場合、ボタンが離されたとき(デフォルトの状態)には、最近追加されたスタイル(赤)に完全に一致するものが見つかるので、赤になります。 ボタンが押されたときは、ライト グレー色の方が現在の状態を完璧に表現しているため、ボタンはライト グレー色になります。 |
Inheritance
英文 | 自動翻訳 |
---|---|
Some properties (typically those related to text) can be inherited from the parent object's styles. Inheritance is applied only if the given property is not set in the object's styles (even in default state). In this case, if the property is inheritable, the property's value will be searched in the parents until an object specifies a value for the property. The parents will use their own state to determine the value. So if a button is pressed, and the text color comes from here, the pressed text color will be used. |
いくつかのプロパティ(通常、テキストに関連するもの)は、親オブジェクトのスタイルから継承することができる。
継承は、与えられたプロパティがオブジェクトのスタイルに設定されていない場合(デフォルト状態であっても)にのみ適用される。 この場合、プロパティが継承可能であれば、オブジェクトがそのプロパティの値を指定するまで、プロパティの値は親で検索されます。 親は自分自身の状態を利用して値を決定します。 つまり、ボタンが押され、テキスト色がここから来た場合、押されたテキスト色が使用されます。 |
Parts
英文 | 自動翻訳 |
---|---|
Objects can be composed of parts which may each have their own styles. The following predefined parts exist in LVGL:
|
オブジェクトはパーツで構成され、それぞれ独自のスタイルを持つことができる。
LVGLでは、以下のパーツが定義されています。
|
Initialize styles and set/get properties
英文 | 自動翻訳 |
---|---|
Styles are stored in
Property set functions looks like this: For example: static lv_style_t style_btn;
lv_style_init(&style_btn);
lv_style_set_bg_color(&style_btn, lv_color_hex(0x115588));
lv_style_set_bg_opa(&style_btn, LV_OPA_50);
lv_style_set_border_width(&style_btn, 2);
lv_style_set_border_color(&style_btn, lv_color_black());
static lv_style_t style_btn_red;
lv_style_init(&style_btn_red);
lv_style_set_bg_color(&style_btn_red, lv_plaette_main(LV_PALETTE_RED));
lv_style_set_bg_opa(&style_btn_red, LV_OPA_COVER);
To remove a property use: lv_style_remove_prop(&style, LV_STYLE_BG_COLOR);
To get a property's value from a style: lv_style_value_t v;
lv_res_t res = lv_style_get_prop(&style, LV_STYLE_BG_COLOR, &v);
if(res == LV_RES_OK) { /*Found*/
do_something(v.color);
}
To reset a style (free all its data) use: lv_style_reset(&style);
Styles can be built as const lv_style_const_prop_t style1_props[] = {
LV_STYLE_CONST_WIDTH(50),
LV_STYLE_CONST_HEIGHT(50),
LV_STYLE_PROP_INV,
};
LV_STYLE_CONST_INIT(style1, style1_props);
Later |
スタイルは、lv_style_t 変数に格納される。スタイル変数は、静的か、グローバルか、動的に割り当てる必要があります。つまり、関数内のローカル変数として使用することはできず、関数の終了時に破棄されます。
プロパティ設定関数は次のようなものです。 static lv_style_t style_btn;
lv_style_init(&style_btn);
lv_style_set_bg_color(&style_btn, lv_color_hex(0x115588));
lv_style_set_bg_opa(&style_btn, LV_OPA_50);
lv_style_set_border_width(&style_btn, 2);
lv_style_set_border_color(&style_btn, lv_color_black());
static lv_style_t style_btn_red;
lv_style_init(&style_btn_red);
lv_style_set_bg_color(&style_btn_red, lv_plaette_main(LV_PALETTE_RED));
lv_style_set_bg_opa(&style_btn_red, LV_OPA_COVER);
プロパティの使用を削除する場合。 lv_style_remove_prop(&style, LV_STYLE_BG_COLOR);
スタイルからプロパティの値を取得する。 lv_style_value_t v;
lv_res_t res = lv_style_get_prop(&style, LV_STYLE_BG_COLOR, &v);
if(res == LV_RES_OK) { /*Found*/
do_something(v.color);
}
スタイルをリセットする(すべてのデータを解放する)には、以下を使用します。 lv_style_reset(&style);
スタイルも const lv_style_const_prop_t style1_props[] = {
LV_STYLE_CONST_WIDTH(50),
LV_STYLE_CONST_HEIGHT(50),
LV_STYLE_PROP_INV,
};
LV_STYLE_CONST_INIT(style1, style1_props);
後の |
Add and remove styles to a widget
英文 | 自動翻訳 |
---|---|
A style on its own is not that useful. It must be assigned to an object to take effect. |
スタイル単体ではあまり意味がありません。効果を発揮するためには、オブジェクトに割り当てる必要があります。 |
Add styles
英文 | 自動翻訳 |
---|---|
To add a style to an object use
lv_obj_add_style(btn, &style_btn, 0); /*Default button style*/
lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); /*Overwrite only some colors to red when pressed*/
|
オブジェクトにスタイルを追加するには、 lv_obj_add_style(obj, &style, <selector>) を使用します。<selector> は、スタイルを追加するパーツとステートの OR 値です。
lv_obj_add_style(btn, &style_btn, 0); /*Default button style*/
lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); /*Overwrite only some colors to red when pressed*/
|
Remove styles
英文 | 自動翻訳 |
---|---|
To remove all styles from an object use
|
オブジェクトからすべてのスタイルを削除するには、lv_obj_remove_style_all(obj) を使用します。
|
Report style changes
英文 | 自動翻訳 |
---|---|
If a style which is already assigned to an object changes (i.e. a property is added or changed), the objects using that style should be notified. There are 3 options to do this:
|
あるオブジェクトに既に割り当てられているスタイルが変更された場合(プロパティが追加または変更された場合など)、そのスタイルを使用しているオブジェクトに通知される必要があります。これを行うには、3つのオプションがあります。
|
Get a property's value on an object
英文 | 自動翻訳 |
---|---|
To get a final value of property - considering cascading, inheritance, local styles and transitions (see below) - property get functions like this can be used: lv_color_t color = lv_obj_get_style_bg_color(btn, LV_PART_MAIN);
|
カスケード、継承、ローカルスタイル、トランジション(下記参照)を考慮して、プロパティの最終値を得るには、次のようなプロパティ取得関数を使用できます: lv_obj_get_style_<property_name>(obj, <part>) 。
これらの関数は、オブジェクトの現在の状態を使用し、より良い候補が存在しない場合は、デフォルト値を返します。 例えば lv_color_t color = lv_obj_get_style_bg_color(btn, LV_PART_MAIN);
|
Local styles
英文 | 自動翻訳 |
---|---|
In addition to "normal" styles, objects can also store local styles. This concept is similar to inline styles in CSS (e.g.
They are useful to add local customization to an object. Unlike in CSS, LVGL local styles can be assigned to states (pseudo-classes) and parts (pseudo-elements).
For example: lv_obj_set_style_bg_color(slider, lv_color_red(), LV_PART_INDICATOR | LV_STATE_FOCUSED);
|
通常の "スタイルに加えて、オブジェクトはローカルスタイルを保存することができます。
この概念はCSSのインラインスタイル(例:
使用された場合、ローカルスタイルは自動的に割り当てられ、オブジェクトが削除されたときに解放されます。 オブジェクトに局所的なカスタマイズを追加するのに便利である。
For example: lv_obj_set_style_bg_color(slider, lv_color_red(), LV_PART_INDICATOR | LV_STATE_FOCUSED);
|
Properties
英文 | 自動翻訳 |
---|---|
For the full list of style properties click here. |
スタイルプロパティの一覧はこちらをご覧ください。 |
Typical background properties
英文 | 自動翻訳 |
---|---|
In the documentation of the widgets you will see sentences like "The widget uses the typical background properties". These "typical background properties" are the ones related to:
|
ウィジェットのドキュメントには、"The widget uses the typical background properties "のような文章が書かれています。この「典型的な背景のプロパティ」とは、関連するものを指します。
|
Transitions
英文 | 自動翻訳 |
---|---|
By default, when an object changes state (e.g. it's pressed) the new properties from the new state are set immediately. However, with transitions it's possible to play an animation on state change. For example, on pressing a button its background color can be animated to the pressed color over 300 ms. The parameters of the transitions are stored in the styles. It's possible to set
For example, setting a 500 ms transition time in the default state means that when the object goes to the default state a 500 ms transition time is applied. Setting a 100 ms transition time in the pressed state causes a 100 ms transition when going to the pressed state.
To describe a transition an /*Only its pointer is saved so must static, global or dynamically allocated */
static const lv_style_prop_t trans_props[] = {
LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR,
0, /*End marker*/
};
static lv_style_transition_dsc_t trans1;
lv_style_transition_dsc_init(&trans1, trans_props, lv_anim_path_ease_out, duration_ms, delay_ms);
lv_style_set_transition(&style1, &trans1);
|
デフォルトでは、オブジェクトの状態が変化すると(例えば、押されるなど)、新しい状態からの新しいプロパティがすぐに設定されます。
しかし、トランジションを使えば、ステートが変化したときにアニメーションを再生することができる。 例えば、ボタンが押されたときに、その背景色を押されたときの色に300ミリ秒で変化させることができる。
例えば、デフォルトの状態で遷移時間を500msに設定すると、オブジェクトがデフォルトの状態になったときに500msの遷移時間が適用されることになる。 pressedの状態で100msの遷移時間を設定すると、pressedの状態に移行するときに100msの遷移が行われます。
/*Only its pointer is saved so must static, global or dynamically allocated */
static const lv_style_prop_t trans_props[] = {
LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR,
0, /*End marker*/
};
static lv_style_transition_dsc_t trans1;
lv_style_transition_dsc_init(&trans1, trans_props, lv_anim_path_ease_out, duration_ms, delay_ms);
lv_style_set_transition(&style1, &trans1);
|
Color filter
英文 | 自動翻訳 |
---|---|
TODO |
Themes
英文 | 自動翻訳 |
---|---|
Themes are a collection of styles. If there is an active theme LVGL applies it on every created widget. This will give a default appearance to the UI which can then be modified by adding further styles.
For example, you could have a colorful theme on a TFT and monochrome theme on a secondary monochrome display. To set a theme for a display, two steps are required:
lv_theme_t * th = lv_theme_default_init(display, /*Use the DPI, size, etc from this display*/
LV_COLOR_PALETTE_BLUE, LV_COLOR_PALETTE_CYAN, /*Primary and secondary palette*/
false, /*Light or dark mode*/
&lv_font_montserrat_10, &lv_font_montserrat_14, &lv_font_montserrat_18); /*Small, normal, large fonts*/
lv_disp_set_theme(display, th); /*Assign the theme to the display*/
If the default theme is enabled by |
テーマは、スタイルの集合体です。もしアクティブなテーマがあれば、LVGLは作成されたすべてのウィジェットにそれを適用します。
これは、UIにデフォルトの外観を与え、さらにスタイルを追加することによって変更することができます。
例えば、TFTディスプレイにはカラフルなテーマを、セカンダリモノクロディスプレイにはモノクロのテーマを持たせることができます。
lv_theme_t * th = lv_theme_default_init(display, /*Use the DPI, size, etc from this display*/
LV_COLOR_PALETTE_BLUE, LV_COLOR_PALETTE_CYAN, /*Primary and secondary palette*/
false, /*Light or dark mode*/
&lv_font_montserrat_10, &lv_font_montserrat_14, &lv_font_montserrat_18); /*Small, normal, large fonts*/
lv_disp_set_theme(display, th); /*Assign the theme to the display*/
If the default theme is enabled by |
Extending themes
英文 | 自動翻訳 |
---|---|
Built-in themes can be extended. If a custom theme is created, a parent theme can be selected. The parent theme's styles will be added before the custom theme's styles. Any number of themes can be chained this way. E.g. default theme -> custom theme -> dark theme.
There is an example for it below. |
内蔵テーマの拡張が可能 カスタムテーマを作成した場合、親テーマを選択することができる。
親テーマのスタイルがカスタムテーマのスタイルの前に追加される。 この方法で、いくつでもテーマを連結することができます。例:デフォルトテーマ→カスタムテーマ→ダークテーマ。
以下にその例を示します。 |
Examples
英文 | 自動翻訳 |
---|---|
Size styles |
|
Background styles |
|
Border styles |
|
Outline styles |
|
Shadow styles |
|
Image styles |
|
Arc styles |
|
Text styles |
|
Line styles |
|
Transition |
|
Using multiple styles |
|
Local styles |
|
Add styles to parts and states |
|
Extending the current theme |
API
英文 | 自動翻訳 |
---|---|
Typedefs typedef uint8_t lv_blend_mode_t typedef uint8_t lv_text_decor_t typedef uint8_t lv_border_side_t typedef uint8_t lv_grad_dir_t typedef uint8_t lv_dither_mode_t Enums enum [anonymous]
enum [anonymous]
enum [anonymous]
enum [anonymous]
enum [anonymous]
enum lv_style_prop_t
|
Typedefs
typedef uint8_t lv_blend_mode_t typedef uint8_t lv_text_decor_t typedef uint8_t lv_border_side_t typedef uint8_t lv_grad_dir_t typedef uint8_t lv_dither_mode_t Enums enum [anonymous]
enum [anonymous]
enum [anonymous]
enum [anonymous]
enum [anonymous]
enum lv_style_prop_t
|
Values: enumerator LV_STYLE_PROP_INV enumerator LV_STYLE_WIDTH enumerator LV_STYLE_MIN_WIDTH enumerator LV_STYLE_MAX_WIDTH enumerator LV_STYLE_HEIGHT enumerator LV_STYLE_MIN_HEIGHT enumerator LV_STYLE_MAX_HEIGHT enumerator LV_STYLE_X enumerator LV_STYLE_Y enumerator LV_STYLE_ALIGN enumerator LV_STYLE_TRANSFORM_WIDTH enumerator LV_STYLE_TRANSFORM_HEIGHT enumerator LV_STYLE_TRANSLATE_X enumerator LV_STYLE_TRANSLATE_Y enumerator LV_STYLE_TRANSFORM_ZOOM enumerator LV_STYLE_TRANSFORM_ANGLE enumerator LV_STYLE_PAD_TOP enumerator LV_STYLE_PAD_BOTTOM enumerator LV_STYLE_PAD_LEFT enumerator LV_STYLE_PAD_RIGHT enumerator LV_STYLE_PAD_ROW enumerator LV_STYLE_PAD_COLUMN enumerator LV_STYLE_BG_COLOR enumerator LV_STYLE_BG_COLOR_FILTERED enumerator LV_STYLE_BG_OPA enumerator LV_STYLE_BG_GRAD_COLOR enumerator LV_STYLE_BG_GRAD_COLOR_FILTERED enumerator LV_STYLE_BG_GRAD_DIR enumerator LV_STYLE_BG_MAIN_STOP enumerator LV_STYLE_BG_GRAD_STOP enumerator LV_STYLE_BG_GRAD enumerator LV_STYLE_BG_DITHER_MODE enumerator LV_STYLE_BG_IMG_SRC enumerator LV_STYLE_BG_IMG_OPA enumerator LV_STYLE_BG_IMG_RECOLOR enumerator LV_STYLE_BG_IMG_RECOLOR_FILTERED enumerator LV_STYLE_BG_IMG_RECOLOR_OPA enumerator LV_STYLE_BG_IMG_TILED enumerator LV_STYLE_BORDER_COLOR enumerator LV_STYLE_BORDER_COLOR_FILTERED enumerator LV_STYLE_BORDER_OPA enumerator LV_STYLE_BORDER_WIDTH enumerator LV_STYLE_BORDER_SIDE enumerator LV_STYLE_BORDER_POST enumerator LV_STYLE_OUTLINE_WIDTH enumerator LV_STYLE_OUTLINE_COLOR enumerator LV_STYLE_OUTLINE_COLOR_FILTERED enumerator LV_STYLE_OUTLINE_OPA enumerator LV_STYLE_OUTLINE_PAD enumerator LV_STYLE_SHADOW_WIDTH enumerator LV_STYLE_SHADOW_OFS_X enumerator LV_STYLE_SHADOW_OFS_Y enumerator LV_STYLE_SHADOW_SPREAD enumerator LV_STYLE_SHADOW_COLOR enumerator LV_STYLE_SHADOW_COLOR_FILTERED enumerator LV_STYLE_SHADOW_OPA enumerator LV_STYLE_IMG_OPA enumerator LV_STYLE_IMG_RECOLOR enumerator LV_STYLE_IMG_RECOLOR_FILTERED enumerator LV_STYLE_IMG_RECOLOR_OPA enumerator LV_STYLE_LINE_WIDTH enumerator LV_STYLE_LINE_DASH_WIDTH enumerator LV_STYLE_LINE_DASH_GAP enumerator LV_STYLE_LINE_ROUNDED enumerator LV_STYLE_LINE_COLOR enumerator LV_STYLE_LINE_COLOR_FILTERED enumerator LV_STYLE_LINE_OPA enumerator LV_STYLE_ARC_WIDTH enumerator LV_STYLE_ARC_ROUNDED enumerator LV_STYLE_ARC_COLOR enumerator LV_STYLE_ARC_COLOR_FILTERED enumerator LV_STYLE_ARC_OPA enumerator LV_STYLE_ARC_IMG_SRC enumerator LV_STYLE_TEXT_COLOR enumerator LV_STYLE_TEXT_COLOR_FILTERED enumerator LV_STYLE_TEXT_OPA enumerator LV_STYLE_TEXT_FONT enumerator LV_STYLE_TEXT_LETTER_SPACE enumerator LV_STYLE_TEXT_LINE_SPACE enumerator LV_STYLE_TEXT_DECOR enumerator LV_STYLE_TEXT_ALIGN enumerator LV_STYLE_RADIUS enumerator LV_STYLE_CLIP_CORNER enumerator LV_STYLE_OPA enumerator LV_STYLE_COLOR_FILTER_DSC enumerator LV_STYLE_COLOR_FILTER_OPA enumerator LV_STYLE_ANIM_TIME enumerator LV_STYLE_ANIM_SPEED enumerator LV_STYLE_TRANSITION enumerator LV_STYLE_BLEND_MODE enumerator LV_STYLE_LAYOUT enumerator LV_STYLE_BASE_DIR enumerator _LV_STYLE_LAST_BUILT_IN_PROP enumerator LV_STYLE_PROP_ANY | |
Functions LV_EXPORT_CONST_INT(LV_IMG_ZOOM_NONE) void lv_style_init(lv_style_t *style)
void lv_style_reset(lv_style_t *style)
lv_style_prop_t lv_style_register_prop(void) bool lv_style_remove_prop(lv_style_t *style, lv_style_prop_t prop)
void lv_style_set_prop(lv_style_t *style, lv_style_prop_t prop, lv_style_value_t value)
lv_res_t lv_style_get_prop(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value)
static inline lv_res_t lv_style_get_prop_inlined(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value)
void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
bool lv_style_is_empty(const lv_style_t *style)
uint8_t _lv_style_get_prop_group(lv_style_prop_t prop)
static inline void lv_style_set_size(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_all(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_hor(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_ver(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_gap(lv_style_t *style, lv_coord_t value) struct lv_gradient_stop_t
struct lv_grad_dsc_t
union lv_style_value_t
struct lv_style_const_prop_t
struct lv_style_t
Typedefs typedef void (*lv_theme_apply_cb_t)(struct _lv_theme_t*, lv_obj_t*) typedef struct _lv_theme_t lv_theme_t Functions
lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj)
void lv_theme_apply(lv_obj_t *obj)
void lv_theme_set_parent(lv_theme_t *new_theme, lv_theme_t *parent)
void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb)
const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj)
const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj)
const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj)
lv_color_t lv_theme_get_color_primary(lv_obj_t *obj)
lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj)
struct _lv_theme_t
|
Functions
LV_EXPORT_CONST_INT(LV_IMG_ZOOM_NONE) void lv_style_init(lv_style_t *style)
void lv_style_reset(lv_style_t *style)
lv_style_prop_t lv_style_register_prop(void) bool lv_style_remove_prop(lv_style_t *style, lv_style_prop_t prop)
void lv_style_set_prop(lv_style_t *style, lv_style_prop_t prop, lv_style_value_t value)
lv_res_t lv_style_get_prop(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value)
static inline lv_res_t lv_style_get_prop_inlined(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value)
void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
bool lv_style_is_empty(const lv_style_t *style)
uint8_t _lv_style_get_prop_group(lv_style_prop_t prop)
static inline void lv_style_set_size(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_all(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_hor(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_ver(lv_style_t *style, lv_coord_t value) static inline void lv_style_set_pad_gap(lv_style_t *style, lv_coord_t value) struct lv_gradient_stop_t
struct lv_grad_dsc_t
union lv_style_value_t
struct lv_style_const_prop_t
struct lv_style_t
Typedefs typedef void (*lv_theme_apply_cb_t)(struct _lv_theme_t*, lv_obj_t*) typedef struct _lv_theme_t lv_theme_t Functions
void lv_theme_apply(lv_obj_t *obj)
void lv_theme_set_parent(lv_theme_t *new_theme, lv_theme_t *parent)
void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb)
const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj)
const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj)
const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj)
lv_color_t lv_theme_get_color_primary(lv_obj_t *obj)
lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj)
struct _lv_theme_t
|
Functions static inline lv_coord_t lv_obj_get_style_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_min_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_max_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_height(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_min_height(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_max_height(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_x(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_y(const struct _lv_obj_t *obj, uint32_t part) static inline lv_align_t lv_obj_get_style_align(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_transform_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_transform_height(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_translate_x(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_translate_y(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_transform_zoom(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_transform_angle(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_top(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_bottom(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_left(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_right(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_row(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_bg_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_grad_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_bg_main_stop(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_bg_grad_stop(const struct _lv_obj_t *obj, uint32_t part) static inline const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const struct _lv_obj_t *obj, uint32_t part) static inline lv_dither_mode_t lv_obj_get_style_bg_dither_mode(const struct _lv_obj_t *obj, uint32_t part) static inline const void *lv_obj_get_style_bg_img_src(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_bg_img_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_img_recolor(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_img_recolor_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_bg_img_recolor_opa(const struct _lv_obj_t *obj, uint32_t part) static inline bool lv_obj_get_style_bg_img_tiled(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_border_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_border_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_border_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_border_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_border_side_t lv_obj_get_style_border_side(const struct _lv_obj_t *obj, uint32_t part) static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_outline_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_outline_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_outline_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_outline_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_outline_pad(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_shadow_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_shadow_ofs_x(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_shadow_ofs_y(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_shadow_spread(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_shadow_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_line_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_line_dash_width(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_line_dash_gap(const struct _lv_obj_t *obj, uint32_t part) static inline bool lv_obj_get_style_line_rounded(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_line_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_line_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_line_opa(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_arc_width(const struct _lv_obj_t *obj, uint32_t part) static inline bool lv_obj_get_style_arc_rounded(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_arc_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_arc_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_arc_opa(const struct _lv_obj_t *obj, uint32_t part) static inline const void *lv_obj_get_style_arc_img_src(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_text_color(const struct _lv_obj_t *obj, uint32_t part) static inline lv_color_t lv_obj_get_style_text_color_filtered(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_text_opa(const struct _lv_obj_t *obj, uint32_t part) static inline const lv_font_t *lv_obj_get_style_text_font(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_text_letter_space(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_text_line_space(const struct _lv_obj_t *obj, uint32_t part) static inline lv_text_decor_t lv_obj_get_style_text_decor(const struct _lv_obj_t *obj, uint32_t part) static inline lv_text_align_t lv_obj_get_style_text_align(const struct _lv_obj_t *obj, uint32_t part) static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t *obj, uint32_t part) static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t *obj, uint32_t part) static inline const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t *obj, uint32_t part) static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t *obj, uint32_t part)
static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t *obj, uint32_t part) static inline const lv_style_transition_dsc_t *lv_obj_get_style_transition(const struct _lv_obj_t *obj, uint32_t part) static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t *obj, uint32_t part) static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t *obj, uint32_t part) static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t *obj, uint32_t part) void lv_obj_set_style_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_min_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_max_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_height(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_min_height(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_max_height(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_x(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_y(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_align(struct _lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) void lv_obj_set_style_transform_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_transform_height(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_translate_x(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_translate_y(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_transform_zoom(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_transform_angle(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_top(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_bottom(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_left(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_right(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_row(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_pad_column(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_grad_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_grad_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t *obj, lv_grad_dir_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_main_stop(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_grad(struct _lv_obj_t *obj, const lv_grad_dsc_t *value, lv_style_selector_t selector) void lv_obj_set_style_bg_dither_mode(struct _lv_obj_t *obj, lv_dither_mode_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_src(struct _lv_obj_t *obj, const void *value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_recolor_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t *obj, bool value, lv_style_selector_t selector) void lv_obj_set_style_border_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_border_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_border_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_border_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_border_side(struct _lv_obj_t *obj, lv_border_side_t value, lv_style_selector_t selector) void lv_obj_set_style_border_post(struct _lv_obj_t *obj, bool value, lv_style_selector_t selector) void lv_obj_set_style_outline_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_outline_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_outline_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_outline_pad(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_ofs_x(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_spread(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_shadow_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_img_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_img_recolor(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_line_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_line_dash_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_line_dash_gap(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_line_rounded(struct _lv_obj_t *obj, bool value, lv_style_selector_t selector) void lv_obj_set_style_line_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_line_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_line_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_arc_width(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_arc_rounded(struct _lv_obj_t *obj, bool value, lv_style_selector_t selector) void lv_obj_set_style_arc_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_arc_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_arc_img_src(struct _lv_obj_t *obj, const void *value, lv_style_selector_t selector) void lv_obj_set_style_text_color(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_text_color_filtered(struct _lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) void lv_obj_set_style_text_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_text_font(struct _lv_obj_t *obj, const lv_font_t *value, lv_style_selector_t selector) void lv_obj_set_style_text_letter_space(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_text_line_space(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_text_decor(struct _lv_obj_t *obj, lv_text_decor_t value, lv_style_selector_t selector) void lv_obj_set_style_text_align(struct _lv_obj_t *obj, lv_text_align_t value, lv_style_selector_t selector) void lv_obj_set_style_radius(struct _lv_obj_t *obj, lv_coord_t value, lv_style_selector_t selector) void lv_obj_set_style_clip_corner(struct _lv_obj_t *obj, bool value, lv_style_selector_t selector) void lv_obj_set_style_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t *obj, const lv_color_filter_dsc_t *value, lv_style_selector_t selector) void lv_obj_set_style_color_filter_opa(struct _lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector)
void lv_obj_set_style_anim_speed(struct _lv_obj_t *obj, uint32_t value, lv_style_selector_t selector) void lv_obj_set_style_transition(struct _lv_obj_t *obj, const lv_style_transition_dsc_t *value, lv_style_selector_t selector) void lv_obj_set_style_blend_mode(struct _lv_obj_t *obj, lv_blend_mode_t value, lv_style_selector_t selector) void lv_obj_set_style_layout(struct _lv_obj_t *obj, uint16_t value, lv_style_selector_t selector) void lv_obj_set_style_base_dir(struct _lv_obj_t *obj, lv_base_dir_t value, lv_style_selector_t selector)
void lv_style_set_width(lv_style_t *style, lv_coord_t value) void lv_style_set_min_width(lv_style_t *style, lv_coord_t value) void lv_style_set_max_width(lv_style_t *style, lv_coord_t value) void lv_style_set_height(lv_style_t *style, lv_coord_t value) void lv_style_set_min_height(lv_style_t *style, lv_coord_t value) void lv_style_set_max_height(lv_style_t *style, lv_coord_t value) void lv_style_set_x(lv_style_t *style, lv_coord_t value) void lv_style_set_y(lv_style_t *style, lv_coord_t value) void lv_style_set_align(lv_style_t *style, lv_align_t value) void lv_style_set_transform_width(lv_style_t *style, lv_coord_t value) void lv_style_set_transform_height(lv_style_t *style, lv_coord_t value) void lv_style_set_translate_x(lv_style_t *style, lv_coord_t value) void lv_style_set_translate_y(lv_style_t *style, lv_coord_t value) void lv_style_set_transform_zoom(lv_style_t *style, lv_coord_t value) void lv_style_set_transform_angle(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_top(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_bottom(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_left(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_right(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_row(lv_style_t *style, lv_coord_t value) void lv_style_set_pad_column(lv_style_t *style, lv_coord_t value) void lv_style_set_bg_color(lv_style_t *style, lv_color_t value) void lv_style_set_bg_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_bg_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_bg_grad_color(lv_style_t *style, lv_color_t value) void lv_style_set_bg_grad_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_bg_grad_dir(lv_style_t *style, lv_grad_dir_t value) void lv_style_set_bg_main_stop(lv_style_t *style, lv_coord_t value) void lv_style_set_bg_grad_stop(lv_style_t *style, lv_coord_t value) void lv_style_set_bg_grad(lv_style_t *style, const lv_grad_dsc_t *value) void lv_style_set_bg_dither_mode(lv_style_t *style, lv_dither_mode_t value) void lv_style_set_bg_img_src(lv_style_t *style, const void *value) void lv_style_set_bg_img_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_bg_img_recolor(lv_style_t *style, lv_color_t value) void lv_style_set_bg_img_recolor_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_bg_img_recolor_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_bg_img_tiled(lv_style_t *style, bool value) void lv_style_set_border_color(lv_style_t *style, lv_color_t value) void lv_style_set_border_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_border_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_border_width(lv_style_t *style, lv_coord_t value) void lv_style_set_border_side(lv_style_t *style, lv_border_side_t value) void lv_style_set_border_post(lv_style_t *style, bool value) void lv_style_set_outline_width(lv_style_t *style, lv_coord_t value) void lv_style_set_outline_color(lv_style_t *style, lv_color_t value) void lv_style_set_outline_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_outline_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_outline_pad(lv_style_t *style, lv_coord_t value) void lv_style_set_shadow_width(lv_style_t *style, lv_coord_t value) void lv_style_set_shadow_ofs_x(lv_style_t *style, lv_coord_t value) void lv_style_set_shadow_ofs_y(lv_style_t *style, lv_coord_t value) void lv_style_set_shadow_spread(lv_style_t *style, lv_coord_t value) void lv_style_set_shadow_color(lv_style_t *style, lv_color_t value) void lv_style_set_shadow_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_shadow_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_img_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_img_recolor(lv_style_t *style, lv_color_t value) void lv_style_set_img_recolor_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_img_recolor_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_line_width(lv_style_t *style, lv_coord_t value) void lv_style_set_line_dash_width(lv_style_t *style, lv_coord_t value) void lv_style_set_line_dash_gap(lv_style_t *style, lv_coord_t value) void lv_style_set_line_rounded(lv_style_t *style, bool value) void lv_style_set_line_color(lv_style_t *style, lv_color_t value) void lv_style_set_line_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_line_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_arc_width(lv_style_t *style, lv_coord_t value) void lv_style_set_arc_rounded(lv_style_t *style, bool value) void lv_style_set_arc_color(lv_style_t *style, lv_color_t value) void lv_style_set_arc_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_arc_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_arc_img_src(lv_style_t *style, const void *value) void lv_style_set_text_color(lv_style_t *style, lv_color_t value) void lv_style_set_text_color_filtered(lv_style_t *style, lv_color_t value) void lv_style_set_text_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_text_font(lv_style_t *style, const lv_font_t *value) void lv_style_set_text_letter_space(lv_style_t *style, lv_coord_t value) void lv_style_set_text_line_space(lv_style_t *style, lv_coord_t value) void lv_style_set_text_decor(lv_style_t *style, lv_text_decor_t value) void lv_style_set_text_align(lv_style_t *style, lv_text_align_t value) void lv_style_set_radius(lv_style_t *style, lv_coord_t value) void lv_style_set_clip_corner(lv_style_t *style, bool value) void lv_style_set_opa(lv_style_t *style, lv_opa_t value) void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) void lv_style_set_color_filter_opa(lv_style_t *style, lv_opa_t value)
void lv_style_set_anim_speed(lv_style_t *style, uint32_t value) void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) void lv_style_set_layout(lv_style_t *style, uint16_t value) void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) |