class WXDLLEXPORT wxXmlDocument : public wxObject
{
public:
- wxXmlDocument() : wxObject(), m_Version(_T("1.0")), m_Root(NULL) {}
+ wxXmlDocument() : wxObject(), m_Version(wxT("1.0")), m_Root(NULL) {}
wxXmlDocument(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO);
wxXmlDocument(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
~wxXmlDocument() { delete m_Root; }
// END_EVENT_TABLE()
#define XMLID(str_id) \
- wxXmlResource::GetXMLID(_T(str_id))
+ wxXmlResource::GetXMLID(wxT(str_id))
// This macro returns pointer to particular control in dialog
// Example:
// wxDialog dlg;
// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
-// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(_T("default value"));
+// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
#define XMLCTRL(window, id, type) \
((type*)((window).FindWindow(XMLID(id))))
// Returns true if the node has property class equal to classname,
// e.g. <object class="wxDialog">
bool IsOfClass(wxXmlNode *node, const wxString& classname)
- { return node->GetPropVal(_T("class"), wxEmptyString) == classname; }
+ { return node->GetPropVal(wxT("class"), wxEmptyString) == classname; }
// Gets node content from wxXML_ENTITY_NODE
// (the problem is, <tag>content<tag> is represented as
// Gets style flags from text in form "flag | flag2| flag3 |..."
// Only understads flags added with AddStyle
- int GetStyle(const wxString& param = _T("style"), int defaults = 0);
+ int GetStyle(const wxString& param = wxT("style"), int defaults = 0);
// Gets text from param and does some convertions:
// - replaces \n, \r, \t by respective chars (according to C syntax)
wxColour GetColour(const wxString& param);
// Get size/position (may be in dlg units):
- wxSize GetSize(const wxString& param = _T("size"));
- wxPoint GetPosition(const wxString& param = _T("pos"));
+ wxSize GetSize(const wxString& param = wxT("size"));
+ wxPoint GetPosition(const wxString& param = wxT("pos"));
// Get dimension (may be in dlg units):
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0);
// Get bitmap:
- wxBitmap GetBitmap(const wxString& param = _T("bitmap"), wxSize size = wxDefaultSize);
- wxIcon GetIcon(const wxString& param = _T("icon"), wxSize size = wxDefaultSize);
+ wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), wxSize size = wxDefaultSize);
+ wxIcon GetIcon(const wxString& param = wxT("icon"), wxSize size = wxDefaultSize);
// Get font:
- wxFont GetFont(const wxString& param = _T("font"));
+ wxFont GetFont(const wxString& param = wxT("font"));
// Sets common window options:
void SetupWindow(wxWindow *wnd);
wxFileSystem& GetCurFileSystem() { return m_Resource->GetCurFileSystem(); }
};
-#define ADD_STYLE(style) AddStyle(_T(#style), style)
+#define ADD_STYLE(style) AddStyle(wxT(#style), style)
wxObject *wxBitmapXmlHandler::DoCreateResource()
{
- return new wxBitmap(GetBitmap(_T("")));
+ return new wxBitmap(GetBitmap(wxT("")));
}
bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxBitmap"));
+ return IsOfClass(node, wxT("wxBitmap"));
}
wxObject *wxIconXmlHandler::DoCreateResource()
{
- return new wxIcon(GetIcon(_T("")));
+ return new wxIcon(GetIcon(wxT("")));
}
bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxIcon"));
+ return IsOfClass(node, wxT("wxIcon"));
}
{
wxBitmapButton *button = new wxBitmapButton(m_ParentAsWindow,
GetID(),
- GetBitmap(_T("bitmap")),
+ GetBitmap(wxT("bitmap")),
GetPosition(), GetSize(),
- GetStyle(_T("style"), wxBU_AUTODRAW),
+ GetStyle(wxT("style"), wxBU_AUTODRAW),
wxDefaultValidator,
GetName());
- if (GetBool(_T("default"), 0) == 1) button->SetDefault();
+ if (GetBool(wxT("default"), 0) == 1) button->SetDefault();
SetupWindow(button);
- if (!GetParamValue(_T("selected")).IsEmpty())
- button->SetBitmapSelected(GetBitmap(_T("selected")));
- if (!GetParamValue(_T("focus")).IsEmpty())
- button->SetBitmapFocus(GetBitmap(_T("focus")));
- if (!GetParamValue(_T("disabled")).IsEmpty())
- button->SetBitmapDisabled(GetBitmap(_T("disabled")));
+ if (!GetParamValue(wxT("selected")).IsEmpty())
+ button->SetBitmapSelected(GetBitmap(wxT("selected")));
+ if (!GetParamValue(wxT("focus")).IsEmpty())
+ button->SetBitmapFocus(GetBitmap(wxT("focus")));
+ if (!GetParamValue(wxT("disabled")).IsEmpty())
+ button->SetBitmapDisabled(GetBitmap(wxT("disabled")));
return button;
}
bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxBitmapButton"));
+ return IsOfClass(node, wxT("wxBitmapButton"));
}
{
wxButton *button = new wxButton(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
GetName());
- if (GetBool(_T("default"), 0) == 1) button->SetDefault();
+ if (GetBool(wxT("default"), 0) == 1) button->SetDefault();
SetupWindow(button);
return button;
bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxButton"));
+ return IsOfClass(node, wxT("wxButton"));
}
bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxCalendarCtrl"));
+ return IsOfClass(node, wxT("wxCalendarCtrl"));
}
{
wxCheckBox *control = new wxCheckBox(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
GetName()
);
- control->SetValue( GetBool( _T("checked")));
+ control->SetValue( GetBool( wxT("checked")));
SetupWindow(control);
return control;
bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxCheckBox"));
+ return IsOfClass(node, wxT("wxCheckBox"));
}
#endif
wxObject *wxCheckListXmlHandler::DoCreateResource()
{
- if (m_Class == _T("wxCheckList"))
+ if (m_Class == wxT("wxCheckList"))
{
// need to build the list of strings from children
m_InsideBox = TRUE;
- CreateChildrenPrivately(NULL, GetParamNode(_T("content")));
+ CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
{
);
// step through children myself (again.)
- wxXmlNode *n = GetParamNode(_T("content"));
+ wxXmlNode *n = GetParamNode(wxT("content"));
if (n) n = n->GetChildren();
int i = 0;
while (n)
{
if (n->GetType() != wxXML_ELEMENT_NODE ||
- n->GetName() != _T("item"))
+ n->GetName() != wxT("item"))
{ n = n->GetNext(); continue; }
// checking boolean is a bit ugly here (see GetBool() )
- wxString v = n->GetPropVal(_T("checked"), wxEmptyString);
+ wxString v = n->GetPropVal(wxT("checked"), wxEmptyString);
v.MakeLower();
- if (v && v == _T("1"))
+ if (v && v == wxT("1"))
control->Check( i, TRUE );
i++;
bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxCheckList")) ||
- (m_InsideBox && node->GetName() == _T("item"))
+ return (IsOfClass(node, wxT("wxCheckList")) ||
+ (m_InsideBox && node->GetName() == wxT("item"))
);
}
wxObject *wxChoiceXmlHandler::DoCreateResource()
{
- if( m_Class == _T("wxChoice"))
+ if( m_Class == wxT("wxChoice"))
{
// find the selection
- long selection = GetLong( _T("selection"), -1 );
+ long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_InsideBox = TRUE;
- CreateChildrenPrivately( NULL, GetParamNode(_T("content")));
+ CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
{
bool wxChoiceXmlHandler::CanHandle(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxChoice")) ||
- (m_InsideBox && node->GetName() == _T("item"))
+ return (IsOfClass(node, wxT("wxChoice")) ||
+ (m_InsideBox && node->GetName() == wxT("item"))
);
}
wxObject *wxComboBoxXmlHandler::DoCreateResource()
{
- if( m_Class == _T("wxComboBox"))
+ if( m_Class == wxT("wxComboBox"))
{
// find the selection
- long selection = GetLong( _T("selection"), -1 );
+ long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_InsideBox = TRUE;
- CreateChildrenPrivately( NULL, GetParamNode(_T("content")));
+ CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
{
wxComboBox *control = new wxComboBox(m_ParentAsWindow,
GetID(),
- GetText(_T("value")),
+ GetText(wxT("value")),
GetPosition(), GetSize(),
strList.GetCount(),
strings,
bool wxComboBoxXmlHandler::CanHandle(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxComboBox")) ||
- (m_InsideBox && node->GetName() == _T("item"))
+ return (IsOfClass(node, wxT("wxComboBox")) ||
+ (m_InsideBox && node->GetName() == wxT("item"))
);
}
dlg->Create(m_ParentAsWindow,
GetID(),
- GetText(_T("title")),
+ GetText(wxT("title")),
wxDefaultPosition, wxDefaultSize,
- GetStyle(_T("style"), wxDEFAULT_DIALOG_STYLE),
+ GetStyle(wxT("style"), wxDEFAULT_DIALOG_STYLE),
GetName());
dlg->SetClientSize(GetSize());
dlg->Move(GetPosition());
bool wxDialogXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxDialog"));
+ return IsOfClass(node, wxT("wxDialog"));
}
{
wxGauge *control = new wxGauge(m_ParentAsWindow,
GetID(),
- GetLong( _T("range"), wxGAUGE_DEFAULT_RANGE),
+ GetLong( wxT("range"), wxGAUGE_DEFAULT_RANGE),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
GetName()
);
- if( HasParam( _T("value") ))
+ if( HasParam( wxT("value") ))
{
- control->SetValue( GetLong( _T("value") ));
+ control->SetValue( GetLong( wxT("value") ));
}
- if( HasParam( _T("shadow") ))
+ if( HasParam( wxT("shadow") ))
{
- control->SetShadowWidth( GetDimension( _T("shadow") ));
+ control->SetShadowWidth( GetDimension( wxT("shadow") ));
}
- if( HasParam( _T("bezel") ))
+ if( HasParam( wxT("bezel") ))
{
- control->SetBezelFace( GetDimension( _T("bezel") ));
+ control->SetBezelFace( GetDimension( wxT("bezel") ));
}
SetupWindow(control);
bool wxGaugeXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxGauge"));
+ return IsOfClass(node, wxT("wxGauge"));
}
wxHtmlWindow *control = new wxHtmlWindow(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle( _T("style" ), wxHW_SCROLLBAR_AUTO),
+ GetStyle( wxT("style" ), wxHW_SCROLLBAR_AUTO),
GetName()
);
- if( HasParam( _T("borders") ))
+ if( HasParam( wxT("borders") ))
{
- control->SetBorders( GetDimension( _T("borders" )));
+ control->SetBorders( GetDimension( wxT("borders" )));
}
- if( HasParam( _T("url") ))
+ if( HasParam( wxT("url") ))
{
- control->LoadPage( GetParamValue( _T("url" )));
+ control->LoadPage( GetParamValue( wxT("url" )));
}
- else if( HasParam( _T("htmlcode") ))
+ else if( HasParam( wxT("htmlcode") ))
{
- control->SetPage( GetText(_T("htmlcode")) );
+ control->SetPage( GetText(wxT("htmlcode")) );
}
SetupWindow(control);
bool wxHtmlWindowXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxHtmlWindow"));
+ return IsOfClass(node, wxT("wxHtmlWindow"));
}
#endif // wxUSE_HTML
wxObject *wxListBoxXmlHandler::DoCreateResource()
{
- if( m_Class == _T("wxListBox"))
+ if( m_Class == wxT("wxListBox"))
{
// find the selection
- long selection = GetLong( _T("selection"), -1 );
+ long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_InsideBox = TRUE;
- CreateChildrenPrivately( NULL, GetParamNode(_T("content")));
+ CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
{
bool wxListBoxXmlHandler::CanHandle(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxListBox")) ||
- (m_InsideBox && node->GetName() == _T("item"))
+ return (IsOfClass(node, wxT("wxListBox")) ||
+ (m_InsideBox && node->GetName() == wxT("item"))
);
}
bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxListCtrl"));
+ return IsOfClass(node, wxT("wxListCtrl"));
}
wxObject *wxMenuXmlHandler::DoCreateResource()
{
- if (m_Class == _T("wxMenu"))
+ if (m_Class == wxT("wxMenu"))
{
wxMenu *menu = new wxMenu(GetStyle());
- wxString title = GetText(_T("label"));
- wxString help = GetText(_T("help"));
+ wxString title = GetText(wxT("label"));
+ wxString help = GetText(wxT("help"));
bool oldins = m_InsideMenu;
m_InsideMenu = TRUE;
{
wxMenu *p_menu = wxDynamicCast(m_Parent, wxMenu);
- if (m_Class == _T("separator"))
+ if (m_Class == wxT("separator"))
p_menu->AppendSeparator();
- else if (m_Class == _T("break"))
+ else if (m_Class == wxT("break"))
p_menu->Break();
else /*wxMenuItem*/
{
int id = GetID();
- bool checkable = GetBool(_T("checkable"));
+ bool checkable = GetBool(wxT("checkable"));
- wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(_T("label")),
- GetText(_T("help")), checkable);
+ wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(wxT("label")),
+ GetText(wxT("help")), checkable);
#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
- if (HasParam(_T("bitmap")))
- mitem->SetBitmap(GetBitmap(_T("bitmap")));
+ if (HasParam(wxT("bitmap")))
+ mitem->SetBitmap(GetBitmap(wxT("bitmap")));
#endif
p_menu->Append(mitem);
- mitem->Enable(GetBool(_T("enabled"), TRUE));
- if (checkable) mitem->Check(GetBool(_T("checked")));
+ mitem->Enable(GetBool(wxT("enabled"), TRUE));
+ if (checkable) mitem->Check(GetBool(wxT("checked")));
}
return NULL;
}
bool wxMenuXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxMenu")) ||
+ return IsOfClass(node, wxT("wxMenu")) ||
(m_InsideMenu &&
- (IsOfClass(node, _T("wxMenuItem")) ||
- IsOfClass(node, _T("break")) ||
- IsOfClass(node, _T("separator")))
+ (IsOfClass(node, wxT("wxMenuItem")) ||
+ IsOfClass(node, wxT("break")) ||
+ IsOfClass(node, wxT("separator")))
);
}
bool wxMenuBarXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxMenuBar"));
+ return IsOfClass(node, wxT("wxMenuBar"));
}
wxObject *wxNotebookXmlHandler::DoCreateResource()
{
- if (m_Class == _T("notebookpage"))
+ if (m_Class == wxT("notebookpage"))
{
- wxXmlNode *n = GetParamNode(_T("object"));
+ wxXmlNode *n = GetParamNode(wxT("object"));
if (n)
{
wxWindow *wnd = wxDynamicCast(item, wxWindow);
if (wnd)
- m_Notebook->AddPage(wnd, GetText(_T("label")),
- GetBool(_T("selected"), 0));
+ m_Notebook->AddPage(wnd, GetText(wxT("label")),
+ GetBool(wxT("selected"), 0));
else
- wxLogError(_T("Error in resource."));
+ wxLogError(wxT("Error in resource."));
return wnd;
}
else
{
- wxLogError(_T("Error in resource: no control within notebook's <page> tag."));
+ wxLogError(wxT("Error in resource: no control within notebook's <page> tag."));
return NULL;
}
}
wxNotebook *nb = new wxNotebook(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle( _T("style" )),
+ GetStyle( wxT("style" )),
GetName());
wxNotebook *old_par = m_Notebook;
m_IsInside = old_ins;
m_Notebook = old_par;
- if (GetBool(_T("usenotebooksizer"), FALSE))
+ if (GetBool(wxT("usenotebooksizer"), FALSE))
return new wxNotebookSizer(nb);
else
return nb;
bool wxNotebookXmlHandler::CanHandle(wxXmlNode *node)
{
- return ((!m_IsInside && IsOfClass(node, _T("wxNotebook"))) ||
- (m_IsInside && IsOfClass(node, _T("notebookpage"))));
+ return ((!m_IsInside && IsOfClass(node, wxT("wxNotebook"))) ||
+ (m_IsInside && IsOfClass(node, wxT("notebookpage"))));
}
#endif
panel = new wxPanel(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle(_T("style"), 0),
+ GetStyle(wxT("style"), 0),
GetName());
else
panel->Create(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle(_T("style"), 0),
+ GetStyle(wxT("style"), 0),
GetName());
SetupWindow(panel);
CreateChildren(panel);
bool wxPanelXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxPanel"));
+ return IsOfClass(node, wxT("wxPanel"));
}
wxRadioButton *control = new wxRadioButton(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
GetName()
);
- control->SetValue( GetBool(_T("value"), 0));
+ control->SetValue( GetBool(wxT("value"), 0));
SetupWindow(control);
return control;
bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxRadioButton"));
+ return IsOfClass(node, wxT("wxRadioButton"));
}
wxObject *wxRadioBoxXmlHandler::DoCreateResource()
{
- if( m_Class == _T("wxRadioBox"))
+ if( m_Class == wxT("wxRadioBox"))
{
// find the selection
- long selection = GetLong( _T("selection"), -1 );
+ long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_InsideBox = TRUE;
- CreateChildrenPrivately( NULL, GetParamNode(_T("content")));
+ CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
{
wxRadioBox *control = new wxRadioBox(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
strList.GetCount(),
strings,
- GetLong( _T("dimension"), 1 ),
+ GetLong( wxT("dimension"), 1 ),
GetStyle(),
wxDefaultValidator,
GetName()
bool wxRadioBoxXmlHandler::CanHandle(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxRadioBox")) ||
- (m_InsideBox && node->GetName() == _T("item"))
+ return (IsOfClass(node, wxT("wxRadioBox")) ||
+ (m_InsideBox && node->GetName() == wxT("item"))
);
}
wxDefaultValidator,
GetName()
);
- control->SetScrollbar(GetLong( _T("value"), 0),
- GetLong( _T("thumbsize"),1),
- GetLong( _T("range"), 10),
- GetLong( _T("pagesize"),1)
+ control->SetScrollbar(GetLong( wxT("value"), 0),
+ GetLong( wxT("thumbsize"),1),
+ GetLong( wxT("range"), 10),
+ GetLong( wxT("pagesize"),1)
);
bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxScrollBar"));
+ return IsOfClass(node, wxT("wxScrollBar"));
}
bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node)
{
- return (IsOfClass(node, _T("wxBoxSizer"))) ||
- (IsOfClass(node, _T("wxStaticBoxSizer"))) ||
- (IsOfClass(node, _T("wxGridSizer"))) ||
- (IsOfClass(node, _T("wxFlexGridSizer")));
+ return (IsOfClass(node, wxT("wxBoxSizer"))) ||
+ (IsOfClass(node, wxT("wxStaticBoxSizer"))) ||
+ (IsOfClass(node, wxT("wxGridSizer"))) ||
+ (IsOfClass(node, wxT("wxFlexGridSizer")));
}
wxObject *wxSizerXmlHandler::DoCreateResource()
{
- if (m_Class == _T("sizeritem"))
+ if (m_Class == wxT("sizeritem"))
{
- wxXmlNode *n = GetParamNode(_T("object"));
+ wxXmlNode *n = GetParamNode(wxT("object"));
if (n)
{
m_ParentSizer = old_par;
wxSizer *sizer = wxDynamicCast(item, wxSizer);
wxWindow *wnd = wxDynamicCast(item, wxWindow);
- wxSize minsize = GetSize(_T("minsize"));
+ wxSize minsize = GetSize(wxT("minsize"));
if (sizer)
{
- m_ParentSizer->Add(sizer, GetLong(_T("option")),
- GetStyle(_T("flag")), GetDimension(_T("border")));
+ m_ParentSizer->Add(sizer, GetLong(wxT("option")),
+ GetStyle(wxT("flag")), GetDimension(wxT("border")));
if (!(minsize == wxDefaultSize))
m_ParentSizer->SetItemMinSize(sizer, minsize.x, minsize.y);
}
else if (wnd)
{
- m_ParentSizer->Add(wnd, GetLong(_T("option")),
- GetStyle(_T("flag")), GetDimension(_T("border")));
+ m_ParentSizer->Add(wnd, GetLong(wxT("option")),
+ GetStyle(wxT("flag")), GetDimension(wxT("border")));
if (!(minsize == wxDefaultSize))
m_ParentSizer->SetItemMinSize(wnd, minsize.x, minsize.y);
}
else
- wxLogError(_T("Error in resource."));
+ wxLogError(wxT("Error in resource."));
return item;
}
else /*n == NULL*/
{
- wxLogError(_T("Error in resource: no control/sizer within sizer's <item> tag."));
+ wxLogError(wxT("Error in resource: no control/sizer within sizer's <item> tag."));
return NULL;
}
}
- else if (m_Class == _T("spacer"))
+ else if (m_Class == wxT("spacer"))
{
- wxCHECK_MSG(m_ParentSizer, NULL, _T("Incorrect syntax of XML resource: spacer not within sizer!"));
+ wxCHECK_MSG(m_ParentSizer, NULL, wxT("Incorrect syntax of XML resource: spacer not within sizer!"));
wxSize sz = GetSize();
m_ParentSizer->Add(sz.x, sz.y,
- GetLong(_T("option")), GetStyle(_T("flag")), GetDimension(_T("border")));
+ GetLong(wxT("option")), GetStyle(wxT("flag")), GetDimension(wxT("border")));
return NULL;
}
wxXmlNode *parentNode = m_Node->GetParent();
wxCHECK_MSG(m_ParentSizer != NULL ||
- ((IsOfClass(parentNode, _T("wxPanel")) ||
- IsOfClass(parentNode, _T("wxDialog"))) &&
+ ((IsOfClass(parentNode, wxT("wxPanel")) ||
+ IsOfClass(parentNode, wxT("wxDialog"))) &&
parentNode->GetType() == wxXML_ELEMENT_NODE), NULL,
- _T("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'."));
+ wxT("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'."));
- if (m_Class == _T("wxBoxSizer"))
- sizer = new wxBoxSizer(GetStyle(_T("orient"), wxHORIZONTAL));
+ if (m_Class == wxT("wxBoxSizer"))
+ sizer = new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL));
- else if (m_Class == _T("wxStaticBoxSizer"))
+ else if (m_Class == wxT("wxStaticBoxSizer"))
{
sizer = new wxStaticBoxSizer(
- new wxStaticBox(m_ParentAsWindow, -1, GetText(_T("label"))),
- GetStyle(_T("orient"), wxHORIZONTAL));
+ new wxStaticBox(m_ParentAsWindow, -1, GetText(wxT("label"))),
+ GetStyle(wxT("orient"), wxHORIZONTAL));
}
- else if (m_Class == _T("wxGridSizer"))
- sizer = new wxGridSizer(GetLong(_T("rows")), GetLong(_T("cols")),
- GetDimension(_T("vgap")), GetDimension(_T("hgap")));
+ else if (m_Class == wxT("wxGridSizer"))
+ sizer = new wxGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")),
+ GetDimension(wxT("vgap")), GetDimension(wxT("hgap")));
- else if (m_Class == _T("wxFlexGridSizer"))
+ else if (m_Class == wxT("wxFlexGridSizer"))
{
wxFlexGridSizer *fsizer =
- new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")),
- GetDimension(_T("vgap")), GetDimension(_T("hgap")));
+ new wxFlexGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")),
+ GetDimension(wxT("vgap")), GetDimension(wxT("hgap")));
sizer = fsizer;
wxStringTokenizer tkn;
unsigned long l;
- tkn.SetString(GetParamValue(_T("growablerows")), _T(","));
+ tkn.SetString(GetParamValue(wxT("growablerows")), wxT(","));
while (tkn.HasMoreTokens())
{
if (!tkn.GetNextToken().ToULong(&l))
- wxLogError(_T("growablerows must be comma-separated list of row numbers"));
+ wxLogError(wxT("growablerows must be comma-separated list of row numbers"));
else
fsizer->AddGrowableRow(l);
}
- tkn.SetString(GetParamValue(_T("growablecols")), _T(","));
+ tkn.SetString(GetParamValue(wxT("growablecols")), wxT(","));
while (tkn.HasMoreTokens())
{
if (!tkn.GetNextToken().ToULong(&l))
- wxLogError(_T("growablecols must be comma-separated list of column numbers"));
+ wxLogError(wxT("growablecols must be comma-separated list of column numbers"));
else
fsizer->AddGrowableCol(l);
}
}
- wxSize minsize = GetSize(_T("minsize"));
+ wxSize minsize = GetSize(wxT("minsize"));
if (!(minsize == wxDefaultSize))
sizer->SetMinSize(minsize);
bool wxSizerXmlHandler::CanHandle(wxXmlNode *node)
{
return ((!m_IsInside && IsSizerNode(node)) ||
- (m_IsInside && IsOfClass(node, _T("sizeritem"))) ||
- (m_IsInside && IsOfClass(node, _T("spacer"))));
+ (m_IsInside && IsOfClass(node, wxT("sizeritem"))) ||
+ (m_IsInside && IsOfClass(node, wxT("spacer"))));
}
{
wxSlider *control = new wxSlider(m_ParentAsWindow,
GetID(),
- GetLong( _T("value"), wxSL_DEFAULT_VALUE),
- GetLong( _T("min"), wxSL_DEFAULT_MIN),
- GetLong( _T("max"), wxSL_DEFAULT_MAX),
+ GetLong( wxT("value"), wxSL_DEFAULT_VALUE),
+ GetLong( wxT("min"), wxSL_DEFAULT_MIN),
+ GetLong( wxT("max"), wxSL_DEFAULT_MAX),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
GetName()
);
- if( HasParam( _T("tickfreq") ))
+ if( HasParam( wxT("tickfreq") ))
{
- control->SetTickFreq( GetLong( _T("tickfreq") ), 0 );
+ control->SetTickFreq( GetLong( wxT("tickfreq") ), 0 );
}
- if( HasParam( _T("pagesize") ))
+ if( HasParam( wxT("pagesize") ))
{
- control->SetPageSize( GetLong( _T("pagesize") ) );
+ control->SetPageSize( GetLong( wxT("pagesize") ) );
}
- if( HasParam( _T("linesize") ))
+ if( HasParam( wxT("linesize") ))
{
- control->SetLineSize( GetLong( _T("linesize") ));
+ control->SetLineSize( GetLong( wxT("linesize") ));
}
- if( HasParam( _T("thumb") ))
+ if( HasParam( wxT("thumb") ))
{
- control->SetThumbLength( GetLong( _T("thumb") ));
+ control->SetThumbLength( GetLong( wxT("thumb") ));
}
- if( HasParam( _T("tick") ))
+ if( HasParam( wxT("tick") ))
{
- control->SetTick( GetLong( _T("tick") ));
+ control->SetTick( GetLong( wxT("tick") ));
}
- if( HasParam( _T("selmin") ) && HasParam( _T("selmax")) )
+ if( HasParam( wxT("selmin") ) && HasParam( wxT("selmax")) )
{
- control->SetSelection( GetLong( _T("selmin") ), GetLong( _T("selmax")) );
+ control->SetSelection( GetLong( wxT("selmin") ), GetLong( wxT("selmax")) );
}
SetupWindow(control);
bool wxSliderXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxSlider"));
+ return IsOfClass(node, wxT("wxSlider"));
}
wxSpinButton *control = new wxSpinButton(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle( _T("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ),
+ GetStyle( wxT("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ),
GetName()
);
- control->SetValue( GetLong( _T("value"), wxSP_DEFAULT_VALUE) );
- control->SetRange( GetLong( _T("min"), wxSP_DEFAULT_MIN),
- GetLong( _T("max"), wxSP_DEFAULT_MAX) );
+ control->SetValue( GetLong( wxT("value"), wxSP_DEFAULT_VALUE) );
+ control->SetRange( GetLong( wxT("min"), wxSP_DEFAULT_MIN),
+ GetLong( wxT("max"), wxSP_DEFAULT_MAX) );
SetupWindow(control);
return control;
bool wxSpinButtonXmlHandler::CanHandle(wxXmlNode *node)
{
- return node->GetName() == _T("spinbutton");
+ return node->GetName() == wxT("spinbutton");
}
#endif // wxUSE_SPINBTN
{
wxSpinCtrl *control = new wxSpinCtrl(m_ParentAsWindow,
GetID(),
- GetText(_T("value")),
+ GetText(wxT("value")),
GetPosition(), GetSize(),
- GetStyle( _T("style"), wxSP_ARROW_KEYS ),
- GetLong( _T("min"), wxSP_DEFAULT_MIN),
- GetLong( _T("max"), wxSP_DEFAULT_MAX),
- GetLong( _T("value"), wxSP_DEFAULT_VALUE),
+ GetStyle( wxT("style"), wxSP_ARROW_KEYS ),
+ GetLong( wxT("min"), wxSP_DEFAULT_MIN),
+ GetLong( wxT("max"), wxSP_DEFAULT_MAX),
+ GetLong( wxT("value"), wxSP_DEFAULT_VALUE),
GetName()
);
bool wxSpinCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxSpinCtrl"));
+ return IsOfClass(node, wxT("wxSpinCtrl"));
}
#endif // wxUSE_SPINCTRL
{
wxStaticBitmap *bmp = new wxStaticBitmap(m_ParentAsWindow,
GetID(),
- GetBitmap(_T("bitmap"), GetSize()),
+ GetBitmap(wxT("bitmap"), GetSize()),
GetPosition(), GetSize(),
GetStyle(),
GetName()
bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxStaticBitmap"));
+ return IsOfClass(node, wxT("wxStaticBitmap"));
}
{
wxStaticBox *box = new wxStaticBox(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
GetStyle(),
GetName()
bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxStaticBox"));
+ return IsOfClass(node, wxT("wxStaticBox"));
}
wxStaticLine *line = new wxStaticLine(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle(_T("style"), wxLI_HORIZONTAL),
+ GetStyle(wxT("style"), wxLI_HORIZONTAL),
GetName()
);
SetupWindow(line);
bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxStaticLine"));
+ return IsOfClass(node, wxT("wxStaticLine"));
}
#endif
{
wxStaticText *text = new wxStaticText(m_ParentAsWindow,
GetID(),
- GetText(_T("label")),
+ GetText(wxT("label")),
GetPosition(), GetSize(),
GetStyle(),
GetName()
bool wxStaticTextXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxStaticText"));
+ return IsOfClass(node, wxT("wxStaticText"));
}
{
wxTextCtrl *text = new wxTextCtrl(m_ParentAsWindow,
GetID(),
- GetText(_T("value")),
+ GetText(wxT("value")),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,
bool wxTextCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxTextCtrl"));
+ return IsOfClass(node, wxT("wxTextCtrl"));
}
wxObject *wxToolBarXmlHandler::DoCreateResource()
{
- if (m_Class == _T("tool"))
+ if (m_Class == wxT("tool"))
{
- wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: tool not within a toolbar!"));
+ wxCHECK_MSG(m_Toolbar, NULL, wxT("Incorrect syntax of XML resource: tool not within a toolbar!"));
m_Toolbar->AddTool(GetID(),
- GetBitmap(_T("bitmap")),
- GetBitmap(_T("bitmap2")),
- GetBool(_T("toggle")),
+ GetBitmap(wxT("bitmap")),
+ GetBitmap(wxT("bitmap2")),
+ GetBool(wxT("toggle")),
GetPosition().x,
GetPosition().y,
NULL,
- GetText(_T("tooltip")),
- GetText(_T("longhelp")));
+ GetText(wxT("tooltip")),
+ GetText(wxT("longhelp")));
return m_Toolbar; // must return non-NULL
}
- else if (m_Class == _T("separator"))
+ else if (m_Class == wxT("separator"))
{
- wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: separator not within a toolbar!"));
+ wxCHECK_MSG(m_Toolbar, NULL, wxT("Incorrect syntax of XML resource: separator not within a toolbar!"));
m_Toolbar->AddSeparator();
return m_Toolbar; // must return non-NULL
}
else /*<object class="wxToolBar">*/
{
- int style = GetStyle(_T("style"), wxNO_BORDER | wxTB_HORIZONTAL);
+ int style = GetStyle(wxT("style"), wxNO_BORDER | wxTB_HORIZONTAL);
#ifdef __WXMSW__
if (!(style & wxNO_BORDER)) style |= wxNO_BORDER;
#endif
style,
GetName());
- wxSize bmpsize = GetSize(_T("bitmapsize"));
+ wxSize bmpsize = GetSize(wxT("bitmapsize"));
if (!(bmpsize == wxDefaultSize))
toolbar->SetToolBitmapSize(bmpsize);
- wxSize margins = GetSize(_T("margins"));
+ wxSize margins = GetSize(wxT("margins"));
if (!(margins == wxDefaultSize))
toolbar->SetMargins(margins.x, margins.y);
- long packing = GetLong(_T("packing"), -1);
+ long packing = GetLong(wxT("packing"), -1);
if (packing != -1)
toolbar->SetToolPacking(packing);
- long separation = GetLong(_T("separation"), -1);
+ long separation = GetLong(wxT("separation"), -1);
if (separation != -1)
toolbar->SetToolSeparation(separation);
- wxXmlNode *children_node = GetParamNode(_T("object"));
+ wxXmlNode *children_node = GetParamNode(wxT("object"));
if (children_node == NULL) return toolbar;
m_IsInside = TRUE;
while (n)
{
if (n->GetType() == wxXML_ELEMENT_NODE &&
- n->GetName() == _T("object"))
+ n->GetName() == wxT("object"))
{
wxObject *created = CreateResFromNode(n, toolbar, NULL);
wxControl *control = wxDynamicCast(created, wxControl);
- if (IsOfClass(n, _T("tool")) &&
- IsOfClass(n, _T("separator")) &&
+ if (IsOfClass(n, wxT("tool")) &&
+ IsOfClass(n, wxT("separator")) &&
control != NULL)
toolbar->AddControl(control);
}
bool wxToolBarXmlHandler::CanHandle(wxXmlNode *node)
{
- return ((!m_IsInside && IsOfClass(node, _T("wxToolBar"))) ||
- (m_IsInside && IsOfClass(node, _T("tool"))) ||
- (m_IsInside && IsOfClass(node, _T("separator"))));
+ return ((!m_IsInside && IsOfClass(node, wxT("wxToolBar"))) ||
+ (m_IsInside && IsOfClass(node, wxT("tool"))) ||
+ (m_IsInside && IsOfClass(node, wxT("separator"))));
}
#endif
bool wxTreeCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("wxTreeCtrl"));
+ return IsOfClass(node, wxT("wxTreeCtrl"));
}
wxObject *wxUnknownWidgetXmlHandler::DoCreateResource()
{
- long id = GetLong(_T("id"), -1);
- wxString name = GetParamValue(_T("name"));
+ long id = GetLong(wxT("id"), -1);
+ wxString name = GetParamValue(wxT("name"));
wxWindow *wnd = NULL;
wnd = m_ParentAsWindow->FindWindow(name);
if (wnd == NULL)
- wxLogError(_T("Cannot find specified window for class 'unknown' (id=%li, name='%s')."), id, name.mb_str());
+ wxLogError(wxT("Cannot find specified window for class 'unknown' (id=%li, name='%s')."), id, name.mb_str());
else
{
if (wnd->GetParent() != m_ParentAsWindow)
bool wxUnknownWidgetXmlHandler::CanHandle(wxXmlNode *node)
{
- return IsOfClass(node, _T("unknown"));
+ return IsOfClass(node, wxT("unknown"));
}
void wxXmlNode::InsertChild(wxXmlNode *child, wxXmlNode *before_node)
{
- wxASSERT_MSG(before_node->GetParent() == this, _T("wxXmlNode::InsertChild - the node has incorrect parent"));
+ wxASSERT_MSG(before_node->GetParent() == this, wxT("wxXmlNode::InsertChild - the node has incorrect parent"));
if (m_Children == before_node)
m_Children = child;
bool wxXmlIOHandlerBin::CanLoad(wxInputStream& stream)
{
bool canread;
- canread = (ReadHeader(stream) == _T("XMLBIN "));
+ canread = (ReadHeader(stream) == wxT("XMLBIN "));
stream.SeekI(-9, wxFromCurrent);
return canread;
}
bool wxXmlIOHandlerBinZ::CanLoad(wxInputStream& stream)
{
bool canread;
- canread = (ReadHeader(stream) == _T("XMLBINZ"));
+ canread = (ReadHeader(stream) == wxT("XMLBINZ"));
stream.SeekI(-9, wxFromCurrent);
return canread;
}
wxLogNull lg;
#ifdef __UNIX__
gs_libxmlDLL.Handle =
- wxDllLoader::LoadLibrary(_T("wxlibxml.so.2"), &gs_libxmlLoaded);
+ wxDllLoader::LoadLibrary(wxT("wxlibxml.so.2"), &gs_libxmlLoaded);
if (!gs_libxmlLoaded) gs_libxmlDLL.Handle =
- wxDllLoader::LoadLibrary(_T("libxml.so.2"), &gs_libxmlLoaded);
+ wxDllLoader::LoadLibrary(wxT("libxml.so.2"), &gs_libxmlLoaded);
#endif
#ifdef __WXMSW__
gs_libxmlDLL.Handle =
- wxDllLoader::LoadLibrary(_T("wxlibxml2.dll"), &gs_libxmlLoaded);
+ wxDllLoader::LoadLibrary(wxT("wxlibxml2.dll"), &gs_libxmlLoaded);
if (!gs_libxmlLoaded) gs_libxmlDLL.Handle =
- wxDllLoader::LoadLibrary(_T("libxml2.dll"), &gs_libxmlLoaded);
+ wxDllLoader::LoadLibrary(wxT("libxml2.dll"), &gs_libxmlLoaded);
#endif
}
#define LOAD_SYMBOL(sym) \
gs_libxmlDLL.sym = \
- (type_##sym)wxDllLoader::GetSymbol(gs_libxmlDLL.Handle, _T(#sym)); \
+ (type_##sym)wxDllLoader::GetSymbol(gs_libxmlDLL.Handle, wxT(#sym)); \
if (!gs_libxmlDLL.sym) \
{ \
ReleaseLibxml(); \
while (c)
{
isok = FALSE;
- if (!c->GetPropVal(_T("platform"), &s))
+ if (!c->GetPropVal(wxT("platform"), &s))
isok = TRUE;
else
{
s = tkn.GetNextToken();
if (
#ifdef __WXMSW__
- s == wxString(_T("win"))
+ s == wxString(wxT("win"))
#elif defined(__UNIX__)
- s == wxString(_T("unix"))
+ s == wxString(wxT("unix"))
#elif defined(__MAC__)
- s == wxString(_T("mac"))
+ s == wxString(wxT("mac"))
#elif defined(__OS2__)
- s == wxString(_T("os2"))
+ s == wxString(wxT("os2"))
#else
FALSE
#endif
delete m_Data[i].Doc;
m_Data[i].Doc = NULL;
}
- else if (m_Data[i].Doc->GetRoot()->GetName() != _T("resource"))
+ else if (m_Data[i].Doc->GetRoot()->GetName() != wxT("resource"))
{
wxLogError(_("Invalid XML resource '%s': doesn't have root node 'resource'."), m_Data[i].File.c_str());
delete m_Data[i].Doc;
while (ND)
{
handler = (wxXmlResourceHandler*)ND->GetData();
- if (node->GetName() == _T("object") && handler->CanHandle(node))
+ if (node->GetName() == wxT("object") && handler->CanHandle(node))
{
ret = handler->CreateResource(node, parent, instance);
if (ret) return ret;
wxLogError(_("No handler found for XML node '%s', class '%s'!"),
node->GetName().c_str(),
- node->GetPropVal(_T("class"), wxEmptyString).c_str());
+ node->GetPropVal(wxT("class"), wxEmptyString).c_str());
return NULL;
}
wxWindow *myParentAW = m_ParentAsWindow, *myInstanceAW = m_InstanceAsWindow;
m_Node = node;
- m_Class = node->GetPropVal(_T("class"), wxEmptyString);
+ m_Class = node->GetPropVal(wxT("class"), wxEmptyString);
m_Parent = parent;
m_Instance = instance;
m_ParentAsWindow = wxDynamicCast(m_Parent, wxWindow);
if (!s) return defaults;
- wxStringTokenizer tkn(s, _T("| "), wxTOKEN_STRTOK);
+ wxStringTokenizer tkn(s, wxT("| "), wxTOKEN_STRTOK);
int style = 0;
int index;
wxString fl;
wxString sid = GetName();
long num;
- if (sid == _T("-1")) return -1;
+ if (sid == wxT("-1")) return -1;
else if (sid.IsNumber() && sid.ToLong(&num)) return num;
-#define stdID(id) else if (sid == _T(#id)) return id
+#define stdID(id) else if (sid == wxT(#id)) return id
stdID(wxID_OPEN); stdID(wxID_CLOSE); stdID(wxID_NEW);
stdID(wxID_SAVE); stdID(wxID_SAVEAS); stdID(wxID_REVERT);
stdID(wxID_EXIT); stdID(wxID_UNDO); stdID(wxID_REDO);
wxString wxXmlResourceHandler::GetName()
{
- return m_Node->GetPropVal(_T("name"), _T("-1"));
+ return m_Node->GetPropVal(wxT("name"), wxT("-1"));
}
wxString v = GetParamValue(param);
v.MakeLower();
if (!v) return defaultv;
- else return (v == _T("1"));
+ else return (v == wxT("1"));
}
wxString v = GetParamValue(param);
unsigned long tmp = 0;
- if (v.Length() != 7 || v[0] != _T('#') ||
- wxSscanf(v.c_str(), _T("#%lX"), &tmp) != 1)
+ if (v.Length() != 7 || v[0] != wxT('#') ||
+ wxSscanf(v.c_str(), wxT("#%lX"), &tmp) != 1)
{
wxLogError(_("XML resource: Incorrect colour specification '%s' for property '%s'."),
v.c_str(), param.c_str());
wxImage img(*(fsfile->GetStream()));
delete fsfile;
#else
- wxImage img(GetParamValue(_T("bitmap")));
+ wxImage img(GetParamValue(wxT("bitmap")));
#endif
if (!img.Ok())
{
wxSize wxXmlResourceHandler::GetSize(const wxString& param)
{
wxString s = GetParamValue(param);
- if (s.IsEmpty()) s = _T("-1,-1");
+ if (s.IsEmpty()) s = wxT("-1,-1");
bool is_dlg;
long sx, sy;
- is_dlg = s[s.Length()-1] == _T('d');
+ is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
- if (!s.BeforeFirst(_T(',')).ToLong(&sx) ||
- !s.AfterLast(_T(',')).ToLong(&sy))
+ if (!s.BeforeFirst(wxT(',')).ToLong(&sx) ||
+ !s.AfterLast(wxT(',')).ToLong(&sy))
{
wxLogError(_("Cannot parse coordinates from '%s'."), s.mb_str());
return wxDefaultSize;
bool is_dlg;
long sx;
- is_dlg = s[s.Length()-1] == _T('d');
+ is_dlg = s[s.Length()-1] == wxT('d');
if (is_dlg) s.RemoveLast();
if (!s.ToLong(&sx))
wxXmlNode *oldnode = m_Node;
m_Node = font_node;
- long size = GetLong(_T("size"), 12);
+ long size = GetLong(wxT("size"), 12);
- wxString style = GetParamValue(_T("style"));
- wxString weight = GetParamValue(_T("weight"));
+ wxString style = GetParamValue(wxT("style"));
+ wxString weight = GetParamValue(wxT("weight"));
int istyle = wxNORMAL, iweight = wxNORMAL;
- if (style == _T("italic")) istyle = wxITALIC;
- else if (style == _T("slant")) istyle = wxSLANT;
- if (weight == _T("bold")) iweight = wxBOLD;
- else if (weight == _T("light")) iweight = wxLIGHT;
+ if (style == wxT("italic")) istyle = wxITALIC;
+ else if (style == wxT("slant")) istyle = wxSLANT;
+ if (weight == wxT("bold")) iweight = wxBOLD;
+ else if (weight == wxT("light")) iweight = wxLIGHT;
- wxString family = GetParamValue(_T("family"));
+ wxString family = GetParamValue(wxT("family"));
int ifamily = wxDEFAULT;
- if (family == _T("decorative")) ifamily = wxDECORATIVE;
- else if (family == _T("roman")) ifamily = wxROMAN;
- else if (family == _T("script")) ifamily = wxSCRIPT;
- else if (family == _T("swiss")) ifamily = wxSWISS;
- else if (family == _T("modern")) ifamily = wxMODERN;
+ if (family == wxT("decorative")) ifamily = wxDECORATIVE;
+ else if (family == wxT("roman")) ifamily = wxROMAN;
+ else if (family == wxT("script")) ifamily = wxSCRIPT;
+ else if (family == wxT("swiss")) ifamily = wxSWISS;
+ else if (family == wxT("modern")) ifamily = wxMODERN;
- bool underlined = GetBool(_T("underlined"), FALSE);
+ bool underlined = GetBool(wxT("underlined"), FALSE);
- wxString encoding = GetParamValue(_T("encoding"));
+ wxString encoding = GetParamValue(wxT("encoding"));
wxFontMapper mapper;
wxFontEncoding enc = wxFONTENCODING_DEFAULT;
if (!encoding.IsEmpty()) enc = mapper.CharsetToEncoding(encoding);
if (enc == wxFONTENCODING_SYSTEM) enc = wxFONTENCODING_SYSTEM;
- wxString faces = GetParamValue(_T("face"));
+ wxString faces = GetParamValue(wxT("face"));
wxString facename = wxEmptyString;
wxFontEnumerator enu;
enu.EnumerateFacenames();
- wxStringTokenizer tk(faces, _T(","));
+ wxStringTokenizer tk(faces, wxT(","));
while (tk.HasMoreTokens())
{
int index = enu.GetFacenames()->Index(tk.GetNextToken(), FALSE);
{
//FIXME : add cursor
- if (HasParam(_T("exstyle")))
- wnd->SetExtraStyle(GetStyle(_T("exstyle")));
- if (HasParam(_T("bg")))
- wnd->SetBackgroundColour(GetColour(_T("bg")));
- if (HasParam(_T("fg")))
- wnd->SetForegroundColour(GetColour(_T("fg")));
- if (GetBool(_T("enabled"), 1) == 0)
+ if (HasParam(wxT("exstyle")))
+ wnd->SetExtraStyle(GetStyle(wxT("exstyle")));
+ if (HasParam(wxT("bg")))
+ wnd->SetBackgroundColour(GetColour(wxT("bg")));
+ if (HasParam(wxT("fg")))
+ wnd->SetForegroundColour(GetColour(wxT("fg")));
+ if (GetBool(wxT("enabled"), 1) == 0)
wnd->Enable(FALSE);
- if (GetBool(_T("focused"), 0) == 1)
+ if (GetBool(wxT("focused"), 0) == 1)
wnd->SetFocus();
- if (GetBool(_T("hidden"), 0) == 1)
+ if (GetBool(wxT("hidden"), 0) == 1)
wnd->Show(FALSE);
#if wxUSE_TOOLTIPS
- if (HasParam(_T("tooltip")))
- wnd->SetToolTip(GetText(_T("tooltip")));
+ if (HasParam(wxT("tooltip")))
+ wnd->SetToolTip(GetText(wxT("tooltip")));
#endif
- if (HasParam(_T("font")))
+ if (HasParam(wxT("font")))
wnd->SetFont(GetFont());
}
while (n)
{
if (n->GetType() == wxXML_ELEMENT_NODE &&
- n->GetName() == _T("object"))
+ n->GetName() == wxT("object"))
{
if (this_hnd_only && CanHandle(n))
CreateResource(n, parent, NULL);