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:
@@ -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);
|
||||
|
@@ -119,8 +119,8 @@ void MyResizableListCtrl::ContextSensitiveMenu( wxMouseEvent& event )
|
||||
// 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
|
||||
|
@@ -60,7 +60,7 @@ 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,
|
||||
|
@@ -96,7 +96,7 @@ void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &WXUNUSED(event) )
|
||||
// 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
|
||||
// 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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// Make an instance of our new custom class.
|
||||
MyResizableListCtrl* a_myResizableListCtrl = new MyResizableListCtrl(&dlg,
|
||||
-1,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxLC_REPORT,
|
||||
|
@@ -116,9 +116,9 @@ bool MyApp::OnInit()
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
// Show the frame.
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
// Return TRUE to tell program to continue (FALSE would terminate).
|
||||
return TRUE;
|
||||
// Return true to tell program to continue (false would terminate).
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
|
||||
: wxXmlResourceHandler(), m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler(), m_insideBox(false)
|
||||
{
|
||||
// no styles
|
||||
AddWindowStyles();
|
||||
@@ -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,7 +84,7 @@ 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++;
|
||||
n = n->GetNext();
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxChoiceXmlHandler::wxChoiceXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxCB_SORT);
|
||||
AddWindowStyles();
|
||||
@@ -40,7 +40,7 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxComboBoxXmlHandler::wxComboBoxXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxCB_SIMPLE);
|
||||
XRC_ADD_STYLE(wxCB_SORT);
|
||||
@@ -45,7 +45,7 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -70,7 +70,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
|
||||
|
||||
CreateChildren(dlg);
|
||||
|
||||
if (GetBool(wxT("centered"), FALSE))
|
||||
if (GetBool(wxT("centered"), false))
|
||||
dlg->Centre();
|
||||
|
||||
return dlg;
|
||||
|
@@ -75,7 +75,7 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
|
||||
|
||||
CreateChildren(frame);
|
||||
|
||||
if (GetBool(wxT("centered"), FALSE))
|
||||
if (GetBool(wxT("centered"), false))
|
||||
frame->Centre();
|
||||
|
||||
return frame;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxListBoxXmlHandler::wxListBoxXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxLB_SINGLE);
|
||||
XRC_ADD_STYLE(wxLB_MULTIPLE);
|
||||
@@ -46,7 +46,7 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxMenuXmlHandler::wxMenuXmlHandler() :
|
||||
wxXmlResourceHandler(), m_insideMenu(FALSE)
|
||||
wxXmlResourceHandler(), m_insideMenu(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxMENU_TEAROFF);
|
||||
}
|
||||
@@ -40,8 +40,8 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
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);
|
||||
@@ -69,7 +69,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
{
|
||||
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;
|
||||
@@ -91,7 +91,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
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")));
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxNotebookXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxNotebookXmlHandler::wxNotebookXmlHandler()
|
||||
: wxXmlResourceHandler(), m_isInside(FALSE), m_notebook(NULL)
|
||||
: wxXmlResourceHandler(), m_isInside(false), m_notebook(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxNB_FIXEDWIDTH);
|
||||
XRC_ADD_STYLE(wxNB_LEFT);
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
|
||||
: wxXmlResourceHandler(), m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler(), m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxRA_SPECIFY_COLS);
|
||||
XRC_ADD_STYLE(wxRA_HORIZONTAL);
|
||||
@@ -45,7 +45,7 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
|
||||
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 )
|
||||
|
@@ -36,8 +36,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxSizerXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxSizerXmlHandler::wxSizerXmlHandler()
|
||||
: wxXmlResourceHandler(),
|
||||
m_isInside(FALSE),
|
||||
m_isGBS(FALSE),
|
||||
m_isInside(false),
|
||||
m_isGBS(false),
|
||||
m_parentSizer(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxHORIZONTAL);
|
||||
@@ -127,7 +127,7 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem()
|
||||
bool old_gbs = m_isGBS;
|
||||
bool old_ins = m_isInside;
|
||||
wxSizer *old_par = m_parentSizer;
|
||||
m_isInside = FALSE;
|
||||
m_isInside = false;
|
||||
if (!IsSizerNode(n)) m_parentSizer = NULL;
|
||||
wxObject *item = CreateResFromNode(n, m_parent, NULL);
|
||||
m_isInside = old_ins;
|
||||
@@ -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;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxToolBarXmlHandler::wxToolBarXmlHandler()
|
||||
: wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL)
|
||||
: wxXmlResourceHandler(), m_isInside(false), m_toolbar(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxTB_FLAT);
|
||||
XRC_ADD_STYLE(wxTB_DOCKABLE);
|
||||
@@ -124,7 +124,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
|
||||
if (children_node == NULL) return toolbar;
|
||||
|
||||
m_isInside = TRUE;
|
||||
m_isInside = true;
|
||||
m_toolbar = toolbar;
|
||||
|
||||
wxXmlNode *n = children_node;
|
||||
@@ -144,7 +144,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
n = n->GetNext();
|
||||
}
|
||||
|
||||
m_isInside = FALSE;
|
||||
m_isInside = false;
|
||||
m_toolbar = NULL;
|
||||
|
||||
toolbar->Realize();
|
||||
|
@@ -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);
|
||||
|
@@ -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(" |"));
|
||||
@@ -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()
|
||||
{
|
||||
|
@@ -58,17 +58,17 @@ bool wxConvertApp::OnInit()
|
||||
SetAppName(_T("wxConvertApp"));
|
||||
|
||||
if (HandleCommandLine())
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
|
||||
// Create the main frame window
|
||||
m_pFrame = new wxMainFrame(NULL, -1, _T("wxConvertApp"), wxPoint(0, 0), wxSize(500, 400),
|
||||
m_pFrame = new wxMainFrame(NULL, wxID_ANY, _T("wxConvertApp"), wxPoint(0, 0), wxSize(500, 400),
|
||||
wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL);
|
||||
|
||||
InitMenu();
|
||||
m_pFrame->Show(TRUE);
|
||||
m_pFrame->Show(true);
|
||||
SetTopWindow(m_pFrame);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxConvertApp::InitMenu()
|
||||
@@ -122,7 +122,7 @@ wxMainFrame::~wxMainFrame()
|
||||
|
||||
void wxMainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close(TRUE);
|
||||
Close(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ bool wxConvertApp::HandleCommandLine()
|
||||
{
|
||||
|
||||
if (argc != 2)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
//Figure out kind of conversion
|
||||
wxString source,target;
|
||||
@@ -208,18 +208,18 @@ bool wxConvertApp::HandleCommandLine()
|
||||
if ((source.Find(_T(".wxr"))>0)&&(target.Find(_T(".xml"))>0))
|
||||
{
|
||||
trans_wxr2xml.Convert(source,target);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ((source.Find(_T(".rc"))!=-1)&(target.Find(_T(".wxr"))!=-1))
|
||||
else if ((source.Find(_T(".rc"))!=wxNOT_FOUND)&(target.Find(_T(".wxr"))!=wxNOT_FOUND))
|
||||
{
|
||||
trans_rc2wxr.Convert(source,target);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ((source.Find(_T(".rc"))!=-1)&(target.Find(_T(".xml"))!=-1))
|
||||
else if ((source.Find(_T(".rc"))!=wxNOT_FOUND)&(target.Find(_T(".xml"))!=wxNOT_FOUND))
|
||||
{
|
||||
trans_rc2xml.Convert(source,target);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ rc2wxr::rc2wxr()
|
||||
|
||||
{
|
||||
|
||||
m_done=FALSE;
|
||||
m_done=false;
|
||||
|
||||
m_controlid=6000;
|
||||
|
||||
@@ -511,7 +511,7 @@ bool rc2wxr::Seperator(int ch)
|
||||
|
||||
if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|'))
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
@@ -519,13 +519,13 @@ if (ch==EOF)
|
||||
|
||||
{
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@@ -595,7 +595,7 @@ if (m_rc.Eof())
|
||||
|
||||
{
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
return tok;
|
||||
|
||||
@@ -611,7 +611,7 @@ if (ch==EOF)
|
||||
|
||||
{
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
return tok;
|
||||
|
||||
@@ -637,7 +637,7 @@ if (ch==EOF)
|
||||
|
||||
{
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
@@ -663,7 +663,7 @@ ReadChar(ch);
|
||||
|
||||
if (ch==EOF)
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ result=m_rc.Tell();
|
||||
|
||||
if((result>=m_filesize))
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
@@ -737,13 +737,13 @@ result=m_rc.Read(&ch,1);
|
||||
|
||||
if((result==-1))
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
if(ch==EOF)
|
||||
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
}
|
||||
|
||||
@@ -1043,7 +1043,7 @@ if (tok.IsNumber())
|
||||
|
||||
w=GetToken();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ cross platform (wxGTK,etc)
|
||||
|
||||
rc2xml::rc2xml()
|
||||
{
|
||||
m_done=FALSE;
|
||||
m_done=false;
|
||||
m_bitmaplist=new wxList(wxKEY_STRING);
|
||||
m_stringtable=new wxList(wxKEY_STRING);
|
||||
m_iconlist = new wxList(wxKEY_STRING);
|
||||
@@ -83,7 +83,7 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
|
||||
result=m_xmlfile.Open(xmlfile.c_str(),_T("w+t"));
|
||||
wxASSERT_MSG(result,_T("Couldn't create XML file"));
|
||||
if (!result)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
|
||||
/* Write Basic header for XML file */
|
||||
@@ -94,7 +94,7 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
|
||||
ParseResourceHeader();
|
||||
//Gather all the resource we need for toolbars,menus, and etc
|
||||
FirstPass();
|
||||
m_done=FALSE;
|
||||
m_done=false;
|
||||
m_rc.Seek(0);
|
||||
//Read in dialogs, toolbars,menus
|
||||
SecondPass();
|
||||
@@ -105,7 +105,7 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
|
||||
wxMessageBox(_("Conversion complete."), _("Done"),
|
||||
wxOK | wxICON_INFORMATION);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,9 +308,9 @@ void rc2xml::ParseRadioButton(wxString phrase, wxString varname)
|
||||
bool GotOrs;
|
||||
GotOrs = ReadOrs(token);
|
||||
if (ReadRect(x,y,width,height))
|
||||
if (GotOrs==FALSE)
|
||||
if (GotOrs==false)
|
||||
ReadOrs(token);
|
||||
if (token.Find(_T("WS_GROUP")) != -1)
|
||||
if (token.Find(_T("WS_GROUP")) != wxNOT_FOUND)
|
||||
style += _T("wxRB_GROUP");
|
||||
|
||||
m_xmlfile.Write(_T("\t\t<object class=\"wxRadioButton\""));
|
||||
@@ -347,15 +347,15 @@ bool rc2xml::Seperator(int ch)
|
||||
{
|
||||
//if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|')|(ch=='\t'))
|
||||
if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='\t'))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (ch==EOF)
|
||||
{
|
||||
m_done=TRUE;
|
||||
return TRUE;
|
||||
m_done=true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void rc2xml::ParseGroupBox(wxString phrase, wxString varname)
|
||||
@@ -394,7 +394,7 @@ wxString rc2xml::GetToken(bool *listseperator)
|
||||
|
||||
if (m_rc.Eof())
|
||||
{
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ wxString rc2xml::GetToken(bool *listseperator)
|
||||
ReadChar(ch);
|
||||
if (ch==EOF)
|
||||
{
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ wxString rc2xml::GetToken(bool *listseperator)
|
||||
|
||||
if (ch==EOF)
|
||||
{
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
}
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@ wxString rc2xml::GetToken(bool *listseperator)
|
||||
}
|
||||
|
||||
if (ch == EOF)
|
||||
m_done = TRUE;
|
||||
m_done = true;
|
||||
|
||||
if (listseperator)
|
||||
*listseperator = (ch == ',');
|
||||
@@ -458,14 +458,14 @@ wxString rc2xml::GetStringQuote()
|
||||
{
|
||||
wxString phrase;
|
||||
//ASCII code 34 "
|
||||
bool done=FALSE;
|
||||
bool done=false;
|
||||
int p,ch=0,lastch=0;
|
||||
ReadChar(ch);
|
||||
|
||||
while (ch!=34)
|
||||
ReadChar(ch);
|
||||
ReadChar(ch);
|
||||
while (done==FALSE)
|
||||
while (done==false)
|
||||
{
|
||||
if ((ch==34)&&(lastch!='\\'))
|
||||
{
|
||||
@@ -477,10 +477,10 @@ wxString rc2xml::GetStringQuote()
|
||||
else
|
||||
{
|
||||
m_rc.Seek(p);
|
||||
done = TRUE;
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
if (done==TRUE)
|
||||
if (done==true)
|
||||
break;
|
||||
if (ch=='\r')
|
||||
ReadChar(ch); // skip
|
||||
@@ -501,15 +501,15 @@ void rc2xml::ReadChar(int &ch)
|
||||
result=m_rc.Tell();
|
||||
|
||||
if((result>=m_filesize))
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
result=m_rc.Read(&ch,1);
|
||||
|
||||
if((result==-1))
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
|
||||
if(ch==EOF)
|
||||
m_done=TRUE;
|
||||
m_done=true;
|
||||
}
|
||||
|
||||
void rc2xml::ParseComboBox(wxString varname)
|
||||
@@ -521,16 +521,16 @@ void rc2xml::ParseComboBox(wxString varname)
|
||||
bool GotOrs;
|
||||
GotOrs = ReadOrs(token);
|
||||
if (ReadRect(x,y,width,height))
|
||||
if (GotOrs==FALSE)
|
||||
if (GotOrs==false)
|
||||
ReadOrs(token);
|
||||
|
||||
m_xmlfile.Write(_T("\t\t<object class=\"wxComboBox\""));
|
||||
WriteBasicInfo(x,y,width,height,varname);
|
||||
if (token.Find(_T("CBS_SIMPLE")) != -1)
|
||||
if (token.Find(_T("CBS_SIMPLE")) != wxNOT_FOUND)
|
||||
WriteStyle(_T("wxCB_SIMPLE"));
|
||||
if (token.Find(_T("CBS_SORT")) != -1)
|
||||
if (token.Find(_T("CBS_SORT")) != wxNOT_FOUND)
|
||||
WriteStyle(_T("wxCB_SORT"));
|
||||
if (token.Find(_T("CBS_DISABLENOSCROLL")) != -1)
|
||||
if (token.Find(_T("CBS_DISABLENOSCROLL")) != wxNOT_FOUND)
|
||||
WriteStyle(_T("wxLB_ALWAYS_SB"));
|
||||
m_xmlfile.Write(_T("\n\t\t</object>\n"));
|
||||
|
||||
@@ -631,7 +631,7 @@ void rc2xml::ParseSlider(wxString WXUNUSED(label), wxString varname)
|
||||
{
|
||||
wxString token,style;
|
||||
ReadOrs(token);
|
||||
if (token.Find(_T("TBS_VERT"))!=-1)
|
||||
if (token.Find(_T("TBS_VERT"))!=wxNOT_FOUND)
|
||||
style+=_T("wxSL_VERTICAL");
|
||||
//MFC RC Default is horizontal
|
||||
else
|
||||
@@ -670,7 +670,7 @@ bool rc2xml::ReadOrs(wxString & orstring)
|
||||
|
||||
token=PeekToken();
|
||||
if (token.IsNumber())
|
||||
return FALSE;
|
||||
return false;
|
||||
orstring=GetToken();
|
||||
|
||||
while(PeekToken()==_T("|"))
|
||||
@@ -680,7 +680,7 @@ bool rc2xml::ReadOrs(wxString & orstring)
|
||||
//Grab next token
|
||||
orstring+=GetToken();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//Is it a checkbutton or a radiobutton or a pushbutton or a groupbox
|
||||
@@ -692,15 +692,15 @@ void rc2xml::ParseCtrlButton(wxString label, wxString varname)
|
||||
ReadOrs(token);
|
||||
m_rc.Seek(p);
|
||||
|
||||
if (token.Find(_T("BS_AUTOCHECKBOX"))!=-1)
|
||||
if (token.Find(_T("BS_AUTOCHECKBOX"))!=wxNOT_FOUND)
|
||||
ParseCheckBox(label, varname);
|
||||
else if ((token.Find(_T("BS_AUTORADIOBUTTON"))!=-1)||
|
||||
(token.Find(_T("BS_RADIOBUTTON"))!=-1))
|
||||
else if ((token.Find(_T("BS_AUTORADIOBUTTON"))!=wxNOT_FOUND)||
|
||||
(token.Find(_T("BS_RADIOBUTTON"))!=wxNOT_FOUND))
|
||||
ParseRadioButton(label, varname);
|
||||
else if (token.Find(_T("BS_GROUPBOX"))!=-1)
|
||||
else if (token.Find(_T("BS_GROUPBOX"))!=wxNOT_FOUND)
|
||||
ParseGroupBox(label, varname);
|
||||
else // if ((token.Find("BS_PUSHBUTTON")!=-1)||
|
||||
// (token.Find("BS_DEFPUSHBUTTON")!=-1))
|
||||
else // if ((token.Find("BS_PUSHBUTTON")!=wxNOT_FOUND)||
|
||||
// (token.Find("BS_DEFPUSHBUTTON")!=wxNOT_FOUND))
|
||||
ParsePushButton(label, varname); // make default case
|
||||
}
|
||||
|
||||
@@ -846,7 +846,7 @@ void rc2xml::ParseSpinCtrl(wxString WXUNUSED(label), wxString varname)
|
||||
wxString token,style;
|
||||
|
||||
ReadOrs(token);
|
||||
if (token.Find(_T("UDS_HORZ"))!=-1)
|
||||
if (token.Find(_T("UDS_HORZ"))!=wxNOT_FOUND)
|
||||
style=_T("wxSP_HORIZONTAL");
|
||||
//MFC default
|
||||
else
|
||||
@@ -928,7 +928,7 @@ void rc2xml::ParseToolBar(wxString varname)
|
||||
wxLogError(_T("Unable to load bitmap:")+*bitmappath);
|
||||
|
||||
//Write toolbar to xml file
|
||||
m_xmlfile.Write(_T(" <object class=\"wxToolBar\""));
|
||||
m_xmlfile.Write(_T("\t<object class=\"wxToolBar\""));
|
||||
//Avoid duplicate names this way
|
||||
varname.Replace(_T("IDR_"),_T("TB_"));
|
||||
WriteName(varname);
|
||||
@@ -962,7 +962,7 @@ void rc2xml::ParseToolBar(wxString varname)
|
||||
{
|
||||
SplitHelp(msg,tip,longhelp);
|
||||
m_xmlfile.Write(_T("\t\t\t\t<tooltip>")+tip+_T("</tooltip>\n"));
|
||||
m_xmlfile.Write(_T(" <longhelp>")+longhelp+_T("</longhelp>\n"));
|
||||
m_xmlfile.Write(_T("\t\t<longhelp>")+longhelp+_T("</longhelp>\n"));
|
||||
}
|
||||
//Make a bitmap file name
|
||||
buttonname=CleanName(buttonname);
|
||||
@@ -1016,19 +1016,19 @@ bool rc2xml::LookUpString(wxString strid,wxString & st)
|
||||
wxNode *node=m_stringtable->Find(strid);
|
||||
wxString *s;
|
||||
if (node==NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
s=(wxString *)node->GetData();
|
||||
st=*s;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rc2xml::SplitHelp(wxString msg, wxString &shorthelp, wxString &longhelp)
|
||||
{
|
||||
int spot;
|
||||
spot=msg.Find(_T("\\n"));
|
||||
if (spot==-1)
|
||||
if (spot==wxNOT_FOUND)
|
||||
{
|
||||
shorthelp=msg;
|
||||
longhelp=msg;
|
||||
@@ -1037,7 +1037,7 @@ bool rc2xml::SplitHelp(wxString msg, wxString &shorthelp, wxString &longhelp)
|
||||
longhelp=msg.Left(spot);
|
||||
spot=msg.Length()-spot-2;
|
||||
shorthelp=msg.Right(spot);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rc2xml::ParseMenuItem()
|
||||
@@ -1191,7 +1191,7 @@ kindctrl.MakeUpper();
|
||||
int p=m_rc.Tell();
|
||||
ReadOrs(token);
|
||||
m_rc.Seek(p);
|
||||
if (token.Find(_T("SS_BITMAP"))!=-1)
|
||||
if (token.Find(_T("SS_BITMAP"))!=wxNOT_FOUND)
|
||||
ParseStaticBitmap(label,varname);
|
||||
else
|
||||
ParseStaticText(label,varname);
|
||||
@@ -1238,7 +1238,7 @@ void rc2xml::ParseScrollBar()
|
||||
|
||||
ReadOrs(token);
|
||||
|
||||
if (token.Find(_T("SBS_VERT"))!=-1)
|
||||
if (token.Find(_T("SBS_VERT"))!=wxNOT_FOUND)
|
||||
style=_T("wxSB_VERTICAL");
|
||||
//Default MFC style is horizontal
|
||||
else
|
||||
@@ -1377,7 +1377,7 @@ wxTextFile r;
|
||||
//Read through entire file
|
||||
for ( str = r.GetFirstLine(); !r.Eof(); str = r.GetNextLine() )
|
||||
{
|
||||
if (str.Find(_T("#define"))!=-1)
|
||||
if (str.Find(_T("#define"))!=wxNOT_FOUND)
|
||||
{
|
||||
tok.SetString(str);
|
||||
//Just ignore #define token
|
||||
|
@@ -48,12 +48,12 @@ bool wxr2xml::Convert(wxString wxrfile, wxString xmlfile)
|
||||
result = m_xmlfile.Open(xmlfile.c_str(), _T("w+t"));
|
||||
wxASSERT_MSG(result, _T("Couldn't create XML file"));
|
||||
if (!result)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
result = m_table.ParseResourceFile(wxrfile);
|
||||
wxASSERT_MSG(result, _T("Couldn't Load WXR file"));
|
||||
if (!result)
|
||||
return FALSE;
|
||||
return false;
|
||||
// Write basic xml header
|
||||
m_xmlfile.Write(_T("<?xml version=\"1.0\" ?>\n"));
|
||||
m_xmlfile.Write(_T("<resource>\n"));
|
||||
@@ -89,7 +89,7 @@ bool wxr2xml::ParseResources()
|
||||
wxLogError(_T("Found unsupported resource ") + resType);
|
||||
node = m_table.Next();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxr2xml::ParsePanel(wxItemResource * res)
|
||||
@@ -632,10 +632,10 @@ void wxr2xml::ParseMenuItem(wxItemResource * res)
|
||||
menuname << _T("name = \"menuitem_") << res->GetValue1() << _T("\"");
|
||||
m_xmlfile.Write(menuname);
|
||||
m_xmlfile.Write(_T(">\n"));
|
||||
m_xmlfile.Write(_T(" <label>")
|
||||
m_xmlfile.Write(_T("\t\t\t<label>")
|
||||
+ FixMenuString(res->GetTitle()) + _T("</label>\n"));
|
||||
if (res->GetValue4() != _T(""))
|
||||
m_xmlfile.Write(_T(" <help>") +
|
||||
m_xmlfile.Write(_T("\t\t\t<help>") +
|
||||
res->GetValue4() + _T("</help>\n"));
|
||||
if (res->GetValue2())
|
||||
m_xmlfile.Write(_T("\t\t\t\t<checkable>1</checkable>\n"));
|
||||
@@ -682,16 +682,16 @@ void wxr2xml::ParseBitmap(wxItemResource * res)
|
||||
void wxr2xml::PanelStuff(wxItemResource * res)
|
||||
{
|
||||
if ((res->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
|
||||
m_dlgunits = TRUE;
|
||||
m_dlgunits = true;
|
||||
else
|
||||
m_dlgunits = FALSE;
|
||||
m_dlgunits = false;
|
||||
|
||||
// If this is true ignore fonts, background color and use system
|
||||
// defaults instead
|
||||
if ((res->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
|
||||
m_systemdefaults = TRUE;
|
||||
m_systemdefaults = true;
|
||||
else
|
||||
m_systemdefaults = FALSE;
|
||||
m_systemdefaults = false;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -378,11 +378,11 @@ static bool NodeContainsFilename(wxXmlNode *node)
|
||||
{
|
||||
// Any bitmaps:
|
||||
if (node->GetName() == _T("bitmap"))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// URLs in wxHtmlWindow:
|
||||
if (node->GetName() == _T("url"))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// wxBitmapButton:
|
||||
wxXmlNode *parent = node->GetParent();
|
||||
@@ -391,17 +391,17 @@ static bool NodeContainsFilename(wxXmlNode *node)
|
||||
(node->GetName() == _T("focus") ||
|
||||
node->GetName() == _T("disabled") ||
|
||||
node->GetName() == _T("selected")))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// wxBitmap or wxIcon toplevel resources:
|
||||
if (node->GetName() == _T("object"))
|
||||
{
|
||||
wxString klass = node->GetPropVal(_T("class"), wxEmptyString);
|
||||
if (klass == _T("wxBitmap") || klass == _T("wxIcon"))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// find all files mentioned in structure, e.g. <bitmap>filename</bitmap>
|
||||
@@ -473,7 +473,7 @@ void XmlResApp::MakePackageZIP(const wxArrayString& flist)
|
||||
wxSetWorkingDirectory(parOutputPath);
|
||||
int execres = wxExecute(_T("zip -9 -j ") +
|
||||
wxString(flagVerbose ? _T("") : _T("-q ")) +
|
||||
parOutput + _T(" ") + files, TRUE);
|
||||
parOutput + _T(" ") + files, true);
|
||||
wxSetWorkingDirectory(cwd);
|
||||
if (execres == -1)
|
||||
{
|
||||
|
@@ -53,9 +53,9 @@ bool MyApp::OnInit()
|
||||
wxInitAllImageHandlers();
|
||||
wxFrame *frame = new EditorFrame(NULL, arg);
|
||||
SetTopWindow(frame);
|
||||
frame->Show(TRUE);
|
||||
PreviewFrame::Get()->Show(TRUE);
|
||||
PropertiesFrame::Get()->Show(TRUE);
|
||||
return TRUE;
|
||||
frame->Show(true);
|
||||
PreviewFrame::Get()->Show(true);
|
||||
PropertiesFrame::Get()->Show(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -183,16 +183,16 @@ END_EVENT_TABLE()
|
||||
EditorFrame *EditorFrame::ms_Instance = NULL;
|
||||
|
||||
EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
|
||||
: wxFrame(parent, -1, filename + _("- wxWidgets resources editor"))
|
||||
: wxFrame(parent, wxID_ANY, filename + _("- wxWidgets resources editor"))
|
||||
{
|
||||
ms_Instance = this;
|
||||
|
||||
m_Clipboard = NULL;
|
||||
m_Modified = FALSE;
|
||||
m_Modified = false;
|
||||
|
||||
wxConfigBase *cfg = wxConfigBase::Get();
|
||||
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("editor_x"), -1), cfg->Read(_T("editor_y"), -1)),
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("editor_x"), wxDefaultPosition.x), cfg->Read(_T("editor_y"), wxDefaultPosition.y)),
|
||||
wxSize(cfg->Read(_T("editor_w"), 400), cfg->Read(_T("editor_h"), 400))));
|
||||
|
||||
m_SelectedNode = NULL;
|
||||
@@ -215,8 +215,8 @@ EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
|
||||
menuEdit->AppendSeparator();
|
||||
menuEdit->Append(ID_DELETE_NODE, _T("Delete"));
|
||||
|
||||
menuEdit->Enable(ID_PASTE_SYBLING, FALSE);
|
||||
menuEdit->Enable(ID_PASTE_CHILD, FALSE);
|
||||
menuEdit->Enable(ID_PASTE_SYBLING, false);
|
||||
menuEdit->Enable(ID_PASTE_CHILD, false);
|
||||
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, _T("&File"));
|
||||
@@ -228,16 +228,16 @@ EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
|
||||
toolBar->SetMargins(2, 2);
|
||||
toolBar->SetToolBitmapSize(wxSize(24, 24));
|
||||
toolBar -> AddTool(ID_EXIT, wxBITMAP(close), wxNullBitmap,
|
||||
FALSE, -1, -1, (wxObject *) NULL,
|
||||
false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL,
|
||||
_("Quit the editor"));
|
||||
toolBar -> AddTool(ID_OPEN, wxBITMAP(open), wxNullBitmap,
|
||||
FALSE, -1, -1, (wxObject *) NULL,
|
||||
false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL,
|
||||
_("Open XML resource file"));
|
||||
toolBar -> AddTool(ID_SAVE, wxBITMAP(save), wxNullBitmap,
|
||||
FALSE, -1, -1, (wxObject *) NULL,
|
||||
false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL,
|
||||
_("Save XML file"));
|
||||
toolBar -> AddTool(ID_PREVIEW, wxBITMAP(preview), wxNullBitmap,
|
||||
FALSE, -1, -1, (wxObject *) NULL,
|
||||
false, wxDefaultPosition.x, wxDefaultPosition.y, (wxObject *) NULL,
|
||||
_("Preview"));
|
||||
toolBar -> Realize();
|
||||
|
||||
@@ -255,7 +255,7 @@ EditorFrame::EditorFrame(wxFrame *parent, const wxString& filename)
|
||||
m_TreeCtrl->AssignImageList(imgList);
|
||||
sizer->Add(m_TreeCtrl, 1, wxEXPAND);
|
||||
|
||||
SetAutoLayout(TRUE);
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizer);
|
||||
|
||||
// Load file:
|
||||
@@ -296,7 +296,7 @@ void EditorFrame::LoadFile(const wxString& filename)
|
||||
|
||||
m_FileName = wxEmptyString;
|
||||
m_Resource = new wxXmlRcEditDocument;
|
||||
m_Modified = FALSE;
|
||||
m_Modified = false;
|
||||
|
||||
if (!m_Resource->Load(filename, wxLocale::GetSystemEncodingName()))
|
||||
{
|
||||
@@ -326,7 +326,7 @@ void EditorFrame::SaveFile(const wxString& filename)
|
||||
if (!m_Resource->Save(filename))
|
||||
wxLogError(_("Error saving ") + filename);
|
||||
else
|
||||
m_Modified = FALSE;
|
||||
m_Modified = false;
|
||||
|
||||
RefreshTitle();
|
||||
}
|
||||
@@ -351,7 +351,7 @@ void EditorFrame::NewFile()
|
||||
m_Resource->GetRoot()->AddProperty(_T("version"),
|
||||
WX_XMLRES_CURRENT_VERSION_STRING);
|
||||
|
||||
m_Modified = FALSE;
|
||||
m_Modified = false;
|
||||
RefreshTree();
|
||||
RefreshTitle();
|
||||
}
|
||||
@@ -428,14 +428,14 @@ bool EditorFrame::SelectNode(wxXmlNode *node, wxTreeItemId *root)
|
||||
RecursivelyExpand(m_TreeCtrl, *root);
|
||||
m_TreeCtrl->SelectItem(item);
|
||||
m_TreeCtrl->EnsureVisible(item);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (m_TreeCtrl->ItemHasChildren(item) && SelectNode(node, &item))
|
||||
return TRUE;
|
||||
return true;
|
||||
item = m_TreeCtrl->GetNextChild(*root, cookie);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ void EditorFrame::NotifyChanged(int change_type)
|
||||
|
||||
if (!m_Modified)
|
||||
{
|
||||
m_Modified = TRUE;
|
||||
m_Modified = true;
|
||||
RefreshTitle();
|
||||
}
|
||||
|
||||
@@ -523,7 +523,7 @@ void EditorFrame::OnToolbar(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
case ID_EXIT :
|
||||
Close(TRUE);
|
||||
Close(true);
|
||||
break;
|
||||
|
||||
case ID_NEW :
|
||||
@@ -745,8 +745,8 @@ void EditorFrame::OnClipboardAction(wxCommandEvent& event)
|
||||
case ID_CUT:
|
||||
delete m_Clipboard;
|
||||
m_Clipboard = new wxXmlNode(*m_SelectedNode);
|
||||
GetMenuBar()->Enable(ID_PASTE_SYBLING, TRUE);
|
||||
GetMenuBar()->Enable(ID_PASTE_CHILD, TRUE);
|
||||
GetMenuBar()->Enable(ID_PASTE_SYBLING, true);
|
||||
GetMenuBar()->Enable(ID_PASTE_CHILD, true);
|
||||
if (event.GetId() == ID_CUT) DeleteSelectedNode();
|
||||
break;
|
||||
|
||||
@@ -786,10 +786,10 @@ void EditorFrame::OnClipboardAction(wxCommandEvent& event)
|
||||
|
||||
bool EditorFrame::AskToSave()
|
||||
// asks the user to save current document (if modified)
|
||||
// returns FALSE if user cancelled the action, TRUE of he choosed
|
||||
// returns false if user cancelled the action, true of he choosed
|
||||
// 'yes' or 'no'
|
||||
{
|
||||
if (!m_Modified) return TRUE;
|
||||
if (!m_Modified) return true;
|
||||
|
||||
int res = wxMessageBox(_("File modified. Do you want to save changes?"), _("Save changes"),
|
||||
wxYES_NO | wxCANCEL | wxCENTRE | wxICON_QUESTION);
|
||||
|
@@ -33,15 +33,15 @@
|
||||
|
||||
|
||||
wxList NodeHandler::ms_Handlers;
|
||||
bool NodeHandler::ms_HandlersLoaded = FALSE;
|
||||
bool NodeHandler::ms_HandlersLoaded = false;
|
||||
|
||||
|
||||
NodeHandler *NodeHandler::Find(wxXmlNode *node)
|
||||
{
|
||||
if (!ms_HandlersLoaded)
|
||||
{
|
||||
ms_HandlersLoaded = TRUE;
|
||||
ms_Handlers.DeleteContents(TRUE);
|
||||
ms_HandlersLoaded = true;
|
||||
ms_Handlers.DeleteContents(true);
|
||||
|
||||
NodeInfoArray& arr = NodesDb::Get()->GetNodesInfo();
|
||||
NodeHandler *hnd;
|
||||
|
@@ -123,7 +123,7 @@ class NodeHandlerUnknown : public NodeHandler
|
||||
public:
|
||||
NodeHandlerUnknown() : NodeHandler(new NodeInfo) {}
|
||||
|
||||
virtual bool CanHandle(wxXmlNode *WXUNUSED(node)) { return TRUE; }
|
||||
virtual bool CanHandle(wxXmlNode *WXUNUSED(node)) { return true; }
|
||||
};
|
||||
|
||||
|
||||
|
@@ -34,7 +34,7 @@ void NodeInfo::Read(const wxString& filename, wxPathList& list)
|
||||
{
|
||||
wxString tp;
|
||||
wxString nd, cht;
|
||||
bool ab = FALSE;
|
||||
bool ab = false;
|
||||
long icn = -1;
|
||||
|
||||
NodeClass.Empty();
|
||||
@@ -81,7 +81,7 @@ void NodeInfo::Read(const wxString& filename, wxPathList& list)
|
||||
pi.Type = tkn.GetNextToken();
|
||||
if (tkn.HasMoreTokens()) pi.MoreInfo = tkn.GetNextToken();
|
||||
|
||||
bool fnd = FALSE;
|
||||
bool fnd = false;
|
||||
for (size_t j = 0; j < Props.GetCount(); j++)
|
||||
{
|
||||
if (Props[j].Name == pi.Name)
|
||||
@@ -90,7 +90,7 @@ void NodeInfo::Read(const wxString& filename, wxPathList& list)
|
||||
Props[j].MoreInfo << _T(',') << pi.MoreInfo;
|
||||
else
|
||||
Props[j] = pi;
|
||||
fnd = TRUE;
|
||||
fnd = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
wxWindow* PropEditCtrlFont::CreateEditCtrl()
|
||||
{
|
||||
PropEditCtrlTxt::CreateEditCtrl();
|
||||
m_TextCtrl->Enable(FALSE);
|
||||
m_TextCtrl->Enable(false);
|
||||
return m_TextCtrl;
|
||||
}
|
||||
|
||||
@@ -61,12 +61,12 @@ wxTreeItemId PropEditCtrlFont::CreateTreeEntry(wxTreeItemId parent, const Proper
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(PropEditCtrlChoice, PropEditCtrl)
|
||||
EVT_CHOICE(-1, PropEditCtrlChoice::OnChoice)
|
||||
EVT_CHOICE(wxID_ANY, PropEditCtrlChoice::OnChoice)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxWindow* PropEditCtrlChoice::CreateEditCtrl()
|
||||
{
|
||||
m_Choice = new wxChoice(this, -1);
|
||||
m_Choice = new wxChoice(this, wxID_ANY);
|
||||
|
||||
return m_Choice;
|
||||
}
|
||||
@@ -150,12 +150,12 @@ void PropEditCtrlFlags::OnDetails()
|
||||
|
||||
wxConfigBase *cfg = wxConfigBase::Get();
|
||||
|
||||
wxDialog dlg(m_PropFrame, -1, _("Flags"),
|
||||
wxPoint(cfg->Read(_T("flagsdlg_x"), -1), cfg->Read(_T("flagsdlg_y"), -1)),
|
||||
wxDialog dlg(m_PropFrame, wxID_ANY, _("Flags"),
|
||||
wxPoint(cfg->Read(_T("flagsdlg_x"), wxDefaultPosition.x), cfg->Read(_T("flagsdlg_y"), wxDefaultPosition.y)),
|
||||
wxSize(cfg->Read(_T("flagsdlg_w"), 300), cfg->Read(_T("flagsdlg_h"), 300)),
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
wxSizer *sz = new wxBoxSizer(wxVERTICAL);
|
||||
wxCheckListBox *lbox = new wxCheckListBox(&dlg, -1);
|
||||
wxCheckListBox *lbox = new wxCheckListBox(&dlg, wxID_ANY);
|
||||
sz->Add(lbox, 1, wxEXPAND | wxALL, 10);
|
||||
wxSizer *sz2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxButton *btnok = new wxButton(&dlg, wxID_OK, _("OK"));
|
||||
@@ -165,7 +165,7 @@ void PropEditCtrlFlags::OnDetails()
|
||||
sz->Add(sz2, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 10);
|
||||
|
||||
dlg.SetSizer(sz);
|
||||
dlg.SetAutoLayout(TRUE);
|
||||
dlg.SetAutoLayout(true);
|
||||
dlg.Layout();
|
||||
|
||||
for (i = 0; i < arr.GetCount(); i++)
|
||||
|
@@ -57,7 +57,7 @@ class PropEditCtrlColor : public PropEditCtrlTxt
|
||||
PropEditCtrlColor(PropertiesFrame *propFrame)
|
||||
: PropEditCtrlTxt(propFrame) {}
|
||||
|
||||
virtual bool HasDetails() { return TRUE; }
|
||||
virtual bool HasDetails() { return true; }
|
||||
virtual void OnDetails();
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ class PropEditCtrlFlags : public PropEditCtrlTxt
|
||||
PropEditCtrlFlags(PropertiesFrame *propFrame)
|
||||
: PropEditCtrlTxt(propFrame) {}
|
||||
|
||||
virtual bool HasDetails() { return TRUE; }
|
||||
virtual bool HasDetails() { return true; }
|
||||
virtual void OnDetails();
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@ class PropEditCtrlFile : public PropEditCtrlTxt
|
||||
PropEditCtrlFile(PropertiesFrame *propFrame)
|
||||
: PropEditCtrlTxt(propFrame) {}
|
||||
|
||||
virtual bool HasDetails() { return TRUE; }
|
||||
virtual bool HasDetails() { return true; }
|
||||
virtual void OnDetails();
|
||||
|
||||
virtual wxString GetFileTypes();
|
||||
|
@@ -28,13 +28,13 @@
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(PropEditCtrlTxt, PropEditCtrl)
|
||||
EVT_TEXT(-1, PropEditCtrlTxt::OnText)
|
||||
EVT_TEXT(wxID_ANY, PropEditCtrlTxt::OnText)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
wxWindow *PropEditCtrlTxt::CreateEditCtrl()
|
||||
{
|
||||
return (m_TextCtrl = new wxTextCtrl(this, -1));
|
||||
return (m_TextCtrl = new wxTextCtrl(this, wxID_ANY));
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void PropEditCtrlTxt::WriteValue()
|
||||
{
|
||||
wxString newv = m_TextCtrl->GetValue();
|
||||
XmlWriteValue(GetNode(), m_PropInfo->Name, newv);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,12 +82,12 @@ wxWindow *PropEditCtrlInt::CreateEditCtrl()
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(PropEditCtrlBool, PropEditCtrl)
|
||||
EVT_CHOICE(-1, PropEditCtrlBool::OnChoice)
|
||||
EVT_CHOICE(wxID_ANY, PropEditCtrlBool::OnChoice)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxWindow *PropEditCtrlBool::CreateEditCtrl()
|
||||
{
|
||||
m_Choice = new wxChoice(this, -1);
|
||||
m_Choice = new wxChoice(this, wxID_ANY);
|
||||
m_Choice->Append(_T("false"));
|
||||
m_Choice->Append(_T("true"));
|
||||
return m_Choice;
|
||||
@@ -110,7 +110,7 @@ void PropEditCtrlBool::WriteValue()
|
||||
wxString newv = m_Choice->GetSelection() == 0 ? _T("0") : _T("1");
|
||||
|
||||
XmlWriteValue(GetNode(), m_PropInfo->Name, newv);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ class PropEditCtrlCoordXY : public PropEditCtrlInt
|
||||
wxString prev = XmlReadValue(GetNode(), m_PropInfo->Name);
|
||||
if (prev[prev.Len()-1] == _T('d')) s << _T('d');
|
||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
||||
}
|
||||
|
||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
||||
@@ -197,8 +197,8 @@ class PropEditCtrlCoordXY : public PropEditCtrlInt
|
||||
if (m_which == 0) return _T("x"); else return _T("y");
|
||||
}
|
||||
|
||||
virtual bool HasClearButton() { return FALSE; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
|
||||
virtual bool HasClearButton() { return false; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
||||
|
||||
|
||||
protected:
|
||||
@@ -228,7 +228,7 @@ class PropEditCtrlCoordDlg : public PropEditCtrlBool
|
||||
wxString s = XmlReadValue(GetNode(), m_PropInfo->Name).BeforeFirst(_T('d'));
|
||||
if (m_Choice->GetSelection() == 1) s << _T('d');
|
||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
||||
}
|
||||
|
||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
||||
@@ -248,8 +248,8 @@ class PropEditCtrlCoordDlg : public PropEditCtrlBool
|
||||
return _T("dlg");
|
||||
}
|
||||
|
||||
virtual bool HasClearButton() { return FALSE; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
|
||||
virtual bool HasClearButton() { return false; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
||||
};
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ class PropEditCtrlDimX : public PropEditCtrlInt
|
||||
s = m_c;
|
||||
if (dlg) s << _T('d');
|
||||
XmlWriteValue(GetNode(), m_PropInfo->Name, s);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), true);
|
||||
}
|
||||
|
||||
virtual wxString GetValueAsText(wxTreeItemId ti)
|
||||
@@ -323,8 +323,8 @@ class PropEditCtrlDimX : public PropEditCtrlInt
|
||||
return _T("val");
|
||||
}
|
||||
|
||||
virtual bool HasClearButton() { return FALSE; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return FALSE; }
|
||||
virtual bool HasClearButton() { return false; }
|
||||
virtual bool IsPresent(const PropertyInfo& WXUNUSED(pinfo)) { return false; }
|
||||
|
||||
|
||||
protected:
|
||||
@@ -379,7 +379,7 @@ void PropEditCtrlXRCID::WriteValue()
|
||||
REAL_NODE->DeleteProperty(_T("name"));
|
||||
REAL_NODE->AddProperty(_T("name"), s);
|
||||
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, TRUE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, true);
|
||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ void PropEditCtrlXRCID::Clear()
|
||||
{
|
||||
EndEdit();
|
||||
REAL_NODE->DeleteProperty(_T("name"));
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, FALSE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, false);
|
||||
EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
|
||||
}
|
||||
|
||||
|
@@ -125,7 +125,7 @@ class PropEditCtrlXRCID : public PropEditCtrlTxt
|
||||
virtual void ReadValue();
|
||||
virtual void WriteValue();
|
||||
virtual void Clear();
|
||||
virtual bool HasDetails() { return TRUE; }
|
||||
virtual bool HasDetails() { return true; }
|
||||
virtual void OnDetails();
|
||||
virtual wxString GetValueAsText(wxTreeItemId ti);
|
||||
virtual bool IsPresent(const PropertyInfo& pinfo);
|
||||
|
@@ -55,13 +55,13 @@ PreviewFrame *PreviewFrame::Get()
|
||||
if (ms_Instance == NULL)
|
||||
{
|
||||
(void)new PreviewFrame;
|
||||
ms_Instance->Show(TRUE);
|
||||
ms_Instance->Show(true);
|
||||
}
|
||||
return ms_Instance;
|
||||
}
|
||||
|
||||
PreviewFrame::PreviewFrame()
|
||||
: wxFrame(EditorFrame::Get(), -1, _("Preview"),
|
||||
: wxFrame(EditorFrame::Get(), wxID_ANY, _("Preview"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR
|
||||
#ifdef __WXMSW__
|
||||
@@ -69,7 +69,7 @@ PreviewFrame::PreviewFrame()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
m_Dirty = FALSE;
|
||||
m_Dirty = false;
|
||||
ms_Instance = this;
|
||||
m_Node = NULL;
|
||||
|
||||
@@ -80,13 +80,13 @@ PreviewFrame::PreviewFrame()
|
||||
ResetResource();
|
||||
|
||||
wxConfigBase *cfg = wxConfigBase::Get();
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("previewframe_x"), -1), cfg->Read(_T("previewframe_y"), -1)),
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("previewframe_x"), wxDefaultPosition.x), cfg->Read(_T("previewframe_y"), wxDefaultPosition.y)),
|
||||
wxSize(cfg->Read(_T("previewframe_w"), 400), cfg->Read(_T("previewframe_h"), 400))));
|
||||
|
||||
m_Splitter = new wxSplitterWindow(this, -1);
|
||||
m_LogCtrl = new wxTextCtrl(m_Splitter, -1, wxEmptyString, wxDefaultPosition,
|
||||
m_Splitter = new wxSplitterWindow(this, wxID_ANY);
|
||||
m_LogCtrl = new wxTextCtrl(m_Splitter, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
wxDefaultSize, wxTE_MULTILINE);
|
||||
m_ScrollWin = new wxScrolledWindow(m_Splitter, -1);
|
||||
m_ScrollWin = new wxScrolledWindow(m_Splitter, wxID_ANY);
|
||||
m_ScrollWin->SetBackgroundColour(_T("light steel blue"));
|
||||
m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300));
|
||||
|
||||
@@ -132,7 +132,7 @@ void PreviewFrame::MakeDirty()
|
||||
{
|
||||
if (m_Node == NULL) return;
|
||||
if (m_Dirty) return;
|
||||
m_Dirty = TRUE;
|
||||
m_Dirty = true;
|
||||
m_LogCtrl->Clear();
|
||||
m_LogCtrl->SetValue(_("Resource modified.\nMove mouse cursor over the preview window to refresh it."));
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc)
|
||||
wxSetWorkingDirectory(oldcwd);
|
||||
wxLog::SetActiveTarget(oldlog);
|
||||
|
||||
m_Dirty = FALSE;
|
||||
m_Dirty = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ void PreviewFrame::PreviewPanel()
|
||||
else
|
||||
{
|
||||
m_ScrollWin->SetScrollbars(1, 1, panel->GetSize().x, panel->GetSize().y,
|
||||
0, 0, TRUE);
|
||||
0, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ void PreviewFrame::PreviewWXFrame()
|
||||
else
|
||||
{
|
||||
m_ScrollWin->SetScrollbars(1, 1, panel->GetSize().x, panel->GetSize().y,
|
||||
0, 0, TRUE);
|
||||
0, 0, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ void PropEditCtrl::BeginEdit(const wxRect& rect, wxTreeItemId ti)
|
||||
m_PropInfo = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
|
||||
m_TreeItem = ti;
|
||||
|
||||
m_CanSave = FALSE;
|
||||
m_CanSave = false;
|
||||
if (!m_Created)
|
||||
{
|
||||
wxSizer *sz = new wxBoxSizer(wxHORIZONTAL);
|
||||
@@ -62,28 +62,28 @@ void PropEditCtrl::BeginEdit(const wxRect& rect, wxTreeItemId ti)
|
||||
sz->Add(m_TheCtrl, 1);
|
||||
if (HasDetails())
|
||||
sz->Add(new wxButton(this, ID_DETAILS, _T("..."), wxDefaultPosition,
|
||||
wxSize(16,-1)));
|
||||
wxSize(16,wxDefaultSize.y)));
|
||||
if (HasClearButton())
|
||||
sz->Add(new wxButton(this, ID_CLEAR, _T("X"), wxDefaultPosition,
|
||||
wxSize(16,-1)));
|
||||
SetAutoLayout(TRUE);
|
||||
wxSize(16,wxDefaultSize.y)));
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sz);
|
||||
m_Created = TRUE;
|
||||
m_Created = true;
|
||||
}
|
||||
|
||||
m_TheCtrl->SetFocus();
|
||||
|
||||
SetSize(rect.x, rect.y, rect.width, rect.height);
|
||||
Show(TRUE);
|
||||
Show(true);
|
||||
ReadValue();
|
||||
m_CanSave = TRUE;
|
||||
m_CanSave = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PropEditCtrl::EndEdit()
|
||||
{
|
||||
Show(FALSE);
|
||||
Show(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ wxTreeItemId PropEditCtrl::CreateTreeEntry(wxTreeItemId parent, const PropertyIn
|
||||
wxTreeItemId t = m_TreeCtrl->AppendItem(parent, GetPropName(pinfo));
|
||||
m_TreeCtrl->SetItemData(t, new PETreeData(this, pinfo));
|
||||
if (IsPresent(pinfo))
|
||||
m_TreeCtrl->SetItemBold(t, TRUE);
|
||||
m_TreeCtrl->SetItemBold(t, true);
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void PropEditCtrl::Clear()
|
||||
{
|
||||
n->GetParent()->RemoveChild(n);
|
||||
delete n;
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, FALSE);
|
||||
m_TreeCtrl->SetItemBold(m_TreeItem, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -29,9 +29,9 @@ class PropEditCtrl : public wxPanel
|
||||
{
|
||||
public:
|
||||
PropEditCtrl(PropertiesFrame *propFrame)
|
||||
: wxPanel(propFrame->m_valueWindow, -1),
|
||||
m_PropFrame(propFrame), m_Created(FALSE), m_TreeCtrl(propFrame->m_tree)
|
||||
{Show(FALSE);}
|
||||
: wxPanel(propFrame->m_valueWindow, wxID_ANY),
|
||||
m_PropFrame(propFrame), m_Created(false), m_TreeCtrl(propFrame->m_tree)
|
||||
{Show(false);}
|
||||
|
||||
virtual void BeginEdit(const wxRect& rect, wxTreeItemId ti);
|
||||
virtual void EndEdit();
|
||||
@@ -48,9 +48,9 @@ class PropEditCtrl : public wxPanel
|
||||
virtual wxString GetPropName(const PropertyInfo& pinfo)
|
||||
{ return pinfo.Name.AfterLast(_T('/')); }
|
||||
|
||||
virtual bool HasDetails() { return FALSE; }
|
||||
virtual bool HasDetails() { return false; }
|
||||
virtual void OnDetails() {}
|
||||
virtual bool HasClearButton() { return TRUE; }
|
||||
virtual bool HasClearButton() { return true; }
|
||||
|
||||
void OnButtonDetails(wxCommandEvent& event);
|
||||
void OnButtonClear(wxCommandEvent& event);
|
||||
|
@@ -129,7 +129,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
|
||||
wxRect bounding;
|
||||
GetBoundingRect(id, bounding);
|
||||
|
||||
m_EditCtrl->Move(-1, bounding.y);
|
||||
m_EditCtrl->Move(wxDefaultPosition.x, bounding.y);
|
||||
}
|
||||
|
||||
PropEditCtrl *m_EditCtrl;
|
||||
@@ -139,7 +139,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
|
||||
|
||||
BEGIN_EVENT_TABLE(PropsTree, wxRemotelyScrolledTreeCtrl)
|
||||
EVT_PAINT(PropsTree::OnPaint)
|
||||
EVT_TREE_SEL_CHANGED(-1, PropsTree::OnSelChange)
|
||||
EVT_TREE_SEL_CHANGED(wxID_ANY, PropsTree::OnSelChange)
|
||||
EVT_SCROLLWIN(PropsTree::OnScroll)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@@ -147,7 +147,7 @@ END_EVENT_TABLE()
|
||||
class PropsValueWindow: public wxTreeCompanionWindow
|
||||
{
|
||||
public:
|
||||
PropsValueWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
PropsValueWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0)
|
||||
@@ -205,13 +205,13 @@ PropertiesFrame *PropertiesFrame::Get()
|
||||
if (ms_Instance == NULL)
|
||||
{
|
||||
(void)new PropertiesFrame;
|
||||
ms_Instance->Show(TRUE);
|
||||
ms_Instance->Show(true);
|
||||
}
|
||||
return ms_Instance;
|
||||
}
|
||||
|
||||
PropertiesFrame::PropertiesFrame()
|
||||
: wxFrame(EditorFrame::Get(), -1, _("Properties"),
|
||||
: wxFrame(EditorFrame::Get(), wxID_ANY, _("Properties"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR
|
||||
#ifdef __WXMSW__
|
||||
@@ -222,34 +222,34 @@ PropertiesFrame::PropertiesFrame()
|
||||
ms_Instance = this;
|
||||
m_Node = NULL;
|
||||
|
||||
m_scrolledWindow = new wxSplitterScrolledWindow(this, -1, wxDefaultPosition,
|
||||
m_scrolledWindow = new wxSplitterScrolledWindow(this, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL);
|
||||
m_splitter = new wxThinSplitterWindow(m_scrolledWindow, -1, wxDefaultPosition,
|
||||
m_splitter = new wxThinSplitterWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxSP_3DBORDER | wxCLIP_CHILDREN /* | wxSP_LIVE_UPDATE */);
|
||||
m_splitter->SetSashSize(2);
|
||||
m_tree = new PropsTree(m_splitter, -1, wxDefaultPosition,
|
||||
m_tree = new PropsTree(m_splitter, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER );
|
||||
m_tree->SetIndent(2);
|
||||
|
||||
m_valueWindow = new PropsValueWindow(m_splitter, -1, wxDefaultPosition,
|
||||
m_valueWindow = new PropsValueWindow(m_splitter, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxNO_BORDER);
|
||||
m_valueWindow->SetBackgroundColour(m_tree->GetBackgroundColour());
|
||||
m_splitter->SplitVertically(m_tree, m_valueWindow, wxConfig::Get()->Read(_T("propertiesframe_sash"), 100));
|
||||
//m_splitter->AdjustScrollbars();
|
||||
m_scrolledWindow->SetTargetWindow(m_tree);
|
||||
|
||||
m_scrolledWindow->EnableScrolling(FALSE, FALSE);
|
||||
m_scrolledWindow->EnableScrolling(false, false);
|
||||
|
||||
// Let the two controls know about each other
|
||||
m_valueWindow->SetTreeCtrl(m_tree);
|
||||
m_tree->SetCompanionWindow(m_valueWindow);
|
||||
|
||||
wxConfigBase *cfg = wxConfigBase::Get();
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("propertiesframe_x"), -1), cfg->Read(_T("propertiesframe_y"), -1)),
|
||||
SetSize(wxRect(wxPoint(cfg->Read(_T("propertiesframe_x"), wxDefaultPosition.x), cfg->Read(_T("propertiesframe_y"), wxDefaultPosition.y)),
|
||||
wxSize(cfg->Read(_T("propertiesframe_w"), 200), cfg->Read(_T("propertiesframe_h"), 200))));
|
||||
|
||||
|
||||
m_EditCtrls.DeleteContents(TRUE);
|
||||
m_EditCtrls.DeleteContents(true);
|
||||
m_EditCtrls.Put(_T("bool"), new PropEditCtrlBool(this));
|
||||
m_EditCtrls.Put(_T("coord"), new PropEditCtrlCoord(this));
|
||||
m_EditCtrls.Put(_T("color"), new PropEditCtrlColor(this));
|
||||
|
@@ -59,8 +59,8 @@ BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxGenericTreeCtrl)
|
||||
BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxTreeCtrl)
|
||||
#endif
|
||||
EVT_SIZE(wxRemotelyScrolledTreeCtrl::OnSize)
|
||||
EVT_TREE_ITEM_EXPANDED(-1, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(-1, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand)
|
||||
EVT_SCROLLWIN(wxRemotelyScrolledTreeCtrl::OnScroll)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@@ -80,7 +80,7 @@ void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
|
||||
#if defined(__WXMSW__) && USE_GENERIC_TREECTRL
|
||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, FALSE);
|
||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -395,8 +395,8 @@ IMPLEMENT_CLASS(wxTreeCompanionWindow, wxWindow)
|
||||
BEGIN_EVENT_TABLE(wxTreeCompanionWindow, wxWindow)
|
||||
EVT_PAINT(wxTreeCompanionWindow::OnPaint)
|
||||
EVT_SCROLLWIN(wxTreeCompanionWindow::OnScroll)
|
||||
EVT_TREE_ITEM_EXPANDED(-1, wxTreeCompanionWindow::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(-1, wxTreeCompanionWindow::OnExpand)
|
||||
EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxTreeCompanionWindow::OnExpand)
|
||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxTreeCompanionWindow::OnExpand)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxTreeCompanionWindow::wxTreeCompanionWindow(wxWindow* parent, wxWindowID id,
|
||||
@@ -478,7 +478,7 @@ void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event)
|
||||
return;
|
||||
|
||||
// TODO: scroll the window physically instead of just refreshing.
|
||||
Refresh(TRUE);
|
||||
Refresh(true);
|
||||
}
|
||||
|
||||
void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event))
|
||||
@@ -605,37 +605,37 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
{
|
||||
// Ensure that events being propagated back up the window hierarchy
|
||||
// don't cause an infinite loop
|
||||
static bool inOnScroll = FALSE;
|
||||
static bool inOnScroll = false;
|
||||
if (inOnScroll)
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
inOnScroll = TRUE;
|
||||
inOnScroll = true;
|
||||
|
||||
int orient = event.GetOrientation();
|
||||
|
||||
int nScrollInc = CalcScrollInc(event);
|
||||
if (nScrollInc == 0)
|
||||
{
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
{
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
event.Skip();
|
||||
return;
|
||||
#if 0
|
||||
int newPos = m_xScrollPosition + nScrollInc;
|
||||
SetScrollPos(wxHORIZONTAL, newPos, TRUE );
|
||||
SetScrollPos(wxHORIZONTAL, newPos, true );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
int newPos = m_yScrollPosition + nScrollInc;
|
||||
SetScrollPos(wxVERTICAL, newPos, TRUE );
|
||||
SetScrollPos(wxVERTICAL, newPos, true );
|
||||
}
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
@@ -668,6 +668,6 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
m_targetWindow->MacUpdateImmediately() ;
|
||||
#endif
|
||||
|
||||
inOnScroll = FALSE;
|
||||
inOnScroll = false;
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0,
|
||||
bool noRefresh = FALSE );
|
||||
bool noRefresh = false );
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
// Get the view start
|
||||
@@ -123,7 +123,7 @@ class wxTreeCompanionWindow: public wxWindow
|
||||
public:
|
||||
DECLARE_CLASS(wxTreeCompanionWindow)
|
||||
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
@@ -162,7 +162,7 @@ class wxThinSplitterWindow: public wxSplitterWindow
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
|
||||
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = wxSP_3D | wxCLIP_CHILDREN);
|
||||
@@ -203,7 +203,7 @@ class wxSplitterScrolledWindow: public wxScrolledWindow
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
|
||||
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
@@ -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);
|
||||
|
@@ -119,8 +119,8 @@ void MyResizableListCtrl::ContextSensitiveMenu( wxMouseEvent& event )
|
||||
// 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
|
||||
|
@@ -60,7 +60,7 @@ 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,
|
||||
|
@@ -96,7 +96,7 @@ void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &WXUNUSED(event) )
|
||||
// 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
|
||||
// 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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// Make an instance of our new custom class.
|
||||
MyResizableListCtrl* a_myResizableListCtrl = new MyResizableListCtrl(&dlg,
|
||||
-1,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxLC_REPORT,
|
||||
|
@@ -116,9 +116,9 @@ bool MyApp::OnInit()
|
||||
MyFrame *frame = new MyFrame();
|
||||
|
||||
// Show the frame.
|
||||
frame->Show(TRUE);
|
||||
frame->Show(true);
|
||||
|
||||
// Return TRUE to tell program to continue (FALSE would terminate).
|
||||
return TRUE;
|
||||
// Return true to tell program to continue (false would terminate).
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
|
||||
: wxXmlResourceHandler(), m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler(), m_insideBox(false)
|
||||
{
|
||||
// no styles
|
||||
AddWindowStyles();
|
||||
@@ -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,7 +84,7 @@ 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++;
|
||||
n = n->GetNext();
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxChoiceXmlHandler::wxChoiceXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxCB_SORT);
|
||||
AddWindowStyles();
|
||||
@@ -40,7 +40,7 @@ wxObject *wxChoiceXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxComboBoxXmlHandler::wxComboBoxXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxCB_SIMPLE);
|
||||
XRC_ADD_STYLE(wxCB_SORT);
|
||||
@@ -45,7 +45,7 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -70,7 +70,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
|
||||
|
||||
CreateChildren(dlg);
|
||||
|
||||
if (GetBool(wxT("centered"), FALSE))
|
||||
if (GetBool(wxT("centered"), false))
|
||||
dlg->Centre();
|
||||
|
||||
return dlg;
|
||||
|
@@ -75,7 +75,7 @@ wxObject *wxFrameXmlHandler::DoCreateResource()
|
||||
|
||||
CreateChildren(frame);
|
||||
|
||||
if (GetBool(wxT("centered"), FALSE))
|
||||
if (GetBool(wxT("centered"), false))
|
||||
frame->Centre();
|
||||
|
||||
return frame;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxListBoxXmlHandler::wxListBoxXmlHandler()
|
||||
: wxXmlResourceHandler() , m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler() , m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxLB_SINGLE);
|
||||
XRC_ADD_STYLE(wxLB_MULTIPLE);
|
||||
@@ -46,7 +46,7 @@ wxObject *wxListBoxXmlHandler::DoCreateResource()
|
||||
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)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxMenuXmlHandler::wxMenuXmlHandler() :
|
||||
wxXmlResourceHandler(), m_insideMenu(FALSE)
|
||||
wxXmlResourceHandler(), m_insideMenu(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxMENU_TEAROFF);
|
||||
}
|
||||
@@ -40,8 +40,8 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
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);
|
||||
@@ -69,7 +69,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
{
|
||||
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;
|
||||
@@ -91,7 +91,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
||||
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")));
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxNotebookXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxNotebookXmlHandler::wxNotebookXmlHandler()
|
||||
: wxXmlResourceHandler(), m_isInside(FALSE), m_notebook(NULL)
|
||||
: wxXmlResourceHandler(), m_isInside(false), m_notebook(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxNB_FIXEDWIDTH);
|
||||
XRC_ADD_STYLE(wxNB_LEFT);
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioBoxXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
|
||||
: wxXmlResourceHandler(), m_insideBox(FALSE)
|
||||
: wxXmlResourceHandler(), m_insideBox(false)
|
||||
{
|
||||
XRC_ADD_STYLE(wxRA_SPECIFY_COLS);
|
||||
XRC_ADD_STYLE(wxRA_HORIZONTAL);
|
||||
@@ -45,7 +45,7 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource()
|
||||
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 )
|
||||
|
@@ -36,8 +36,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxSizerXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxSizerXmlHandler::wxSizerXmlHandler()
|
||||
: wxXmlResourceHandler(),
|
||||
m_isInside(FALSE),
|
||||
m_isGBS(FALSE),
|
||||
m_isInside(false),
|
||||
m_isGBS(false),
|
||||
m_parentSizer(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxHORIZONTAL);
|
||||
@@ -127,7 +127,7 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem()
|
||||
bool old_gbs = m_isGBS;
|
||||
bool old_ins = m_isInside;
|
||||
wxSizer *old_par = m_parentSizer;
|
||||
m_isInside = FALSE;
|
||||
m_isInside = false;
|
||||
if (!IsSizerNode(n)) m_parentSizer = NULL;
|
||||
wxObject *item = CreateResFromNode(n, m_parent, NULL);
|
||||
m_isInside = old_ins;
|
||||
@@ -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;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxToolBarXmlHandler::wxToolBarXmlHandler()
|
||||
: wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL)
|
||||
: wxXmlResourceHandler(), m_isInside(false), m_toolbar(NULL)
|
||||
{
|
||||
XRC_ADD_STYLE(wxTB_FLAT);
|
||||
XRC_ADD_STYLE(wxTB_DOCKABLE);
|
||||
@@ -124,7 +124,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
|
||||
if (children_node == NULL) return toolbar;
|
||||
|
||||
m_isInside = TRUE;
|
||||
m_isInside = true;
|
||||
m_toolbar = toolbar;
|
||||
|
||||
wxXmlNode *n = children_node;
|
||||
@@ -144,7 +144,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
||||
n = n->GetNext();
|
||||
}
|
||||
|
||||
m_isInside = FALSE;
|
||||
m_isInside = false;
|
||||
m_toolbar = NULL;
|
||||
|
||||
toolbar->Realize();
|
||||
|
@@ -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);
|
||||
|
@@ -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(" |"));
|
||||
@@ -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()
|
||||
{
|
||||
|
@@ -378,11 +378,11 @@ static bool NodeContainsFilename(wxXmlNode *node)
|
||||
{
|
||||
// Any bitmaps:
|
||||
if (node->GetName() == _T("bitmap"))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// URLs in wxHtmlWindow:
|
||||
if (node->GetName() == _T("url"))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// wxBitmapButton:
|
||||
wxXmlNode *parent = node->GetParent();
|
||||
@@ -391,17 +391,17 @@ static bool NodeContainsFilename(wxXmlNode *node)
|
||||
(node->GetName() == _T("focus") ||
|
||||
node->GetName() == _T("disabled") ||
|
||||
node->GetName() == _T("selected")))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// wxBitmap or wxIcon toplevel resources:
|
||||
if (node->GetName() == _T("object"))
|
||||
{
|
||||
wxString klass = node->GetPropVal(_T("class"), wxEmptyString);
|
||||
if (klass == _T("wxBitmap") || klass == _T("wxIcon"))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// find all files mentioned in structure, e.g. <bitmap>filename</bitmap>
|
||||
@@ -473,7 +473,7 @@ void XmlResApp::MakePackageZIP(const wxArrayString& flist)
|
||||
wxSetWorkingDirectory(parOutputPath);
|
||||
int execres = wxExecute(_T("zip -9 -j ") +
|
||||
wxString(flagVerbose ? _T("") : _T("-q ")) +
|
||||
parOutput + _T(" ") + files, TRUE);
|
||||
parOutput + _T(" ") + files, true);
|
||||
wxSetWorkingDirectory(cwd);
|
||||
if (execres == -1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user