]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/collpane.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / gtk / collpane.h
CommitLineData
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
3c1f8cb1
VZ
15// ----------------------------------------------------------------------------
16// wxCollapsiblePane
17// ----------------------------------------------------------------------------
18
ff654490 19class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase
3c1f8cb1
VZ
20{
21public:
22 wxCollapsiblePane() { Init(); }
23
24 wxCollapsiblePane(wxWindow *parent,
25 wxWindowID winid,
26 const wxString& label,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
037c7b4c 29 long style = wxCP_DEFAULT_STYLE,
3c1f8cb1
VZ
30 const wxValidator& val = wxDefaultValidator,
31 const wxString& name = wxCollapsiblePaneNameStr)
32 {
33 Init();
34
35 Create(parent, winid, label, pos, size, style, val, name);
36 }
37
3c1f8cb1
VZ
38 bool Create(wxWindow *parent,
39 wxWindowID winid,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
037c7b4c 43 long style = wxCP_DEFAULT_STYLE,
3c1f8cb1
VZ
44 const wxValidator& val = wxDefaultValidator,
45 const wxString& name = wxCollapsiblePaneNameStr);
46
ff654490
VZ
47 virtual void Collapse(bool collapse = true);
48 virtual bool IsCollapsed() const;
49 virtual void SetLabel(const wxString& str);
50
51 virtual wxWindow *GetPane() const { return m_pPane; }
52 virtual wxString GetLabel() const { return m_strLabel; }
3c1f8cb1 53
bc48a5d7
PC
54protected:
55 virtual wxSize DoGetBestSize() const;
3c1f8cb1
VZ
56
57public: // used by GTK callbacks
3c1f8cb1
VZ
58 bool m_bIgnoreNextChange;
59 wxSize m_szCollapsed;
60
ff654490
VZ
61 wxWindow *m_pPane;
62
63 // the button label without ">>" or "<<"
64 wxString m_strLabel;
65
3c1f8cb1 66private:
95dc31e0
PC
67 void Init()
68 {
69 m_bIgnoreNextChange = false;
70 }
71
bc48a5d7 72 void OnSize(wxSizeEvent&);
48200154 73 virtual void AddChildGTK(wxWindowGTK* child);
69d32caf 74 GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
bc48a5d7 75
3c1f8cb1
VZ
76 DECLARE_DYNAMIC_CLASS(wxCollapsiblePane)
77 DECLARE_EVENT_TABLE()
78};
79
bc48a5d7 80#endif // _WX_COLLAPSABLE_PANEL_H_GTK_