Committed missing part of earlier bottom tab patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,6 +97,8 @@ class MyFrame : public wxFrame
|
|||||||
ID_NotebookTabFixedWidth,
|
ID_NotebookTabFixedWidth,
|
||||||
ID_NotebookArtGloss,
|
ID_NotebookArtGloss,
|
||||||
ID_NotebookArtSimple,
|
ID_NotebookArtSimple,
|
||||||
|
ID_NotebookAlignTop,
|
||||||
|
ID_NotebookAlignBottom,
|
||||||
ID_FirstPerspective = ID_CreatePerspective+1000
|
ID_FirstPerspective = ID_CreatePerspective+1000
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -144,6 +146,7 @@ private:
|
|||||||
void OnNotebookPageClose(wxAuiNotebookEvent& evt);
|
void OnNotebookPageClose(wxAuiNotebookEvent& evt);
|
||||||
void OnExit(wxCommandEvent& evt);
|
void OnExit(wxCommandEvent& evt);
|
||||||
void OnAbout(wxCommandEvent& evt);
|
void OnAbout(wxCommandEvent& evt);
|
||||||
|
void OnTabAlignment(wxCommandEvent &evt);
|
||||||
|
|
||||||
void OnGradient(wxCommandEvent& evt);
|
void OnGradient(wxCommandEvent& evt);
|
||||||
void OnManagerFlag(wxCommandEvent& evt);
|
void OnManagerFlag(wxCommandEvent& evt);
|
||||||
@@ -591,6 +594,8 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(ID_NotebookWindowList, MyFrame::OnNotebookFlag)
|
EVT_MENU(ID_NotebookWindowList, MyFrame::OnNotebookFlag)
|
||||||
EVT_MENU(ID_NotebookArtGloss, MyFrame::OnNotebookFlag)
|
EVT_MENU(ID_NotebookArtGloss, MyFrame::OnNotebookFlag)
|
||||||
EVT_MENU(ID_NotebookArtSimple, MyFrame::OnNotebookFlag)
|
EVT_MENU(ID_NotebookArtSimple, MyFrame::OnNotebookFlag)
|
||||||
|
EVT_MENU(ID_NotebookAlignTop, MyFrame::OnTabAlignment)
|
||||||
|
EVT_MENU(ID_NotebookAlignBottom, MyFrame::OnTabAlignment)
|
||||||
EVT_MENU(ID_NoGradient, MyFrame::OnGradient)
|
EVT_MENU(ID_NoGradient, MyFrame::OnGradient)
|
||||||
EVT_MENU(ID_VerticalGradient, MyFrame::OnGradient)
|
EVT_MENU(ID_VerticalGradient, MyFrame::OnGradient)
|
||||||
EVT_MENU(ID_HorizontalGradient, MyFrame::OnGradient)
|
EVT_MENU(ID_HorizontalGradient, MyFrame::OnGradient)
|
||||||
@@ -698,6 +703,9 @@ MyFrame::MyFrame(wxWindow* parent,
|
|||||||
notebook_menu->AppendRadioItem(ID_NotebookCloseButtonAll, _("Close Button on All Tabs"));
|
notebook_menu->AppendRadioItem(ID_NotebookCloseButtonAll, _("Close Button on All Tabs"));
|
||||||
notebook_menu->AppendRadioItem(ID_NotebookCloseButtonActive, _("Close Button on Active Tab"));
|
notebook_menu->AppendRadioItem(ID_NotebookCloseButtonActive, _("Close Button on Active Tab"));
|
||||||
notebook_menu->AppendSeparator();
|
notebook_menu->AppendSeparator();
|
||||||
|
notebook_menu->AppendRadioItem(ID_NotebookAlignTop, _("Tab Top Alignment"));
|
||||||
|
notebook_menu->AppendRadioItem(ID_NotebookAlignBottom, _("Tab Bottom Alignment"));
|
||||||
|
notebook_menu->AppendSeparator();
|
||||||
notebook_menu->AppendCheckItem(ID_NotebookAllowTabMove, _("Allow Tab Move"));
|
notebook_menu->AppendCheckItem(ID_NotebookAllowTabMove, _("Allow Tab Move"));
|
||||||
notebook_menu->AppendCheckItem(ID_NotebookAllowTabExternalMove, _("Allow External Tab Move"));
|
notebook_menu->AppendCheckItem(ID_NotebookAllowTabExternalMove, _("Allow External Tab Move"));
|
||||||
notebook_menu->AppendCheckItem(ID_NotebookAllowTabSplit, _("Allow Notebook Split"));
|
notebook_menu->AppendCheckItem(ID_NotebookAllowTabSplit, _("Allow Notebook Split"));
|
||||||
@@ -1343,6 +1351,26 @@ void MyFrame::OnChangeContentPane(wxCommandEvent& event)
|
|||||||
m_mgr.Update();
|
m_mgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnTabAlignment(wxCommandEvent &evt)
|
||||||
|
{
|
||||||
|
size_t i, count;
|
||||||
|
wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
|
||||||
|
for (i = 0, count = all_panes.GetCount(); i < count; ++i)
|
||||||
|
{
|
||||||
|
wxAuiPaneInfo& pane = all_panes.Item(i);
|
||||||
|
if (pane.window->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
||||||
|
{
|
||||||
|
wxAuiNotebook* nb = (wxAuiNotebook*)pane.window;
|
||||||
|
|
||||||
|
if (evt.GetId() == ID_NotebookAlignTop)
|
||||||
|
nb->SetWindowStyleFlag(nb->GetWindowStyleFlag()^wxAUI_NB_BOTTOM|wxAUI_NB_TOP);
|
||||||
|
else if (evt.GetId() == ID_NotebookAlignBottom)
|
||||||
|
nb->SetWindowStyleFlag(nb->GetWindowStyleFlag()^wxAUI_NB_TOP|wxAUI_NB_BOTTOM);
|
||||||
|
nb->Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close(true);
|
Close(true);
|
||||||
|
Reference in New Issue
Block a user