]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xmlreshandler.cpp
Fix compilation with MinGW -std=c++11 option.
[wxWidgets.git] / src / xrc / xmlreshandler.cpp
CommitLineData
a3b9c43b
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/xrc/xmlreshandler.cpp
3// Purpose: XML resource handler
4// Author: Steven Lamerton
5// Created: 2011/01/26
6// RCS-ID: $id$
7// Copyright: (c) 2011 Steven Lamerton
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
17#if wxUSE_XRC
18
19#include "wx/xrc/xmlreshandler.h"
20
21IMPLEMENT_ABSTRACT_CLASS(wxXmlResourceHandler, wxObject)
22
23wxXmlResourceHandlerImplBase* wxXmlResourceHandler::GetImpl() const
24{
25 if ( !m_impl )
26 {
27 wxFAIL_MSG(wxT("SetImpl() must have been called!"));
28 }
29
30 return m_impl;
31}
32
33void wxXmlResourceHandler::AddStyle(const wxString& name, int value)
34{
35 m_styleNames.Add(name);
36 m_styleValues.Add(value);
37}
38
39void wxXmlResourceHandler::AddWindowStyles()
40{
41 XRC_ADD_STYLE(wxCLIP_CHILDREN);
42
43 // the border styles all have the old and new names, recognize both for now
44 XRC_ADD_STYLE(wxSIMPLE_BORDER); XRC_ADD_STYLE(wxBORDER_SIMPLE);
45 XRC_ADD_STYLE(wxSUNKEN_BORDER); XRC_ADD_STYLE(wxBORDER_SUNKEN);
46 XRC_ADD_STYLE(wxDOUBLE_BORDER); XRC_ADD_STYLE(wxBORDER_DOUBLE); // deprecated
47 XRC_ADD_STYLE(wxBORDER_THEME);
48 XRC_ADD_STYLE(wxRAISED_BORDER); XRC_ADD_STYLE(wxBORDER_RAISED);
49 XRC_ADD_STYLE(wxSTATIC_BORDER); XRC_ADD_STYLE(wxBORDER_STATIC);
50 XRC_ADD_STYLE(wxNO_BORDER); XRC_ADD_STYLE(wxBORDER_NONE);
51 XRC_ADD_STYLE(wxBORDER_DEFAULT);
52
53 XRC_ADD_STYLE(wxTRANSPARENT_WINDOW);
54 XRC_ADD_STYLE(wxWANTS_CHARS);
55 XRC_ADD_STYLE(wxTAB_TRAVERSAL);
56 XRC_ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE);
57 XRC_ADD_STYLE(wxFULL_REPAINT_ON_RESIZE);
58 XRC_ADD_STYLE(wxVSCROLL);
59 XRC_ADD_STYLE(wxHSCROLL);
60 XRC_ADD_STYLE(wxALWAYS_SHOW_SB);
61 XRC_ADD_STYLE(wxWS_EX_BLOCK_EVENTS);
62 XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
63 XRC_ADD_STYLE(wxWS_EX_TRANSIENT);
64 XRC_ADD_STYLE(wxWS_EX_CONTEXTHELP);
65 XRC_ADD_STYLE(wxWS_EX_PROCESS_IDLE);
66 XRC_ADD_STYLE(wxWS_EX_PROCESS_UI_UPDATES);
67}
68
69#endif // wxUSE_XRC