.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2025 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.aui.AuiToolBarArt: ========================================================================================================================================== |phoenix_title| **wx.aui.AuiToolBarArt** ========================================================================================================================================== :ref:`wx.aui.AuiToolBarArt` is part of the ``AUI`` class framework and is the base class defining the interface for rendering :ref:`wx.aui.AuiToolBar`. It is an abstract base class and its concrete `AuiGenericToolBarArt` and `AuiMSWToolBarArt` subclasses provide the implementations used by default under all non-MSW platforms and under MSW respectively. See also :ref:`wx.aui.AuiToolBar` and :ref:`AUI Overview `. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html

Inheritance diagram of AuiToolBarArt

| |sub_classes| Known Subclasses ============================== :ref:`wx.aui.AuiDefaultToolBarArt`, `AuiGenericToolBarArt` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.aui.AuiToolBarArt.__init__` :meth:`~wx.aui.AuiToolBarArt.Clone` :meth:`~wx.aui.AuiToolBarArt.DrawBackground` :meth:`~wx.aui.AuiToolBarArt.DrawButton` :meth:`~wx.aui.AuiToolBarArt.DrawControlLabel` :meth:`~wx.aui.AuiToolBarArt.DrawDropDownButton` :meth:`~wx.aui.AuiToolBarArt.DrawGripper` :meth:`~wx.aui.AuiToolBarArt.DrawLabel` :meth:`~wx.aui.AuiToolBarArt.DrawOverflowButton` :meth:`~wx.aui.AuiToolBarArt.DrawPlainBackground` :meth:`~wx.aui.AuiToolBarArt.DrawSeparator` :meth:`~wx.aui.AuiToolBarArt.GetElementSize` Returns the size of the given element in DIPs. :meth:`~wx.aui.AuiToolBarArt.GetElementSizeForWindow` Get the element size scaled by the ``DPI`` of the given window. :meth:`~wx.aui.AuiToolBarArt.GetFlags` :meth:`~wx.aui.AuiToolBarArt.GetFont` :meth:`~wx.aui.AuiToolBarArt.GetLabelSize` Return the size of the label for the given item. :meth:`~wx.aui.AuiToolBarArt.GetTextDirection` Return the direction used for rendering text. :meth:`~wx.aui.AuiToolBarArt.GetTextOrientation` :meth:`~wx.aui.AuiToolBarArt.GetToolSize` Return the size of the given item. :meth:`~wx.aui.AuiToolBarArt.SetElementSize` Sets the size of the given element in DIPs. :meth:`~wx.aui.AuiToolBarArt.SetFlags` :meth:`~wx.aui.AuiToolBarArt.SetFont` :meth:`~wx.aui.AuiToolBarArt.SetTextDirection` Set the text direction for rendering text. :meth:`~wx.aui.AuiToolBarArt.SetTextOrientation` :meth:`~wx.aui.AuiToolBarArt.ShowDropDown` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.aui.AuiToolBarArt.Flags` See :meth:`~wx.aui.AuiToolBarArt.GetFlags` and :meth:`~wx.aui.AuiToolBarArt.SetFlags` :attr:`~wx.aui.AuiToolBarArt.Font` See :meth:`~wx.aui.AuiToolBarArt.GetFont` and :meth:`~wx.aui.AuiToolBarArt.SetFont` :attr:`~wx.aui.AuiToolBarArt.TextDirection` See :meth:`~wx.aui.AuiToolBarArt.GetTextDirection` and :meth:`~wx.aui.AuiToolBarArt.SetTextDirection` :attr:`~wx.aui.AuiToolBarArt.TextOrientation` See :meth:`~wx.aui.AuiToolBarArt.GetTextOrientation` and :meth:`~wx.aui.AuiToolBarArt.SetTextOrientation` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.aui.AuiToolBarArt(object) **Possible constructors**:: AuiToolBarArt() -> None AuiToolBarArt is part of the ``AUI`` class framework and is the base class defining the interface for rendering AuiToolBar. .. method:: __init__(self) :rtype: `None` .. method:: Clone(self) :rtype: :ref:`wx.aui.AuiToolBarArt` .. method:: DrawBackground(self, dc, wnd, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawButton(self, dc, wnd, item, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawControlLabel(self, dc, wnd, item, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawDropDownButton(self, dc, wnd, item, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawGripper(self, dc, wnd, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawLabel(self, dc, wnd, item, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawOverflowButton(self, dc, wnd, rect, state) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `rect`: :type `rect`: wx.Rect :param `state`: :type `state`: int :rtype: `None` .. method:: DrawPlainBackground(self, dc, wnd, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: DrawSeparator(self, dc, wnd, rect) :param `dc`: :type `dc`: wx.DC :param `wnd`: :type `wnd`: wx.Window :param `rect`: :type `rect`: wx.Rect :rtype: `None` .. method:: GetElementSize(self, elementId) Returns the size of the given element in DIPs. This function is typically more convenient to override, as it can just return the same value as was passed to :meth:`SetElementSize` , but it shouldn't usually be called, use :meth:`GetElementSizeForWindow` instead. :param `elementId`: One of :ref:`wx.aui.AuiToolBarArtSetting` elements. :type `elementId`: int :rtype: `int` :returns: The size of the element in DIPs. .. method:: GetElementSizeForWindow(self, elementId, window) Get the element size scaled by the ``DPI`` of the given window. This function should be used to get the size of the element in pixels. The default version delegates to :meth:`GetElementSize` , override this function if a different behaviour (e.g. to use some smarter algorithm for scaling instead of just multiplying by the ``DPI`` factor) is needed. :param `elementId`: One of :ref:`wx.aui.AuiToolBarArtSetting` elements. :type `elementId`: int :param `window`: A valid window, typically :ref:`wx.aui.AuiToolBar` itself. :type `window`: wx.Window :rtype: `int` :returns: The size of the element in pixels. .. versionadded:: 4.3/wxWidgets-3.3.0 .. seealso:: :meth:`SetElementSize` .. method:: GetFlags(self) :rtype: `int` .. method:: GetFont(self) :rtype: `Font` .. method:: GetLabelSize(self, dc, wnd, item) Return the size of the label for the given item. Note that the type of `dc` was :ref:`wx.DC` until wxWidgets 3.3.0, where it was changed to :ref:`wx.ReadOnlyDC` as this function doesn't modify the DC contents. :param `dc`: :type `dc`: wx.ReadOnlyDC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :rtype: `Size` .. method:: GetTextDirection(self) Return the direction used for rendering text. Always returns :meth:`wx.aui.AuiTextDirection.LeftToRight` in the base class. :rtype: :ref:`wx.aui.AuiTextDirection` .. versionadded:: 4.3/wxWidgets-3.3.2 .. method:: GetTextOrientation(self) :rtype: `int` .. method:: GetToolSize(self, dc, wnd, item) Return the size of the given item. Note that the type of `dc` was :ref:`wx.DC` until wxWidgets 3.3.0, where it was changed to :ref:`wx.ReadOnlyDC` as this function doesn't modify the DC contents. :param `dc`: :type `dc`: wx.ReadOnlyDC :param `wnd`: :type `wnd`: wx.Window :param `item`: :type `item`: wx.aui.AuiToolBarItem :rtype: `Size` .. method:: SetElementSize(self, elementId, size) Sets the size of the given element in DIPs. Note that this function takes the size in DPI-independent pixels and this size will be scaled by the factor depending on the ``DPI`` being actually used by :meth:`GetElementSizeForWindow` . In particular, do `not` use :meth:`wx.Window.FromDIP` for the `size` argument passed to this function. :param `elementId`: One of :ref:`wx.aui.AuiToolBarArtSetting` elements. :type `elementId`: int :param `size`: The size of the element in DIPs. :type `size`: int :rtype: `None` .. method:: SetFlags(self, flags) :param `flags`: :type `flags`: int :rtype: `None` .. method:: SetFont(self, font) :param `font`: :type `font`: wx.Font :rtype: `None` .. method:: SetTextDirection(self, direction) Set the text direction for rendering text. Does nothing in the base class, override this function to support vertical text rendering. :param `direction`: :type `direction`: wx.aui.AuiTextDirection :rtype: `None` .. versionadded:: 4.3/wxWidgets-3.3.2 .. method:: SetTextOrientation(self, orientation) :param `orientation`: :type `orientation`: int :rtype: `None` .. method:: ShowDropDown(self, wnd, items) :param `wnd`: :type `wnd`: wx.Window :param `items`: :type `items`: AuiToolBarItemArray :rtype: `int` .. attribute:: Flags See :meth:`~wx.aui.AuiToolBarArt.GetFlags` and :meth:`~wx.aui.AuiToolBarArt.SetFlags` .. attribute:: Font See :meth:`~wx.aui.AuiToolBarArt.GetFont` and :meth:`~wx.aui.AuiToolBarArt.SetFont` .. attribute:: TextDirection See :meth:`~wx.aui.AuiToolBarArt.GetTextDirection` and :meth:`~wx.aui.AuiToolBarArt.SetTextDirection` .. attribute:: TextOrientation See :meth:`~wx.aui.AuiToolBarArt.GetTextOrientation` and :meth:`~wx.aui.AuiToolBarArt.SetTextOrientation`