]>
Commit | Line | Data |
---|---|---|
3c1f8cb1 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/gtk/collpane.h | |
3 | // Purpose: wxCollapsiblePane | |
4 | // Author: Francesco Montorsi | |
5 | // Modified by: | |
6 | // Created: 8/10/2006 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Francesco Montorsi | |
9 | // Licence: wxWindows Licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_COLLAPSABLE_PANEL_H_GTK_ | |
13 | #define _WX_COLLAPSABLE_PANEL_H_GTK_ | |
14 | ||
15 | #include "wx/generic/collpaneg.h" | |
16 | ||
93076559 | 17 | extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxCollapsiblePaneNameStr[]; |
3c1f8cb1 VZ |
18 | |
19 | // ---------------------------------------------------------------------------- | |
20 | // wxCollapsiblePane | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
93076559 | 23 | class WXDLLIMPEXP_ADV wxCollapsiblePane : public wxGenericCollapsiblePane |
3c1f8cb1 VZ |
24 | { |
25 | public: | |
26 | wxCollapsiblePane() { Init(); } | |
27 | ||
28 | wxCollapsiblePane(wxWindow *parent, | |
29 | wxWindowID winid, | |
30 | const wxString& label, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
34 | const wxValidator& val = wxDefaultValidator, | |
35 | const wxString& name = wxCollapsiblePaneNameStr) | |
36 | { | |
37 | Init(); | |
38 | ||
39 | Create(parent, winid, label, pos, size, style, val, name); | |
40 | } | |
41 | ||
42 | void Init() | |
43 | { | |
44 | m_bIgnoreNextChange = false; | |
45 | } | |
46 | ||
47 | bool Create(wxWindow *parent, | |
48 | wxWindowID winid, | |
49 | const wxString& label, | |
50 | const wxPoint& pos = wxDefaultPosition, | |
51 | const wxSize& size = wxDefaultSize, | |
52 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
53 | const wxValidator& val = wxDefaultValidator, | |
54 | const wxString& name = wxCollapsiblePaneNameStr); | |
55 | ||
56 | public: // public API | |
57 | ||
58 | wxSize DoGetBestSize() const; | |
59 | void Collapse(bool collapse = true); | |
60 | bool IsCollapsed() const; | |
61 | void SetLabel(const wxString &str); | |
62 | ||
63 | void OnSize(wxSizeEvent&); | |
64 | ||
65 | public: // used by GTK callbacks | |
66 | ||
67 | bool m_bIgnoreNextChange; | |
68 | wxSize m_szCollapsed; | |
69 | ||
70 | private: | |
71 | DECLARE_DYNAMIC_CLASS(wxCollapsiblePane) | |
72 | DECLARE_EVENT_TABLE() | |
73 | }; | |
74 | ||
75 | ||
76 | #endif | |
77 | // _WX_COLLAPSABLE_PANEL_H_GTK_ |