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