]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/notebook.h
wxCHECK/wxCHECK_RET changes
[wxWidgets.git] / include / wx / gtk / notebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: tabctrl.h
3 // Purpose: wxTabCtrl class
4 // Author: Robert Roebling
5 // Modified by:
6 // RCS-ID: $Id$
7 // Copyright: (c) Julian Smart and Markus Holzem
8 // Licence: wxWindows license
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __TABCTRLH__
12 #define __TABCTRLH__
13
14 #ifdef __GNUG__
15 #pragma interface "notebook.h"
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/control.h"
22
23 //-----------------------------------------------------------------------------
24 // classes
25 //-----------------------------------------------------------------------------
26
27 class wxImageList;
28 class wxNotebook;
29 class wxNotebookPage;
30
31 //-----------------------------------------------------------------------------
32 // global data
33 //-----------------------------------------------------------------------------
34
35
36 //-----------------------------------------------------------------------------
37 // wxNotebook
38 //-----------------------------------------------------------------------------
39
40 class wxNotebook: public wxControl
41 {
42 DECLARE_DYNAMIC_CLASS(wxNotebook)
43
44 public:
45
46 wxNotebook(void);
47 wxNotebook( wxWindow *parent, const wxWindowID id,
48 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
49 const long style = 0, const wxString& name = "notebook" );
50 ~wxNotebook(void);
51 bool Create(wxWindow *parent, const wxWindowID id,
52 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
53 const long style = 0, const wxString& name = "notebook" );
54 int GetSelection(void) const;
55 wxImageList* GetImageList(void) const;
56 int GetPageCount(void) const;
57 int GetRowCount(void) const;
58 wxString GetPageText( const int page ) const;
59 int GetPageImage( const int page ) const;
60 void* GetPageData( const int page ) const;
61 wxNotebookPage* GetNotebookPage(int page) const;
62 int SetSelection( const int page );
63 void SetImageList( wxImageList* imageList );
64 bool SetPageText( const int page, const wxString& text );
65 bool SetPageImage( const int oage, const int image );
66 bool SetPageData( const int page, void* data );
67 void SetPageSize( const wxSize& size );
68 void SetPadding( const wxSize& padding );
69 bool DeleteAllPages(void);
70 bool DeletePage( const int page );
71 bool AddPage(wxWindow* win, const wxString& text, const int imageId = -1, void* data = NULL );
72 wxWindow *GetPageWindow( const int page ) const;
73
74 // overriden to do nothing
75 virtual void AddChild( wxWindow *win );
76
77 protected:
78
79 wxImageList* m_imageList;
80 wxList m_pages;
81
82 DECLARE_EVENT_TABLE()
83 };
84
85 //-----------------------------------------------------------------------------
86 // wxTabEvent
87 //-----------------------------------------------------------------------------
88
89 class wxTabEvent: public wxCommandEvent
90 {
91 DECLARE_DYNAMIC_CLASS(wxTabEvent)
92
93 public:
94
95 wxTabEvent( WXTYPE commandType = 0, int id = 0 );
96 };
97
98 typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
99
100 #define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, \
101 id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
102 #define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, \
103 id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
104
105 #endif
106 // __TABCTRLH__