Lines Matching full:a
9 What is a Widget?
11 A Widget is the **basic building block** of the LVGL user interface.
20 All Widgets are referenced using an :cpp:type:`lv_obj_t` pointer as a handle.
36 The Base Widget can be used directly as a simple widget. While it is a simple
37 rectangle, it has a large number of features shared with all Widgets, detailed
38 below and in subsequent pages. In HTML terms, think of it as a ``<div>``.
67 lv_obj_set_size(btn1, 100, 50); /* Set a button's size */
68 lv_obj_set_pos(btn1, 20,30); /* Set a button's position */
76 The Widget types have special attributes as well. For example, a slider has
82 functions. For example for a slider:
100 A Widget's parent is set when the widget is created --- the parent is passed to the
103 To get a Widget's current parent, use :cpp:expr:`lv_obj_get_parent(widget)`.
105 You can move the Widget to a new parent with :cpp:expr:`lv_obj_set_parent(widget, new_parent)`.
107 To get a specific child of a parent use :cpp:expr:`lv_obj_get_child(parent, idx)`.
114 You can iterate through a parent Widget's children like this:
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…
134 To get a Widget's Screen (highest-level parent) use :cpp:expr:`lv_obj_get_screen(widget)`.
146 A parent Widget can be considered as the container of its children. Every Widget has
147 exactly one parent Widget (except Screens), but a parent Widget can have any number
149 which are typically a parent (e.g. button) or a child (e.g. label).
156 If the position of a parent changes, the children will move along with
163 …lv_obj_t * parent = lv_obj_create(lv_screen_active()); /* Create a parent Widget on current scree…
166 …lv_obj_t * obj1 = lv_obj_create(parent); /* Create a Widget on previously created p…
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 */
213 This allows for the creation of a screen just when a button is clicked
214 to open it, and for deletion of screens when a new screen is loaded.
220 Every widget has its own **create** function with a prototype like this:
226 Typically, the create functions only have a ``parent`` parameter telling
229 The return value is a pointer to the created Widget with :cpp:type:`lv_obj_t` ``*``
232 There is a common **delete** function for all Widget types. It deletes
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)
249 You can use :cpp:expr:`lv_obj_delete_delayed(widget, 1000)` to delete a Widget after
252 Sometimes you're not sure whether a Widget was deleted and you need some way to
285 Not to be confused with a :ref:`display`, Screens are simply any Widget created
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.
290 Screens need. But an :ref:`lv_image` Widget can also be used to create a wallpaper
308 Screen Widgets (root of a Widget Tree)
335 Screen and its child Widgets will ever be shown on a display at one time.
337 When each :ref:`display` object was created, a default screen was created with it and
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
351 To load a new screen, use :cpp:expr:`lv_screen_load(scr1)`. This sets ``scr1`` as
357 A new screen can be loaded with animation by using
398 Usually, the opacity of the Screen is :cpp:enumerator:`LV_OPA_COVER` to provide a
405 on-screen display (OSD) menus where a video is played on a different hardware layer
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
417 - Set a color format with alpha channel. E.g.
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
434 - :cpp:enumerator:`LV_PART_MAIN`: A background like rectangle
437 - :cpp:enumerator:`LV_PART_KNOB`: Like a handle to grab to adjust the value
440 - :cpp:enumerator:`LV_PART_CURSOR`: Mark a specific place e.g. text area's or chart's cursor
454 The Widget can be in a combination of the following states:
471 interacts with a Widget (presses, releases, focuses, etc.). However,
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
515 - :cpp:enumerator:`LV_OBJ_FLAG_FLEX_IN_NEW_TRACK` Start a new flex track on this item
532 /* Make a Widget non-clickable */
549 - :cpp:enumerator:`LV_EVENT_SHORT_CLICKED` Widget was pressed for a short period of time, t…
550 - :cpp:enumerator:`LV_EVENT_SINGLE_CLICKED` Sent for first short click within a small distan…
557 - :cpp:enumerator:`LV_EVENT_SCROLL_BEGIN` Scrolling begins. The event parameter is a point…
561 - :cpp:enumerator:`LV_EVENT_GESTURE` A gesture is detected. Get gesture with `lv_inde…
562 - :cpp:enumerator:`LV_EVENT_KEY` A key is sent to Widget. Get key with `lv_indev_…
590 - :cpp:enumerator:`LV_EVENT_LAYOUT_CHANGED` A child's position has changed due to a layout r…
591 - :cpp:enumerator:`LV_EVENT_GET_SELF_SIZE` Get internal size of a widget
629 A snapshot image can be generated for a Widget together with its