Version: 3.3.1
Loading...
Searching...
No Matches

#include <wx/aui/auibar.h>

Inheritance diagram for wxAuiToolBarArt:

Detailed Description

wxAuiToolBarArt is part of the wxAUI class framework and is the base class defining the interface for rendering wxAuiToolBar.

It is an abstract base class and its concrete wxAuiGenericToolBarArt and wxAuiMSWToolBarArt subclasses provide the implementations used by default under all non-MSW platforms and under MSW respectively.

See also wxAuiToolBar and wxAUI Overview.

Library:  wxAui
Category:  Window Docking (wxAUI)

Public Member Functions

 wxAuiToolBarArt ()
virtual wxAuiToolBarArtClone ()=0
virtual void SetFlags (unsigned int flags)=0
virtual unsigned int GetFlags ()=0
virtual void SetFont (const wxFont &font)=0
virtual wxFont GetFont ()=0
virtual void SetTextOrientation (int orientation)=0
virtual int GetTextOrientation ()=0
virtual void SetTextDirection (wxAuiTextDirection direction)
 Set the text direction for rendering text.
virtual wxAuiTextDirection GetTextDirection () const
 Return the direction used for rendering text.
virtual void DrawBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)=0
virtual void DrawPlainBackground (wxDC &dc, wxWindow *wnd, const wxRect &rect)=0
virtual void DrawLabel (wxDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item, const wxRect &rect)=0
virtual void DrawButton (wxDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item, const wxRect &rect)=0
virtual void DrawDropDownButton (wxDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item, const wxRect &rect)=0
virtual void DrawControlLabel (wxDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item, const wxRect &rect)=0
virtual void DrawSeparator (wxDC &dc, wxWindow *wnd, const wxRect &rect)=0
virtual void DrawGripper (wxDC &dc, wxWindow *wnd, const wxRect &rect)=0
virtual void DrawOverflowButton (wxDC &dc, wxWindow *wnd, const wxRect &rect, int state)=0
virtual wxSize GetLabelSize (wxReadOnlyDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item)=0
 Return the size of the label for the given item.
virtual wxSize GetToolSize (wxReadOnlyDC &dc, wxWindow *wnd, const wxAuiToolBarItem &item)=0
 Return the size of the given item.
virtual int GetElementSizeForWindow (int elementId, const wxWindow *window)
 Get the element size scaled by the DPI of the given window.
virtual int GetElementSize (int elementId)=0
 Returns the size of the given element in DIPs.
virtual void SetElementSize (int elementId, int size)=0
 Sets the size of the given element in DIPs.
virtual int ShowDropDown (wxWindow *wnd, const wxAuiToolBarItemArray &items)=0
 Show a drop down menu with the given items.

Constructor & Destructor Documentation

◆ wxAuiToolBarArt()

wxAuiToolBarArt::wxAuiToolBarArt ( )

Member Function Documentation

◆ Clone()

virtual wxAuiToolBarArt * wxAuiToolBarArt::Clone ( )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawBackground()

virtual void wxAuiToolBarArt::DrawBackground ( wxDC & dc,
wxWindow * wnd,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawButton()

virtual void wxAuiToolBarArt::DrawButton ( wxDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawControlLabel()

virtual void wxAuiToolBarArt::DrawControlLabel ( wxDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawDropDownButton()

virtual void wxAuiToolBarArt::DrawDropDownButton ( wxDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawGripper()

virtual void wxAuiToolBarArt::DrawGripper ( wxDC & dc,
wxWindow * wnd,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawLabel()

virtual void wxAuiToolBarArt::DrawLabel ( wxDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawOverflowButton()

virtual void wxAuiToolBarArt::DrawOverflowButton ( wxDC & dc,
wxWindow * wnd,
const wxRect & rect,
int state )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawPlainBackground()

virtual void wxAuiToolBarArt::DrawPlainBackground ( wxDC & dc,
wxWindow * wnd,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ DrawSeparator()

virtual void wxAuiToolBarArt::DrawSeparator ( wxDC & dc,
wxWindow * wnd,
const wxRect & rect )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ GetElementSize()

virtual int wxAuiToolBarArt::GetElementSize ( int elementId)
pure virtual

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 SetElementSize(), but it shouldn't usually be called, use GetElementSizeForWindow() instead.

Parameters
elementIdOne of wxAuiToolBarArtSetting elements.
Returns
The size of the element in DIPs.

Implemented in wxAuiDefaultToolBarArt.

◆ GetElementSizeForWindow()

virtual int wxAuiToolBarArt::GetElementSizeForWindow ( int elementId,
const wxWindow * window )
virtual

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 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.

Parameters
elementIdOne of wxAuiToolBarArtSetting elements.
windowA valid window, typically wxAuiToolBar itself.
Returns
The size of the element in pixels.
See also
SetElementSize()
Since
3.3.0

◆ GetFlags()

virtual unsigned int wxAuiToolBarArt::GetFlags ( )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ GetFont()

virtual wxFont wxAuiToolBarArt::GetFont ( )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ GetLabelSize()

virtual wxSize wxAuiToolBarArt::GetLabelSize ( wxReadOnlyDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item )
pure virtual

Return the size of the label for the given item.

Note that the type of dc was wxDC until wxWidgets 3.3.0, where it was changed to wxReadOnlyDC as this function doesn't modify the DC contents.

Implemented in wxAuiDefaultToolBarArt.

◆ GetTextDirection()

virtual wxAuiTextDirection wxAuiToolBarArt::GetTextDirection ( ) const
virtual

Return the direction used for rendering text.

Always returns wxAuiTextDirection::LeftToRight in the base class.

Since
3.3.2

Reimplemented in wxAuiGenericToolBarArt, and wxAuiMSWToolBarArt.

◆ GetTextOrientation()

virtual int wxAuiToolBarArt::GetTextOrientation ( )
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ GetToolSize()

virtual wxSize wxAuiToolBarArt::GetToolSize ( wxReadOnlyDC & dc,
wxWindow * wnd,
const wxAuiToolBarItem & item )
pure virtual

Return the size of the given item.

Note that the type of dc was wxDC until wxWidgets 3.3.0, where it was changed to wxReadOnlyDC as this function doesn't modify the DC contents.

Implemented in wxAuiDefaultToolBarArt.

◆ SetElementSize()

virtual void wxAuiToolBarArt::SetElementSize ( int elementId,
int size )
pure virtual

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 GetElementSizeForWindow(). In particular, do not use wxWindow::FromDIP() for the size argument passed to this function.

Parameters
elementIdOne of wxAuiToolBarArtSetting elements.
sizeThe size of the element in DIPs.

Implemented in wxAuiDefaultToolBarArt.

◆ SetFlags()

virtual void wxAuiToolBarArt::SetFlags ( unsigned int flags)
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ SetFont()

virtual void wxAuiToolBarArt::SetFont ( const wxFont & font)
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ SetTextDirection()

virtual void wxAuiToolBarArt::SetTextDirection ( wxAuiTextDirection direction)
virtual

Set the text direction for rendering text.

Does nothing in the base class, override this function to support vertical text rendering.

Since
3.3.2

Reimplemented in wxAuiGenericToolBarArt, and wxAuiMSWToolBarArt.

◆ SetTextOrientation()

virtual void wxAuiToolBarArt::SetTextOrientation ( int orientation)
pure virtual

Implemented in wxAuiDefaultToolBarArt.

◆ ShowDropDown()

virtual int wxAuiToolBarArt::ShowDropDown ( wxWindow * wnd,
const wxAuiToolBarItemArray & items )
pure virtual

Show a drop down menu with the given items.

Returns
ID of the item selected in the menu or -1 if the menu was dismissed

Implemented in wxAuiDefaultToolBarArt.