]>
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 // License: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/choicebk.h"
13 #include "wx/listbook.h"
14 #include "wx/treebook.h"
15 #include "wx/notebook.h"
17 #if wxUSE_LOG && !defined( __SMARTPHONE__ )
23 // Define a new application
24 class MyApp
: public wxApp
33 class MyFrame
: public wxFrame
39 void OnType(wxCommandEvent
& event
);
40 void OnOrient(wxCommandEvent
& event
);
41 void OnShowImages(wxCommandEvent
& event
);
42 void OnMulti(wxCommandEvent
& event
);
43 void OnExit(wxCommandEvent
& event
);
45 void OnAddPage(wxCommandEvent
& event
);
46 void OnInsertPage(wxCommandEvent
& event
);
47 void OnDeleteCurPage(wxCommandEvent
& event
);
48 void OnDeleteLastPage(wxCommandEvent
& event
);
49 void OnNextPage(wxCommandEvent
& event
);
51 void OnAddSubPage(wxCommandEvent
& event
);
52 void OnAddPageBefore(wxCommandEvent
& event
);
54 void OnBookCtrl(wxBookCtrlBaseEvent
& event
);
56 void OnNotebook(wxNotebookEvent
& event
) { OnBookCtrl(event
); }
59 void OnChoicebook(wxChoicebookEvent
& event
) { OnBookCtrl(event
); }
62 void OnListbook(wxListbookEvent
& event
) { OnBookCtrl(event
); }
65 void OnTreebook(wxTreebookEvent
& event
) { OnBookCtrl(event
); }
68 void OnIdle(wxIdleEvent
& event
);
71 void OnUpdateTreeMenu(wxUpdateUIEvent
& event
);
72 #endif // wxUSE_TREEBOOK
74 wxBookCtrlBase
*GetCurrentBook() const { return m_bookCtrl
; }
77 wxLog
*m_logTargetOld
;
80 wxPanel
*CreateNewPage() const;
81 int TranslateBookFlag(int nb
, int lb
, int chb
, int tbk
) const;
98 wxPanel
*m_panel
; // Panel containing notebook and other controls
99 wxBookCtrlBase
*m_bookCtrl
;
106 wxBoxSizer
*m_sizerFrame
;
108 wxImageList
*m_imageList
;
110 DECLARE_EVENT_TABLE()
115 // these should be in the same order as Type_XXX elements above
116 ID_BOOK_NOTEBOOK
= wxID_HIGHEST
,
140 Name of each notebook page.
141 Used as a label for a page, and used when cloning the notebook
142 to decide what type of page it is.
145 #define I_WAS_INSERTED_PAGE_NAME wxT("Inserted")
146 #define RADIOBUTTONS_PAGE_NAME wxT("Radiobuttons")
147 #define VETO_PAGE_NAME wxT("Veto")
148 #define MAXIMIZED_BUTTON_PAGE_NAME wxT("Maximized button")
150 // Pages that can be added by the user
151 #define INSERTED_PAGE_NAME wxT("Inserted ")
152 #define ADDED_PAGE_NAME wxT("Added ")
153 #define ADDED_PAGE_NAME_BEFORE wxT(" Inserted before ")
154 #define ADDED_SUB_PAGE_NAME wxT(" Inserted sub-page ")