docs: bring back flat widget directory structure
This commit is contained in:
@@ -202,7 +202,7 @@ If you don't want to speak about your project publicly, feel free to use [Contac
|
||||
### Write examples
|
||||
As you learn LVGL you will probably play with the features of widgets. Why not publish your experiments?
|
||||
|
||||
Each widgets' documentation contains examples. For instance, here are the examples of the [Drop-down list](/widgets/core/dropdown#examples) widget.
|
||||
Each widgets' documentation contains examples. For instance, here are the examples of the [Drop-down list](/widgets/dropdown#examples) widget.
|
||||
The examples are directly loaded from the [lvgl/examples](https://github.com/lvgl/lvgl/tree/master/examples) folder.
|
||||
|
||||
So all you need to do is send a [Pull request](#pull-request) to the [lvgl](https://github.com/lvgl/lvgl) repository and follow some conventions:
|
||||
|
||||
@@ -152,7 +152,7 @@ To learn all features of the events go to the [Event overview](/overview/event)
|
||||
|
||||
### Parts
|
||||
Widgets might be built from one or more *parts*. For example, a button has only one part called `LV_PART_MAIN`.
|
||||
However, a [Slider](/widgets/core/slider) has `LV_PART_MAIN`, `LV_PART_INDICATOR` and `LV_PART_KNOB`.
|
||||
However, a [Slider](/widgets/slider) has `LV_PART_MAIN`, `LV_PART_INDICATOR` and `LV_PART_KNOB`.
|
||||
|
||||
By using parts you can apply different styles to sub-elements of a widget. (See below)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ It doesn't matter how the children are positioned, as only the current x and y c
|
||||
This means that gridnav works with manually positioned children, as well as [Flex](/layouts/flex) and [Grid](/layouts/grid) layouts.
|
||||
|
||||
Gridnav also works if the children are arranged into a single row or column.
|
||||
That makes it useful, for example, to simplify navigation on a [List widget](/widgets/extra/list).
|
||||
That makes it useful, for example, to simplify navigation on a [List widget](/widgets/list).
|
||||
|
||||
Gridnav assumes that the object to which gridnav is added is part of a [group](/overview/indev.html#groups).
|
||||
This way, if the object with gridnav is focused, the arrow key presses are automatically forwarded to the object
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
Pinyin IME provides API to provide Chinese Pinyin input method (Chinese input) for keyboard object, which supports 26 key and 9 key input modes. You can think of `lv_ime_pinyin` as a Pinyin input method plug-in for keyboard objects.
|
||||
|
||||
Normally, an environment where [lv_keyboard](/widgets/extra/keyboard) can run can also run `lv_ime_pinyin`. There are two main influencing factors: the size of the font file and the size of the dictionary.
|
||||
Normally, an environment where [lv_keyboard](/widgets/keyboard) can run can also run `lv_ime_pinyin`. There are two main influencing factors: the size of the font file and the size of the dictionary.
|
||||
|
||||
<details>
|
||||
<summary>中文</summary>
|
||||
<p>
|
||||
|
||||
`lv_ime_pinyin`为[键盘](/widgets/extra/keyboard)组件提供汉语拼音输入法(中文输入)的功能(后文简称为拼音输入法),支持26键和9键输入模式。您可以将 `lv_ime_pinyin` 看成是键盘组件的汉语拼音输入法插件。
|
||||
`lv_ime_pinyin`为[键盘](/widgets/keyboard)组件提供汉语拼音输入法(中文输入)的功能(后文简称为拼音输入法),支持26键和9键输入模式。您可以将 `lv_ime_pinyin` 看成是键盘组件的汉语拼音输入法插件。
|
||||
|
||||
一般情况下,只要是[键盘](/widgets/extra/keyboard)组件能运行的环境 `lv_ime_pinyin` 也能运行。有两个影响因素:字库的大小和词库的大小。
|
||||
一般情况下,只要是[键盘](/widgets/keyboard)组件能运行的环境 `lv_ime_pinyin` 也能运行。有两个影响因素:字库的大小和词库的大小。
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
@@ -47,7 +47,7 @@ Be sure not to confuse displays and screens:
|
||||
Screens can be considered the highest level containers which have no parent.
|
||||
A screen's size is always equal to its display and their origin is (0;0). Therefore, a screen's coordinates can't be changed, i.e. `lv_obj_set_pos()`, `lv_obj_set_size()` or similar functions can't be used on screens.
|
||||
|
||||
A screen can be created from any object type but the two most typical types are [Base object](/widgets/obj) and [Image](/widgets/core/img) (to create a wallpaper).
|
||||
A screen can be created from any object type but the two most typical types are [Base object](/widgets/obj) and [Image](/widgets/img) (to create a wallpaper).
|
||||
|
||||
To create a screen, use `lv_obj_t * scr = lv_<type>_create(NULL, copy)`. `copy` can be an existing screen copied into the new screen.
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Although widgets can be easily customized by styles there might be cases when so
|
||||
To ensure a great level of flexibility LVGL sends a lot of events during drawing with parameters that tell what LVGL is about to draw.
|
||||
Some fields of these parameters can be modified to draw something else or any custom drawing operations can be added manually.
|
||||
|
||||
A good use case for this is the [Button matrix](/widgets/core/btnmatrix) widget. By default, its buttons can be styled in different states, but you can't style the buttons one by one.
|
||||
A good use case for this is the [Button matrix](/widgets/btnmatrix) widget. By default, its buttons can be styled in different states, but you can't style the buttons one by one.
|
||||
However, an event is sent for every button and you can, for example, tell LVGL to use different colors on a specific button or to manually draw an image on some buttons.
|
||||
|
||||
Each of these events is described in detail below.
|
||||
|
||||
@@ -110,7 +110,7 @@ lv_fs_dir_close(&dir);
|
||||
|
||||
## Use drives for images
|
||||
|
||||
[Image](/widgets/core/img) objects can be opened from files too (besides variables stored in the compiled program).
|
||||
[Image](/widgets/img) objects can be opened from files too (besides variables stored in the compiled program).
|
||||
|
||||
To use files in image widgets the following callbacks are required:
|
||||
- open
|
||||
|
||||
@@ -104,11 +104,11 @@ static lv_img_dsc_t my_img_dsc = {
|
||||
|
||||
If the color format is `LV_IMG_CF_TRUE_COLOR_ALPHA` you can set `data_size` like `80 * 60 * LV_IMG_PX_SIZE_ALPHA_BYTE`.
|
||||
|
||||
Another (possibly simpler) option to create and display an image at run-time is to use the [Canvas](/widgets/core/canvas) object.
|
||||
Another (possibly simpler) option to create and display an image at run-time is to use the [Canvas](/widgets/canvas) object.
|
||||
|
||||
### Use images
|
||||
|
||||
The simplest way to use an image in LVGL is to display it with an [lv_img](/widgets/core/img) object:
|
||||
The simplest way to use an image in LVGL is to display it with an [lv_img](/widgets/img) object:
|
||||
|
||||
```c
|
||||
lv_obj_t * icon = lv_img_create(lv_scr_act(), NULL);
|
||||
|
||||
@@ -72,8 +72,8 @@ You can fully control the user interface without a touchpad or mouse by using a
|
||||
|
||||
Objects you want to control with a keypad or encoder need to be added to a *Group*.
|
||||
In every group there is exactly one focused object which receives the pressed keys or the encoder actions.
|
||||
For example, if a [Text area](/widgets/core/textarea) is focused and you press some letter on a keyboard, the keys will be sent and inserted into the text area.
|
||||
Similarly, if a [Slider](/widgets/core/slider) is focused and you press the left or right arrows, the slider's value will be changed.
|
||||
For example, if a [Text area](/widgets/textarea) is focused and you press some letter on a keyboard, the keys will be sent and inserted into the text area.
|
||||
Similarly, if a [Slider](/widgets/slider) is focused and you press the left or right arrows, the slider's value will be changed.
|
||||
|
||||
You need to associate an input device with a group. An input device can send key events to only one group but a group can receive data from more than one input device.
|
||||
|
||||
@@ -90,11 +90,11 @@ There are some predefined keys which have special meaning:
|
||||
- **LV_KEY_DOWN** Decrease value or move downwards
|
||||
- **LV_KEY_RIGHT** Increase value or move to the right
|
||||
- **LV_KEY_LEFT** Decrease value or move to the left
|
||||
- **LV_KEY_ESC** Close or exit (E.g. close a [Drop down list](/widgets/core/dropdown))
|
||||
- **LV_KEY_DEL** Delete (E.g. a character on the right in a [Text area](/widgets/core/textarea))
|
||||
- **LV_KEY_BACKSPACE** Delete a character on the left (E.g. in a [Text area](/widgets/core/textarea))
|
||||
- **LV_KEY_HOME** Go to the beginning/top (E.g. in a [Text area](/widgets/core/textarea))
|
||||
- **LV_KEY_END** Go to the end (E.g. in a [Text area](/widgets/core/textarea))
|
||||
- **LV_KEY_ESC** Close or exit (E.g. close a [Drop down list](/widgets/dropdown))
|
||||
- **LV_KEY_DEL** Delete (E.g. a character on the right in a [Text area](/widgets/textarea))
|
||||
- **LV_KEY_BACKSPACE** Delete a character on the left (E.g. in a [Text area](/widgets/textarea))
|
||||
- **LV_KEY_HOME** Go to the beginning/top (E.g. in a [Text area](/widgets/textarea))
|
||||
- **LV_KEY_END** Go to the end (E.g. in a [Text area](/widgets/textarea))
|
||||
|
||||
The most important special keys are `LV_KEY_NEXT/PREV`, `LV_KEY_ENTER` and `LV_KEY_UP/DOWN/LEFT/RIGHT`.
|
||||
In your `read_cb` function, you should translate some of your keys to these special keys to support navigation in a group and interact with selected objects.
|
||||
@@ -112,7 +112,7 @@ Pressing `LV_KEY_ENTER` will change to *Edit* mode.
|
||||
|
||||
In *Edit* mode, `LV_KEY_NEXT/PREV` is usually used to modify an object.
|
||||
Depending on the object's type, a short or long press of `LV_KEY_ENTER` changes back to *Navigate* mode.
|
||||
Usually, an object which cannot be pressed (like a [Slider](/widgets/core/slider)) leaves *Edit* mode upon a short click. But with objects where a short click has meaning (e.g. [Button](/widgets/core/btn)), a long press is required.
|
||||
Usually, an object which cannot be pressed (like a [Slider](/widgets/slider)) leaves *Edit* mode upon a short click. But with objects where a short click has meaning (e.g. [Button](/widgets/btn)), a long press is required.
|
||||
|
||||
#### Default group
|
||||
Interactive widgets - such as buttons, checkboxes, sliders, etc. - can be automatically added to a default group.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Objects
|
||||
|
||||
In LVGL the **basic building blocks** of a user interface are the objects, also called *Widgets*.
|
||||
For example a [Button](/widgets/core/btn), [Label](/widgets/core/label), [Image](/widgets/core/img), [List](/widgets/extra/list), [Chart](/widgets/extra/chart) or [Text area](/widgets/core/textarea).
|
||||
For example a [Button](/widgets/btn), [Label](/widgets/label), [Image](/widgets/img), [List](/widgets/list), [Chart](/widgets/chart) or [Text area](/widgets/textarea).
|
||||
|
||||
You can see all the [Object types](/widgets/index) here.
|
||||
|
||||
@@ -179,7 +179,7 @@ Visit [Multi-display support](/overview/display) to learn more.
|
||||
|
||||
## Parts
|
||||
|
||||
The widgets are built from multiple parts. For example a [Base object](/widgets/obj) uses the main and scrollbar parts but a [Slider](/widgets/core/slider) uses the main, indicator and knob parts.
|
||||
The widgets are built from multiple parts. For example a [Base object](/widgets/obj) uses the main and scrollbar parts but a [Slider](/widgets/slider) uses the main, indicator and knob parts.
|
||||
Parts are similar to *pseudo-elements* in CSS.
|
||||
|
||||
The following predefined parts exist in LVGL:
|
||||
|
||||
@@ -117,7 +117,7 @@ The following predefined parts exist in LVGL:
|
||||
- `LV_PART_CUSTOM_FIRST` Custom part identifiers can be added starting from here.
|
||||
|
||||
|
||||
For example a [Slider](/widgets/core/slider) has three parts:
|
||||
For example a [Slider](/widgets/slider) has three parts:
|
||||
- Background
|
||||
- Indicator
|
||||
- Knob
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Button Matrix object is a lightweight way to display multiple buttons in rows and columns. Lightweight because the buttons are not actually created but just virtually drawn on the fly. This way, one button use only eight extra bytes of memory instead of the ~100-150 bytes a normal [Button](/widgets/core/btn) object plus the 100 or so bytes for the [Label](/widgets/core/label) object.
|
||||
The Button Matrix object is a lightweight way to display multiple buttons in rows and columns. Lightweight because the buttons are not actually created but just virtually drawn on the fly. This way, one button use only eight extra bytes of memory instead of the ~100-150 bytes a normal [Button](/widgets/btn) object plus the 100 or so bytes for the [Label](/widgets/label) object.
|
||||
|
||||
The Button matrix is added to the default group (if one is set). Besides the Button matrix is an editable object to allow selecting and clicking the buttons with encoder navigation too.
|
||||
|
||||
@@ -13,7 +13,7 @@ The Calendar is added to the default group (if it is set). Calendar is an editab
|
||||
To make the Calendar flexible, by default it doesn't show the current year or month. Instead, there are optional "headers" that can be attached to the calendar.
|
||||
|
||||
## Parts and Styles
|
||||
The calendar object uses the [Button matrix](/widgets/core/btnmatrix) object under the hood to arrange the days into a matrix.
|
||||
The calendar object uses the [Button matrix](/widgets/btnmatrix) object under the hood to arrange the days into a matrix.
|
||||
- `LV_PART_MAIN` The background of the calendar. Uses all the background related style properties.
|
||||
- `LV_PART_ITEMS` Refers to the dates and day names. Button matrix control flags are set to differentiate the buttons and a custom drawer event is added modify the properties of the buttons as follows:
|
||||
- day names have no border, no background and drawn with a gray color
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
A Canvas inherits from [Image](/widgets/core/img) where the user can draw anything.
|
||||
A Canvas inherits from [Image](/widgets/img) where the user can draw anything.
|
||||
Rectangles, texts, images, lines, arcs can be drawn here using lvgl's drawing engine.
|
||||
Additionally "effects" can be applied, such as rotation, zoom and blur.
|
||||
|
||||
@@ -77,7 +77,7 @@ A given area of the canvas can be blurred horizontally with `lv_canvas_blur_hor(
|
||||
No special events are sent by canvas objects.
|
||||
The same events are sent as for the
|
||||
|
||||
See the events of the [Images](/widgets/core/img) too.
|
||||
See the events of the [Images](/widgets/img) too.
|
||||
|
||||
Learn more about [Events](/overview/event).
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Core widgets
|
||||
|
||||
```eval_rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
arc
|
||||
bar
|
||||
btn
|
||||
btnmatrix
|
||||
canvas
|
||||
checkbox
|
||||
dropdown
|
||||
img
|
||||
label
|
||||
line
|
||||
roller
|
||||
slider
|
||||
switch
|
||||
table
|
||||
textarea
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Extra widgets
|
||||
|
||||
```eval_rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
animimg
|
||||
calendar
|
||||
chart
|
||||
colorwheel
|
||||
imgbtn
|
||||
keyboard
|
||||
led
|
||||
list
|
||||
menu
|
||||
meter
|
||||
msgbox
|
||||
span
|
||||
spinbox
|
||||
spinner
|
||||
tabview
|
||||
tileview
|
||||
win
|
||||
```
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ To use external files, you also need to convert the image files using the online
|
||||
You also need to use LVGL's file system module and register a driver with some functions for the basic file operation. Go to the [File system](/overview/file-system) to learn more.
|
||||
To set an image sourced from a file, use `lv_img_set_src(img, "S:folder1/my_img.bin")`.
|
||||
|
||||
You can also set a symbol similarly to [Labels](/widgets/core/label). In this case, the image will be rendered as text according to the *font* specified in the style. It enables to use of light-weight monochrome "letters" instead of real images. You can set symbol like `lv_img_set_src(img1, LV_SYMBOL_OK)`.
|
||||
You can also set a symbol similarly to [Labels](/widgets/label). In this case, the image will be rendered as text according to the *font* specified in the style. It enables to use of light-weight monochrome "letters" instead of real images. You can set symbol like `lv_img_set_src(img1, LV_SYMBOL_OK)`.
|
||||
|
||||
### Label as an image
|
||||
Images and labels are sometimes used to convey the same thing. For example, to describe what a button does.
|
||||
@@ -16,7 +16,7 @@ You can set a left, right and center image, and the center image will be repeate
|
||||
### Image sources
|
||||
To set the image in a state, use the `lv_imgbtn_set_src(imgbtn, LV_IMGBTN_STATE_..., src_left, src_center, src_right)`.
|
||||
|
||||
The image sources work the same as described in the [Image object](/widgets/core/img) except that "Symbols" are not supported by the Image button.
|
||||
The image sources work the same as described in the [Image object](/widgets/img) except that "Symbols" are not supported by the Image button.
|
||||
Any of the sources can `NULL`.
|
||||
|
||||
The possible states are:
|
||||
@@ -6,8 +6,39 @@
|
||||
:maxdepth: 1
|
||||
|
||||
obj
|
||||
core/index
|
||||
extra/index
|
||||
arc
|
||||
animimg
|
||||
bar
|
||||
btn
|
||||
btnmatrix
|
||||
calendar
|
||||
chart
|
||||
colorwheel
|
||||
canvas
|
||||
checkbox
|
||||
dropdown
|
||||
img
|
||||
imgbtn
|
||||
keyboard
|
||||
label
|
||||
led
|
||||
line
|
||||
list
|
||||
menu
|
||||
meter
|
||||
msgbox
|
||||
roller
|
||||
slider
|
||||
span
|
||||
spinbox
|
||||
spinner
|
||||
switch
|
||||
table
|
||||
tabview
|
||||
textarea
|
||||
tileview
|
||||
win
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Keyboard object is a special [Button matrix](/widgets/core/btnmatrix) with predefined keymaps and other features to realize a virtual keyboard to write texts into a [Text area](/widgets/core/textarea).
|
||||
The Keyboard object is a special [Button matrix](/widgets/btnmatrix) with predefined keymaps and other features to realize a virtual keyboard to write texts into a [Text area](/widgets/textarea).
|
||||
|
||||
## Parts and Styles
|
||||
Similarly to Button matrices Keyboards consist of 2 part:
|
||||
@@ -26,7 +26,7 @@ The `TEXT` modes' layout contains buttons to change mode.
|
||||
To set the mode manually, use `lv_keyboard_set_mode(kb, mode)`. The default mode is `LV_KEYBOARD_MODE_TEXT_UPPER`.
|
||||
|
||||
### Assign Text area
|
||||
You can assign a [Text area](/widgets/core/textarea) to the Keyboard to automatically put the clicked characters there.
|
||||
You can assign a [Text area](/widgets/textarea) to the Keyboard to automatically put the clicked characters there.
|
||||
To assign the text area, use `lv_keyboard_set_textarea(kb, ta)`.
|
||||
|
||||
### Key Popovers
|
||||
@@ -37,7 +37,7 @@ Note that popovers for keys in the top row will draw outside the widget boundari
|
||||
The popovers currently are merely a visual effect and don't allow selecting additional characters such as accents yet.
|
||||
|
||||
### New Keymap
|
||||
You can specify a new map (layout) for the keyboard with `lv_keyboard_set_map(kb, LV_KEYBOARD_MODE_..., kb_map, kb_ctrl);`. See the [Button matrix](/widgets/core/btnmatrix) for more information about creating new maps a ctrls.
|
||||
You can specify a new map (layout) for the keyboard with `lv_keyboard_set_map(kb, LV_KEYBOARD_MODE_..., kb_map, kb_ctrl);`. See the [Button matrix](/widgets/btnmatrix) for more information about creating new maps a ctrls.
|
||||
|
||||
Keep in mind that using following keywords will have the same effect as with the original map:
|
||||
- `LV_SYMBOL_OK` Send `LV_EVENT_RADY` to the assigend Text area.
|
||||
@@ -48,7 +48,7 @@ This feature can be enabled individually for each label by `lv_label_set_recolor
|
||||
|
||||
### Text selection
|
||||
If enabled by `LV_LABEL_TEXT_SELECTION` part of the text can be selected. It's similar to when you use your mouse on a PC to select a text.
|
||||
The whole mechanism (click and select the text as you drag your finger/mouse) is implemented in [Text area](/widgets/core/textarea) and the Label widget only allows manual text selection with
|
||||
The whole mechanism (click and select the text as you drag your finger/mouse) is implemented in [Text area](/widgets/textarea) and the Label widget only allows manual text selection with
|
||||
`lv_label_get_text_selection_start(label, start_char_index)` and `lv_label_get_text_selection_start(label, end_char_index)`.
|
||||
|
||||
### Very long texts
|
||||
@@ -10,7 +10,7 @@ The List is basically a rectangle with vertical layout to which Buttons and Text
|
||||
- `LV_PART_SCROLLBAR` The scrollbar. See the [Base objects](/widgets/obj) documentation for details.
|
||||
|
||||
**Buttons and Texts**
|
||||
See the [Button](/widgets/core/btn)'s and [Label](/widgets/core/label)'s documentation.
|
||||
See the [Button](/widgets/btn)'s and [Label](/widgets/label)'s documentation.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -7,13 +7,13 @@ The menu widget can be used to easily create multi-level menus. It handles the t
|
||||
The menu widget is built from the following objects:
|
||||
- Main container: lv_menu_main_cont
|
||||
- Main header: lv_menu_main_header_cont
|
||||
- Back btn: [lv_btn](/widgets/core/btn)
|
||||
- Back btn icon: [lv_img](/widgets/core/img)
|
||||
- Back btn: [lv_btn](/widgets/btn)
|
||||
- Back btn icon: [lv_img](/widgets/img)
|
||||
- Main page: lv_menu_page
|
||||
- Sidebar container: lv_menu_sidebar_cont
|
||||
- Sidebar header: lv_menu_sidebar_header_cont
|
||||
- Back btn: [lv_btn](/widgets/core/btn)
|
||||
- Back btn icon: [lv_img](/widgets/core/img)
|
||||
- Back btn: [lv_btn](/widgets/btn)
|
||||
- Back btn icon: [lv_img](/widgets/img)
|
||||
- Sidebar page: lv_menu_page
|
||||
|
||||
## Usage
|
||||
@@ -11,9 +11,9 @@ The message box can be modal (blocking clicks on the rest of the screen) or not
|
||||
## Parts and Styles
|
||||
The message box is built from other widgets, so you can check these widgets' documentation for details.
|
||||
- Background: [lv_obj](/widgets/obj)
|
||||
- Close button: [lv_btn](/widgets/core/btn)
|
||||
- Title and text: [lv_label](/widgets/core/label)
|
||||
- Buttons: [lv_btnmatrix](/widgets/core/btnmatrix)
|
||||
- Close button: [lv_btn](/widgets/btn)
|
||||
- Title and text: [lv_label](/widgets/label)
|
||||
- Buttons: [lv_btnmatrix](/widgets/btnmatrix)
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Slider object looks like a [Bar](/widgets/core/bar) supplemented with a knob. The knob can be dragged to set a value. Just like Bar, Slider can be vertical or horizontal.
|
||||
The Slider object looks like a [Bar](/widgets/bar) supplemented with a knob. The knob can be dragged to set a value. Just like Bar, Slider can be vertical or horizontal.
|
||||
|
||||
|
||||
## Parts and Styles
|
||||
@@ -46,7 +46,7 @@ The extended click area (set by `lv_obj_set_ext_click_area(slider, value)`) incr
|
||||
- `rect_dsc`
|
||||
- `id`: 1
|
||||
|
||||
See the events of the [Bar](/widgets/core/bar) too.
|
||||
See the events of the [Bar](/widgets/bar) too.
|
||||
|
||||
Learn more about [Events](/overview/event).
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
## Overview
|
||||
The Spinbox contains a number as text which can be increased or decreased by *Keys* or API functions.
|
||||
Under the hood the Spinbox is a modified [Text area](/widgets/core/textarea).
|
||||
Under the hood the Spinbox is a modified [Text area](/widgets/textarea).
|
||||
|
||||
## Parts and Styles
|
||||
The parts of the Spinbox are identical to the [Text area](/widgets/core/textarea).
|
||||
The parts of the Spinbox are identical to the [Text area](/widgets/textarea).
|
||||
|
||||
### Value, range and step
|
||||
`lv_spinbox_set_value(spinbox, 1234)` sets a new value on the Spinbox.
|
||||
@@ -31,7 +31,7 @@ If an encoder is used as input device, the selected digit is shifted to the righ
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent when the value has changed.
|
||||
|
||||
See the events of the [Text area](/widgets/core/textarea) too.
|
||||
See the events of the [Text area](/widgets/textarea) too.
|
||||
|
||||
Learn more about [Events](/overview/event).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
The Spinner object is a spinning arc over a ring.
|
||||
|
||||
## Parts and Styles
|
||||
The parts are identical to the parts of [lv_arc](/widgets/core/arc).
|
||||
The parts are identical to the parts of [lv_arc](/widgets/arc).
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -15,7 +15,7 @@ To create a spinner use `lv_spinner_create(parent, spin_time, arc_length)`. `spi
|
||||
## Events
|
||||
No special events are sent to the Spinner.
|
||||
|
||||
See the events of the [Arc](/widgets/core/arc) too.
|
||||
See the events of the [Arc](/widgets/arc) too.
|
||||
|
||||
Learn more about [Events](/overview/event).
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
The Tab view object can be used to organize content in tabs.
|
||||
The Tab view is built from other widgets:
|
||||
- Main container: [lv_obj](/widgets/obj))
|
||||
- Tab buttons: [lv_btnmatrix](/widgets/core/btnmatrix)
|
||||
- Tab buttons: [lv_btnmatrix](/widgets/btnmatrix)
|
||||
- Container for the tabs: [lv_obj](/widgets/obj)
|
||||
- Content of the tabs: [lv_obj](/widgets/obj)
|
||||
|
||||
@@ -41,7 +41,7 @@ To select a new tab you can:
|
||||
|
||||
### Get the parts
|
||||
|
||||
`lv_tabview_get_content(tabview)` returns the container for the tabs, `lv_tabview_get_tab_btns(tabview)` returns the Tab buttons object which is a [Button matrix](/widgets/core/btnmatrix).
|
||||
`lv_tabview_get_content(tabview)` returns the container for the tabs, `lv_tabview_get_tab_btns(tabview)` returns the Tab buttons object which is a [Button matrix](/widgets/btnmatrix).
|
||||
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent when a new tab is selected by sliding or clicking the tab button. `lv_tabview_get_tab_act(tabview)` returns the zero based index of the current tab.
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
The Text Area is a [Base object](widgets/obj) with a [Label](/widgets/core/label) and a cursor on it.
|
||||
The Text Area is a [Base object](widgets/obj) with a [Label](/widgets/label) and a cursor on it.
|
||||
Texts or characters can be added to it.
|
||||
Long lines are wrapped and when the text becomes long enough the Text area can be scrolled.
|
||||
|
||||
@@ -11,7 +11,7 @@ One line mode and password modes are supported.
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` The background of the text area. Uses all the typical background style properties and the text related style properties including `text_align` to align the text to the left, right or center.
|
||||
- `LV_PART_SCROLLBAR` The scrollbar that is shown when the text is too long.
|
||||
- `LV_PART_SELECTED` Determines the style of the [selected text](/widgets/core/label.html#text-selection). Only `text_color` and `bg_color` style properties can be used. `bg_color` should be set directly on the label of the text area.
|
||||
- `LV_PART_SELECTED` Determines the style of the [selected text](/widgets/label.html#text-selection). Only `text_color` and `bg_color` style properties can be used. `bg_color` should be set directly on the label of the text area.
|
||||
- `LV_PART_CURSOR` Marks the position where the characters are inserted. The cursor's area is always the bounding box of the current character.
|
||||
A block cursor can be created by adding a background color and background opacity to `LV_PART_CURSOR`'s style. The create line cursor leave the cursor transparent and set a left border.
|
||||
The `anim_time` style property sets the cursor's blink time.
|
||||
@@ -8,8 +8,8 @@ The Window is container-like object built from a header with title and buttons a
|
||||
The Window is built from other widgets so you can check their documentation for details:
|
||||
- Background: [lv_obj](/widgets/obj)
|
||||
- Header on the background: [lv_obj](/widgets/obj)
|
||||
- Title on the header: [lv_label](/widgets/core/label)
|
||||
- Buttons on the header: [lv_btn](/widgets/core/btn)
|
||||
- Title on the header: [lv_label](/widgets/label)
|
||||
- Buttons on the header: [lv_btn](/widgets/btn)
|
||||
- Content area on the background: [lv_obj](/widgets/obj)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user