]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
f6bcfd97 BP |
2 | // Name: wx/generic/panelg.h |
3 | // Purpose: wxPanel: a container for child controls | |
c801d85f KB |
4 | // Author: Julian Smart |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
99d80019 | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
678cd6de VZ |
12 | #ifndef _WX_GENERIC_PANEL_H_ |
13 | #define _WX_GENERIC_PANEL_H_ | |
c801d85f | 14 | |
f6bcfd97 BP |
15 | // ---------------------------------------------------------------------------- |
16 | // headers and forward declarations | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
c801d85f | 19 | #include "wx/window.h" |
456bc6d9 | 20 | #include "wx/containr.h" |
f6bcfd97 | 21 | |
456bc6d9 | 22 | class WXDLLEXPORT wxControlContainer; |
c801d85f | 23 | |
63ec432b | 24 | extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[]; |
c801d85f | 25 | |
f6bcfd97 BP |
26 | // ---------------------------------------------------------------------------- |
27 | // wxPanel contains other controls and implements TAB traversal between them | |
28 | // ---------------------------------------------------------------------------- | |
29 | ||
06b57134 | 30 | class WXDLLEXPORT wxPanel : public wxWindow |
c801d85f | 31 | { |
c801d85f | 32 | public: |
9948d31f | 33 | wxPanel() { Init(); } |
27dc7e21 | 34 | |
341c92a8 VZ |
35 | // Old-style constructor (no default values for coordinates to avoid |
36 | // ambiguity with the new one) | |
37 | wxPanel(wxWindow *parent, | |
38 | int x, int y, int width, int height, | |
39 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
40 | const wxString& name = wxPanelNameStr) | |
41 | { | |
edccf428 VZ |
42 | Init(); |
43 | ||
ca65c044 | 44 | Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); |
341c92a8 | 45 | } |
27dc7e21 | 46 | |
341c92a8 VZ |
47 | // Constructor |
48 | wxPanel(wxWindow *parent, | |
ca65c044 | 49 | wxWindowID winid = wxID_ANY, |
341c92a8 VZ |
50 | const wxPoint& pos = wxDefaultPosition, |
51 | const wxSize& size = wxDefaultSize, | |
52 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
53 | const wxString& name = wxPanelNameStr) | |
54 | { | |
d220ae32 VZ |
55 | Init(); |
56 | ||
d9e2e4c2 | 57 | Create(parent, winid, pos, size, style, name); |
341c92a8 | 58 | } |
c801d85f | 59 | |
341c92a8 | 60 | // Pseudo ctor |
d9e2e4c2 | 61 | bool Create(wxWindow *parent, wxWindowID winid, |
341c92a8 VZ |
62 | const wxPoint& pos = wxDefaultPosition, |
63 | const wxSize& size = wxDefaultSize, | |
64 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
65 | const wxString& name = wxPanelNameStr); | |
27dc7e21 | 66 | |
456bc6d9 | 67 | virtual ~wxPanel(); |
edccf428 VZ |
68 | |
69 | // implementation from now on | |
70 | // -------------------------- | |
71 | ||
3da17724 | 72 | // calls layout for layout constraints and sizers |
27dc7e21 RD |
73 | void OnSize(wxSizeEvent& event); |
74 | ||
19193a2c KB |
75 | virtual void InitDialog(); |
76 | ||
5f517075 | 77 | #ifdef __WXUNIVERSAL__ |
ca65c044 | 78 | virtual bool IsCanvasWindow() const { return true; } |
193e19cf RR |
79 | #endif |
80 | ||
ca65c044 | 81 | |
456bc6d9 | 82 | WX_DECLARE_CONTROL_CONTAINER(); |
ada8f807 | 83 | |
341c92a8 | 84 | protected: |
edccf428 VZ |
85 | // common part of all ctors |
86 | void Init(); | |
87 | ||
06b57134 | 88 | private: |
fc7a2a60 | 89 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel) |
06b57134 | 90 | DECLARE_EVENT_TABLE() |
c801d85f KB |
91 | }; |
92 | ||
93 | #endif | |
678cd6de | 94 | // _WX_GENERIC_PANEL_H_ |