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/notebook.h"
16 #if wxUSE_LOG && !defined( __SMARTPHONE__ )
22 // Define a new application
23 class MyApp
: public wxApp
31 class MyFrame
: public wxFrame
34 MyFrame(const wxString
& title
, const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
, long style
= wxDEFAULT_FRAME_STYLE
|wxCLIP_CHILDREN
|wxNO_FULL_REPAINT_ON_RESIZE
);
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
);
52 void OnNotebook(wxNotebookEvent
& event
);
55 void OnChoicebook(wxChoicebookEvent
& event
);
58 void OnListbook(wxListbookEvent
& event
);
61 void OnIdle(wxIdleEvent
& event
);
63 wxBookCtrl
*GetCurrentBook();
66 wxLog
*m_logTargetOld
;
68 int SelectFlag(int id
, int nb
, int lb
, int chb
);
69 void ShowCurrentBook();
80 wxPanel
*m_panel
; // Panel containing notebook and other controls
83 wxNotebook
*m_notebook
;
86 wxChoicebook
*m_choicebook
;
89 wxListbook
*m_listbook
;
97 wxBoxSizer
*m_sizerFrame
;
99 wxImageList
*m_imageList
;
101 DECLARE_EVENT_TABLE()
106 ID_BOOK_NOTEBOOK
= wxID_HIGHEST
,
129 Name of each notebook page.
130 Used as a label for a page, and used when cloning the notebook
131 to decide what type of page it is.
134 #define I_WAS_INSERTED_PAGE_NAME wxT("Inserted")
135 #define RADIOBUTTONS_PAGE_NAME wxT("Radiobuttons")
136 #define VETO_PAGE_NAME wxT("Veto")
137 #define MAXIMIZED_BUTTON_PAGE_NAME wxT("Maximized button")
139 // Pages that can be added by the user
140 #define INSERTED_PAGE_NAME wxT("Inserted ")
141 #define ADDED_PAGE_NAME wxT("Added ")