wxID_ANY, wxDefaultSize, wxDefaultPosition, wxNOT_FOUND, true, false, tabs replacements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-06-11 13:14:23 +00:00
parent df135587ad
commit f80ea77b4a
135 changed files with 1720 additions and 1720 deletions

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_bmp.h"
#endif
@@ -24,13 +24,13 @@
IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler)
wxBitmapXmlHandler::wxBitmapXmlHandler()
: wxXmlResourceHandler()
wxBitmapXmlHandler::wxBitmapXmlHandler()
: wxXmlResourceHandler()
{
}
wxObject *wxBitmapXmlHandler::DoCreateResource()
{
{
return new wxBitmap(GetBitmap(wxT("")));
}
@@ -41,13 +41,13 @@ bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler)
wxIconXmlHandler::wxIconXmlHandler()
: wxXmlResourceHandler()
wxIconXmlHandler::wxIconXmlHandler()
: wxXmlResourceHandler()
{
}
wxObject *wxIconXmlHandler::DoCreateResource()
{
{
return new wxIcon(GetIcon(wxT("")));
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_bmpbt.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxBitmapButtonXmlHandler, wxXmlResourceHandler)
wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler()
: wxXmlResourceHandler()
wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxBU_AUTODRAW);
XRC_ADD_STYLE(wxBU_LEFT);
@@ -37,7 +37,7 @@ wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler()
}
wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(button, wxBitmapButton)
button->Create(m_parentAsWindow,
@@ -50,14 +50,14 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
if (GetBool(wxT("default"), 0))
button->SetDefault();
SetupWindow(button);
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;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_bttn.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxButtonXmlHandler, wxXmlResourceHandler)
wxButtonXmlHandler::wxButtonXmlHandler()
: wxXmlResourceHandler()
wxButtonXmlHandler::wxButtonXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxBU_LEFT);
XRC_ADD_STYLE(wxBU_RIGHT);
@@ -36,7 +36,7 @@ wxButtonXmlHandler::wxButtonXmlHandler()
}
wxObject *wxButtonXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(button, wxButton)
button->Create(m_parentAsWindow,
@@ -50,7 +50,7 @@ wxObject *wxButtonXmlHandler::DoCreateResource()
if (GetBool(wxT("default"), 0))
button->SetDefault();
SetupWindow(button);
return button;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_cald.h"
#endif
@@ -29,8 +29,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler, wxXmlResourceHandler)
wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
: wxXmlResourceHandler()
wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST);
XRC_ADD_STYLE(wxCAL_MONDAY_FIRST);
@@ -45,7 +45,7 @@ wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl);
calendar->Create(m_parentAsWindow,
@@ -55,9 +55,9 @@ wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
GetPosition(), GetSize(),
GetStyle(),
GetName());
SetupWindow(calendar);
return calendar;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_chckb.h"
#endif
@@ -26,14 +26,14 @@
IMPLEMENT_DYNAMIC_CLASS(wxCheckBoxXmlHandler, wxXmlResourceHandler)
wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
: wxXmlResourceHandler()
wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
: wxXmlResourceHandler()
{
AddWindowStyles();
}
wxObject *wxCheckBoxXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxCheckBox)
control->Create(m_parentAsWindow,
@@ -46,7 +46,7 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource()
control->SetValue(GetBool( wxT("checked")));
SetupWindow(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_chckl.h"
#endif
@@ -28,15 +28,15 @@
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
: wxXmlResourceHandler(), m_insideBox(FALSE)
wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
: wxXmlResourceHandler(), m_insideBox(false)
{
// no styles
AddWindowStyles();
}
wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
{
{
if (m_class == wxT("wxCheckListBox")
#if WXWIN_COMPATIBILITY_2_4
|| m_class == wxT("wxCheckList")
@@ -48,7 +48,7 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead."));
#endif
// need to build the list of strings from children
m_insideBox = TRUE;
m_insideBox = true;
CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if (strList.GetCount() > 0)
@@ -84,17 +84,17 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
wxString v = n->GetPropVal(wxT("checked"), wxEmptyString);
v.MakeLower();
if (v && v == wxT("1"))
control->Check( i, TRUE );
control->Check( i, true );
i++;
i++;
n = n->GetNext();
}
SetupWindow(control);
if (strings != NULL)
delete[] strings;
strList.Clear(); // dump the strings
strList.Clear(); // dump the strings
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_choic.h"
#endif
@@ -25,22 +25,22 @@
IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
wxChoiceXmlHandler::wxChoiceXmlHandler()
: wxXmlResourceHandler() , m_insideBox(FALSE)
wxChoiceXmlHandler::wxChoiceXmlHandler()
: wxXmlResourceHandler() , m_insideBox(false)
{
XRC_ADD_STYLE(wxCB_SORT);
AddWindowStyles();
}
wxObject *wxChoiceXmlHandler::DoCreateResource()
{
{
if( m_class == wxT("wxChoice"))
{
// find the selection
long selection = GetLong(wxT("selection"), -1);
// need to build the list of strings from children
m_insideBox = TRUE;
m_insideBox = true;
CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if (strList.GetCount() > 0)
@@ -69,7 +69,7 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
if (strings != NULL)
delete[] strings;
strList.Clear(); // dump the strings
strList.Clear(); // dump the strings
return control;
}
@@ -77,7 +77,7 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
{
// on the inside now.
// handle <item>Label</item>
// add to the list
wxString str = GetNodeContent(m_node);
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_combo.h"
#endif
@@ -27,8 +27,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)
wxComboBoxXmlHandler::wxComboBoxXmlHandler()
: wxXmlResourceHandler() , m_insideBox(FALSE)
wxComboBoxXmlHandler::wxComboBoxXmlHandler()
: wxXmlResourceHandler() , m_insideBox(false)
{
XRC_ADD_STYLE(wxCB_SIMPLE);
XRC_ADD_STYLE(wxCB_SORT);
@@ -38,14 +38,14 @@ wxComboBoxXmlHandler::wxComboBoxXmlHandler()
}
wxObject *wxComboBoxXmlHandler::DoCreateResource()
{
{
if( m_class == wxT("wxComboBox"))
{
// find the selection
long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_insideBox = TRUE;
m_insideBox = true;
CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if (strList.GetCount() > 0)
@@ -75,7 +75,7 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
if (strings != NULL)
delete[] strings;
strList.Clear(); // dump the strings
strList.Clear(); // dump the strings
return control;
}

View File

@@ -70,7 +70,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
CreateChildren(dlg);
if (GetBool(wxT("centered"), FALSE))
if (GetBool(wxT("centered"), false))
dlg->Centre();
return dlg;

View File

@@ -75,7 +75,7 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
CreateChildren(frame);
if (GetBool(wxT("centered"), FALSE))
if (GetBool(wxT("centered"), false))
frame->Centre();
return frame;

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_gauge.h"
#endif
@@ -26,8 +26,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxGaugeXmlHandler, wxXmlResourceHandler)
wxGaugeXmlHandler::wxGaugeXmlHandler()
: wxXmlResourceHandler()
wxGaugeXmlHandler::wxGaugeXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxGA_HORIZONTAL);
XRC_ADD_STYLE(wxGA_VERTICAL);
@@ -37,12 +37,12 @@ wxGaugeXmlHandler::wxGaugeXmlHandler()
}
wxObject *wxGaugeXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxGauge)
control->Create(m_parentAsWindow,
GetID(),
GetLong(wxT("range"), wxGAUGE_DEFAULT_RANGE),
GetLong(wxT("range"), wxGAUGE_DEFAULT_RANGE),
GetPosition(), GetSize(),
GetStyle(),
wxDefaultValidator,

View File

@@ -41,7 +41,7 @@ wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl)
ctrl->Create(m_parentAsWindow,
GetID(),
GetText(wxT("defaultfolder")),

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_html.h"
#endif
@@ -28,8 +28,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxHtmlWindowXmlHandler, wxXmlResourceHandler)
wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler()
: wxXmlResourceHandler()
wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxHW_SCROLLBAR_NEVER);
XRC_ADD_STYLE(wxHW_SCROLLBAR_AUTO);
@@ -56,7 +56,7 @@ wxObject *wxHtmlWindowXmlHandler::DoCreateResource()
{
wxString url = GetParamValue(wxT("url"));
wxFileSystem& fsys = GetCurFileSystem();
wxFSFile *f = fsys.OpenFile(url);
if (f)
{
@@ -66,14 +66,14 @@ wxObject *wxHtmlWindowXmlHandler::DoCreateResource()
else
control->LoadPage(url);
}
else if (HasParam(wxT("htmlcode")))
{
control->SetPage(GetText(wxT("htmlcode")));
}
SetupWindow(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_listb.h"
#endif
@@ -25,8 +25,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxListBoxXmlHandler, wxXmlResourceHandler)
wxListBoxXmlHandler::wxListBoxXmlHandler()
: wxXmlResourceHandler() , m_insideBox(FALSE)
wxListBoxXmlHandler::wxListBoxXmlHandler()
: wxXmlResourceHandler() , m_insideBox(false)
{
XRC_ADD_STYLE(wxLB_SINGLE);
XRC_ADD_STYLE(wxLB_MULTIPLE);
@@ -39,14 +39,14 @@ wxListBoxXmlHandler::wxListBoxXmlHandler()
}
wxObject *wxListBoxXmlHandler::DoCreateResource()
{
{
if( m_class == wxT("wxListBox"))
{
// find the selection
long selection = GetLong(wxT("selection"), -1);
// need to build the list of strings from children
m_insideBox = TRUE;
m_insideBox = true;
CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if (strList.GetCount() > 0)
@@ -75,7 +75,7 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
if (strings != NULL)
delete[] strings;
strList.Clear(); // dump the strings
strList.Clear(); // dump the strings
return control;
}
@@ -83,7 +83,7 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
{
// on the inside now.
// handle <item>Label</item>
// add to the list
wxString str = GetNodeContent(m_node);
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_listc.h"
#endif
@@ -26,8 +26,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
wxListCtrlXmlHandler::wxListCtrlXmlHandler()
: wxXmlResourceHandler()
wxListCtrlXmlHandler::wxListCtrlXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxLC_LIST);
XRC_ADD_STYLE(wxLC_REPORT);
@@ -50,7 +50,7 @@ wxListCtrlXmlHandler::wxListCtrlXmlHandler()
}
wxObject *wxListCtrlXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(list, wxListCtrl)
list->Create(m_parentAsWindow,
@@ -61,9 +61,9 @@ wxObject *wxListCtrlXmlHandler::DoCreateResource()
GetName());
// FIXME: add columns definition
SetupWindow(list);
return list;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_menu.h"
#endif
@@ -25,8 +25,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)
wxMenuXmlHandler::wxMenuXmlHandler() :
wxXmlResourceHandler(), m_insideMenu(FALSE)
wxMenuXmlHandler::wxMenuXmlHandler() :
wxXmlResourceHandler(), m_insideMenu(false)
{
XRC_ADD_STYLE(wxMENU_TEAROFF);
}
@@ -38,10 +38,10 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
wxMenu *menu = new wxMenu(GetStyle());
wxString title = GetText(wxT("label"));
wxString help = GetText(wxT("help"));
bool oldins = m_insideMenu;
m_insideMenu = TRUE;
CreateChildren(menu, TRUE/*only this handler*/);
m_insideMenu = true;
CreateChildren(menu, true/*only this handler*/);
m_insideMenu = oldins;
wxMenuBar *p_bar = wxDynamicCast(m_parent, wxMenuBar);
@@ -60,16 +60,16 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
else
{
wxMenu *p_menu = wxDynamicCast(m_parent, wxMenu);
if (m_class == wxT("separator"))
p_menu->AppendSeparator();
else if (m_class == wxT("break"))
p_menu->Break();
else /*wxMenuItem*/
{
{
int id = GetID();
wxString label = GetText(wxT("label"));
wxString accel = GetText(wxT("accel"), FALSE);
wxString accel = GetText(wxT("accel"), false);
wxString fullLabel = label;
if (!accel.IsEmpty())
fullLabel << wxT("\t") << accel;
@@ -85,13 +85,13 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
GetText(wxT("help")), kind);
#if wxCHECK_VERSION(2,3,0) || (defined(__WXMSW__) && wxUSE_OWNER_DRAWN)
if (HasParam(wxT("bitmap")))
mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU));
#endif
p_menu->Append(mitem);
mitem->Enable(GetBool(wxT("enabled"), TRUE));
mitem->Enable(GetBool(wxT("enabled"), true));
if (kind == wxITEM_CHECK)
mitem->Check(GetBool(wxT("checked")));
}
@@ -104,7 +104,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
bool wxMenuXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxMenu")) ||
(m_insideMenu &&
(m_insideMenu &&
(IsOfClass(node, wxT("wxMenuItem")) ||
IsOfClass(node, wxT("break")) ||
IsOfClass(node, wxT("separator")))

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_notbk.h"
#endif
@@ -29,8 +29,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxNotebookXmlHandler, wxXmlResourceHandler)
wxNotebookXmlHandler::wxNotebookXmlHandler()
: wxXmlResourceHandler(), m_isInside(FALSE), m_notebook(NULL)
wxNotebookXmlHandler::wxNotebookXmlHandler()
: wxXmlResourceHandler(), m_isInside(false), m_notebook(NULL)
{
XRC_ADD_STYLE(wxNB_FIXEDWIDTH);
XRC_ADD_STYLE(wxNB_LEFT);
@@ -40,7 +40,7 @@ wxNotebookXmlHandler::wxNotebookXmlHandler()
}
wxObject *wxNotebookXmlHandler::DoCreateResource()
{
{
if (m_class == wxT("notebookpage"))
{
wxXmlNode *n = GetParamNode(wxT("object"));
@@ -51,7 +51,7 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
if (n)
{
bool old_ins = m_isInside;
m_isInside = FALSE;
m_isInside = false;
wxObject *item = CreateResFromNode(n, m_notebook, NULL);
m_isInside = old_ins;
wxWindow *wnd = wxDynamicCast(item, wxWindow);
@@ -59,8 +59,8 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
if (wnd)
m_notebook->AddPage(wnd, GetText(wxT("label")),
GetBool(wxT("selected"), 0));
else
wxLogError(wxT("Error in resource."));
else
wxLogError(wxT("Error in resource."));
return wnd;
}
else
@@ -69,12 +69,12 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
return NULL;
}
}
else
else
{
XRC_MAKE_INSTANCE(nb, wxNotebook)
nb->Create(m_parentAsWindow,
nb->Create(m_parentAsWindow,
GetID(),
GetPosition(), GetSize(),
GetStyle(wxT("style")),
@@ -83,12 +83,12 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
wxNotebook *old_par = m_notebook;
m_notebook = nb;
bool old_ins = m_isInside;
m_isInside = TRUE;
CreateChildren(m_notebook, TRUE/*only this handler*/);
m_isInside = true;
CreateChildren(m_notebook, true/*only this handler*/);
m_isInside = old_ins;
m_notebook = old_par;
if (GetBool(wxT("usenotebooksizer"), FALSE))
if (GetBool(wxT("usenotebooksizer"), false))
return new wxNotebookSizer(nb);
else
return nb;

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_panel.h"
#endif
@@ -35,7 +35,7 @@ wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler()
}
wxObject *wxPanelXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(panel, wxPanel)
panel->Create(m_parentAsWindow,
@@ -46,7 +46,7 @@ wxObject *wxPanelXmlHandler::DoCreateResource()
SetupWindow(panel);
CreateChildren(panel);
return panel;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_radbt.h"
#endif
@@ -26,21 +26,21 @@
IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler)
wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
: wxXmlResourceHandler()
wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxRB_GROUP);
AddWindowStyles();
}
wxObject *wxRadioButtonXmlHandler::DoCreateResource()
{
{
/* BOBM - implementation note.
* once the wxBitmapRadioButton is implemented.
* look for a bitmap property. If not null,
* make it a wxBitmapRadioButton instead of the
* look for a bitmap property. If not null,
* make it a wxBitmapRadioButton instead of the
* normal radio button.
*/
*/
XRC_MAKE_INSTANCE(control, wxRadioButton)
@@ -54,7 +54,7 @@ wxObject *wxRadioButtonXmlHandler::DoCreateResource()
control->SetValue(GetBool(wxT("value"), 0));
SetupWindow(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_radbx.h"
#endif
@@ -27,8 +27,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxRadioBoxXmlHandler, wxXmlResourceHandler)
wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
: wxXmlResourceHandler(), m_insideBox(FALSE)
wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
: wxXmlResourceHandler(), m_insideBox(false)
{
XRC_ADD_STYLE(wxRA_SPECIFY_COLS);
XRC_ADD_STYLE(wxRA_HORIZONTAL);
@@ -38,14 +38,14 @@ wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
}
wxObject *wxRadioBoxXmlHandler::DoCreateResource()
{
{
if( m_class == wxT("wxRadioBox"))
{
// find the selection
long selection = GetLong( wxT("selection"), -1 );
// need to build the list of strings from children
m_insideBox = TRUE;
m_insideBox = true;
CreateChildrenPrivately( NULL, GetParamNode(wxT("content")));
wxString *strings = (wxString *) NULL;
if( strList.GetCount() > 0 )
@@ -76,7 +76,7 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
if (strings != NULL)
delete[] strings;
strList.Clear(); // dump the strings
strList.Clear(); // dump the strings
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_scrol.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxScrollBarXmlHandler, wxXmlResourceHandler)
wxScrollBarXmlHandler::wxScrollBarXmlHandler()
: wxXmlResourceHandler()
wxScrollBarXmlHandler::wxScrollBarXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxSB_HORIZONTAL);
XRC_ADD_STYLE(wxSB_VERTICAL);
@@ -33,7 +33,7 @@ wxScrollBarXmlHandler::wxScrollBarXmlHandler()
}
wxObject *wxScrollBarXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxScrollBar)
control->Create(m_parentAsWindow,
@@ -43,14 +43,14 @@ wxObject *wxScrollBarXmlHandler::DoCreateResource()
wxDefaultValidator,
GetName());
control->SetScrollbar(GetLong( wxT("value"), 0),
control->SetScrollbar(GetLong( wxT("value"), 0),
GetLong( wxT("thumbsize"),1),
GetLong( wxT("range"), 10),
GetLong( wxT("pagesize"),1));
SetupWindow(control);
CreateChildren(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2002 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_scwin.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)
wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
: wxXmlResourceHandler()
wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxHSCROLL);
XRC_ADD_STYLE(wxVSCROLL);
@@ -33,7 +33,7 @@ wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
}
wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxScrolledWindow)
control->Create(m_parentAsWindow,
@@ -44,7 +44,7 @@ wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
SetupWindow(control);
CreateChildren(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_sizer.h"
#endif
@@ -32,12 +32,12 @@
IMPLEMENT_DYNAMIC_CLASS(wxSizerXmlHandler, wxXmlResourceHandler)
wxSizerXmlHandler::wxSizerXmlHandler()
wxSizerXmlHandler::wxSizerXmlHandler()
: wxXmlResourceHandler(),
m_isInside(FALSE),
m_isGBS(FALSE),
m_isInside(false),
m_isGBS(false),
m_parentSizer(NULL)
{
XRC_ADD_STYLE(wxHORIZONTAL);
@@ -69,7 +69,7 @@ wxSizerXmlHandler::wxSizerXmlHandler()
XRC_ADD_STYLE(wxALIGN_CENTRE_HORIZONTAL);
XRC_ADD_STYLE(wxALIGN_CENTER_VERTICAL);
XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL);
XRC_ADD_STYLE(wxADJUST_MINSIZE);
XRC_ADD_STYLE(wxFIXED_MINSIZE);
}
@@ -80,16 +80,16 @@ bool wxSizerXmlHandler::CanHandle(wxXmlNode *node)
{
return ( (!m_isInside && IsSizerNode(node)) ||
(m_isInside && IsOfClass(node, wxT("sizeritem"))) ||
(m_isInside && IsOfClass(node, wxT("spacer")))
(m_isInside && IsOfClass(node, wxT("spacer")))
);
}
wxObject* wxSizerXmlHandler::DoCreateResource()
{
{
if (m_class == wxT("sizeritem"))
return Handle_sizeritem();
else if (m_class == wxT("spacer"))
return Handle_spacer();
@@ -122,13 +122,13 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem()
{
// create a sizer item for it
wxSizerItem* sitem = MakeSizerItem();
// now fetch the item to be managed
bool old_gbs = m_isGBS;
bool old_ins = m_isInside;
wxSizer *old_par = m_parentSizer;
m_isInside = FALSE;
if (!IsSizerNode(n)) m_parentSizer = NULL;
m_isInside = false;
if (!IsSizerNode(n)) m_parentSizer = NULL;
wxObject *item = CreateResFromNode(n, m_parent, NULL);
m_isInside = old_ins;
m_parentSizer = old_par;
@@ -137,12 +137,12 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem()
// and figure out what type it is
wxSizer *sizer = wxDynamicCast(item, wxSizer);
wxWindow *wnd = wxDynamicCast(item, wxWindow);
if (sizer)
sitem->SetSizer(sizer);
else if (wnd)
sitem->SetWindow(wnd);
else
else
wxLogError(wxT("Error in resource."));
// finally, set other wxSizerItem attributes
@@ -166,7 +166,7 @@ wxObject* wxSizerXmlHandler::Handle_spacer()
wxSizerItem* sitem = MakeSizerItem();
SetSizerItemAttributes(sitem);
sitem->SetSpacer(GetSize());
AddSizerItem(sitem);
AddSizerItem(sitem);
return NULL;
}
@@ -174,7 +174,7 @@ wxObject* wxSizerXmlHandler::Handle_spacer()
wxObject* wxSizerXmlHandler::Handle_sizer()
{
wxSizer *sizer = NULL;
wxXmlNode *parentNode = m_node->GetParent();
wxCHECK_MSG(m_parentSizer != NULL ||
@@ -191,17 +191,17 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
else if (m_class == wxT("wxStaticBoxSizer"))
sizer = Handle_wxStaticBoxSizer();
else if (m_class == wxT("wxGridSizer"))
sizer = Handle_wxGridSizer();
else if (m_class == wxT("wxFlexGridSizer"))
sizer = Handle_wxFlexGridSizer();
else if (m_class == wxT("wxGridBagSizer"))
sizer = Handle_wxGridBagSizer();
wxSize minsize = GetSize(wxT("minsize"));
if (!(minsize == wxDefaultSize))
sizer->SetMinSize(minsize);
@@ -212,10 +212,10 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
// set new state
m_parentSizer = sizer;
m_isInside = TRUE;
m_isInside = true;
m_isGBS = (m_class == wxT("wxGridBagSizer"));
CreateChildren(m_parent, TRUE/*only this handler*/);
CreateChildren(m_parent, true/*only this handler*/);
// restore state
m_isInside = old_ins;
@@ -223,7 +223,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
if (m_parentSizer == NULL) // setup window:
{
m_parentAsWindow->SetAutoLayout(TRUE);
m_parentAsWindow->SetAutoLayout(true);
m_parentAsWindow->SetSizer(sizer);
wxXmlNode *nd = m_node;
@@ -235,7 +235,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
if (m_parentAsWindow->GetWindowStyle() & (wxRESIZE_BOX | wxRESIZE_BORDER))
sizer->SetSizeHints(m_parentAsWindow);
}
return sizer;
}
@@ -243,8 +243,8 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
wxSizer* wxSizerXmlHandler::Handle_wxBoxSizer()
{
return new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL));
}
}
wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer()
{
return new wxStaticBoxSizer(
@@ -256,7 +256,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer()
GetName()),
GetStyle(wxT("orient"), wxHORIZONTAL));
}
wxSizer* wxSizerXmlHandler::Handle_wxGridSizer()
{
return new wxGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")),
@@ -266,7 +266,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxGridSizer()
wxSizer* wxSizerXmlHandler::Handle_wxFlexGridSizer()
{
wxFlexGridSizer *sizer =
wxFlexGridSizer *sizer =
new wxFlexGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")),
GetDimension(wxT("vgap")), GetDimension(wxT("hgap")));
SetGrowables(sizer, wxT("growablerows"), true);
@@ -277,7 +277,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxFlexGridSizer()
wxSizer* wxSizerXmlHandler::Handle_wxGridBagSizer()
{
wxGridBagSizer *sizer =
wxGridBagSizer *sizer =
new wxGridBagSizer(GetDimension(wxT("vgap")), GetDimension(wxT("hgap")));
SetGrowables(sizer, wxT("growablerows"), true);
SetGrowables(sizer, wxT("growablecols"), false);
@@ -345,13 +345,13 @@ void wxSizerXmlHandler::SetSizerItemAttributes(wxSizerItem* sitem)
sz = GetSize(wxT("ratio"));
if (!(sz == wxDefaultSize))
sitem->SetRatio(sz);
if (m_isGBS)
{
wxGBSizerItem* gbsitem = (wxGBSizerItem*)sitem;
gbsitem->SetPos(GetGBPos(wxT("cellpos")));
gbsitem->SetSpan(GetGBSpan(wxT("cellspan")));
}
}
}
void wxSizerXmlHandler::AddSizerItem(wxSizerItem* sitem)
@@ -361,7 +361,7 @@ void wxSizerXmlHandler::AddSizerItem(wxSizerItem* sitem)
else
m_parentSizer->Add(sitem);
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_slidr.h"
#endif
@@ -26,8 +26,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxSliderXmlHandler, wxXmlResourceHandler)
wxSliderXmlHandler::wxSliderXmlHandler()
: wxXmlResourceHandler()
wxSliderXmlHandler::wxSliderXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxSL_HORIZONTAL);
XRC_ADD_STYLE(wxSL_VERTICAL);
@@ -43,12 +43,12 @@ wxSliderXmlHandler::wxSliderXmlHandler()
}
wxObject *wxSliderXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxSlider)
control->Create(m_parentAsWindow,
GetID(),
GetLong(wxT("value"), wxSL_DEFAULT_VALUE),
GetLong(wxT("value"), wxSL_DEFAULT_VALUE),
GetLong(wxT("min"), wxSL_DEFAULT_MIN),
GetLong(wxT("max"), wxSL_DEFAULT_MAX),
GetPosition(), GetSize(),
@@ -82,7 +82,7 @@ wxObject *wxSliderXmlHandler::DoCreateResource()
}
SetupWindow(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_spin.h"
#endif
@@ -26,8 +26,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxSpinButtonXmlHandler, wxXmlResourceHandler)
wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
: wxXmlResourceHandler()
wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxSP_HORIZONTAL);
XRC_ADD_STYLE(wxSP_VERTICAL);
@@ -37,7 +37,7 @@ wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
}
wxObject *wxSpinButtonXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxSpinButton)
control->Create(m_parentAsWindow,
@@ -50,7 +50,7 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource()
control->SetRange(GetLong( wxT("min"), wxSP_DEFAULT_MIN),
GetLong(wxT("max"), wxSP_DEFAULT_MAX));
SetupWindow(control);
return control;
}
@@ -65,8 +65,8 @@ bool wxSpinButtonXmlHandler::CanHandle(wxXmlNode *node)
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrlXmlHandler, wxXmlResourceHandler)
wxSpinCtrlXmlHandler::wxSpinCtrlXmlHandler()
: wxXmlResourceHandler()
wxSpinCtrlXmlHandler::wxSpinCtrlXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxSP_HORIZONTAL);
XRC_ADD_STYLE(wxSP_VERTICAL);
@@ -75,9 +75,9 @@ wxSpinCtrlXmlHandler::wxSpinCtrlXmlHandler()
}
wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(control, wxSpinCtrl)
control->Create(m_parentAsWindow,
GetID(),
GetText(wxT("value")),
@@ -89,7 +89,7 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
GetName());
SetupWindow(control);
return control;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2003 panga@freemail.hu, Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_split.h"
#endif
@@ -60,7 +60,7 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
wxXmlNode *n = m_node->GetChildren();
while (n)
{
if ((n->GetType() == wxXML_ELEMENT_NODE) &&
if ((n->GetType() == wxXML_ELEMENT_NODE) &&
(n->GetName() == wxT("object") ||
n->GetName() == wxT("object_ref")))
{
@@ -74,7 +74,7 @@ wxObject *wxSplitterWindowXmlHandler::DoCreateResource()
{
win2 = win;
break;
}
}
}
n = n->GetNext();
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_stbmp.h"
#endif
@@ -24,14 +24,14 @@
IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler)
wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
: wxXmlResourceHandler()
wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
: wxXmlResourceHandler()
{
AddWindowStyles();
}
wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
bmp->Create(m_parentAsWindow,
@@ -42,7 +42,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
GetName());
SetupWindow(bmp);
return bmp;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_stbox.h"
#endif
@@ -24,14 +24,14 @@
IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler)
wxStaticBoxXmlHandler::wxStaticBoxXmlHandler()
: wxXmlResourceHandler()
wxStaticBoxXmlHandler::wxStaticBoxXmlHandler()
: wxXmlResourceHandler()
{
AddWindowStyles();
}
wxObject *wxStaticBoxXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(box, wxStaticBox)
box->Create(m_parentAsWindow,
@@ -42,7 +42,7 @@ wxObject *wxStaticBoxXmlHandler::DoCreateResource()
GetName());
SetupWindow(box);
return box;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_stlin.h"
#endif
@@ -26,8 +26,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxStaticLineXmlHandler, wxXmlResourceHandler)
wxStaticLineXmlHandler::wxStaticLineXmlHandler()
: wxXmlResourceHandler()
wxStaticLineXmlHandler::wxStaticLineXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxLI_HORIZONTAL);
XRC_ADD_STYLE(wxLI_VERTICAL);
@@ -35,7 +35,7 @@ wxStaticLineXmlHandler::wxStaticLineXmlHandler()
}
wxObject *wxStaticLineXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(line, wxStaticLine)
line->Create(m_parentAsWindow,
@@ -45,7 +45,7 @@ wxObject *wxStaticLineXmlHandler::DoCreateResource()
GetName());
SetupWindow(line);
return line;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_sttxt.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxStaticTextXmlHandler, wxXmlResourceHandler)
wxStaticTextXmlHandler::wxStaticTextXmlHandler()
: wxXmlResourceHandler()
wxStaticTextXmlHandler::wxStaticTextXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxST_NO_AUTORESIZE);
XRC_ADD_STYLE(wxALIGN_LEFT);
@@ -35,7 +35,7 @@ wxStaticTextXmlHandler::wxStaticTextXmlHandler()
}
wxObject *wxStaticTextXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(text, wxStaticText)
text->Create(m_parentAsWindow,
@@ -46,7 +46,7 @@ wxObject *wxStaticTextXmlHandler::DoCreateResource()
GetName());
SetupWindow(text);
return text;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Aleksandras Gluchovas
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_text.h"
#endif
@@ -24,7 +24,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrlXmlHandler, wxXmlResourceHandler)
wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxTE_NO_VSCROLL);
XRC_ADD_STYLE(wxTE_AUTO_SCROLL);
@@ -48,7 +48,7 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
}
wxObject *wxTextCtrlXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(text, wxTextCtrl)
text->Create(m_parentAsWindow,
@@ -60,7 +60,7 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
GetName());
SetupWindow(text);
return text;
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_toolb.h"
#endif
@@ -27,8 +27,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
wxToolBarXmlHandler::wxToolBarXmlHandler()
: wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL)
wxToolBarXmlHandler::wxToolBarXmlHandler()
: wxXmlResourceHandler(), m_isInside(false), m_toolbar(NULL)
{
XRC_ADD_STYLE(wxTB_FLAT);
XRC_ADD_STYLE(wxTB_DOCKABLE);
@@ -43,11 +43,11 @@ wxToolBarXmlHandler::wxToolBarXmlHandler()
}
wxObject *wxToolBarXmlHandler::DoCreateResource()
{
{
if (m_class == wxT("tool"))
{
wxCHECK_MSG(m_toolbar, NULL, wxT("Incorrect syntax of XRC resource: tool not within a toolbar!"));
if (GetPosition() != wxDefaultPosition)
{
m_toolbar->AddTool(GetID(),
@@ -61,7 +61,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
GetText(wxT("longhelp")));
}
else
{
{
wxItemKind kind = wxITEM_NORMAL;
if (GetBool(wxT("radio")))
kind = wxITEM_RADIO;
@@ -70,7 +70,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
wxASSERT_MSG( kind == wxITEM_NORMAL,
_T("can't have both toggleable and radion button at once") );
kind = wxITEM_CHECK;
}
}
m_toolbar->AddTool(GetID(),
GetText(wxT("label")),
GetBitmap(wxT("bitmap"), wxART_TOOLBAR),
@@ -81,14 +81,14 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
}
return m_toolbar; // must return non-NULL
}
else if (m_class == wxT("separator"))
{
wxCHECK_MSG(m_toolbar, NULL, wxT("Incorrect syntax of XRC resource: separator not within a toolbar!"));
m_toolbar->AddSeparator();
return m_toolbar; // must return non-NULL
}
else /*<object class="wxToolBar">*/
{
int style = GetStyle(wxT("style"), wxNO_BORDER | wxTB_HORIZONTAL);
@@ -97,7 +97,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
#endif
XRC_MAKE_INSTANCE(toolbar, wxToolBar)
toolbar->Create(m_parentAsWindow,
GetID(),
GetPosition(),
@@ -124,14 +124,14 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
if (children_node == NULL) return toolbar;
m_isInside = TRUE;
m_isInside = true;
m_toolbar = toolbar;
wxXmlNode *n = children_node;
while (n)
{
if ((n->GetType() == wxXML_ELEMENT_NODE) &&
if ((n->GetType() == wxXML_ELEMENT_NODE) &&
(n->GetName() == wxT("object") || n->GetName() == wxT("object_ref")))
{
wxObject *created = CreateResFromNode(n, toolbar, NULL);
@@ -144,7 +144,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
n = n->GetNext();
}
m_isInside = FALSE;
m_isInside = false;
m_toolbar = NULL;
toolbar->Realize();
@@ -163,7 +163,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
bool wxToolBarXmlHandler::CanHandle(wxXmlNode *node)
{
return ((!m_isInside && IsOfClass(node, wxT("wxToolBar"))) ||
(m_isInside && IsOfClass(node, wxT("tool"))) ||
(m_isInside && IsOfClass(node, wxT("tool"))) ||
(m_isInside && IsOfClass(node, wxT("separator"))));
}

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_tree.h"
#endif
@@ -24,8 +24,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrlXmlHandler, wxXmlResourceHandler)
wxTreeCtrlXmlHandler::wxTreeCtrlXmlHandler()
: wxXmlResourceHandler()
wxTreeCtrlXmlHandler::wxTreeCtrlXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxTR_EDIT_LABELS);
XRC_ADD_STYLE(wxTR_NO_BUTTONS);
@@ -45,7 +45,7 @@ wxTreeCtrlXmlHandler::wxTreeCtrlXmlHandler()
}
wxObject *wxTreeCtrlXmlHandler::DoCreateResource()
{
{
XRC_MAKE_INSTANCE(tree, wxTreeCtrl)
tree->Create(m_parentAsWindow,
@@ -56,7 +56,7 @@ wxObject *wxTreeCtrlXmlHandler::DoCreateResource()
GetName());
SetupWindow(tree);
return tree;
}

View File

@@ -31,7 +31,7 @@ class wxUnknownControlContainer : public wxPanel
public:
wxUnknownControlContainer(wxWindow *parent,
const wxString& controlName,
wxWindowID id = -1,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0)
@@ -95,7 +95,7 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource()
wxPanel *panel =
new wxUnknownControlContainer(m_parentAsWindow,
GetName(), -1,
GetName(), wxID_ANY,
GetPosition(), GetSize(),
GetStyle(wxT("style")));
SetupWindow(panel);

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_wizrd.h"
#endif
@@ -35,7 +35,7 @@ wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler()
}
wxObject *wxWizardXmlHandler::DoCreateResource()
{
{
if (m_class == wxT("wxWizard"))
{
XRC_MAKE_INSTANCE(wiz, wxWizard)
@@ -92,7 +92,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
bool wxWizardXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxWizard")) ||
return IsOfClass(node, wxT("wxWizard")) ||
(m_wizard != NULL &&
(IsOfClass(node, wxT("wxWizardPage")) ||
IsOfClass(node, wxT("wxWizardPageSimple")))

View File

@@ -82,7 +82,7 @@ bool wxXmlResource::Load(const wxString& filemask)
wxString fnd;
wxXmlResourceDataRecord *drec;
bool iswild = wxIsWild(filemask);
bool rt = TRUE;
bool rt = true;
#if wxUSE_FILESYSTEM
wxFileSystem fsys;
@@ -260,7 +260,7 @@ bool wxXmlResource::AttachUnknownControl(const wxString& name,
if (!container)
{
wxLogError(_("Cannot find container for unknown control '%s'."), name.c_str());
return FALSE;
return false;
}
return control->Reparent(container);
}
@@ -274,9 +274,9 @@ static void ProcessPlatformProperty(wxXmlNode *node)
wxXmlNode *c = node->GetChildren();
while (c)
{
isok = FALSE;
isok = false;
if (!c->GetPropVal(wxT("platform"), &s))
isok = TRUE;
isok = true;
else
{
wxStringTokenizer tkn(s, wxT(" |"));
@@ -366,8 +366,8 @@ bool wxXmlResource::UpdateResources()
# if wxUSE_FILESYSTEM
file = fsys.OpenFile(m_data[i].File);
if (file)
stream = file->GetStream();
if (file)
stream = file->GetStream();
# else
stream = new wxFileInputStream(m_data[i].File);
# endif
@@ -391,7 +391,7 @@ bool wxXmlResource::UpdateResources()
rt = false;
}
else
{
{
long version;
int v1, v2, v3, v4;
wxString verstr = m_data[i].Doc->GetRoot()->GetPropVal(
@@ -411,17 +411,17 @@ bool wxXmlResource::UpdateResources()
ProcessPlatformProperty(m_data[i].Doc->GetRoot());
#if wxUSE_FILESYSTEM
m_data[i].Time = file->GetModificationTime();
m_data[i].Time = file->GetModificationTime();
#else
m_data[i].Time = wxDateTime(wxFileModificationTime(m_data[i].File));
#endif
}
}
# if wxUSE_FILESYSTEM
wxDELETE(file);
wxUnusedVar(file);
wxDELETE(file);
wxUnusedVar(file);
# else
wxDELETE(stream);
wxDELETE(stream);
# endif
}
}
@@ -456,7 +456,7 @@ wxXmlNode *wxXmlResource::DoFindResource(wxXmlNode *parent,
wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString);
if (refName.empty())
continue;
wxXmlNode* refNode = FindResource(refName, wxEmptyString, TRUE);
wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
if (refNode &&
refNode->GetPropVal(wxT("class"), wxEmptyString) == classname)
{
@@ -473,7 +473,7 @@ wxXmlNode *wxXmlResource::DoFindResource(wxXmlNode *parent,
(node->GetName() == wxT("object") ||
node->GetName() == wxT("object_ref")) )
{
wxXmlNode* found = DoFindResource(node, name, classname, TRUE);
wxXmlNode* found = DoFindResource(node, name, classname, true);
if ( found )
return found;
}
@@ -565,7 +565,7 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent,
if ( node->GetName() == wxT("object_ref") )
{
wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString);
wxXmlNode* refNode = FindResource(refName, wxEmptyString, TRUE);
wxXmlNode* refNode = FindResource(refName, wxEmptyString, true);
if ( !refNode )
{
@@ -1090,7 +1090,7 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
else if (family == wxT("swiss")) ifamily = wxSWISS;
else if (family == wxT("modern")) ifamily = wxMODERN;
bool underlined = GetBool(wxT("underlined"), FALSE);
bool underlined = GetBool(wxT("underlined"), false);
wxString encoding = GetParamValue(wxT("encoding"));
wxFontMapper mapper;
@@ -1107,7 +1107,7 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
wxStringTokenizer tk(faces, wxT(","));
while (tk.HasMoreTokens())
{
int index = enu.GetFacenames()->Index(tk.GetNextToken(), FALSE);
int index = enu.GetFacenames()->Index(tk.GetNextToken(), false);
if (index != wxNOT_FOUND)
{
facename = (*enu.GetFacenames())[index];
@@ -1136,11 +1136,11 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
if (HasParam(wxT("fg")))
wnd->SetForegroundColour(GetColour(wxT("fg")));
if (GetBool(wxT("enabled"), 1) == 0)
wnd->Enable(FALSE);
wnd->Enable(false);
if (GetBool(wxT("focused"), 0) == 1)
wnd->SetFocus();
if (GetBool(wxT("hidden"), 0) == 1)
wnd->Show(FALSE);
wnd->Show(false);
#if wxUSE_TOOLTIPS
if (HasParam(wxT("tooltip")))
wnd->SetToolTip(GetText(wxT("tooltip")));
@@ -1309,7 +1309,7 @@ public:
{
AddStdXRCID_Records();
wxXmlResource::AddSubclassFactory(new wxXmlSubclassFactoryCXX);
return TRUE;
return true;
}
void OnExit()
{

View File

@@ -7,7 +7,7 @@
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// -- Already done in xmlres.cpp
//#ifdef __GNUG__
//#pragma implementation "xmlres.h"
@@ -56,16 +56,16 @@ void wxXmlResource::InitAllHandlers()
#endif
#if wxUSE_CHECKBOX
AddHandler(new wxCheckBoxXmlHandler);
#endif
#endif
#if wxUSE_HTML
AddHandler(new wxHtmlWindowXmlHandler);
#endif
#endif
#if wxUSE_SPINBTN
AddHandler(new wxSpinButtonXmlHandler);
#endif
#endif
#if wxUSE_SPINCTRL
AddHandler(new wxSpinCtrlXmlHandler);
#endif
#endif
#if wxUSE_SCROLLBAR
AddHandler(new wxScrollBarXmlHandler);
#endif