======= Toolbar ======= .. py:currentmodule:: p3dsdk .. py:class:: Location .. py:attribute:: TOP :annotation: = 2 Top Dockbar. .. py:attribute:: BOTTOM :annotation: = 3 Bottom Dockbar. .. py:attribute:: LEFT :annotation: = 5 Left Dockbar. Toolbar ------- .. py:class:: Toolbar .. py:method:: id :property: The id of the Toolbar. :type: str, read-only .. py:method:: name :property: The name of the Toolbar. :type: str, read-only .. py:method:: visible :property: The visible state of the Toolbar. :type: bool .. py:method:: location :property: The location of the Toolbar. :type: Location :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: list_actions() List buttons of the Toolbar. :returns: The list of buttons. :rtype: list(Button) .. py:method:: find_action(name) Find a button by name. :param name: The button name to find. :type name: str :returns: The button found or :py:obj:`None` if not found. :rtype: Button :raises NotFoundError: If ``name`` is not matching with any button of the Toolbar. .. py:method:: insert_default_button(name) Insert action from name in the toolbar .. note:: An action can only be added once in the whole interface. :param name: The name of the action inserted. :type name: str :returns: The button inserted or :py:obj:`None` if already inserted. :rtype: Button or None .. py:method:: create_custom_button(name) Create customisable button from name .. note:: The button's name must be unique in the whole application. :param name: The name of the button. :type name: str :returns: The button created. :rtype: CustomButton .. py:method:: create_popup_button(name, execute_on_click = True, set_current_on_click = True) Create popup button from name .. note:: The button's name must be unique in the whole application. :param name: The name of the button. :type name: str :param execute_on_click: Lauch the action clicked in the popup. :type execute_on_click: bool :param set_current_on_click: Select the action clicked in the popup. :type set_current_on_click: bool :returns: The button created. :rtype: PopupButton .. py:method:: create_tiny_popup_button(name, show_label = True) Create tiny popup button from name .. note:: The button's name must be unique in the whole application. :param name: The name of the button. :type name: str :param show_label: If the popup will show the label. :type show_label: bool :returns: The button created. :rtype: TinyPopupButton .. py:method:: create_cycle_button(name) Create cycle button from name .. note:: The button's name must be unique in the whole application. :param name: The name of the button. :type name: str :returns: The button created. :rtype: CycleButton .. py:method:: insert_separator() Insert separator in the toolbar. .. py:method:: insert_spacer(size) Insert spacer in the toolbar. :param size: The spacer's size in px. :type size: int