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
);
51 void OnNotebook(wxNotebookEvent
& event
);
52 void OnChoicebook(wxChoicebookEvent
& event
);
53 void OnListbook(wxListbookEvent
& event
);
55 void OnIdle(wxIdleEvent
& event
);
57 wxBookCtrl
*GetCurrentBook();
60 wxLog
*m_logTargetOld
;
62 int SelectFlag(int id
, int nb
, int lb
, int chb
);
63 void ShowCurrentBook();
74 wxPanel
*m_panel
; // Panel containing notebook and other controls
76 wxNotebook
*m_notebook
;
77 wxChoicebook
*m_choicebook
;
78 wxListbook
*m_listbook
;
85 wxBoxSizer
*m_sizerFrame
;
87 wxImageList
*m_imageList
;
94 ID_BOOK_NOTEBOOK
= wxID_HIGHEST
,
117 Name of each notebook page.
118 Used as a label for a page, and used when cloning the notebook
119 to decide what type of page it is.
122 #define I_WAS_INSERTED_PAGE_NAME wxT("Inserted")
123 #define RADIOBUTTONS_PAGE_NAME wxT("Radiobuttons")
124 #define VETO_PAGE_NAME wxT("Veto")
125 #define MAXIMIZED_BUTTON_PAGE_NAME wxT("Maximized button")
127 // Pages that can be added by the user
128 #define INSERTED_PAGE_NAME wxT("Inserted ")
129 #define ADDED_PAGE_NAME wxT("Added ")