.. default-domain:: cpp .. highlight:: cpp .. namespace:: krpc::services::UI Container ========= .. class:: Container The base class of canvases and panels, which other objects can be added to. | Base class: :class:`Object` | Derived classes: :class:`Canvas`, :class:`Panel` .. container:: inherited-members .. rubric:: Inherited Members * From :class:`Object`: :func:`rect_transform `, :func:`layout_element `, :func:`visible `, :func:`set_visible `, :func:`remove ` .. function:: Panel add_panel(bool visible = true) Add a panel to this object. :Parameters: * **visible** -- Whether the new panel is visible. .. function:: Text add_text(std::string content, bool visible = true) Add text to this object. :Parameters: * **content** -- The text. * **visible** -- Whether the text is visible. .. function:: InputField add_input_field(bool visible = true) Add an input field to this object. :Parameters: * **visible** -- Whether the input field is visible. .. function:: Button add_button(std::string content, bool visible = true) Add a button to this object. :Parameters: * **content** -- The label for the button. * **visible** -- Whether the button is visible. .. function:: Toggle add_toggle(std::string content, bool visible = true) Add a toggle to this object. :Parameters: * **content** -- The label for the toggle. * **visible** -- Whether the toggle is visible. .. function:: ToggleGroup add_toggle_group() Add a toggle group to this object, to make a set of toggles into radio buttons. .. note:: The group is not drawn and does not take up any space. The toggles that belong to it can be added anywhere. .. function:: Slider add_slider(bool vertical = false, bool visible = true) Add a slider to this object. :Parameters: * **vertical** -- Whether the slider runs from bottom to top, rather than from left to right. * **visible** -- Whether the slider is visible. .. function:: Dropdown add_dropdown(bool visible = true) Add a dropdown to this object. :Parameters: * **visible** -- Whether the dropdown is visible. .. function:: Image add_image(bool visible = true) Add an image to this object. :Parameters: * **visible** -- Whether the image is visible. .. function:: ScrollView add_scroll_view(bool visible = true) Add a scroll view to this object. :Parameters: * **visible** -- Whether the scroll view is visible.