]>
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 | ||
3c1f8cb1 VZ |
17 | // ---------------------------------------------------------------------------- |
18 | // wxCollapsiblePane | |
19 | // ---------------------------------------------------------------------------- | |
20 | ||
3c6fa826 | 21 | class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxGenericCollapsiblePane |
3c1f8cb1 VZ |
22 | { |
23 | public: | |
24 | wxCollapsiblePane() { Init(); } | |
25 | ||
26 | wxCollapsiblePane(wxWindow *parent, | |
27 | wxWindowID winid, | |
28 | const wxString& label, | |
29 | const wxPoint& pos = wxDefaultPosition, | |
30 | const wxSize& size = wxDefaultSize, | |
037c7b4c | 31 | long style = wxCP_DEFAULT_STYLE, |
3c1f8cb1 VZ |
32 | const wxValidator& val = wxDefaultValidator, |
33 | const wxString& name = wxCollapsiblePaneNameStr) | |
34 | { | |
35 | Init(); | |
36 | ||
37 | Create(parent, winid, label, pos, size, style, val, name); | |
38 | } | |
39 | ||
40 | void Init() | |
41 | { | |
42 | m_bIgnoreNextChange = false; | |
43 | } | |
44 | ||
45 | bool Create(wxWindow *parent, | |
46 | wxWindowID winid, | |
47 | const wxString& label, | |
48 | const wxPoint& pos = wxDefaultPosition, | |
49 | const wxSize& size = wxDefaultSize, | |
037c7b4c | 50 | long style = wxCP_DEFAULT_STYLE, |
3c1f8cb1 VZ |
51 | const wxValidator& val = wxDefaultValidator, |
52 | const wxString& name = wxCollapsiblePaneNameStr); | |
53 | ||
3c1f8cb1 VZ |
54 | void Collapse(bool collapse = true); |
55 | bool IsCollapsed() const; | |
56 | void SetLabel(const wxString &str); | |
57 | ||
bc48a5d7 PC |
58 | protected: |
59 | virtual wxSize DoGetBestSize() const; | |
3c1f8cb1 VZ |
60 | |
61 | public: // used by GTK callbacks | |
3c1f8cb1 VZ |
62 | bool m_bIgnoreNextChange; |
63 | wxSize m_szCollapsed; | |
64 | ||
65 | private: | |
bc48a5d7 PC |
66 | void OnSize(wxSizeEvent&); |
67 | ||
3c1f8cb1 VZ |
68 | DECLARE_DYNAMIC_CLASS(wxCollapsiblePane) |
69 | DECLARE_EVENT_TABLE() | |
70 | }; | |
71 | ||
bc48a5d7 | 72 | #endif // _WX_COLLAPSABLE_PANEL_H_GTK_ |