]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/collpane.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / gtk / collpane.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/collpane.h
3// Purpose: wxCollapsiblePane
4// Author: Francesco Montorsi
5// Modified by:
6// Created: 8/10/2006
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
14// ----------------------------------------------------------------------------
15// wxCollapsiblePane
16// ----------------------------------------------------------------------------
17
18class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase
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,
28 long style = wxCP_DEFAULT_STYLE,
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
37 bool Create(wxWindow *parent,
38 wxWindowID winid,
39 const wxString& label,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxCP_DEFAULT_STYLE,
43 const wxValidator& val = wxDefaultValidator,
44 const wxString& name = wxCollapsiblePaneNameStr);
45
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; }
52
53protected:
54 virtual wxSize DoGetBestSize() const;
55
56public: // used by GTK callbacks
57 bool m_bIgnoreNextChange;
58 wxSize m_szCollapsed;
59
60 wxWindow *m_pPane;
61
62 // the button label without ">>" or "<<"
63 wxString m_strLabel;
64
65private:
66 void Init()
67 {
68 m_bIgnoreNextChange = false;
69 }
70
71 void OnSize(wxSizeEvent&);
72 virtual void AddChildGTK(wxWindowGTK* child);
73 GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
74
75 DECLARE_DYNAMIC_CLASS(wxCollapsiblePane)
76 DECLARE_EVENT_TABLE()
77};
78
79#endif // _WX_COLLAPSABLE_PANEL_H_GTK_