]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/notebook.h
GTK
[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 wxPanel;
29
30 class wxNotebook;
31
32 //-----------------------------------------------------------------------------
33 // global data
34 //-----------------------------------------------------------------------------
35
36
37 //-----------------------------------------------------------------------------
38 // wxNotebook
39 //-----------------------------------------------------------------------------
40
41 class wxNotebook: public wxControl
42 {
43 DECLARE_DYNAMIC_CLASS(wxNotebook)
44
45 public:
46
47 wxNotebook(void);
48 wxNotebook( wxWindow *parent, const wxWindowID id,
49 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
50 const long style = 0, const wxString& name = "notebook" );
51 ~wxNotebook(void);
52 bool Create(wxWindow *parent, const wxWindowID id,
53 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
54 const long style = 0, const wxString& name = "notebook" );
55 int GetSelection(void) const;
56 wxImageList* GetImageList(void) const;
57 int GetPageCount(void) const;
58 int GetRowCount(void) const;
59 wxString GetPageText( const int page ) const;
60 int GetPageImage( const int page ) const;
61 void* GetPageData( const 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 wxPanel *CreatePage( const int page, const wxString& text, const int imageId = -1, void* data = NULL );
72 wxPanel *GetPanel( const int page );
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 GtkWidget *m_frame;
82
83 DECLARE_EVENT_TABLE()
84 };
85
86 //-----------------------------------------------------------------------------
87 // wxTabEvent
88 //-----------------------------------------------------------------------------
89
90 class wxTabEvent: public wxCommandEvent
91 {
92 DECLARE_DYNAMIC_CLASS(wxTabEvent)
93
94 public:
95
96 wxTabEvent( WXTYPE commandType = 0, int id = 0 );
97 };
98
99 typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
100
101 #define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, \
102 id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
103 #define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, \
104 id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
105
106 #endif
107 // __TABCTRLH__