]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/notebook.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTabCtrl class
4 // Author: Robert Roebling
7 // Copyright: (c) Julian Smart and Markus Holzem
8 // Licence: wxWindows license
9 /////////////////////////////////////////////////////////////////////////////
15 #pragma interface "notebook.h"
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxNotebook
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxNotebook
)
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" );
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( const int page
, const wxString
& text
, wxWindow
* win
, const int imageId
= -1, void* data
= NULL
);
72 wxWindow
*GetPageWindow( const int page
) const;
74 // overriden to do nothing
75 virtual void AddChild( wxWindow
*win
);
79 wxImageList
* m_imageList
;
86 //-----------------------------------------------------------------------------
88 //-----------------------------------------------------------------------------
90 class wxTabEvent
: public wxCommandEvent
92 DECLARE_DYNAMIC_CLASS(wxTabEvent
)
96 wxTabEvent( WXTYPE commandType
= 0, int id
= 0 );
99 typedef void (wxEvtHandler::*wxTabEventFunction
)(wxTabEvent
&);
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 },