diff --git a/contrib/include/wx/xrc/xh_gauge.h b/contrib/include/wx/xrc/xh_gauge.h
index b9c0f669c4..3f7a181336 100644
--- a/contrib/include/wx/xrc/xh_gauge.h
+++ b/contrib/include/wx/xrc/xh_gauge.h
@@ -24,7 +24,7 @@
class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler)
enum
{
wxGAUGE_DEFAULT_RANGE = 100
diff --git a/contrib/include/wx/xrc/xh_menu.h b/contrib/include/wx/xrc/xh_menu.h
index 52274fb81b..c263338705 100644
--- a/contrib/include/wx/xrc/xh_menu.h
+++ b/contrib/include/wx/xrc/xh_menu.h
@@ -31,7 +31,7 @@ private:
class WXDLLIMPEXP_XRC wxMenuBarXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler)
public:
wxMenuBarXmlHandler();
virtual wxObject *DoCreateResource();
diff --git a/contrib/include/wx/xrc/xh_scrol.h b/contrib/include/wx/xrc/xh_scrol.h
index ef1d3861d8..77988eefce 100644
--- a/contrib/include/wx/xrc/xh_scrol.h
+++ b/contrib/include/wx/xrc/xh_scrol.h
@@ -22,7 +22,7 @@
class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler)
enum
{
wxSL_DEFAULT_VALUE = 0,
diff --git a/contrib/include/wx/xrc/xh_sizer.h b/contrib/include/wx/xrc/xh_sizer.h
index 7159605584..2e0ad9606a 100644
--- a/contrib/include/wx/xrc/xh_sizer.h
+++ b/contrib/include/wx/xrc/xh_sizer.h
@@ -33,7 +33,7 @@ public:
private:
bool m_isInside;
bool m_isGBS;
-
+
wxSizer *m_parentSizer;
bool IsSizerNode(wxXmlNode *node);
@@ -52,7 +52,7 @@ private:
wxGBSpan GetGBSpan(const wxString& param);
wxSizerItem* MakeSizerItem();
void SetSizerItemAttributes(wxSizerItem* sitem);
- void AddSizerItem(wxSizerItem* sitem);
+ void AddSizerItem(wxSizerItem* sitem);
};
diff --git a/contrib/include/wx/xrc/xh_slidr.h b/contrib/include/wx/xrc/xh_slidr.h
index 8e425b4294..2eeb587eaf 100644
--- a/contrib/include/wx/xrc/xh_slidr.h
+++ b/contrib/include/wx/xrc/xh_slidr.h
@@ -22,7 +22,7 @@
class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxSliderXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxSliderXmlHandler)
enum
{
wxSL_DEFAULT_VALUE = 0,
diff --git a/contrib/include/wx/xrc/xh_spin.h b/contrib/include/wx/xrc/xh_spin.h
index ab9590a68b..e49b607dd1 100644
--- a/contrib/include/wx/xrc/xh_spin.h
+++ b/contrib/include/wx/xrc/xh_spin.h
@@ -21,7 +21,7 @@
#if wxUSE_SPINBTN
class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler)
enum
{
wxSP_DEFAULT_VALUE = 0,
@@ -39,7 +39,7 @@ public:
#if wxUSE_SPINCTRL
class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler
{
- DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler)
+ DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler)
enum
{
wxSP_DEFAULT_VALUE = 0,
diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h
index dd62160169..76dbd1e972 100644
--- a/contrib/include/wx/xrc/xmlres.h
+++ b/contrib/include/wx/xrc/xmlres.h
@@ -240,7 +240,7 @@ protected:
bool UpdateResources();
// Finds a resource (calls UpdateResources) and returns a node containing it.
- wxXmlNode *FindResource(const wxString& name, const wxString& classname, bool recursive = FALSE);
+ wxXmlNode *FindResource(const wxString& name, const wxString& classname, bool recursive = false);
// Helper function: finds a resource (calls UpdateResources) and returns a node containing it.
wxXmlNode *DoFindResource(wxXmlNode *parent, const wxString& name, const wxString& classname, bool recursive);
@@ -329,8 +329,8 @@ public:
// were filled.
virtual wxObject *DoCreateResource() = 0;
- // Returns TRUE if it understands this node and can create
- // a resource from it, FALSE otherwise.
+ // Returns true if it understands this node and can create
+ // a resource from it, false otherwise.
virtual bool CanHandle(wxXmlNode *node) = 0;
// Sets the parent resource.
@@ -385,7 +385,7 @@ protected:
// - replaces \n, \r, \t by respective chars (according to C syntax)
// - replaces _ by & and __ by _ (needed for _File => &File because of XML)
// - calls wxGetTranslations (unless disabled in wxXmlResource)
- wxString GetText(const wxString& param, bool translate = TRUE);
+ wxString GetText(const wxString& param, bool translate = true);
// Returns the XRCID.
int GetID();
@@ -393,8 +393,8 @@ protected:
// Returns the resource name.
wxString GetName();
- // Gets a bool flag (1, t, yes, on, true are TRUE, everything else is FALSE).
- bool GetBool(const wxString& param, bool defaultv = FALSE);
+ // Gets a bool flag (1, t, yes, on, true are true, everything else is false).
+ bool GetBool(const wxString& param, bool defaultv = false);
// Gets the integer value from the parameter.
long GetLong( const wxString& param, long defaultv = 0 );
@@ -428,7 +428,7 @@ protected:
void SetupWindow(wxWindow *wnd);
// Creates children.
- void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
+ void CreateChildren(wxObject *parent, bool this_hnd_only = false);
// Helper function.
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
diff --git a/contrib/samples/xrc/custclas.cpp b/contrib/samples/xrc/custclas.cpp
index 6735dc3bce..1582342227 100644
--- a/contrib/samples/xrc/custclas.cpp
+++ b/contrib/samples/xrc/custclas.cpp
@@ -42,18 +42,18 @@
// Internal constants
//-----------------------------------------------------------------------------
-// Popup menu (PU) item control IDs. In this example, they aren't hooked up
+// Popup menu (PU) item control IDs. In this example, they aren't hooked up
// to any functions. Normally you would use these IDs in your event table, so
-// that if one of these menu items is clicked, then a certain function is
+// that if one of these menu items is clicked, then a certain function is
// called.
enum {
- PU_ADD_RECORD = wxID_HIGHEST + 1,
+ PU_ADD_RECORD = wxID_HIGHEST + 1,
PU_EDIT_RECORD,
- PU_DELETE_RECORD
+ PU_DELETE_RECORD
};
// Columns of the listctrl (the leftmost one starts at 0, and so on).
-// Allows easier code maintenance if want to add/rearrangement of listctrl's
+// Allows easier code maintenance if want to add/rearrangement of listctrl's
// columns.
enum {
RECORD_COLUMN = 0,
@@ -71,9 +71,9 @@ IMPLEMENT_DYNAMIC_CLASS( MyResizableListCtrl, wxListCtrl )
// Event table: connect the events to the handler functions to process them
//-----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE( MyResizableListCtrl, wxListCtrl )
- // Something to do when right mouse down
- EVT_RIGHT_DOWN( MyResizableListCtrl::ContextSensitiveMenu )
+BEGIN_EVENT_TABLE( MyResizableListCtrl, wxListCtrl )
+ // Something to do when right mouse down
+ EVT_RIGHT_DOWN( MyResizableListCtrl::ContextSensitiveMenu )
// Something to do when resized
EVT_SIZE( MyResizableListCtrl::OnSize )
END_EVENT_TABLE()
@@ -90,15 +90,15 @@ MyResizableListCtrl::MyResizableListCtrl( wxWindow *parent, wxWindowID id,
const wxString& name )
: wxListCtrl( parent, id, pos, size, style, validator, name )
{
-
- // This listctrl needs to insert its columns in the constructor, since
- // as soon as the listctrl is built, it is resized and grafted onto an
- // "unknown" XRC placeholder. This induces an OnSize() event, calling the
- // overrriden OnSize function for this class, which needs to have 3
+
+ // This listctrl needs to insert its columns in the constructor, since
+ // as soon as the listctrl is built, it is resized and grafted onto an
+ // "unknown" XRC placeholder. This induces an OnSize() event, calling the
+ // overrriden OnSize function for this class, which needs to have 3
// columns to resize (else an assert on WXGTK debug build).
InsertColumn( RECORD_COLUMN, _("Record"), wxLIST_FORMAT_LEFT, 140);
InsertColumn( ACTION_COLUMN, _("Action"), wxLIST_FORMAT_LEFT, 70);
- InsertColumn( PRIORITY_COLUMN, _("Priority"), wxLIST_FORMAT_LEFT, 70 );
+ InsertColumn( PRIORITY_COLUMN, _("Priority"), wxLIST_FORMAT_LEFT, 70 );
}
@@ -115,16 +115,16 @@ void MyResizableListCtrl::ContextSensitiveMenu( wxMouseEvent& event )
a_menu.Append( PU_ADD_RECORD, _( "Add a new record...") );
a_menu.Append( PU_EDIT_RECORD, _( "Edit selected record..." ) );
a_menu.Append( PU_DELETE_RECORD, _( "Delete selected record" ) );
-
- // If no listctrl rows selected, then disable the menu items that
+
+ // If no listctrl rows selected, then disable the menu items that
// require selection
if ( GetSelectedItemCount() == 0 ) {
- a_menu.Enable( PU_EDIT_RECORD, FALSE );
- a_menu.Enable( PU_DELETE_RECORD, FALSE );
+ a_menu.Enable( PU_EDIT_RECORD, false );
+ a_menu.Enable( PU_DELETE_RECORD, false );
}
- // Show the popup menu (wxWindow::PopupMenu ), at the x,y position
- // of the click event
+ // Show the popup menu (wxWindow::PopupMenu ), at the x,y position
+ // of the click event
PopupMenu( &a_menu, event.GetPosition() );
}
@@ -133,28 +133,28 @@ void MyResizableListCtrl::OnSize( wxSizeEvent &event )
{
// Call our custom width setting function.
SetColumnWidths();
- // REQURED event.Skip() call to allow this event to propagate
- // upwards so others can do what they need to do in response to
+ // REQURED event.Skip() call to allow this event to propagate
+ // upwards so others can do what they need to do in response to
// this size event.
event.Skip();
}
void MyResizableListCtrl::SetColumnWidths()
-{
+{
// Get width of entire listctrl
- int leftmostColumnWidth = GetSize().x;
-
- // Subtract width of other columns, scrollbar, and some padding
+ int leftmostColumnWidth = GetSize().x;
+
+ // Subtract width of other columns, scrollbar, and some padding
leftmostColumnWidth -= GetColumnWidth( ACTION_COLUMN );
leftmostColumnWidth -= GetColumnWidth( PRIORITY_COLUMN );
- leftmostColumnWidth -= wxSystemSettings::GetSystemMetric( wxSYS_VSCROLL_X );
+ leftmostColumnWidth -= wxSystemSettings::GetSystemMetric( wxSYS_VSCROLL_X );
leftmostColumnWidth -= 5;
-
+
// Set the column width to the new value.
- SetColumnWidth( RECORD_COLUMN, leftmostColumnWidth );
-
- // This is just a debug message in case you want to watch the
+ SetColumnWidth( RECORD_COLUMN, leftmostColumnWidth );
+
+ // This is just a debug message in case you want to watch the
// events scroll by as you resize.
wxLogDebug( wxT("Successfully set column widths") );
}
diff --git a/contrib/samples/xrc/custclas.h b/contrib/samples/xrc/custclas.h
index 69b01d4387..9973ed0161 100644
--- a/contrib/samples/xrc/custclas.h
+++ b/contrib/samples/xrc/custclas.h
@@ -38,14 +38,14 @@ class MyResizableListCtrl : public wxListCtrl
// Very helpful wxWidgets macro required for wxWidgets-RTTI tracing: By using this
// you will see "Leaked one object of type myResizeableListCtrl" in the debug log,
// along with which line you if was created, but you forget to free the memory.
- // NOTE: Using this REQUIRES a default constructor: that means either: giving a
+ // NOTE: Using this REQUIRES a default constructor: that means either: giving a
// default value for all parameters in your constructor, or else having a dummy
// MyResizableListCtrl(){} constructor in addition to your regular one.
DECLARE_DYNAMIC_CLASS( MyResizableListCtrl )
public:
- // Constructor.
+ // Constructor.
/*
These parameters are the same as a wxWidgets constructor.
\param parent The parent window.
@@ -60,33 +60,33 @@ public:
column.
*/
MyResizableListCtrl( wxWindow *parent = NULL,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxLC_REPORT,
const wxValidator& validator = wxDefaultValidator,
const wxString &name = wxT("myResizableListCtrl")
- );
+ );
// Destuctor.
- ~MyResizableListCtrl();
+ ~MyResizableListCtrl();
-protected:
+protected:
+
+ // A custom function for a context sensitive menu.
+ void ContextSensitiveMenu( wxMouseEvent& event );
- // A custom function for a context sensitive menu.
- void ContextSensitiveMenu( wxMouseEvent& event );
-
// This is a wxWidgets function that we are going to override with our own behaviour.
void OnSize( wxSizeEvent &event );
-
+
// A custom function. What is called in the constructor, and in an OnSize()
- void SetColumnWidths();
-
+ void SetColumnWidths();
+
private:
// wxWidgets macro, required to be able to use Event tables in the .cpp file.
DECLARE_EVENT_TABLE()
-
+
};
//----------------------------------------------------------------------------------------
diff --git a/contrib/samples/xrc/derivdlg.cpp b/contrib/samples/xrc/derivdlg.cpp
index ed6c1cd613..64cda9224f 100644
--- a/contrib/samples/xrc/derivdlg.cpp
+++ b/contrib/samples/xrc/derivdlg.cpp
@@ -49,7 +49,7 @@
//-----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(PreferencesDialog, wxDialog)
- EVT_BUTTON( XRCID( "my_button" ), PreferencesDialog::OnMyButtonClicked )
+ EVT_BUTTON( XRCID( "my_button" ), PreferencesDialog::OnMyButtonClicked )
EVT_UPDATE_UI(XRCID( "my_checkbox" ), PreferencesDialog::OuUpdateUIMyCheckbox )
// Note that the ID here isn't a XRCID, it is one of the standard wx ID's.
EVT_BUTTON( wxID_OK, PreferencesDialog::OnOK )
@@ -60,7 +60,7 @@ END_EVENT_TABLE()
//-----------------------------------------------------------------------------
// Constructor (Notice how small and easy it is)
PreferencesDialog::PreferencesDialog(wxWindow* parent)
-{
+{
wxXmlResource::Get()->LoadDialog(this, parent, wxT("derived_dialog"));
}
@@ -76,29 +76,29 @@ PreferencesDialog::~PreferencesDialog()
void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &WXUNUSED(event) )
{
// Construct a message dialog.
- wxMessageDialog msgDlg(this, _("You clicked on My Button"));
-
+ wxMessageDialog msgDlg(this, _("You clicked on My Button"));
+
// Show it modally.
msgDlg.ShowModal();
}
-// Update the enabled/disabled state of the edit/delete buttons depending on
+// Update the enabled/disabled state of the edit/delete buttons depending on
// whether a row (item) is selected in the listctrl
void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &WXUNUSED(event) )
{
// Get a boolean value of whether the checkbox is checked
- bool myCheckBoxIsChecked;
+ bool myCheckBoxIsChecked;
// You could just write:
// myCheckBoxIsChecked = event.IsChecked();
- // since the event that was passed into this function already has the
- // is a pointer to the right control. However,
+ // since the event that was passed into this function already has the
+ // is a pointer to the right control. However,
// this is the XRCCTRL way (which is more obvious as to what is going on).
myCheckBoxIsChecked = XRCCTRL(*this, "my_checkbox", wxCheckBox)->IsChecked();
- // Now call either Enable(TRUE) or Enable(FALSE) on the textctrl, depending
- // on the value of that boolean.
- XRCCTRL(*this, "my_textctrl", wxTextCtrl)->Enable(myCheckBoxIsChecked);
+ // Now call either Enable(true) or Enable(false) on the textctrl, depending
+ // on the value of that boolean.
+ XRCCTRL(*this, "my_textctrl", wxTextCtrl)->Enable(myCheckBoxIsChecked);
}
@@ -108,16 +108,16 @@ void PreferencesDialog::OnOK( wxCommandEvent& WXUNUSED(event) )
wxMessageDialog msgDlg2(this, _("Press OK to close Derived dialog, or Cancel to abort"),
_("Overriding base class OK button handler"),
wxOK | wxCANCEL | wxCENTER );
-
+
// Show the message dialog, and if it returns wxID_OK (ie they clicked on OK button)...
if (msgDlg2.ShowModal() == wxID_OK)
{
- // ...then end this Preferences dialog.
+ // ...then end this Preferences dialog.
EndModal( wxID_OK );
// You could also have used event.Skip() which would then skip up
// to the wxDialog's event table and see if there was a EVT_BUTTON
- // handler for wxID_OK and if there was, then execute that code.
+ // handler for wxID_OK and if there was, then execute that code.
}
-
+
// Otherwise do nothing.
}
diff --git a/contrib/samples/xrc/derivdlg.h b/contrib/samples/xrc/derivdlg.h
index 1e82f6f5b0..edcf91f525 100644
--- a/contrib/samples/xrc/derivdlg.h
+++ b/contrib/samples/xrc/derivdlg.h
@@ -36,26 +36,26 @@
class PreferencesDialog : public wxDialog
{
-public:
-
+public:
+
// Constructor.
/*
\param parent The parent window. Simple constructor.
- */
+ */
PreferencesDialog( wxWindow* parent );
-
- // Destructor.
+
+ // Destructor.
~PreferencesDialog();
private:
-
+
// Stuff to do when "My Button" gets clicked
void OnMyButtonClicked( wxCommandEvent &event );
- // Stuff to do when a "My Checkbox" gets updated
+ // Stuff to do when a "My Checkbox" gets updated
// (drawn, or it changes its value)
void OuUpdateUIMyCheckbox( wxUpdateUIEvent &event );
-
+
// Override base class functions of a wxDialog.
void OnOK( wxCommandEvent &event );
diff --git a/contrib/samples/xrc/myframe.cpp b/contrib/samples/xrc/myframe.cpp
index a740c29bda..cfab7d39f9 100644
--- a/contrib/samples/xrc/myframe.cpp
+++ b/contrib/samples/xrc/myframe.cpp
@@ -76,18 +76,18 @@
// The event tables connect the wxWidgets events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
-// The reason why the menuitems and tools are given the same name in the
+// The reason why the menuitems and tools are given the same name in the
// XRC file, is that both a tool (a toolbar item) and a menuitem are designed
-// to fire the same kind of event (an EVT_MENU) and thus I give them the same
-// ID name to help new users emphasize this point which is often overlooked
+// to fire the same kind of event (an EVT_MENU) and thus I give them the same
+// ID name to help new users emphasize this point which is often overlooked
// when starting out with wxWidgets.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(XRCID("exit_tool_or_menuitem"), MyFrame::OnExitToolOrMenuCommand)
- EVT_MENU(XRCID("non_derived_dialog_tool_or_menuitem"), MyFrame::OnNonDerivedDialogToolOrMenuCommand)
- EVT_MENU(XRCID("derived_tool_or_menuitem"), MyFrame::OnDerivedDialogToolOrMenuCommand)
- EVT_MENU(XRCID("controls_tool_or_menuitem"), MyFrame::OnControlsToolOrMenuCommand)
- EVT_MENU(XRCID("uncentered_tool_or_menuitem"), MyFrame::OnUncenteredToolOrMenuCommand)
- EVT_MENU(XRCID("custom_class_tool_or_menuitem"), MyFrame::OnCustomClassToolOrMenuCommand)
+ EVT_MENU(XRCID("non_derived_dialog_tool_or_menuitem"), MyFrame::OnNonDerivedDialogToolOrMenuCommand)
+ EVT_MENU(XRCID("derived_tool_or_menuitem"), MyFrame::OnDerivedDialogToolOrMenuCommand)
+ EVT_MENU(XRCID("controls_tool_or_menuitem"), MyFrame::OnControlsToolOrMenuCommand)
+ EVT_MENU(XRCID("uncentered_tool_or_menuitem"), MyFrame::OnUncenteredToolOrMenuCommand)
+ EVT_MENU(XRCID("custom_class_tool_or_menuitem"), MyFrame::OnCustomClassToolOrMenuCommand)
EVT_MENU(XRCID("platform_property_tool_or_menuitem"), MyFrame::OnPlatformPropertyToolOrMenuCommand)
EVT_MENU(XRCID("art_provider_tool_or_menuitem"), MyFrame::OnArtProviderToolOrMenuCommand)
EVT_MENU(XRCID("variable_expansion_tool_or_menuitem"), MyFrame::OnVariableExpansionToolOrMenuCommand)
@@ -102,12 +102,12 @@ END_EVENT_TABLE()
MyFrame::MyFrame(wxWindow* parent)
{
// Load up this frame from XRC. [Note, instead of making a class's
- // constructor take a wxWindow* parent with a default value of NULL,
- // we could have just had designed MyFrame class with an empty
+ // constructor take a wxWindow* parent with a default value of NULL,
+ // we could have just had designed MyFrame class with an empty
// constructor and then written here:
// wxXmlResource::Get()->LoadFrame(this, (wxWindow* )NULL, "main_frame");
- // since this frame will always be the top window, and thus parentless.
- // However, the current approach has source code that can be recycled
+ // since this frame will always be the top window, and thus parentless.
+ // However, the current approach has source code that can be recycled
// for other frames that aren't the top level window.]
wxXmlResource::Get()->LoadFrame(this, parent, wxT("main_frame"));
@@ -121,9 +121,9 @@ MyFrame::MyFrame(wxWindow* parent)
// With toolbars, you currently can't create one, and set it later. It
// needs to be all in one step.
SetToolBar(wxXmlResource::Get()->LoadToolBar(this, wxT("main_toolbar")));
-
- // Give the frame a optional statusbar. The '1' just means one field.
- // A gripsizer will automatically get put on into the corner, if that
+
+ // Give the frame a optional statusbar. The '1' just means one field.
+ // A gripsizer will automatically get put on into the corner, if that
// is the normal OS behaviour for frames on that platform. Helptext
// for menu items and toolbar tools will automatically get displayed
// here.
@@ -136,8 +136,8 @@ MyFrame::MyFrame(wxWindow* parent)
void MyFrame::OnExitToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
{
- // TRUE is to force the frame to close.
- Close(TRUE);
+ // true is to force the frame to close.
+ Close(true);
}
@@ -152,10 +152,10 @@ void MyFrame::OnNonDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event
}
-void MyFrame::OnDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
+void MyFrame::OnDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
{
// Make an instance of our derived dialog, passing it "this" window
- // (the main frame) as the parent of the dialog. This allows the dialog
+ // (the main frame) as the parent of the dialog. This allows the dialog
// to be destructed automatically when the parent is destroyed.
PreferencesDialog preferencesDialog(this);
// Show the instance of the dialog, modally.
@@ -163,19 +163,19 @@ void MyFrame::OnDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
}
-void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
+void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("controls_dialog"));
#if wxUSE_LISTCTRL
// There is no data in the listctrl. This will add some columns
- // and some data. You don't need use any pointers
+ // and some data. You don't need use any pointers
// at all to manipulate the controls, just simply use the XRCCTL(...) macros.
// "controls_treectrl" is the name of this control in the XRC.
// (1) Insert a column, with the column header of "Name"
// (The '_' function around "Name" marks this string as one to translate).
- XRCCTRL(dlg, "controls_listctrl", wxListCtrl)->InsertColumn( 0,
+ XRCCTRL(dlg, "controls_listctrl", wxListCtrl)->InsertColumn( 0,
_("Name"),
wxLIST_FORMAT_LEFT,
( 200 )
@@ -186,12 +186,12 @@ void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
XRCCTRL(dlg, "controls_listctrl", wxListCtrl)->InsertItem(2,wxT("Leon Li"));
#endif
-#if wxUSE_TREECTRL
+#if wxUSE_TREECTRL
// There is no data in the tree ctrl. These lines will add some.
- // (1) Instead of having to write out
- // XRCCTRL(dlg, "controls_treectrl", wxTreeCtrl)->SomeFunction()
+ // (1) Instead of having to write out
+ // XRCCTRL(dlg, "controls_treectrl", wxTreeCtrl)->SomeFunction()
// each time (which is also OK), this example code will shown how
- // to make a pointer to the XRC control, so we can use
+ // to make a pointer to the XRC control, so we can use
// treectrl->SomeFunction() as a short cut. This is useful if you
// will be referring to this control often in the code.
wxTreeCtrl* treectrl = XRCCTRL(dlg, "controls_treectrl", wxTreeCtrl);
@@ -200,15 +200,15 @@ void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
// (3)Append some items to the root node.
treectrl->AppendItem(treectrl->GetRootItem(), _("Evil henchman 1"));
treectrl->AppendItem(treectrl->GetRootItem(), _("Evil henchman 2"));
- treectrl->AppendItem(treectrl->GetRootItem(), _("Evil accountant"));
+ treectrl->AppendItem(treectrl->GetRootItem(), _("Evil accountant"));
#endif
-
+
// All done. Show the dialog.
dlg.ShowModal();
}
-void MyFrame::OnUncenteredToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
+void MyFrame::OnUncenteredToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("uncentered_dialog"));
@@ -220,16 +220,16 @@ void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
{
wxDialog dlg;
wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("custom_class_dialog"));
-
- // Make an instance of our new custom class.
- MyResizableListCtrl* a_myResizableListCtrl = new MyResizableListCtrl(&dlg,
- -1,
+
+ // Make an instance of our new custom class.
+ MyResizableListCtrl* a_myResizableListCtrl = new MyResizableListCtrl(&dlg,
+ wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
wxLC_REPORT,
wxDefaultValidator);
-
- // "custom_control_placeholder" is the name of the "unknown" tag in the
+
+ // "custom_control_placeholder" is the name of the "unknown" tag in the
// custctrl.xrc XRC file.
wxXmlResource::Get()->AttachUnknownControl(wxT("custom_control_placeholder"),
a_myResizableListCtrl);
diff --git a/contrib/samples/xrc/myframe.h b/contrib/samples/xrc/myframe.h
index a773adc30d..eb5b2540e0 100644
--- a/contrib/samples/xrc/myframe.h
+++ b/contrib/samples/xrc/myframe.h
@@ -41,7 +41,7 @@ public:
// Constructor.
MyFrame( wxWindow* parent=(wxWindow *)NULL);
-private:
+private:
// Event handlers (these functions should _not_ be virtual)
void OnExitToolOrMenuCommand(wxCommandEvent& event);
@@ -49,7 +49,7 @@ private:
void OnNonDerivedDialogToolOrMenuCommand(wxCommandEvent& event);
void OnDerivedDialogToolOrMenuCommand(wxCommandEvent& event);
void OnControlsToolOrMenuCommand(wxCommandEvent& event);
- void OnUncenteredToolOrMenuCommand(wxCommandEvent& event);
+ void OnUncenteredToolOrMenuCommand(wxCommandEvent& event);
void OnCustomClassToolOrMenuCommand(wxCommandEvent& event);
void OnPlatformPropertyToolOrMenuCommand(wxCommandEvent& event);
void OnArtProviderToolOrMenuCommand(wxCommandEvent& event);
diff --git a/contrib/samples/xrc/xrcdemo.cpp b/contrib/samples/xrc/xrcdemo.cpp
index 824477921d..64b0309f60 100644
--- a/contrib/samples/xrc/xrcdemo.cpp
+++ b/contrib/samples/xrc/xrcdemo.cpp
@@ -75,18 +75,18 @@ bool MyApp::OnInit()
// you want PNGs, then add a PNG handler, etc. See wxImage::AddHandler()
// documentation for the types of image handlers available.
wxImage::AddHandler(new wxXPMHandler);
-
+
// Initialize all the XRC handlers. Always required (unless you feel like
// going through and initializing a handler of each control type you will
// be using (ie initialize the spinctrl handler, initialize the textctrl
// handler). However, if you are only using a few control types, it will
// save some space to only initialize the ones you will be using. See
// wxXRC docs for details.
- wxXmlResource::Get()->InitAllHandlers();
-
+ wxXmlResource::Get()->InitAllHandlers();
+
// Load all of the XRC files that will be used. You can put everything
- // into one giant XRC file if you wanted, but then they become more
- // diffcult to manage, and harder to reuse in later projects.
+ // into one giant XRC file if you wanted, but then they become more
+ // diffcult to manage, and harder to reuse in later projects.
// The menubar
wxXmlResource::Get()->Load(wxT("rc/menu.xrc"));
// The toolbar
@@ -100,7 +100,7 @@ bool MyApp::OnInit()
// Frame example
wxXmlResource::Get()->Load(wxT("rc/frame.xrc"));
// Uncentered example
- wxXmlResource::Get()->Load(wxT("rc/uncenter.xrc"));
+ wxXmlResource::Get()->Load(wxT("rc/uncenter.xrc"));
// Custom class example
wxXmlResource::Get()->Load(wxT("rc/custclas.xrc"));
// wxArtProvider example
@@ -110,15 +110,15 @@ bool MyApp::OnInit()
// Variable expansion example
wxXmlResource::Get()->Load(wxT("rc/variable.xrc"));
- // Make an instance of your derived frame. Passing NULL (the default value
+ // Make an instance of your derived frame. Passing NULL (the default value
// of MyFrame's constructor is NULL) as the frame doesn't have a frame
- // since it is the first window.
+ // since it is the first window.
MyFrame *frame = new MyFrame();
-
+
// Show the frame.
- frame->Show(TRUE);
-
- // Return TRUE to tell program to continue (FALSE would terminate).
- return TRUE;
+ frame->Show(true);
+
+ // Return true to tell program to continue (false would terminate).
+ return true;
}
diff --git a/contrib/samples/xrc/xrcdemo.h b/contrib/samples/xrc/xrcdemo.h
index d41a649ddc..134c477a9a 100644
--- a/contrib/samples/xrc/xrcdemo.h
+++ b/contrib/samples/xrc/xrcdemo.h
@@ -39,12 +39,12 @@ class MyApp : public wxApp
public:
// Override base class virtuals:
- // wxApp::OnInit() is called on application startup and is a good place
- // for the app initialization (doing it here and not in the ctor
- // allows to have an error return: if OnInit() returns false, the
+ // wxApp::OnInit() is called on application startup and is a good place
+ // for the app initialization (doing it here and not in the ctor
+ // allows to have an error return: if OnInit() returns false, the
// application terminates)
virtual bool OnInit();
-
+
};
//-----------------------------------------------------------------------------
diff --git a/contrib/src/xrc/xh_bmp.cpp b/contrib/src/xrc/xh_bmp.cpp
index c7a1ed9b5a..0853104360 100644
--- a/contrib/src/xrc/xh_bmp.cpp
+++ b/contrib/src/xrc/xh_bmp.cpp
@@ -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("")));
}
diff --git a/contrib/src/xrc/xh_bmpbt.cpp b/contrib/src/xrc/xh_bmpbt.cpp
index 984234d210..321b36c0b5 100644
--- a/contrib/src/xrc/xh_bmpbt.cpp
+++ b/contrib/src/xrc/xh_bmpbt.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_bttn.cpp b/contrib/src/xrc/xh_bttn.cpp
index 5ed5ee88db..0733bd6f6f 100644
--- a/contrib/src/xrc/xh_bttn.cpp
+++ b/contrib/src/xrc/xh_bttn.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_cald.cpp b/contrib/src/xrc/xh_cald.cpp
index 29ab1b9b94..bc7df4efbc 100644
--- a/contrib/src/xrc/xh_cald.cpp
+++ b/contrib/src/xrc/xh_cald.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_chckb.cpp b/contrib/src/xrc/xh_chckb.cpp
index c7a0e824b6..242a33645b 100644
--- a/contrib/src/xrc/xh_chckb.cpp
+++ b/contrib/src/xrc/xh_chckb.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_chckl.cpp b/contrib/src/xrc/xh_chckl.cpp
index 522612a264..0dde7f6759 100644
--- a/contrib/src/xrc/xh_chckl.cpp
+++ b/contrib/src/xrc/xh_chckl.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_choic.cpp b/contrib/src/xrc/xh_choic.cpp
index 15f7c6a77c..9b3c33d34e 100644
--- a/contrib/src/xrc/xh_choic.cpp
+++ b/contrib/src/xrc/xh_choic.cpp
@@ -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 - Label
-
+
// add to the list
wxString str = GetNodeContent(m_node);
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
diff --git a/contrib/src/xrc/xh_combo.cpp b/contrib/src/xrc/xh_combo.cpp
index 03fa009eb4..ffde936198 100644
--- a/contrib/src/xrc/xh_combo.cpp
+++ b/contrib/src/xrc/xh_combo.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_dlg.cpp b/contrib/src/xrc/xh_dlg.cpp
index 0fefbf70e6..7a93c46dc9 100644
--- a/contrib/src/xrc/xh_dlg.cpp
+++ b/contrib/src/xrc/xh_dlg.cpp
@@ -70,7 +70,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
CreateChildren(dlg);
- if (GetBool(wxT("centered"), FALSE))
+ if (GetBool(wxT("centered"), false))
dlg->Centre();
return dlg;
diff --git a/contrib/src/xrc/xh_frame.cpp b/contrib/src/xrc/xh_frame.cpp
index 520b265ca6..795bb43af9 100644
--- a/contrib/src/xrc/xh_frame.cpp
+++ b/contrib/src/xrc/xh_frame.cpp
@@ -75,7 +75,7 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
CreateChildren(frame);
- if (GetBool(wxT("centered"), FALSE))
+ if (GetBool(wxT("centered"), false))
frame->Centre();
return frame;
diff --git a/contrib/src/xrc/xh_gauge.cpp b/contrib/src/xrc/xh_gauge.cpp
index 852f7bbd65..2f3dad0c44 100644
--- a/contrib/src/xrc/xh_gauge.cpp
+++ b/contrib/src/xrc/xh_gauge.cpp
@@ -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,
diff --git a/contrib/src/xrc/xh_gdctl.cpp b/contrib/src/xrc/xh_gdctl.cpp
index 7106b598cf..5a8226ebb7 100644
--- a/contrib/src/xrc/xh_gdctl.cpp
+++ b/contrib/src/xrc/xh_gdctl.cpp
@@ -41,7 +41,7 @@ wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl)
-
+
ctrl->Create(m_parentAsWindow,
GetID(),
GetText(wxT("defaultfolder")),
diff --git a/contrib/src/xrc/xh_html.cpp b/contrib/src/xrc/xh_html.cpp
index 8fe80d2082..156370d27a 100644
--- a/contrib/src/xrc/xh_html.cpp
+++ b/contrib/src/xrc/xh_html.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_listb.cpp b/contrib/src/xrc/xh_listb.cpp
index 68caf3c1b8..c0a41a91eb 100644
--- a/contrib/src/xrc/xh_listb.cpp
+++ b/contrib/src/xrc/xh_listb.cpp
@@ -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 - Label
-
+
// add to the list
wxString str = GetNodeContent(m_node);
if (m_resource->GetFlags() & wxXRC_USE_LOCALE)
diff --git a/contrib/src/xrc/xh_listc.cpp b/contrib/src/xrc/xh_listc.cpp
index f133a894f7..f6c9eab2c2 100644
--- a/contrib/src/xrc/xh_listc.cpp
+++ b/contrib/src/xrc/xh_listc.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_menu.cpp b/contrib/src/xrc/xh_menu.cpp
index 5df0d5f8d5..dbe2a89e61 100644
--- a/contrib/src/xrc/xh_menu.cpp
+++ b/contrib/src/xrc/xh_menu.cpp
@@ -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")))
diff --git a/contrib/src/xrc/xh_notbk.cpp b/contrib/src/xrc/xh_notbk.cpp
index 27d6a5ee40..e97598a225 100644
--- a/contrib/src/xrc/xh_notbk.cpp
+++ b/contrib/src/xrc/xh_notbk.cpp
@@ -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;
diff --git a/contrib/src/xrc/xh_panel.cpp b/contrib/src/xrc/xh_panel.cpp
index b4b4c82810..4083dce1d2 100644
--- a/contrib/src/xrc/xh_panel.cpp
+++ b/contrib/src/xrc/xh_panel.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_radbt.cpp b/contrib/src/xrc/xh_radbt.cpp
index 8533992393..01c5ece4f0 100644
--- a/contrib/src/xrc/xh_radbt.cpp
+++ b/contrib/src/xrc/xh_radbt.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_radbx.cpp b/contrib/src/xrc/xh_radbx.cpp
index 0bff4dda51..5b950e2e93 100644
--- a/contrib/src/xrc/xh_radbx.cpp
+++ b/contrib/src/xrc/xh_radbx.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_scrol.cpp b/contrib/src/xrc/xh_scrol.cpp
index ac99ba1b40..f1c6fcba19 100644
--- a/contrib/src/xrc/xh_scrol.cpp
+++ b/contrib/src/xrc/xh_scrol.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_scwin.cpp b/contrib/src/xrc/xh_scwin.cpp
index 2ac6d4face..275bafed64 100644
--- a/contrib/src/xrc/xh_scwin.cpp
+++ b/contrib/src/xrc/xh_scwin.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_sizer.cpp b/contrib/src/xrc/xh_sizer.cpp
index 2e3f3e4908..1163ab619f 100644
--- a/contrib/src/xrc/xh_sizer.cpp
+++ b/contrib/src/xrc/xh_sizer.cpp
@@ -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);
}
-
+
diff --git a/contrib/src/xrc/xh_slidr.cpp b/contrib/src/xrc/xh_slidr.cpp
index 10e16450cc..e71a5fd41a 100644
--- a/contrib/src/xrc/xh_slidr.cpp
+++ b/contrib/src/xrc/xh_slidr.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_spin.cpp b/contrib/src/xrc/xh_spin.cpp
index 5748e7443a..c6ad0fcf92 100644
--- a/contrib/src/xrc/xh_spin.cpp
+++ b/contrib/src/xrc/xh_spin.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_split.cpp b/contrib/src/xrc/xh_split.cpp
index 2eef0d3ac4..5deff63190 100644
--- a/contrib/src/xrc/xh_split.cpp
+++ b/contrib/src/xrc/xh_split.cpp
@@ -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();
}
diff --git a/contrib/src/xrc/xh_stbmp.cpp b/contrib/src/xrc/xh_stbmp.cpp
index 04eb5096df..2674322938 100644
--- a/contrib/src/xrc/xh_stbmp.cpp
+++ b/contrib/src/xrc/xh_stbmp.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_stbox.cpp b/contrib/src/xrc/xh_stbox.cpp
index cc357908c9..9a88572d5b 100644
--- a/contrib/src/xrc/xh_stbox.cpp
+++ b/contrib/src/xrc/xh_stbox.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_stlin.cpp b/contrib/src/xrc/xh_stlin.cpp
index 7cc5abc08b..9d49226eab 100644
--- a/contrib/src/xrc/xh_stlin.cpp
+++ b/contrib/src/xrc/xh_stlin.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_sttxt.cpp b/contrib/src/xrc/xh_sttxt.cpp
index e94e9fdbd2..a65e2b4b4f 100644
--- a/contrib/src/xrc/xh_sttxt.cpp
+++ b/contrib/src/xrc/xh_sttxt.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_text.cpp b/contrib/src/xrc/xh_text.cpp
index 3e89a272ce..19bbd601c8 100644
--- a/contrib/src/xrc/xh_text.cpp
+++ b/contrib/src/xrc/xh_text.cpp
@@ -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;
}
diff --git a/contrib/src/xrc/xh_toolb.cpp b/contrib/src/xrc/xh_toolb.cpp
index 9bc524dc34..7e44ab77a1 100644
--- a/contrib/src/xrc/xh_toolb.cpp
+++ b/contrib/src/xrc/xh_toolb.cpp
@@ -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 /*