Class: Wx::AUI::AuiTabArt

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/aui/aui_tab_art.rb

Overview

Tab art provider defines all the drawing functions used by AuiNotebook.

This allows the AuiNotebook to have a pluggable look-and-feel. By default, a AuiNotebook uses an instance of class AuiDefaultTabArt, derived from this class, which provides bitmaps and a colour scheme that is adapted to the major platforms’ look. You can either derive from that class to alter its behaviour or write a completely new tab art class. Another example of creating a new AuiNotebook tab bar is AuiSimpleTabArt. Call Wx::AUI::AuiNotebook#set_art_provider to make use of this new tab art.

Category: Window Docking (wxAUI)

Requires:

  • USE_AUI

Direct Known Subclasses

AuiFlatTabArt, AuiNativeTabArt, AuiSimpleTabArt

Instance Method Summary collapse

Constructor Details

#initializeWx::AUI::AuiTabArt

Constructor.



29
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 29

def initialize; end

Instance Method Details

#cloneWx::AUI::AuiTabArt

Clones the art object.

Returns:



33
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 33

def clone; end

#draw_background(dc, wnd, rect) ⇒ void

This method returns an undefined value.

Draws a background on the given area.

Parameters:



40
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 40

def draw_background(dc, wnd, rect) end

#draw_button(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect) ⇒ void

This method returns an undefined value.

Draws a button.

Parameters:



51
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 51

def draw_button(dc, wnd, in_rect, bitmap_id, button_state, orientation, out_rect) end

#draw_page_tab(dc, wnd, page, rect) ⇒ Integer

Draws a tab for the specified notebook page.

This function must be overridden if #draw_tab is not overridden and, also, if pinned tabs are used, as they are not supported by #draw_tab. The pane contains the information about the page to draw, in particular its Wx::AUI::AuiNotebookPage::buttons specifies the buttons to draw if it is not empty and receives the rectangles where they were drawn on output in the Wx::AUI::AuiTabContainerButton::rect fields. Note that if a button state is Wx::AUI::AuiPaneButtonState::AUI_BUTTON_STATE_HIDDEN, the effect is the same as not including this button at all, i.e. it is not drawn and the output field is not modified in this case. The Wx::AUI::AuiNotebookPage::rect field is also updated by this function to contain the bounding rectangle of the tab. The total horizontal span of the tab, which may be greater than the page bounding rectangle.

Parameters:

Returns:

  • (Integer)


78
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 78

def draw_page_tab(dc, wnd, page, rect) end

#draw_tab(dc, wnd, page, rect, close_button_state, out_tab_rect, out_button_rect) ⇒ Integer

Draws a tab.

This function used to be pure virtual and so had to be overridden in the derived classes in the previous versions of wxWidgets, however since version 3.3.0 it doesn’t have to be overridden if #draw_page_tab is overridden and, moreover, it is recommended to override #draw_page_tab instead of this function in the new code.

Parameters:

Returns:

  • (Integer)


64
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 64

def draw_tab(dc, wnd, page, rect, close_button_state, out_tab_rect, out_button_rect) end

#get_best_tab_ctrl_size(arg, arg1, arg2) ⇒ Integer Also known as: best_tab_ctrl_size

Returns the tab control size.

Parameters:

Returns:

  • (Integer)


85
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 85

def get_best_tab_ctrl_size(arg, arg1, arg2) end

#get_button_rect(dc, wnd, inRect, bitmapId, buttonState, orientation, outRect = nil) ⇒ Integer Also known as: button_rect

Returns the rectangle for the given button.

This function is not pure virtual because it is only for multi-line tabs, but it must be implemented if Wx::AUI::AuiNotebookOption::AUI_NB_MULTILINE is used. If specified, the returned rectangle must be filled with the same value as #draw_button puts into its outRect but here it can also be null in which case just its width is returned.

Parameters:

Returns:

  • (Integer)


144
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 144

def get_button_rect(dc, wnd, inRect, bitmapId, buttonState, orientation, outRect=nil) end

#get_indent_sizeInteger Also known as: indent_size

Returns the indent size.

Returns:

  • (Integer)


90
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 90

def get_indent_size; end

#get_normal_fontWx::Font Also known as: normal_font

Returns the font to use for normal, non-selected, tabs.

By default, returns an invalid font, meaning that the font set for Wx::AUI::AuiNotebook itself should be used. This function should be overridden for #set_normal_font to actually work.

Returns:



98
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 98

def get_normal_font; end

#get_page_tab_size(dc, wnd, page) ⇒ Array(Wx::Size,Integer) Also known as: page_tab_size

Returns the size of the tab for the specified notebook page.

This function must be overridden if #get_tab_size is not overridden and, also, if pinned tabs are used, as they are not supported by #get_tab_size.

Parameters:

Returns:



129
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 129

def get_page_tab_size(dc, wnd, page) end

#get_selected_fontWx::Font Also known as: selected_font

Returns the font to use for the selected tab.

By default, returns an invalid font, meaning that the font set for Wx::AUI::AuiNotebook itself should be used. This function should be overridden for #set_selected_font to actually work.

Returns:



106
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 106

def get_selected_font; end

#get_tab_size(dc, wnd, caption, bitmap, active, close_button_state) ⇒ Array(Wx::Size,Integer) Also known as: tab_size

Returns the tab size for the given caption, bitmap and state.

This function used to be pure virtual and so had to be overridden in the derived classes in the previous versions of wxWidgets, however since version 3.3.0 it doesn’t have to be overridden if #get_page_tab_size is overridden and it is recommended to override #get_page_tab_size instead of this function in the new code.

Parameters:

Returns:



119
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 119

def get_tab_size(dc, wnd, caption, bitmap, active, close_button_state) end

#set_active_colour(colour) ⇒ void Also known as: active_colour=

This method returns an undefined value.

Sets the colour of the selected tab.

Parameters:



186
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 186

def set_active_colour(colour) end

#set_colour(colour) ⇒ void Also known as: colour=

This method returns an undefined value.

Sets the colour of the inactive tabs.

Parameters:



180
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 180

def set_colour(colour) end

#set_flags(flags) ⇒ void Also known as: flags=

This method returns an undefined value.

Sets flags.

Parameters:

  • flags (Integer)


150
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 150

def set_flags(flags) end

#set_measuring_font(font) ⇒ void Also known as: measuring_font=

This method returns an undefined value.

Sets the font used for calculating measurements.

Parameters:



156
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 156

def set_measuring_font(font) end

#set_normal_font(font) ⇒ void Also known as: normal_font=

This method returns an undefined value.

Sets the normal font for drawing labels.

Parameters:

See Also:



165
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 165

def set_normal_font(font) end

#set_selected_font(font) ⇒ void Also known as: selected_font=

This method returns an undefined value.

Sets the font for drawing text for selected UI elements.

Parameters:

See Also:



174
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 174

def set_selected_font(font) end

#set_sizing_info(tab_ctrl_size, tab_count, wnd = nil) ⇒ void

This method returns an undefined value.

Sets sizing information.

The wnd argument is only present in wxWidgets 3.1.6 and newer and is required, it only has nil default value for compatibility reasons.

Parameters:

  • tab_ctrl_size (Array(Integer, Integer), Wx::Size)
  • tab_count (Integer)
  • wnd (Wx::Window) (defaults to: nil)


196
# File 'lib/wx/doc/gen/aui/aui_tab_art.rb', line 196

def set_sizing_info(tab_ctrl_size, tab_count, wnd=nil) end