「App:Library:LVGL:docs:Widgets:Container (lv cont)」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
 
(同じ利用者による、間の5版が非表示)
7行目: 7行目:
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|The containers are essentially a basic object with layout and automatic sizing features.
|
+
|コンテナは、基本的にレイアウトと自動サイジング機能を備えた基本オブジェクトです。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
18行目: 18行目:
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|The containers has only a main style called <code style="color: #bb0000;">LV_CONT_PART_MAIN</code> and it can use all the typicaly bacground properties and padding for layout auto sizing.
|
+
|コンテナには、<code style="color: #bb0000;">LV_CONT_PART_MAIN</code>と呼ばれるメインスタイルのみがあり、レイアウトオートサイジングにはすべての典型的なバクグラウンドプロパティとパディングを使用できます。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
29行目: 29行目:
 
!英文
 
!英文
 
!自動翻訳
 
!自動翻訳
 +
|-
 +
|You can apply a layout on the containers to automatically order their children.
 +
 +
The layout spacing comes from the style's <code style="color: #bb0000;">pad</code> properties. The possible layout options:
 +
 +
* '''LV_LAYOUT_OFF''' - Do not align the children.
 +
* '''LV_LAYOUT_CENTER''' - Align children to the center in column and keep <code style="color: #bb0000;">pad_inner</code> space between them.
 +
* '''LV_LAYOUT_COLUMN_LEFT''' - Align children in a left-justified column. Keep <code style="color: #bb0000;">pad_left</code> space on the left, <code style="color: #bb0000;">pad_top</code> space on the top and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
* '''LV_LAYOUT_COLUMN_MID''' - Align children in centered column. Keep <code style="color: #bb0000;">pad_top</code> space on the top and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
* '''LV_LAYOUT_COLUMN_RIGHT''' - Align children in a right-justified column. Keep <code style="color: #bb0000;">pad_right</code> space on the right, <code style="color: #bb0000;">pad_top</code> space on the top and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
* '''LV_LAYOUT_ROW_TOP''' - Align children in a top justified row. Keep <code style="color: #bb0000;">pad_left</code> space on the left, <code style="color: #bb0000;">pad_top</code> space on the top and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
* '''LV_LAYOUT_ROW_MID''' - Align children in centered row. Keep <code style="color: #bb0000;">pad_left</code> space on the left and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
|コンテナに対してレイアウトを適用することで、子コンテナを自動的に並べることができます。
 +
 +
レイアウト間隔は、スタイルの<code style="color: #bb0000;">pad</code>プロパティに由来します。可能なレイアウトオプション:
 +
 +
* '''LV_LAYOUT_OFF'''-子供を調整しないでください。
 +
* '''LV_LAYOUT_CENTER'''-子供を列の中央に並べ、それらの間に<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_COLUMN_LEFT'''-左正当化された列に子供を調整します。左側に<code style="color: #bb0000;">pad_left</code>スペース、上部の<code style="color: #bb0000;">pad_top</code>スペース、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_COLUMN_MID'''-中央の列に子供を整列させます。上部に<code style="color: #bb0000;">pad_top</code>スペースを保ち、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_COLUMN_RIGHT'''-右正当化された列に子供を調整します。右側に<code style="color: #bb0000;">pad_right</code>スペース、上部の<code style="color: #bb0000;">pad_top</code>スペース、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_ROW_TOP'''-子どもを一番正当な列に合わせます。左側に<code style="color: #bb0000;">pad_left</code>スペース、上部の<code style="color: #bb0000;">pad_top</code>スペース、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_ROW_MID'''-中央の列に子供を調整します。左側に<code style="color: #bb0000;">pad_left</code>スペースを保持し、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 
|-
 
|-
 
|
 
|
 +
 +
 +
* '''LV_LAYOUT_ROW_BOTTOM''' - Align children in a bottom justified row. Keep <code style="color: #bb0000;">pad_left</code> space on the left, <code style="color: #bb0000;">pad_bottom</code> space on the bottom and <code style="color: #bb0000;">pad_inner</code> space between the children.
 +
* '''LV_LAYOUT_PRETTY_TOP''' - Put as many objects as possible in a row (with at least <code style="color: #bb0000;">pad_inner</code> space and <code style="color: #bb0000;">pad_left/right</code> space on the sides). Divide the space in each line equally between the children. If here are children with different height in a row align their top edge.
 +
* '''LV_LAYOUT_PRETTY_MID''' - Same as <code style="color: #bb0000;">LV_LAYOUT_PRETTY_TOP</code> but if here are children with different height in a row align their middle line.
 +
* '''LV_LAYOUT_PRETTY_BOTTOM''' - Same as <code style="color: #bb0000;">LV_LAYOUT_PRETTY_TOP</code> but if here are children with different height in a row align their bottom line.
 +
* '''LV_LAYOUT_GRID''' - Similar to <code style="color: #bb0000;">LV_LAYOUT_PRETTY</code> but not divide horizontal space equally just let <code style="color: #bb0000;">pad_left/right</code> on the edges and <code style="color: #bb0000;">pad_inner</code> space between the elements.
 
|
 
|
 +
* '''LV_LAYOUT_ROW_BOTTOM'''-下部の正当な列に子供を並べます。左側に<code style="color: #bb0000;">pad_left</code>スペース、底部に<code style="color: #bb0000;">pad_bottom</code>スペース、子供の間の<code style="color: #bb0000;">pad_inner</code>スペースを保持します。
 +
* '''LV_LAYOUT_PRETTY_TOP'''-できるだけ多くのオブジェクトを連続して配置します(少なくとも<code style="color: #bb0000;">pad_inner</code>スペースと側面にPAD_LEFT/右スペースがあります)。各ラインのスペースを子供の間で均等に分割します。ここに連続して身長が異なる子供が最上端を合わせている場合。
 +
* '''LV_LAYOUT_PRETTY_MID'''- <code style="color: #bb0000;">LV_LAYOUT_PRETTY_TOP</code>と同じですが、ここに連続してさまざまな高さの子供が中央の線を合わせます。
 +
* '''LV_LAYOUT_PRETTY_BOTTOM'''- <code style="color: #bb0000;">LV_LAYOUT_PRETTY_TOP</code>と同じですが、ここに連続してさまざまな高さの子供が最終的な線に合わせてください。
 +
* '''LV_LAYOUT_GRID''' - <code style="color: #bb0000;">LV_LAYOUT_PRETTY</code>と似ていますが、水平方向のスペースを均等に分割せず、エッジに <code style="color: #bb0000;">pad_left/right</code> を、要素間に <code style="color: #bb0000;">pad_inner</code> スペースを設定します。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
  
 
=== Autofit ===
 
=== Autofit ===
41行目: 75行目:
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|Container have an autofit feature which can automatically change the size of the container according to its children and/or its parent.
|
+
 
 +
The following options exist:
 +
 
 +
* '''LV_FIT_NONE''' - Do not change the size automatically.
 +
* '''LV_FIT_TIGHT''' - Shrink-wrap the container around all of its children, while keeping <code style="color: #bb0000;">pad_top/bottom/left/right</code> space on the edges.
 +
* '''LV_FIT_PARENT''' - Set the size to the parent's size minus <code style="color: #bb0000;">pad_top/bottom/left/right</code> (from the parent's style) space.
 +
* '''LV_FIT_MAX''' - Use <code style="color: #bb0000;">LV_FIT_PARENT</code> while smaller than the parent and <code style="color: #bb0000;">LV_FIT_TIGHT</code> when larger. It will ensure that the container is, at minimum, the size of its parent.
 +
 
 +
 
 +
To set the auto fit mode for all directions, use <code style="color: #bb0000;">lv_cont_set_fit(cont, LV_FIT_...)</code>.
 +
 
 +
To use different auto fit horizontally and vertically, use <code style="color: #bb0000;">lv_cont_set_fit2(cont, hor_fit_type, ver_fit_type)</code>. To use different auto fit in all 4 directions, use <code style="color: #bb0000;">lv_cont_set_fit4(cont, left_fit_type, right_fit_type, top_fit_type, bottom_fit_type)</code>.
 +
|コンテナには、子や親に応じてコンテナのサイズを自動的に変更できるオートフィット機能があります。
 +
 
 +
次のオプションが存在します:
 +
 
 +
* '''LV_FIT_NONE'''-サイズを自動的に変更しないでください。
 +
* '''LV_FIT_TIGHT'''-すべての子の周りにコンテナを縮小します。
 +
* '''LV_FIT_PARENT'''-サイズを親のサイズにマイナスpad_top/bottom/左/右(親のスタイルから)に設定します。
 +
* '''LV_FIT_MAX'''  -lv_fit_parentを使用して、親よりも小さく、lv_fit_tightが大きいときは使用します。 コンテナが少なくともその親のサイズであることを保証します。
 +
 
 +
 
 +
すべての方向に自動フィットモードを設定するには、lv_cont_set_fit(cont、lv_fit _...)を使用します。
 +
 
 +
さまざまな自動適合を水平および垂直に使用するには、lv_cont_set_fit2(cont、hor_fit_type、ver_fit_type)を使用します。 4つの方向すべてで異なるオートフィットを使用するには、lv_cont_set_fit4(cont、left_fit_type、right_fit_type、top_fit_type、botond_fit_type)を使用します。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
52行目: 110行目:
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|Only the [https://docs.lvgl.io/latest/en/html/overview/event.html#generic-events <u>Generic events</u>] are sent by the object type.
|
+
 
 +
 
 +
Learn more about [https://docs.lvgl.io/latest/en/html/overview/event.html <u>Events</u>].
 +
|オブジェクトタイプでは、[https://docs.lvgl.io/latest/en/html/overview/event.html#generic-events <u>Generic events</u>]のみが送信されます。
 +
 
 +
 
 +
[https://docs.lvgl.io/latest/en/html/overview/event.html <u>イベント</u>]についての詳細はこちら。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
62行目: 126行目:
 
!自動翻訳
 
!自動翻訳
 
|-
 
|-
|
+
|No ''Keys'' are processed by the object type.
|
+
 
 +
 
 +
Learn more about [https://docs.lvgl.io/latest/en/html/overview/indev.html <u>Keys</u>].
 +
|オブジェクトタイプで処理されるキーはありません。
 +
 
 +
 
 +
[https://docs.lvgl.io/latest/en/html/overview/indev.html <u>キー</u>]の詳細をご覧ください。
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
72行目: 142行目:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
|[[ファイル:LVGL Lib docs Container.png|サムネイル]]
+
|[[file:LVGL Lib docs Container.png|link=https://docs.lvgl.io/latest/en/html/widgets/cont.html#container-with-auto-fit]]
 
|}
 
|}
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]
 
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]]

2022年8月31日 (水) 16:11時点における最新版

https://docs.lvgl.io/latest/en/html/widgets/cont.html

Container (lv_cont)

Overview

英文 自動翻訳
The containers are essentially a basic object with layout and automatic sizing features. コンテナは、基本的にレイアウトと自動サイジング機能を備えた基本オブジェクトです。
戻る : Previous


Parts and Styles

英文 自動翻訳
The containers has only a main style called LV_CONT_PART_MAIN and it can use all the typicaly bacground properties and padding for layout auto sizing. コンテナには、LV_CONT_PART_MAINと呼ばれるメインスタイルのみがあり、レイアウトオートサイジングにはすべての典型的なバクグラウンドプロパティとパディングを使用できます。
戻る : Previous


Usage

Layout

英文 自動翻訳
You can apply a layout on the containers to automatically order their children.

The layout spacing comes from the style's pad properties. The possible layout options:

  • LV_LAYOUT_OFF - Do not align the children.
  • LV_LAYOUT_CENTER - Align children to the center in column and keep pad_inner space between them.
  • LV_LAYOUT_COLUMN_LEFT - Align children in a left-justified column. Keep pad_left space on the left, pad_top space on the top and pad_inner space between the children.
  • LV_LAYOUT_COLUMN_MID - Align children in centered column. Keep pad_top space on the top and pad_inner space between the children.
  • LV_LAYOUT_COLUMN_RIGHT - Align children in a right-justified column. Keep pad_right space on the right, pad_top space on the top and pad_inner space between the children.
  • LV_LAYOUT_ROW_TOP - Align children in a top justified row. Keep pad_left space on the left, pad_top space on the top and pad_inner space between the children.
  • LV_LAYOUT_ROW_MID - Align children in centered row. Keep pad_left space on the left and pad_inner space between the children.
コンテナに対してレイアウトを適用することで、子コンテナを自動的に並べることができます。

レイアウト間隔は、スタイルのpadプロパティに由来します。可能なレイアウトオプション:

  • LV_LAYOUT_OFF-子供を調整しないでください。
  • LV_LAYOUT_CENTER-子供を列の中央に並べ、それらの間にpad_innerスペースを保持します。
  • LV_LAYOUT_COLUMN_LEFT-左正当化された列に子供を調整します。左側にpad_leftスペース、上部のpad_topスペース、子供の間のpad_innerスペースを保持します。
  • LV_LAYOUT_COLUMN_MID-中央の列に子供を整列させます。上部にpad_topスペースを保ち、子供の間のpad_innerスペースを保持します。
  • LV_LAYOUT_COLUMN_RIGHT-右正当化された列に子供を調整します。右側にpad_rightスペース、上部のpad_topスペース、子供の間のpad_innerスペースを保持します。
  • LV_LAYOUT_ROW_TOP-子どもを一番正当な列に合わせます。左側にpad_leftスペース、上部のpad_topスペース、子供の間のpad_innerスペースを保持します。
  • LV_LAYOUT_ROW_MID-中央の列に子供を調整します。左側にpad_leftスペースを保持し、子供の間のpad_innerスペースを保持します。


  • LV_LAYOUT_ROW_BOTTOM - Align children in a bottom justified row. Keep pad_left space on the left, pad_bottom space on the bottom and pad_inner space between the children.
  • LV_LAYOUT_PRETTY_TOP - Put as many objects as possible in a row (with at least pad_inner space and pad_left/right space on the sides). Divide the space in each line equally between the children. If here are children with different height in a row align their top edge.
  • LV_LAYOUT_PRETTY_MID - Same as LV_LAYOUT_PRETTY_TOP but if here are children with different height in a row align their middle line.
  • LV_LAYOUT_PRETTY_BOTTOM - Same as LV_LAYOUT_PRETTY_TOP but if here are children with different height in a row align their bottom line.
  • LV_LAYOUT_GRID - Similar to LV_LAYOUT_PRETTY but not divide horizontal space equally just let pad_left/right on the edges and pad_inner space between the elements.
  • LV_LAYOUT_ROW_BOTTOM-下部の正当な列に子供を並べます。左側にpad_leftスペース、底部にpad_bottomスペース、子供の間のpad_innerスペースを保持します。
  • LV_LAYOUT_PRETTY_TOP-できるだけ多くのオブジェクトを連続して配置します(少なくともpad_innerスペースと側面にPAD_LEFT/右スペースがあります)。各ラインのスペースを子供の間で均等に分割します。ここに連続して身長が異なる子供が最上端を合わせている場合。
  • LV_LAYOUT_PRETTY_MID- LV_LAYOUT_PRETTY_TOPと同じですが、ここに連続してさまざまな高さの子供が中央の線を合わせます。
  • LV_LAYOUT_PRETTY_BOTTOM- LV_LAYOUT_PRETTY_TOPと同じですが、ここに連続してさまざまな高さの子供が最終的な線に合わせてください。
  • LV_LAYOUT_GRID - LV_LAYOUT_PRETTYと似ていますが、水平方向のスペースを均等に分割せず、エッジに pad_left/right を、要素間に pad_inner スペースを設定します。
戻る : Previous

Autofit

英文 自動翻訳
Container have an autofit feature which can automatically change the size of the container according to its children and/or its parent.

The following options exist:

  • LV_FIT_NONE - Do not change the size automatically.
  • LV_FIT_TIGHT - Shrink-wrap the container around all of its children, while keeping pad_top/bottom/left/right space on the edges.
  • LV_FIT_PARENT - Set the size to the parent's size minus pad_top/bottom/left/right (from the parent's style) space.
  • LV_FIT_MAX - Use LV_FIT_PARENT while smaller than the parent and LV_FIT_TIGHT when larger. It will ensure that the container is, at minimum, the size of its parent.


To set the auto fit mode for all directions, use lv_cont_set_fit(cont, LV_FIT_...).

To use different auto fit horizontally and vertically, use lv_cont_set_fit2(cont, hor_fit_type, ver_fit_type). To use different auto fit in all 4 directions, use lv_cont_set_fit4(cont, left_fit_type, right_fit_type, top_fit_type, bottom_fit_type).

コンテナには、子や親に応じてコンテナのサイズを自動的に変更できるオートフィット機能があります。

次のオプションが存在します:

  • LV_FIT_NONE-サイズを自動的に変更しないでください。
  • LV_FIT_TIGHT-すべての子の周りにコンテナを縮小します。
  • LV_FIT_PARENT-サイズを親のサイズにマイナスpad_top/bottom/左/右(親のスタイルから)に設定します。
  • LV_FIT_MAX -lv_fit_parentを使用して、親よりも小さく、lv_fit_tightが大きいときは使用します。 コンテナが少なくともその親のサイズであることを保証します。


すべての方向に自動フィットモードを設定するには、lv_cont_set_fit(cont、lv_fit _...)を使用します。

さまざまな自動適合を水平および垂直に使用するには、lv_cont_set_fit2(cont、hor_fit_type、ver_fit_type)を使用します。 4つの方向すべてで異なるオートフィットを使用するには、lv_cont_set_fit4(cont、left_fit_type、right_fit_type、top_fit_type、botond_fit_type)を使用します。

戻る : Previous


Events

英文 自動翻訳
Only the Generic events are sent by the object type.


Learn more about Events.

オブジェクトタイプでは、Generic eventsのみが送信されます。


イベントについての詳細はこちら。

戻る : Previous

Keys

英文 自動翻訳
No Keys are processed by the object type.


Learn more about Keys.

オブジェクトタイプで処理されるキーはありません。


キーの詳細をご覧ください。

戻る : Previous


Example

Container with auto-fit

LVGL Lib docs Container.png
戻る : Previous

API

戻る : Previous