wxAuiNotebook window styles implemented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c50fa29f43
commit
0ce53f3226
@ -37,8 +37,8 @@ enum wxAuiNotebookOption
|
||||
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,
|
||||
|
||||
@ -337,10 +337,10 @@ public:
|
||||
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();
|
||||
|
||||
@ -363,6 +363,8 @@ public:
|
||||
|
||||
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);
|
||||
@ -370,6 +372,7 @@ public:
|
||||
size_t GetPageCount() const;
|
||||
wxWindow* GetPage(size_t page_idx) const;
|
||||
|
||||
|
||||
void SetArtProvider(wxAuiTabArt* art);
|
||||
wxAuiTabArt* GetArtProvider();
|
||||
|
||||
@ -412,6 +415,7 @@ protected:
|
||||
unsigned int m_flags;
|
||||
|
||||
#ifndef SWIG
|
||||
DECLARE_CLASS(wxAuiNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION)
|
||||
|
||||
|
||||
|
||||
IMPLEMENT_CLASS(wxAuiNotebook, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookEvent, wxEvent)
|
||||
|
||||
|
||||
@ -1519,6 +1519,33 @@ wxAuiTabArt* wxAuiNotebook::GetArtProvider()
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user