Lines Matching full:the

11 A Widget is the **basic building block** of the LVGL user interface.
21 This pointer can later be used to read or change the Widget's attributes.
29 The most fundamental of all Widgets is the Base Widget, on which all other widgets
30 are based. From an Object-Oriented perspective, think of the Base Widget as the
33 The functions and functionalities of the Base Widget can be used with
36 The Base Widget can be used directly as a simple widget. While it is a simple
76 The Widget types have special attributes as well. For example, a slider has
87 lv_slider_set_range(slider1, 0, 100); /* Set the min. and max. values */
88 lv_slider_set_value(slider1, 40, LV_ANIM_ON); /* Set the current value (position) */
90 The API of the widgets is described in their
91 :ref:`Documentation <widgets>` but you can also check the respective
100 A Widget's parent is set when the widget is created --- the parent is passed to the
105 You can move the Widget to a new parent with :cpp:expr:`lv_obj_set_parent(widget, new_parent)`.
110 - ``0`` get the child created first
111 - ``1`` get the child created second
112 - ``-1`` get the child created last
124 :cpp:expr:`lv_obj_get_index(widget)` returns the index of the Widget in its parent.
125 It is equivalent to the number of older children in the parent.
127 You can bring a Widget to the foreground or send it to the background with
130 You can change the index of a Widget in its parent using :cpp:expr:`lv_obj_move_to_index(widget, in…
132 You can swap the position of two Widgets with :cpp:expr:`lv_obj_swap(widget1, widget2)`.
146 A parent Widget can be considered as the container of its children. Every Widget has
148 of children. There is no limitation for the type of the parent but there are Widgets
156 If the position of a parent changes, the children will move along with
157 it. Therefore, all positions are relative to the parent.
169 Modify the position of the parent:
175 lv_obj_set_pos(parent, 50, 50); /* Move the parent. The child will move with it. */
177 (For simplicity the adjusting of colors of the Widgets is not shown in
178 the example.)
180 Visibility only on the parent
183 If a child is partially or fully outside its parent then the parts
190 lv_obj_set_x(widget1, -30); /* Move the child a little bit off the parent */
193 :cpp:expr:`lv_obj_add_flag(widget, LV_OBJ_FLAG_OVERFLOW_VISIBLE)` which allow the
194 children to be drawn out of the parent. In addition to this, you must register
195 the following event callback (this was not required in previous versions).
197 Note: ``ext_width`` should be the maximum absolute width the children will be
204 lv_event_set_ext_draw_size(e, 30); /*Set 30px extra draw area around the widget*/
211 means only the currently created (existing) Widgets consume RAM.
213 This allows for the creation of a screen just when a button is clicked
216 UIs can be created based on the current environment of the device. For
217 example one can create meters, charts, bars and sliders based on the
226 Typically, the create functions only have a ``parent`` parameter telling
227 them on which Widget to create the new Widget.
229 The return value is a pointer to the created Widget with :cpp:type:`lv_obj_t` ``*``
233 the Widget and all of its children.
239 :cpp:func:`lv_obj_delete` will delete the Widget immediately. If for any reason you
240 can't delete the Widget immediately you can use
241 :cpp:expr:`lv_obj_delete_async(widget)` which will perform the deletion on the next
243 delete the parent of a Widget in the child's :cpp:enumerator:`LV_EVENT_DELETE`
246 You can remove all the children of a Widget (but not the Widget itself)
250 some time. The delay is expressed in milliseconds.
253 check if it's still "alive". Anytime before the Widget is deleted, you can use
255 when the Widget is deleted.
257 Make sure the pointer variable itself stays valid until the Widget is deleted. Here
286 without a parent (i.e. passing NULL for the ``parent`` argument during creation). As
287 such, they form the "root" of a Widget Tree.
289 Normally the Base Widget is used for this purpose since it has all the features most
291 background for the Widget Tree.
295 - are automatically attached to the :ref:`default_display` current when the Screen
297 - automatically occupy the full area of the associated display;
302 versa. Thus the relationship::
325 delete the :ref:`active_screen`.
334 Screen is referred to as the Display's "Active Screen". For this reason, only one
340 To get a pointer to the "Active Screen", call :cpp:func:`lv_screen_active`.
342 To set a Screen to be the "Active Screen", call :cpp:func:`lv_screen_load` or
352 the Active Screen.
358 :cpp:expr:`lv_screen_load_anim(scr, transition_type, time, delay, auto_del)`. The
362 …d :cpp:enumerator:`LV_SCR_LOAD_ANIM_OVER_BOTTOM`: Move the new screen over the current towards the
363 …cpp:enumerator:`LV_SCR_LOAD_ANIM_OUT_BOTTOM`: Move out the old screen over the current towards the
364 …cpp:enumerator:`LV_SCR_LOAD_ANIM_MOVE_BOTTOM`: Move both the current and new screens towards the g…
365 …M_FADE_IN` and :cpp:enumerator:`LV_SCR_LOAD_ANIM_FADE_OUT`: Fade the new screen over the old scree…
367 Setting ``auto_del`` to ``true`` will automatically delete the old
368 screen when the animation is finished.
370 The new screen will become active (returned by :cpp:func:`lv_screen_active`) when
371 the animation starts after ``delay`` time. All inputs are disabled
372 during the screen animation.
388 1, 3 and 4 are independent of the :ref:`active_screen` and they will be shown (if
389 they contain anything that is visible) regardless of which screen is the Active
398 Usually, the opacity of the Screen is :cpp:enumerator:`LV_OPA_COVER` to provide a
399 solid background for its children. If this is not the case (opacity <
400 100%) the display's ``bottom_layer`` will be visible. If the bottom layer's
406 of the display panel, and a menu is overlaid on a higher layer.
408 To properly render a UI on a transparent Screen the Display's color format needs to
413 - Set the screen's ``bg_opa`` to transparent:
415 - Set the bottom layer's ``bg_opa`` to transparent:
427 The widgets are built from multiple parts. For example a
428 :ref:`Base Widget <base_widget>` uses the main and scrollbar parts but a
429 :ref:`Slider <lv_slider>` uses the main, indicator and knob parts.
432 The following predefined parts exist in LVGL:
435 - :cpp:enumerator:`LV_PART_SCROLLBAR`: The scrollbar(s)
436 …rator:`LV_PART_INDICATOR`: Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox
437 - :cpp:enumerator:`LV_PART_KNOB`: Like a handle to grab to adjust the value
438 - :cpp:enumerator:`LV_PART_SELECTED`: Indicate the currently selected option or section
439 - :cpp:enumerator:`LV_PART_ITEMS`: Used if the widget has multiple similar elements (e.g. table cel…
443 The main purpose of parts is to allow styling the "components" of the
444 widgets. They are described in more detail in the
454 The Widget can be in a combination of the following states:
470 The states are usually automatically changed by the library as the user
472 the states can be changed manually as well. To set or clear given state (but
473 leave the other states untouched) use
479 To learn more about the states, read the related section of
493 - :cpp:enumerator:`LV_OBJ_FLAG_HIDDEN` Make the Widget hidden. (Like it wasn't there at all)
494 - :cpp:enumerator:`LV_OBJ_FLAG_CLICKABLE` Make the Widget clickable by input devices
495 - :cpp:enumerator:`LV_OBJ_FLAG_CLICK_FOCUSABLE` Add focused state to the Widget when clicked
496 - :cpp:enumerator:`LV_OBJ_FLAG_CHECKABLE` Toggle checked state when the Widget is clicked
497 - :cpp:enumerator:`LV_OBJ_FLAG_SCROLLABLE` Make the Widget scrollable
499 - :cpp:enumerator:`LV_OBJ_FLAG_SCROLL_MOMENTUM` Make the Widget scroll further when "thrown"
501 - :cpp:enumerator:`LV_OBJ_FLAG_SCROLL_CHAIN_HOR` Allow propagating the horizontal scroll to a pare…
502 - :cpp:enumerator:`LV_OBJ_FLAG_SCROLL_CHAIN_VER` Allow propagating the vertical scroll to a parent
505 - :cpp:enumerator:`LV_OBJ_FLAG_SCROLL_WITH_ARROW` Allow scrolling the focused Widget with arrow ke…
506 - :cpp:enumerator:`LV_OBJ_FLAG_SNAPPABLE` If scroll snap is enabled on the parent it can snap to t…
507 - :cpp:enumerator:`LV_OBJ_FLAG_PRESS_LOCK` Keep the Widget pressed even if the press slid from the
508 - :cpp:enumerator:`LV_OBJ_FLAG_EVENT_BUBBLE` Propagate the events to the parent as well
509 - :cpp:enumerator:`LV_OBJ_FLAG_GESTURE_BUBBLE` Propagate the gestures to the parent
511 - :cpp:enumerator:`LV_OBJ_FLAG_IGNORE_LAYOUT` Make the Widget not positioned by the layouts
512 - :cpp:enumerator:`LV_OBJ_FLAG_FLOATING` Do not scroll the Widget when the parent scrolls and igno…
514 - :cpp:enumerator:`LV_OBJ_FLAG_OVERFLOW_VISIBLE` Do not clip the children's content to the parent'…
557 …V_EVENT_SCROLL_BEGIN` Scrolling begins. The event parameter is a pointer to the animation …
570 - :cpp:enumerator:`LV_EVENT_VALUE_CHANGED` when the :cpp:enumerator:`LV_OBJ_FLAG_CHECKABLE` flag is
571 enabled and the Widget was clicked (on transition to/from the checked state)
578 - :cpp:enumerator:`LV_EVENT_DRAW_POST` Perform the post draw phase (when all children a…
579 - :cpp:enumerator:`LV_EVENT_DRAW_POST_BEGIN` Starting the post draw phase (when all children …
580 - :cpp:enumerator:`LV_EVENT_DRAW_POST_END` Finishing the post draw phase (when all children…
605 :cpp:enumerator:`LV_KEY_UP` make the Widget checked, and :cpp:enumerator:`LV_KEY_LEFT` and
608 If :cpp:enumerator:`LV_OBJ_FLAG_SCROLLABLE` is enabled, but the Widget is not editable
609 (as declared by the widget class), the arrow keys (:cpp:enumerator:`LV_KEY_UP`,
610 …or:`LV_KEY_DOWN`, :cpp:enumerator:`LV_KEY_LEFT`, :cpp:enumerator:`LV_KEY_RIGHT`) scroll the Widget.
611 If the Widget can only scroll vertically, :cpp:enumerator:`LV_KEY_LEFT` and
614 more on encoder behaviors and the edit mode.