]>
Commit | Line | Data |
---|---|---|
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( const int page, const wxString& text, wxWindow* win, 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 | 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__ |