wxAUI_NB_TAB_SPLIT = 1 << 4,
wxAUI_NB_TAB_MOVE = 1 << 5,
wxAUI_NB_SCROLL_BUTTONS = 1 << 6,
- wxAUI_NB_CLOSE_BUTTON = 1 << 7,
- wxAUI_NB_PAGELIST_BUTTON = 1 << 8,
+ wxAUI_NB_PAGELIST_BUTTON = 1 << 7,
+ wxAUI_NB_CLOSE_BUTTON = 1 << 8,
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 9,
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 10,
wxAuiNotebook();
wxAuiNotebook(wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxAUI_NB_DEFAULT_STYLE);
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAUI_NB_DEFAULT_STYLE);
virtual ~wxAuiNotebook();
bool DeletePage(size_t page);
bool RemovePage(size_t page);
+
+ void SetWindowStyleFlag(long style);
bool SetPageText(size_t page, const wxString& text);
size_t SetSelection(size_t new_page);
size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const;
+
void SetArtProvider(wxAuiTabArt* art);
wxAuiTabArt* GetArtProvider();
unsigned int m_flags;
#ifndef SWIG
+ DECLARE_CLASS(wxAuiNotebook)
DECLARE_EVENT_TABLE()
#endif
};
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION)
-
+IMPLEMENT_CLASS(wxAuiNotebook, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookEvent, wxEvent)
return m_tabs.GetArtProvider();
}
+void wxAuiNotebook::SetWindowStyleFlag(long style)
+{
+ wxControl::SetWindowStyleFlag(style);
+
+ m_flags = (unsigned int)style;
+
+ // if the control is already initialized
+ if (m_mgr.GetManagedWindow() == (wxWindow*)this)
+ {
+ // let all of the tab children know about the new style
+
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ size_t i, pane_count = all_panes.GetCount();
+ for (i = 0; i < pane_count; ++i)
+ {
+ wxAuiPaneInfo& pane = all_panes.Item(i);
+ if (pane.name == wxT("dummy"))
+ continue;
+ wxAuiTabCtrl* tabctrl = ((wxTabFrame*)pane.window)->m_tabs;
+ tabctrl->SetFlags(m_flags);
+ tabctrl->Refresh();
+ tabctrl->Update();
+ }
+ }
+}
+
+
bool wxAuiNotebook::AddPage(wxWindow* page,
const wxString& caption,
bool select,