1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XML resource for dialogs
4 // Author: Vaclav Slavik & Aleks.
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_frame.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xrc/xh_frame.h"
28 wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
30 ADD_STYLE(wxSTAY_ON_TOP
);
32 ADD_STYLE(wxDEFAULT_DIALOG_STYLE
);
33 ADD_STYLE(wxDEFAULT_FRAME_STYLE
);
34 ADD_STYLE(wxTHICK_FRAME
);
35 ADD_STYLE(wxSYSTEM_MENU
);
36 ADD_STYLE(wxRESIZE_BORDER
);
37 ADD_STYLE(wxRESIZE_BOX
);
39 ADD_STYLE(wxFRAME_TOOL_WINDOW
);
40 ADD_STYLE(wxFRAME_FLOAT_ON_PARENT
);
41 ADD_STYLE(wxMAXIMIZE_BOX
);
42 ADD_STYLE(wxMINIMIZE_BOX
);
43 ADD_STYLE(wxSTAY_ON_TOP
);
46 ADD_STYLE(wxTAB_TRAVERSAL
);
47 ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY
);
48 ADD_STYLE(wxCLIP_CHILDREN
);
54 wxObject
*wxFrameXmlHandler::DoCreateResource()
56 wxFrame
*frame
= wxDynamicCast(m_instance
, wxFrame
);
58 wxASSERT_MSG(frame
, _("XML resource: Cannot create dialog without instance."));
60 frame
->Create(m_parentAsWindow
,
63 wxDefaultPosition
, wxDefaultSize
,
64 GetStyle(_T("style"), wxDEFAULT_FRAME_STYLE
),
66 frame
->SetClientSize(GetSize());
67 frame
->Move(GetPosition());
70 CreateChildren(frame
);
72 if (GetBool(_("centered"), FALSE
))
80 bool wxFrameXmlHandler::CanHandle(wxXmlNode
*node
)
82 return IsOfClass(node
, _T("wxFrame"));