PlexyDesk : GPU accelerated Display Server for GNU/Linux and BSD
Search
PlexyDesk
Not logged in
Talk
Contributions
Create account
Log in
Open Desktop Systems Journal
Main page
Documentation
Architecture
Development
Components
News
Gallery
Community
Page
Discussion
Read
Edit
Edit source
View history
Editing
PlexyUI API
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Widget creation == These functions create widgets and containers inside an existing window. === <code>plexy_label</code> === <pre>uint32_t plexy_label(PlexyWindow* win, uint32_t parent, const char* text);</pre> Create a label and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_button</code> === <pre>uint32_t plexy_button(PlexyWindow* win, uint32_t parent, const char* text);</pre> Create a button and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_text_input</code> === <pre>uint32_t plexy_text_input(PlexyWindow* win, uint32_t parent, const char* placeholder);</pre> Create a text input and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>placeholder</code> || <code>const char*</code> || Placeholder text shown before the user enters content. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_text_area</code> === <pre>uint32_t plexy_text_area(PlexyWindow* win, uint32_t parent, const char* initial_text);</pre> Create a text area and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>initial_text</code> || <code>const char*</code> || Initial text content for the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_checkbox</code> === <pre>uint32_t plexy_checkbox(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a checkbox and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_switch_widget</code> === <pre>uint32_t plexy_switch_widget(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a switch widget and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_slider</code> === <pre>uint32_t plexy_slider(PlexyWindow* win, uint32_t parent, float min, float max, float initial);</pre> Create a slider and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>min</code> || <code>float</code> || Minimum allowed value for the control. |- | <code>max</code> || <code>float</code> || Maximum allowed value for the control. |- | <code>initial</code> || <code>float</code> || Initial numeric value for the control. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_progress</code> === <pre>uint32_t plexy_progress(PlexyWindow* win, uint32_t parent, float value);</pre> Create a progress and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>value</code> || <code>float</code> || Numeric value to apply or report. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_separator</code> === <pre>uint32_t plexy_separator(PlexyWindow* win, uint32_t parent);</pre> Create a separator and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_spacer</code> === <pre>uint32_t plexy_spacer(PlexyWindow* win, uint32_t parent);</pre> Create a spacer and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_panel</code> === <pre>uint32_t plexy_panel(PlexyWindow* win, uint32_t parent);</pre> Create a panel and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_scroll_view</code> === <pre>uint32_t plexy_scroll_view(PlexyWindow* win, uint32_t parent);</pre> Create a scroll view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_view</code> === <pre>uint32_t plexy_list_view(PlexyWindow* win, uint32_t parent, const char* items_text);</pre> Create a list view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>items_text</code> || <code>const char*</code> || Text payload describing the initial items for the view. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_icon_view</code> === <pre>uint32_t plexy_icon_view(PlexyWindow* win, uint32_t parent, const char* items_text);</pre> Create a icon view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>items_text</code> || <code>const char*</code> || Text payload describing the initial items for the view. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_clear</code> === <pre>void plexy_list_clear(PlexyWindow* win, uint32_t list_view_id);</pre> Remove all items from a list view. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |} === <code>plexy_list_append</code> === <pre>uint32_t plexy_list_append(PlexyWindow* win, uint32_t list_view_id, const char* item_text);</pre> Append a new item to a list view and return the new child widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |- | <code>item_text</code> || <code>const char*</code> || Text content for an inserted list or icon item. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_select</code> === <pre>void plexy_list_select(PlexyWindow* win, uint32_t list_view_id, int index);</pre> Select an item in a list view by index. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |- | <code>index</code> || <code>int</code> || Zero-based item index. |} === <code>plexy_icon_clear</code> === <pre>void plexy_icon_clear(PlexyWindow* win, uint32_t icon_view_id);</pre> Remove all items from an icon view. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |} === <code>plexy_icon_append</code> === <pre>uint32_t plexy_icon_append(PlexyWindow* win, uint32_t icon_view_id, const char* item_text);</pre> Append a new item to an icon view and return the new child widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |- | <code>item_text</code> || <code>const char*</code> || Text content for an inserted list or icon item. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_icon_select</code> === <pre>void plexy_icon_select(PlexyWindow* win, uint32_t icon_view_id, int index);</pre> Select an item in an icon view by index. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |- | <code>index</code> || <code>int</code> || Zero-based item index. |} === <code>plexy_destroy_widget</code> === <pre>void plexy_destroy_widget(PlexyWindow* win, uint32_t widget_id);</pre> Remove a widget from the window and destroy it. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |}
Summary:
Please note that all contributions to PlexyDesk - Display Server for GNU/Linux may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)