]>
git.saurik.com Git - wxWidgets.git/blob - samples/notebook/notebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: samples/notebook/notebook.h
3 // Purpose: a sample demonstrating notebook usage
4 // Author: Julian Smart
5 // Modified by: Dimitri Schoolwerth
8 // Copyright: (c) 1998-2002 wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/choicebk.h"
13 #include "wx/listbook.h"
14 #include "wx/treebook.h"
15 #include "wx/notebook.h"
16 #include "wx/simplebook.h"
17 #include "wx/toolbook.h"
18 #include "wx/aui/auibook.h"
20 #if wxUSE_LOG && !defined( __SMARTPHONE__ )
26 // Define a new application
27 class MyApp
: public wxApp
36 class MyFrame
: public wxFrame
42 void OnType(wxCommandEvent
& event
);
43 void OnOrient(wxCommandEvent
& event
);
44 void OnShowImages(wxCommandEvent
& event
);
45 void OnStyle(wxCommandEvent
& event
);
46 void OnExit(wxCommandEvent
& event
);
48 void OnAddPage(wxCommandEvent
& event
);
49 void OnAddPageNoSelect(wxCommandEvent
& event
);
50 void OnInsertPage(wxCommandEvent
& event
);
51 void OnDeleteCurPage(wxCommandEvent
& event
);
52 void OnDeleteLastPage(wxCommandEvent
& event
);
53 void OnNextPage(wxCommandEvent
& event
);
54 void OnChangeSelection(wxCommandEvent
&event
);
55 void OnSetSelection(wxCommandEvent
&event
);
56 void OnGetPageSize(wxCommandEvent
&event
);
57 void OnSetPageSize(wxCommandEvent
&event
);
59 void OnAddSubPage(wxCommandEvent
& event
);
60 void OnAddPageBefore(wxCommandEvent
& event
);
63 void OnContextHelp(wxCommandEvent
& event
);
66 void OnHitTest(wxCommandEvent
& event
);
68 void OnBookCtrl(wxBookCtrlBaseEvent
& event
);
70 void OnNotebook(wxNotebookEvent
& event
) { OnBookCtrl(event
); }
73 void OnChoicebook(wxChoicebookEvent
& event
) { OnBookCtrl(event
); }
76 void OnListbook(wxListbookEvent
& event
) { OnBookCtrl(event
); }
79 void OnTreebook(wxTreebookEvent
& event
) { OnBookCtrl(event
); }
82 void OnToolbook(wxToolbookEvent
& event
) { OnBookCtrl(event
); }
85 void OnAuiNotebook(wxAuiNotebookEvent
& event
) { OnBookCtrl(event
); }
88 void OnIdle(wxIdleEvent
& event
);
91 void OnUpdateTreeMenu(wxUpdateUIEvent
& event
);
92 #endif // wxUSE_TREEBOOK
94 wxBookCtrlBase
*GetCurrentBook() const { return m_bookCtrl
; }
97 wxLog
*m_logTargetOld
;
100 wxPanel
*CreateNewPage() const;
101 void AddFlagStrIfFlagPresent(wxString
& flagStr
, long flags
, long flag
, const wxChar
* flagName
) const;
116 bool m_chkShowImages
;
125 wxPanel
*m_panel
; // Panel containing notebook and other controls
126 wxBookCtrlBase
*m_bookCtrl
;
133 wxBoxSizer
*m_sizerFrame
;
135 wxImageList
*m_imageList
;
137 DECLARE_EVENT_TABLE()
142 // these should be in the same order as Type_XXX elements above
143 ID_BOOK_NOTEBOOK
= wxID_HIGHEST
,
165 ID_ADD_PAGE_NO_SELECT
,
185 Name of each notebook page.
186 Used as a label for a page, and used when cloning the notebook
187 to decide what type of page it is.
190 #define I_WAS_INSERTED_PAGE_NAME wxT("Inserted")
191 #define RADIOBUTTONS_PAGE_NAME wxT("Radiobuttons")
192 #define VETO_PAGE_NAME wxT("Veto")
193 #define MAXIMIZED_BUTTON_PAGE_NAME wxT("Maximized button")
195 // Pages that can be added by the user
196 #define INSERTED_PAGE_NAME wxT("Inserted ")
197 #define ADDED_PAGE_NAME wxT("Added ")
198 #define ADDED_PAGE_NAME_BEFORE wxT(" Inserted before ")
199 #define ADDED_SUB_PAGE_NAME wxT(" Inserted sub-page ")