Debian Codegraph @

wxcrafter/controls/panel_wrapper.cpp

raw
1 #include "panel_wrapper.h"
2 #include "allocator_mgr.h"
3 #include <wx/ffile.h>
4 #include <wx/filename.h>
5 #include <wx/msgdlg.h>
6 #include <wx/tokenzr.h>
7
8 PanelWrapper::PanelWrapper()
9 : wxcWidget(ID_WXPANEL)
10 {
11 SetPropertyString(_("Common Settings"), "wxPanel");
12 // Enable the 'wxTAB_TRAVERSAL' style
13 EnableStyle(wxT("wxTAB_TRAVERSAL"), true);
14 m_namePattern = wxT("m_panel");
15 SetName(GenerateName());
16 }
17
18 PanelWrapper::~PanelWrapper() {}
19
20 void PanelWrapper::GetIncludeFile(wxArrayString& headers) const { headers.Add(wxT("#include <wx/panel.h>")); }
21
22 wxString PanelWrapper::GetWxClassName() const { return wxT("wxPanel"); }
23
24 wxString PanelWrapper::CppCtorCode() const
25 {
26 // m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
27 wxString code;
28
29 code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID()
30 << wxT(", ") << wxT("wxDefaultPosition") << wxT(", ") << SizeAsString() << wxT(", ")
31 << StyleFlags("wxTAB_TRAVERSAL") << ");\n";
32 code << CPPCommonAttributes();
33 return code;
34 }
35
36 void PanelWrapper::ToXRC(wxString& text, XRC_TYPE type) const
37 {
38 text << XRCPrefix() << XRCStyle() << XRCSize() << XRCCommonAttributes();
39
40 ChildrenXRC(text, type);
41 text << wxT("</object>");
42 }
43
44 bool PanelWrapper::IsTopWindow() const { return false; }