2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: aui/auibook.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxAuiNotebook
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-10-27 21:48:52 -04:00
|
|
|
enum wxAuiNotebookOption
|
|
|
|
{
|
|
|
|
wxAUI_NB_TOP = 1 << 0,
|
|
|
|
wxAUI_NB_LEFT = 1 << 1, // not implemented yet
|
|
|
|
wxAUI_NB_RIGHT = 1 << 2, // not implemented yet
|
|
|
|
wxAUI_NB_BOTTOM = 1 << 3,
|
|
|
|
wxAUI_NB_TAB_SPLIT = 1 << 4,
|
|
|
|
wxAUI_NB_TAB_MOVE = 1 << 5,
|
|
|
|
wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6,
|
|
|
|
wxAUI_NB_TAB_FIXED_WIDTH = 1 << 7,
|
|
|
|
wxAUI_NB_SCROLL_BUTTONS = 1 << 8,
|
|
|
|
wxAUI_NB_WINDOWLIST_BUTTON = 1 << 9,
|
|
|
|
wxAUI_NB_CLOSE_BUTTON = 1 << 10,
|
|
|
|
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
|
|
|
|
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
|
|
|
|
wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
|
|
|
|
|
|
|
|
wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
|
|
|
|
wxAUI_NB_TAB_SPLIT |
|
|
|
|
wxAUI_NB_TAB_MOVE |
|
|
|
|
wxAUI_NB_SCROLL_BUTTONS |
|
|
|
|
wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
|
|
|
|
wxAUI_NB_MIDDLE_CLICK_CLOSE
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxAuiNotebook
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2012-06-30 19:41:23 -04:00
|
|
|
wxAuiNotebook is part of the wxAUI class framework, which represents a
|
|
|
|
notebook control, managing multiple windows with associated tabs.
|
|
|
|
|
2008-03-14 12:12:37 -04:00
|
|
|
See also @ref overview_aui.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
wxAuiNotebook is a notebook control which implements many features common in
|
|
|
|
applications with dockable panes.
|
|
|
|
Specifically, wxAuiNotebook implements functionality which allows the user to
|
2008-03-14 12:12:37 -04:00
|
|
|
rearrange tab order via drag-and-drop, split the tab window into many different
|
|
|
|
splitter configurations, and toggle through different themes to customize
|
2008-03-08 08:52:38 -05:00
|
|
|
the control's look and feel.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2016-10-27 21:48:52 -04:00
|
|
|
The default theme that is used is wxAuiDefaultTabArt, which provides a modern,
|
|
|
|
glossy look and feel.
|
|
|
|
The theme can be changed by calling wxAuiNotebook::SetArtProvider.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@beginStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_DEFAULT_STYLE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Defined as wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE |
|
2012-02-07 21:09:51 -05:00
|
|
|
wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
|
|
|
|
wxAUI_NB_MIDDLE_CLICK_CLOSE.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_TAB_SPLIT}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows the tab control to be split by dragging a tab.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_TAB_MOVE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows a tab to be moved horizontally by dragging.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_TAB_EXTERNAL_MOVE}
|
2008-03-08 08:52:38 -05:00
|
|
|
Allows a tab to be moved to another tab control.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_TAB_FIXED_WIDTH}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, all tabs have the same width.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_SCROLL_BUTTONS}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, left and right scroll buttons are displayed.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_WINDOWLIST_BUTTON}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, a drop-down list of windows is available.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_CLOSE_BUTTON}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, a close button is available on the tab bar.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_CLOSE_ON_ACTIVE_TAB}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, the close button is visible on the active tab.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_CLOSE_ON_ALL_TABS}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, the close button is visible on all tabs.
|
2012-02-07 21:09:51 -05:00
|
|
|
@style{wxAUI_NB_MIDDLE_CLICK_CLOSE}
|
|
|
|
With this style, middle click on a tab closes the tab.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_TOP}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, tabs are drawn along the top of the notebook.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxAUI_NB_BOTTOM}
|
2008-03-08 08:52:38 -05:00
|
|
|
With this style, tabs are drawn along the bottom of the notebook.
|
|
|
|
@endStyleTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2009-02-18 12:58:51 -05:00
|
|
|
@beginEventEmissionTable{wxAuiNotebookEvent}
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CLOSE(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
A page is about to be closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSE event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
A page has been closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSED event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CHANGED(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The page selection was changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGED event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CHANGING(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The page selection is about to be changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_BUTTON(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The window list button has been pressed. Processes a @c wxEVT_AUINOTEBOOK_BUTTON event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_BEGIN_DRAG(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Dragging is about to begin. Processes a @c wxEVT_AUINOTEBOOK_BEGIN_DRAG event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_END_DRAG(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Dragging has ended. Processes a @c wxEVT_AUINOTEBOOK_END_DRAG event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_DRAG_MOTION(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Emitted during a drag and drop operation. Processes a @c wxEVT_AUINOTEBOOK_DRAG_MOTION event.
|
2008-11-22 10:36:50 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_ALLOW_DND(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Whether to allow a tab to be dropped. Processes a @c wxEVT_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_DRAG_DONE(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Notify that the tab has been dragged. Processes a @c wxEVT_AUINOTEBOOK_DRAG_DONE event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The middle mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The middle mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The right mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The right mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_UP event.
|
2012-02-25 18:49:49 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_BG_DCLICK(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Double clicked on the tabs background area. Processes a @c wxEVT_AUINOTEBOOK_BG_DCLICK event.
|
2008-11-22 07:10:54 -05:00
|
|
|
@endEventTable
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
2011-10-02 06:29:00 -04:00
|
|
|
class wxAuiNotebook : public wxBookCtrlBase
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
2008-11-22 07:10:54 -05:00
|
|
|
/**
|
|
|
|
Default ctor.
|
|
|
|
*/
|
2008-03-14 12:12:37 -04:00
|
|
|
wxAuiNotebook();
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Constructor. Creates a wxAuiNotebok control.
|
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxAUI_NB_DEFAULT_STYLE);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-14 12:12:37 -04:00
|
|
|
Adds a page.
|
|
|
|
If the @a select parameter is @true, calling this will generate a page change event.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool AddPage(wxWindow* page, const wxString& caption,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool select = false,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxBitmap& bitmap = wxNullBitmap);
|
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Adds a new page.
|
|
|
|
|
|
|
|
The page must have the book control itself as the parent and must not
|
|
|
|
have been added to this control previously.
|
|
|
|
|
|
|
|
The call to this function may generate the page changing events.
|
|
|
|
|
|
|
|
@param page
|
|
|
|
Specifies the new page.
|
|
|
|
@param text
|
|
|
|
Specifies the text for the new page.
|
|
|
|
@param select
|
|
|
|
Specifies whether the page should be selected.
|
|
|
|
@param imageId
|
|
|
|
Specifies the optional image index for the new page.
|
|
|
|
|
|
|
|
@return @true if successful, @false otherwise.
|
|
|
|
|
|
|
|
@remarks Do not delete the page, it will be deleted by the book control.
|
|
|
|
|
|
|
|
@see InsertPage()
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
virtual bool AddPage(wxWindow *page, const wxString &text, bool select, int imageId);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Sets the selection to the next or previous page.
|
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
void AdvanceSelection(bool forward = true);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Changes the selection for the given page, returning the previous selection.
|
|
|
|
|
|
|
|
This function behaves as SetSelection() but does @em not generate the
|
|
|
|
page changing events.
|
|
|
|
|
|
|
|
See @ref overview_events_prog for more information.
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
virtual int ChangeSelection(size_t n);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Creates the notebook window.
|
|
|
|
*/
|
|
|
|
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0);
|
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Deletes all pages.
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
virtual bool DeleteAllPages();
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-14 12:12:37 -04:00
|
|
|
Deletes a page at the given index.
|
|
|
|
Calling this method will generate a page change event.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool DeletePage(size_t page);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the associated art provider.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxAuiTabArt* GetArtProvider() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Returns the currently selected page or @NULL.
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
wxWindow* GetCurrentPage () const;
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-14 12:12:37 -04:00
|
|
|
Returns the desired height of the notebook for the given page height.
|
|
|
|
Use this to fit the notebook to a given page size.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
int GetHeightForPageHeight(int pageHeight);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the page specified by the given index.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxWindow* GetPage(size_t page_idx) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the tab bitmap for the page.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxBitmap GetPageBitmap(size_t page) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the number of pages in the notebook.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
size_t GetPageCount() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-25 12:01:21 -04:00
|
|
|
Returns the page index for the specified window.
|
2008-03-14 12:12:37 -04:00
|
|
|
If the window is not found in the notebook, wxNOT_FOUND is returned.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetPageIndex(wxWindow* page_wnd) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the tab label for the page.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxString GetPageText(size_t page) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2012-04-16 08:12:26 -04:00
|
|
|
/**
|
|
|
|
Returns the tooltip for the tab label of the page.
|
|
|
|
|
|
|
|
@since 2.9.4
|
|
|
|
*/
|
|
|
|
wxString GetPageToolTip(size_t pageIdx) const;
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Returns the currently selected page.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetSelection() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the height of the tab control.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetTabCtrlHeight() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
InsertPage() is similar to AddPage, but allows the ability to specify the
|
|
|
|
insert location.
|
2008-03-09 08:33:59 -04:00
|
|
|
If the @a select parameter is @true, calling this will generate a page change
|
2008-03-08 08:52:38 -05:00
|
|
|
event.
|
|
|
|
*/
|
|
|
|
bool InsertPage(size_t page_idx, wxWindow* page,
|
|
|
|
const wxString& caption,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool select = false,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxBitmap& bitmap = wxNullBitmap);
|
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Inserts a new page at the specified position.
|
|
|
|
|
|
|
|
@param index
|
|
|
|
Specifies the position for the new page.
|
|
|
|
@param page
|
|
|
|
Specifies the new page.
|
|
|
|
@param text
|
|
|
|
Specifies the text for the new page.
|
|
|
|
@param select
|
|
|
|
Specifies whether the page should be selected.
|
|
|
|
@param imageId
|
|
|
|
Specifies the optional image index for the new page.
|
|
|
|
|
|
|
|
@return @true if successful, @false otherwise.
|
|
|
|
|
|
|
|
@remarks Do not delete the page, it will be deleted by the book control.
|
|
|
|
|
|
|
|
@see AddPage()
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
|
2016-10-27 21:48:52 -04:00
|
|
|
bool select, int imageId);
|
2011-10-02 06:29:00 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Removes a page, without deleting the window pointer.
|
|
|
|
*/
|
|
|
|
bool RemovePage(size_t page);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the art provider to be used by the notebook.
|
|
|
|
*/
|
|
|
|
void SetArtProvider(wxAuiTabArt* art);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the font for drawing the tab labels, using a bold version of the font for
|
|
|
|
selected tab labels.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual bool SetFont(const wxFont& font);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the font for measuring tab labels.
|
|
|
|
*/
|
|
|
|
void SetMeasuringFont(const wxFont& font);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the font for drawing unselected tab labels.
|
|
|
|
*/
|
|
|
|
void SetNormalFont(const wxFont& font);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the bitmap for the page. To remove a bitmap from the tab caption, pass
|
|
|
|
wxNullBitmap.
|
|
|
|
*/
|
|
|
|
bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
|
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
Sets the image index for the given page. @a image is an index into
|
|
|
|
the image list which was set with SetImageList().
|
|
|
|
@since 2.9.3
|
|
|
|
*/
|
|
|
|
virtual bool SetPageImage(size_t n, int imageId);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Sets the tab label for the page.
|
|
|
|
*/
|
|
|
|
bool SetPageText(size_t page, const wxString& text);
|
|
|
|
|
2012-04-16 08:12:26 -04:00
|
|
|
/**
|
|
|
|
Sets the tooltip displayed when hovering over the tab label of the page.
|
|
|
|
|
|
|
|
@return
|
|
|
|
@true if tooltip was updated, @false if it failed, e.g. because the
|
|
|
|
page index is invalid.
|
|
|
|
|
|
|
|
@since 2.9.4
|
|
|
|
*/
|
|
|
|
bool SetPageToolTip(size_t page, const wxString& text);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Sets the font for drawing selected tab labels.
|
|
|
|
*/
|
|
|
|
void SetSelectedFont(const wxFont& font);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the page selection. Calling this method will generate a page change event.
|
|
|
|
*/
|
|
|
|
size_t SetSelection(size_t new_page);
|
|
|
|
|
|
|
|
/**
|
2008-03-14 12:12:37 -04:00
|
|
|
Sets the tab height. By default, the tab control height is calculated
|
|
|
|
by measuring the text height and bitmap sizes on the tab captions. Calling this
|
2008-03-08 08:52:38 -05:00
|
|
|
method will override that calculation and set the tab control to the specified
|
2008-03-14 12:12:37 -04:00
|
|
|
height parameter. A call to this method will override any call to
|
2008-03-08 08:52:38 -05:00
|
|
|
SetUniformBitmapSize().
|
2008-03-14 12:12:37 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Specifying -1 as the height will return the control to its default auto-sizing
|
|
|
|
behaviour.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetTabCtrlHeight(int height);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2015-07-04 10:33:21 -04:00
|
|
|
/**
|
|
|
|
Ensure that all tabs have the same height, even if some of them don't
|
|
|
|
have bitmaps.
|
|
|
|
|
|
|
|
Passing ::wxDefaultSize as @a size undoes the effect of a previous call
|
|
|
|
to this function and instructs the control to use dynamic tab height.
|
|
|
|
*/
|
|
|
|
virtual void SetUniformBitmapSize(const wxSize& size);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Split performs a split operation programmatically. The argument @a page
|
2008-03-14 12:12:37 -04:00
|
|
|
indicates the page that will be split off. This page will also become the
|
|
|
|
active page after the split.
|
|
|
|
|
|
|
|
The @a direction argument specifies where the pane should go, it should be one
|
2008-03-08 08:52:38 -05:00
|
|
|
of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
|
|
|
|
*/
|
2009-01-10 17:42:09 -05:00
|
|
|
virtual void Split(size_t page, int direction);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Shows the window menu for the active tab control associated with this notebook,
|
|
|
|
and returns @true if a selection was made.
|
|
|
|
*/
|
|
|
|
bool ShowWindowMenu();
|
2016-11-11 22:02:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the image index for the given page.
|
|
|
|
*/
|
|
|
|
virtual int GetPageImage(size_t nPage) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
2016-10-27 21:48:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxAuiNotebookPage
|
|
|
|
|
|
|
|
A simple class which holds information about the notebook's pages and their state.
|
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
|
|
|
class wxAuiNotebookPage
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxWindow* window; // page's associated window
|
|
|
|
wxString caption; // caption displayed on the tab
|
|
|
|
wxString tooltip; // tooltip displayed when hovering over tab title
|
|
|
|
wxBitmap bitmap; // tab's bitmap
|
|
|
|
wxRect rect; // tab's hit rectangle
|
|
|
|
bool active; // true if the page is currently active
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-06-30 19:41:23 -04:00
|
|
|
/**
|
|
|
|
@class wxAuiTabContainerButton
|
|
|
|
|
|
|
|
A simple class which holds information about wxAuiNotebook tab buttons and their state.
|
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
|
|
|
class wxAuiTabContainerButton
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// button's id
|
|
|
|
int id;
|
|
|
|
/// current state (normal, hover, pressed, etc.)
|
|
|
|
int curState;
|
|
|
|
/// buttons location (wxLEFT, wxRIGHT, or wxCENTER)
|
|
|
|
int location;
|
|
|
|
/// button's hover bitmap
|
|
|
|
wxBitmap bitmap;
|
|
|
|
/// button's disabled bitmap
|
|
|
|
wxBitmap disBitmap;
|
|
|
|
/// button's hit rectangle
|
|
|
|
wxRect rect;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxAuiTabContainer
|
|
|
|
|
|
|
|
wxAuiTabContainer is a class which contains information about each tab.
|
|
|
|
It also can render an entire tab control to a specified DC.
|
|
|
|
It's not a window class itself, because this code will be used by
|
|
|
|
the wxAuiNotebook, where it is disadvantageous to have separate
|
|
|
|
windows for each tab control in the case of "docked tabs".
|
|
|
|
|
|
|
|
A derived class, wxAuiTabCtrl, is an actual wxWindow - derived window
|
|
|
|
which can be used as a tab control in the normal sense.
|
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
|
|
|
class wxAuiTabContainer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
Default ctor.
|
|
|
|
*/
|
|
|
|
wxAuiTabContainer();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Default dtor.
|
|
|
|
*/
|
|
|
|
virtual ~wxAuiTabContainer();
|
|
|
|
|
|
|
|
void SetArtProvider(wxAuiTabArt* art);
|
|
|
|
wxAuiTabArt* GetArtProvider() const;
|
|
|
|
|
|
|
|
void SetFlags(unsigned int flags);
|
|
|
|
unsigned int GetFlags() const;
|
|
|
|
|
|
|
|
bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
|
|
|
|
bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
|
|
|
|
bool MovePage(wxWindow* page, size_t newIdx);
|
|
|
|
bool RemovePage(wxWindow* page);
|
|
|
|
bool SetActivePage(wxWindow* page);
|
|
|
|
bool SetActivePage(size_t page);
|
|
|
|
void SetNoneActive();
|
|
|
|
int GetActivePage() const;
|
|
|
|
bool TabHitTest(int x, int y, wxWindow** hit) const;
|
|
|
|
bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
|
|
|
|
wxWindow* GetWindowFromIdx(size_t idx) const;
|
|
|
|
int GetIdxFromWindow(wxWindow* page) const;
|
|
|
|
size_t GetPageCount() const;
|
|
|
|
wxAuiNotebookPage& GetPage(size_t idx);
|
|
|
|
const wxAuiNotebookPage& GetPage(size_t idx) const;
|
|
|
|
wxAuiNotebookPageArray& GetPages();
|
|
|
|
void SetNormalFont(const wxFont& normalFont);
|
|
|
|
void SetSelectedFont(const wxFont& selectedFont);
|
|
|
|
void SetMeasuringFont(const wxFont& measuringFont);
|
|
|
|
void SetColour(const wxColour& colour);
|
|
|
|
void SetActiveColour(const wxColour& colour);
|
|
|
|
void DoShowHide();
|
|
|
|
void SetRect(const wxRect& rect);
|
|
|
|
|
|
|
|
void RemoveButton(int id);
|
|
|
|
void AddButton(int id,
|
|
|
|
int location,
|
|
|
|
const wxBitmap& normalBitmap = wxNullBitmap,
|
|
|
|
const wxBitmap& disabledBitmap = wxNullBitmap);
|
|
|
|
|
|
|
|
size_t GetTabOffset() const;
|
|
|
|
void SetTabOffset(size_t offset);
|
|
|
|
|
|
|
|
// Is the tab visible?
|
|
|
|
bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd);
|
|
|
|
|
|
|
|
// Make the tab visible if it wasn't already
|
|
|
|
void MakeTabVisible(int tabPage, wxWindow* win);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void Render(wxDC* dc, wxWindow* wnd);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
wxAuiTabArt* m_art;
|
|
|
|
wxAuiNotebookPageArray m_pages;
|
|
|
|
wxAuiTabContainerButtonArray m_buttons;
|
|
|
|
wxAuiTabContainerButtonArray m_tabCloseButtons;
|
|
|
|
wxRect m_rect;
|
|
|
|
size_t m_tabOffset;
|
|
|
|
unsigned int m_flags;
|
|
|
|
};
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxAuiTabArt
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2012-06-30 19:41:23 -04:00
|
|
|
Tab art provider defines all the drawing functions used by wxAuiNotebook.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2012-06-30 19:41:23 -04:00
|
|
|
This allows the wxAuiNotebook to have a pluggable look-and-feel.
|
|
|
|
|
|
|
|
By default, a wxAuiNotebook uses an instance of this class called
|
|
|
|
wxAuiDefaultTabArt which provides bitmap art 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 wxAuiNotebook tab bar is wxAuiSimpleTabArt.
|
|
|
|
|
|
|
|
Call wxAuiNotebook::SetArtProvider() to make use of this new tab art.
|
2008-03-14 12:12:37 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxAuiTabArt
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxAuiTabArt();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Clones the art object.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual wxAuiTabArt* Clone() = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Draws a background on the given area.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Draws a button.
|
|
|
|
*/
|
2008-03-25 12:01:21 -04:00
|
|
|
virtual void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect,
|
|
|
|
int bitmap_id, int button_state, int orientation,
|
|
|
|
wxRect* out_rect) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Draws a tab.
|
|
|
|
*/
|
2008-03-25 12:01:21 -04:00
|
|
|
virtual void DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page,
|
|
|
|
const wxRect& rect, int close_button_state,
|
|
|
|
wxRect* out_tab_rect, wxRect* out_button_rect, int* x_extent) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the tab control size.
|
|
|
|
*/
|
2008-03-25 12:01:21 -04:00
|
|
|
virtual int GetBestTabCtrlSize(wxWindow*, const wxAuiNotebookPageArray&, const wxSize&) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the indent size.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual int GetIndentSize() = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the tab size for the given caption, bitmap and state.
|
|
|
|
*/
|
2008-03-25 12:01:21 -04:00
|
|
|
virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption,
|
|
|
|
const wxBitmap& bitmap, bool active,
|
|
|
|
int close_button_state, int* x_extent) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets flags.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetFlags(unsigned int flags) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the font used for calculating measurements.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetMeasuringFont(const wxFont& font) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the normal font for drawing labels.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetNormalFont(const wxFont& font) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the font for drawing text for selected UI elements.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetSelectedFont(const wxFont& font) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2011-04-10 11:36:03 -04:00
|
|
|
/**
|
|
|
|
Sets the colour of the inactive tabs.
|
|
|
|
|
|
|
|
@since 2.9.2
|
|
|
|
*/
|
|
|
|
virtual void SetColour(const wxColour& colour) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the colour of the selected tab.
|
|
|
|
|
|
|
|
@since 2.9.2
|
|
|
|
*/
|
|
|
|
virtual void SetActiveColour(const wxColour& colour) = 0;
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Sets sizing information.
|
|
|
|
*/
|
2008-03-24 18:17:25 -04:00
|
|
|
virtual void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2011-10-02 06:29:00 -04:00
|
|
|
/**
|
|
|
|
@class wxAuiNotebookEvent
|
|
|
|
|
|
|
|
This class is used by the events generated by wxAuiNotebook.
|
|
|
|
|
|
|
|
@beginEventEmissionTable{wxAuiNotebookEvent}
|
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CLOSE(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
A page is about to be closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSE event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
A page has been closed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CLOSED event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CHANGED(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The page selection was changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGED event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_PAGE_CHANGING(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The page selection is about to be changed. Processes a @c wxEVT_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_BUTTON(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The window list button has been pressed. Processes a @c wxEVT_AUINOTEBOOK_BUTTON event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_BEGIN_DRAG(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Dragging is about to begin. Processes a @c wxEVT_AUINOTEBOOK_BEGIN_DRAG event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_END_DRAG(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Dragging has ended. Processes a @c wxEVT_AUINOTEBOOK_END_DRAG event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_DRAG_MOTION(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Emitted during a drag and drop operation. Processes a @c wxEVT_AUINOTEBOOK_DRAG_MOTION event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@event{EVT_AUINOTEBOOK_ALLOW_DND(id, func)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Whether to allow a tab to be dropped. Processes a @c wxEVT_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_DRAG_DONE(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Notify that the tab has been dragged. Processes a @c wxEVT_AUINOTEBOOK_DRAG_DONE event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The middle mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The middle mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The right mouse button is pressed on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
The right mouse button is released on a tab. Processes a @c wxEVT_AUINOTEBOOK_TAB_RIGHT_UP event.
|
2012-02-27 10:26:54 -05:00
|
|
|
@event{EVT_AUINOTEBOOK_BG_DCLICK(winid, fn)}
|
2013-04-25 06:11:03 -04:00
|
|
|
Double clicked on the tabs background area. Processes a @c wxEVT_AUINOTEBOOK_BG_DCLICK event.
|
2011-10-02 06:29:00 -04:00
|
|
|
@endEventTable
|
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{events,bookctrl}
|
|
|
|
|
|
|
|
@see wxAuiNotebook, wxBookCtrlEvent
|
|
|
|
*/
|
|
|
|
class wxAuiNotebookEvent : public wxBookCtrlEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0);
|
|
|
|
|
|
|
|
wxEvent *Clone();
|
|
|
|
};
|
|
|
|
|
2014-02-24 15:54:39 -05:00
|
|
|
wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_BUTTON;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_END_DRAG;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE;
|
|
|
|
wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK;
|
|
|
|
|
2012-06-30 19:41:23 -04:00
|
|
|
/**
|
|
|
|
Default art provider for wxAuiNotebook.
|
|
|
|
|
|
|
|
@see wxAuiTabArt
|
|
|
|
|
2013-10-01 09:03:25 -04:00
|
|
|
@genericAppearance{auidefaulttabart}
|
2012-06-30 19:41:23 -04:00
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
|
|
|
|
|
|
|
class wxAuiDefaultTabArt : public wxAuiTabArt
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxAuiDefaultTabArt();
|
|
|
|
virtual ~wxAuiDefaultTabArt();
|
|
|
|
|
|
|
|
wxAuiTabArt* Clone();
|
|
|
|
void SetFlags(unsigned int flags);
|
|
|
|
void SetSizingInfo(const wxSize& tabCtrlSize,
|
|
|
|
size_t tabCount);
|
|
|
|
|
|
|
|
void SetNormalFont(const wxFont& font);
|
|
|
|
void SetSelectedFont(const wxFont& font);
|
|
|
|
void SetMeasuringFont(const wxFont& font);
|
|
|
|
void SetColour(const wxColour& colour);
|
|
|
|
void SetActiveColour(const wxColour& colour);
|
|
|
|
|
|
|
|
void DrawBackground(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxRect& rect);
|
|
|
|
|
|
|
|
void DrawTab(wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPage& pane,
|
|
|
|
const wxRect& inRect,
|
|
|
|
int closeButtonState,
|
|
|
|
wxRect* outTabRect,
|
|
|
|
wxRect* outButtonRect,
|
|
|
|
int* xExtent);
|
|
|
|
|
|
|
|
void DrawButton(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxRect& inRect,
|
|
|
|
int bitmapId,
|
|
|
|
int buttonState,
|
|
|
|
int orientation,
|
|
|
|
wxRect* outRect);
|
|
|
|
|
|
|
|
int GetIndentSize();
|
|
|
|
|
|
|
|
wxSize GetTabSize(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
bool active,
|
|
|
|
int closeButtonState,
|
|
|
|
int* xExtent);
|
|
|
|
|
|
|
|
int ShowDropDown(
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPageArray& items,
|
|
|
|
int activeIdx);
|
|
|
|
|
|
|
|
int GetBestTabCtrlSize(wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPageArray& pages,
|
|
|
|
const wxSize& requiredBmpSize);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
The font used for all tabs
|
|
|
|
*/
|
|
|
|
wxFont m_normalFont;
|
|
|
|
wxFont m_selectedFont; /// The font used on the selected tab
|
|
|
|
wxFont m_measuringFont;
|
|
|
|
wxColour m_baseColour;
|
|
|
|
wxPen m_baseColourPen;
|
|
|
|
wxPen m_borderPen;
|
|
|
|
wxBrush m_baseColourBrush;
|
|
|
|
wxColour m_activeColour;
|
|
|
|
wxBitmap m_activeCloseBmp;
|
|
|
|
wxBitmap m_disabledCloseBmp;
|
|
|
|
wxBitmap m_activeLeftBmp;
|
|
|
|
wxBitmap m_disabledLeftBmp;
|
|
|
|
wxBitmap m_activeRightBmp;
|
|
|
|
wxBitmap m_disabledRightBmp;
|
|
|
|
wxBitmap m_activeWindowListBmp;
|
|
|
|
wxBitmap m_disabledWindowListBmp;
|
|
|
|
|
|
|
|
int m_fixedTabWidth;
|
|
|
|
int m_tabCtrlHeight;
|
|
|
|
unsigned int m_flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxAuiSimpleTabArt
|
|
|
|
|
|
|
|
Another standard tab art provider for wxAuiNotebook.
|
|
|
|
|
|
|
|
wxAuiSimpleTabArt is derived from wxAuiTabArt demonstrating how to write a
|
|
|
|
completely new tab art class. It can also be used as alternative to
|
|
|
|
wxAuiDefaultTabArt.
|
|
|
|
|
2013-10-01 09:03:25 -04:00
|
|
|
@genericAppearance{auisimpletabart}
|
2012-06-30 19:41:23 -04:00
|
|
|
|
|
|
|
@library{wxaui}
|
|
|
|
@category{aui}
|
|
|
|
*/
|
|
|
|
|
|
|
|
class wxAuiSimpleTabArt : public wxAuiTabArt
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxAuiSimpleTabArt();
|
|
|
|
virtual ~wxAuiSimpleTabArt();
|
|
|
|
|
|
|
|
wxAuiTabArt* Clone();
|
|
|
|
void SetFlags(unsigned int flags);
|
|
|
|
|
|
|
|
void SetSizingInfo(const wxSize& tabCtrlSize,
|
|
|
|
size_t tabCount);
|
|
|
|
|
|
|
|
void SetNormalFont(const wxFont& font);
|
|
|
|
void SetSelectedFont(const wxFont& font);
|
|
|
|
void SetMeasuringFont(const wxFont& font);
|
|
|
|
void SetColour(const wxColour& colour);
|
|
|
|
void SetActiveColour(const wxColour& colour);
|
|
|
|
|
|
|
|
void DrawBackground(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxRect& rect);
|
|
|
|
|
|
|
|
void DrawTab(wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPage& pane,
|
|
|
|
const wxRect& inRect,
|
|
|
|
int closeButtonState,
|
|
|
|
wxRect* outTabRect,
|
|
|
|
wxRect* outButtonRect,
|
|
|
|
int* xExtent);
|
|
|
|
|
|
|
|
void DrawButton(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxRect& inRect,
|
|
|
|
int bitmapId,
|
|
|
|
int buttonState,
|
|
|
|
int orientation,
|
|
|
|
wxRect* outRect);
|
|
|
|
|
|
|
|
int GetIndentSize();
|
|
|
|
|
|
|
|
wxSize GetTabSize(
|
|
|
|
wxDC& dc,
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
bool active,
|
|
|
|
int closeButtonState,
|
|
|
|
int* xExtent);
|
|
|
|
|
|
|
|
int ShowDropDown(
|
|
|
|
wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPageArray& items,
|
|
|
|
int activeIdx);
|
|
|
|
|
|
|
|
int GetBestTabCtrlSize(wxWindow* wnd,
|
|
|
|
const wxAuiNotebookPageArray& pages,
|
|
|
|
const wxSize& requiredBmpSize);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
wxFont m_normalFont;
|
|
|
|
wxFont m_selectedFont;
|
|
|
|
wxFont m_measuringFont;
|
|
|
|
wxPen m_normalBkPen;
|
|
|
|
wxPen m_selectedBkPen;
|
|
|
|
wxBrush m_normalBkBrush;
|
|
|
|
wxBrush m_selectedBkBrush;
|
|
|
|
wxBrush m_bkBrush;
|
|
|
|
wxBitmap m_activeCloseBmp;
|
|
|
|
wxBitmap m_disabledCloseBmp;
|
|
|
|
wxBitmap m_activeLeftBmp;
|
|
|
|
wxBitmap m_disabledLeftBmp;
|
|
|
|
wxBitmap m_activeRightBmp;
|
|
|
|
wxBitmap m_disabledRightBmp;
|
|
|
|
wxBitmap m_activeWindowListBmp;
|
|
|
|
wxBitmap m_disabledWindowListBmp;
|
|
|
|
|
|
|
|
int m_fixedTabWidth;
|
|
|
|
unsigned int m_flags;
|
|
|
|
};
|