#pragma implementation "appsettings.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-#include "wx/wfstream.h"
#include "wx/datstrm.h"
-#include "wx/config.h"
-#include "wx/fileconf.h"
#include "wx/dir.h"
-#include "wx/valgen.h"
#include "wx/colordlg.h"
#include "wx/wxhtml.h"
#include "wx/effects.h"
#include "wx/spinctrl.h"
#include "wx/tooltip.h"
+#endif
+
+#include "wx/wfstream.h"
+#include "wx/config.h"
+#include "wx/fileconf.h"
+#include "wx/valgen.h"
#include "utils.h"
#include "wxconfigtool.h"
#include "appsettings.h"
/////////////////////////////////////////////////////////////////////////////
// Name: configbrowser.cpp
-// Purpose:
-// Author:
+// Purpose: Configuration browser
+// Author: Julian Smart
// Modified by:
-// Created:
-// RCS-ID:
-// Copyright:
+// Created: 2003-08-14
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
-////@begin includes
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+
#include "wx/wx.h"
#include "wx/splitter.h"
#include "wx/treectrl.h"
-////@end includes
+
+#endif
#include "configbrowser.h"
/////////////////////////////////////////////////////////////////////////////
// Name: configbrowser.h
-// Purpose:
-// Author:
+// Purpose: Configuration browser
+// Author: Julian Smart
// Modified by:
-// Created:
-// RCS-ID:
-// Copyright:
+// Created: 2003-08-14
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
public:
/// Constructor
- ctConfigurationBrowserControlPanel( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL );
+ ctConfigurationBrowserControlPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL );
/// Creates the controls and sizers
void CreateControls();
#pragma implementation "configitem.h"
#endif
-// Includes other headers for precompiled compilation
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/tokenzr.h"
-
#include "configitem.h"
#include "configtree.h"
#include "configtooldoc.h"
if (parent)
{
SetParent(parent);
- wxObjectList::compatibility_iterator node = (wxObjectList::compatibility_iterator)NULL;
if (insertBefore)
- node = parent->GetChildren().Member(insertBefore);
-
- if (node)
- parent->GetChildren().Insert(node, this);
+ {
+ wxObjectList::compatibility_iterator node = parent->GetChildren().Member(insertBefore);
+ if (node)
+ parent->GetChildren().Insert(node, this);
+ else
+ parent->GetChildren().Append(this);
+ }
else
parent->GetChildren().Append(this);
}
#pragma implementation "configitemselector.h"
#endif
+// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+#pragma hdrstop
#endif
#ifndef WX_PRECOMP
- #include "wx/wx.h"
-#endif
-#include <wx/cshelp.h>
-#include <wx/statline.h>
-#include <wx/splitter.h>
-#include <wx/scrolwin.h>
-#include <wx/spinctrl.h>
-#include <wx/spinbutt.h>
-#include <wx/valgen.h>
-#include <wx/notebook.h>
+#include "wx/statline.h"
+#include "wx/splitter.h"
+#include "wx/scrolwin.h"
+#include "wx/spinctrl.h"
+#include "wx/spinbutt.h"
+
+#endif
+#include "wx/cshelp.h"
+#include "wx/notebook.h"
+#include "wx/valgen.h"
#include "configitemselector.h"
#include "configtooldoc.h"
#include "configtoolview.h"
* ctConfigItemsSelector constructor
*/
-ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, const wxString& caption)
{
- wxDialog::Create( parent, id, caption, pos, size, style );
+ wxDialog::Create( parent, id, caption);
CreateControls();
InitSourceConfigList();
masterList->Append(item->GetName());
}
- wxNode* node = item->GetChildren().GetFirst();
+ wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst();
while (node)
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
{
public:
/// Constructor
- ctConfigItemsSelector( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Configuration Items Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
+ ctConfigItemsSelector( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Configuration Items Selector"));
/// Creates the controls and sizers
void CreateControls();
#pragma implementation "configtooldoc.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#include "wx/config.h"
-#include "wx/textfile.h"
+#ifndef WX_PRECOMP
+
#include "wx/process.h"
#include "wx/mimetype.h"
#include "wx/process.h"
-#include "wx/wfstream.h"
-#ifdef __BORLANDC__
-#pragma hdrstop
#endif
+#include "wx/textfile.h"
+#include "wx/wfstream.h"
+#include "wx/config.h"
#include "configtooldoc.h"
#include "configtoolview.h"
#include "configtree.h"
stream << wxT("<enabled>0</enabled>");
// Output properties
- wxNode* node = item->GetProperties().GetList().GetFirst();
+ wxObjectList::compatibility_iterator node = item->GetProperties().GetList().GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
item = GetTopItem();
item->GetDependents().Clear();
- for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
ClearDependencies(child);
otherItem->GetDependents().Append(item);
}
}
- for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
RefreshDependencies(child);
}
}
- for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
GenerateSetup(child, str);
ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Target"));
if (platformsFolder)
{
- for ( wxNode* node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
if (child->GetType() == ctTypeBoolRadio && child->IsEnabled())
}
}
- for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
GenerateConfigureCommand(child, str);
{
// Should probably allow other variables
// to be used, and maybe expand variables within m_frameworkDir
- path = wxGetenv(wxT("WXWIN"));
+ wxString pathEnv(wxGetenv(wxT("WXWIN")));
+ path = pathEnv;
#ifdef __WXMSW__
if (makeUnix)
path.Replace(wxT("\\"), wxT("/"));
{
if (item->GetParent())
{
- wxNode* node = item->GetParent()->GetChildren().Member(item);
+ wxObjectList::compatibility_iterator node = item->GetParent()->GetChildren().Member(item);
if (node && node->GetNext())
{
ctConfigItem* nextItem = (ctConfigItem*) node->GetNext()->GetData();
// Apply only those that need applying
// (those properties in activeState that are not in propsTemp)
- wxNode* node = m_activeState->GetProperties().GetList().GetFirst();
+ wxObjectList::compatibility_iterator node = m_activeState->GetProperties().GetList().GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
/// Clear children
void ctConfiguration::Clear()
{
- wxNode* node = m_children.GetFirst();
+ wxObjectList::compatibility_iterator node = m_children.GetFirst();
while (node)
{
- wxNode* next = node->GetNext();
+ wxObjectList::compatibility_iterator next = node->GetNext();
ctConfiguration* child = (ctConfiguration*) node->GetData();
// This should delete 'node' too, assuming
if (GetName() == name)
return this;
- for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfiguration* child = (ctConfiguration*) node->GetData();
ctConfiguration* found = child->FindConfiguration(name);
{
if (!GetParent())
return NULL;
- wxNode* node = GetParent()->GetChildren().Member(this);
+ wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
if (node && node->GetNext())
{
return (ctConfiguration*) node->GetNext()->GetData();
{
if (!GetParent())
return NULL;
- wxNode* node = GetParent()->GetChildren().Member(this);
+ wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
if (node && node->GetPrevious())
{
return (ctConfiguration*) node->GetPrevious()->GetData();
{
ctConfiguration* newItem = Clone();
- for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
+ for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfiguration* child = (ctConfiguration*) node->GetData();
ctConfiguration* newChild = child->DeepClone();
#pragma implementation "configtoolview.h"
#endif
-// Includes other headers for precompiled compilation
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+#pragma hdrstop
#endif
#include "wx/wfstream.h"
-
#include "configtoolview.h"
#include "configtooldoc.h"
#include "configtree.h"
#pragma implementation "configtree.h"
#endif
-// Includes other headers for precompiled compilation
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#include "wx/imaglist.h"
#include "wx/cshelp.h"
+#include "wx/imaglist.h"
// Include XPM icons
#include "bitmaps/closedfolder.xpm"
#pragma implementation "custompropertydialog.h"
#endif
-#include <wx/wx.h>
-#include <wx/cshelp.h>
-#include <wx/statline.h>
-#include <wx/splitter.h>
-#include <wx/scrolwin.h>
-#include <wx/spinctrl.h>
-#include <wx/spinbutt.h>
-#include <wx/valgen.h>
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+
+#include "wx/wx.h"
+#include "wx/statline.h"
+#include "wx/splitter.h"
+#include "wx/scrolwin.h"
+#include "wx/spinctrl.h"
+#include "wx/spinbutt.h"
+
+#endif
+
+#include "wx/cshelp.h"
+#include "wx/valgen.h"
#include "custompropertydialog.h"
////@begin XPM images
* ctCustomPropertyDialog constructor
*/
-ctCustomPropertyDialog::ctCustomPropertyDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+ctCustomPropertyDialog::ctCustomPropertyDialog( wxWindow* parent, wxWindowID id, const wxString& caption)
{
m_type = wxT("string");
- wxDialog::Create( parent, id, caption, pos, size, style );
+ wxDialog::Create( parent, id, caption);
CreateControls();
}
{
////@begin ctCustomPropertyDialog content construction
+ wxArrayString items;
+
ctCustomPropertyDialog* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Name:"), wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- wxTextCtrl* item6 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item6, 0, wxGROW|wxALL, 5);
+ m_customPropertyName = new wxTextCtrl(item1, wxID_ANY);
+ item3->Add(m_customPropertyName, 0, wxGROW|wxALL, 5);
wxBoxSizer* item7 = new wxBoxSizer(wxHORIZONTAL);
item3->Add(item7, 0, wxGROW, 5);
wxStaticText* item9 = new wxStaticText(item1, wxID_STATIC, _("&Data type:"), wxDefaultPosition, wxDefaultSize, 0);
item8->Add(item9, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- wxString item10Strings[] = {
- _("string"),
- _("bool"),
- _("double"),
- _("long")
- };
- wxChoice* item10 = new wxChoice(item1, ID_CUSTOMPROPERTYTYPE, wxDefaultPosition, wxDefaultSize, 4, item10Strings, 0);
- item10->SetStringSelection(_("string"));
- item8->Add(item10, 1, wxGROW|wxALL, 5);
+ items.Empty();
+ items.Add(_("string"));
+ items.Add(_("bool"));
+ items.Add(_("double"));
+ items.Add(_("long"));
+ m_customPrototype = new wxChoice(item1, wxID_ANY, wxDefaultPosition, wxDefaultSize, items);
+ m_customPrototype->SetStringSelection(_("string"));
+ item8->Add(m_customPrototype, 1, wxGROW|wxALL, 5);
wxBoxSizer* item11 = new wxBoxSizer(wxVERTICAL);
item7->Add(item11, 0, wxALIGN_CENTER_VERTICAL, 5);
wxStaticText* item12 = new wxStaticText(item1, wxID_STATIC, _("&Editor type:"), wxDefaultPosition, wxDefaultSize, 0);
item11->Add(item12, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- wxString item13Strings[] = {
- _("string"),
- _("choice"),
- _("bool"),
- _("float"),
- _("integer"),
- _("configitems")
- };
- wxChoice* item13 = new wxChoice(item1, ID_CUSTOMPROPERTYEDITORTYPE, wxDefaultPosition, wxDefaultSize, 6, item13Strings, 0);
- item13->SetStringSelection(_("string"));
- item11->Add(item13, 1, wxGROW|wxALL, 5);
+ items.Empty();
+ items.Add(_("string"));
+ items.Add(_("choice"));
+ items.Add(_("bool"));
+ items.Add(_("float"));
+ items.Add(_("integer"));
+ items.Add(_("configitems"));
+ m_customPropertyEditorType = new wxChoice(item1, wxID_ANY, wxDefaultPosition, wxDefaultSize, items);
+ m_customPropertyEditorType->SetStringSelection(_("string"));
+ item11->Add(m_customPropertyEditorType, 1, wxGROW|wxALL, 5);
wxStaticBox* item14Static = new wxStaticBox(item1, wxID_ANY, _("Choices"));
wxStaticBoxSizer* item14 = new wxStaticBoxSizer(item14Static, wxHORIZONTAL);
item3->Add(item14, 0, wxGROW|wxALL, 5);
wxString* item15Strings = NULL;
- wxListBox* item15 = new wxListBox(item1, ID_PROPERTY_CHOICES, wxDefaultPosition, wxDefaultSize, 0, item15Strings, wxLB_SINGLE);
- item14->Add(item15, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ m_propertyChoices = new wxListBox(item1, ID_PROPERTY_CHOICES, wxDefaultPosition, wxDefaultSize, 0, item15Strings, wxLB_SINGLE);
+ item14->Add(m_propertyChoices, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* item16 = new wxBoxSizer(wxVERTICAL);
item14->Add(item16, 0, wxALIGN_CENTER_VERTICAL, 5);
wxStaticText* item19 = new wxStaticText(item1, wxID_STATIC, _("&Description:"), wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item19, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- wxTextCtrl* item20 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYDESCRIPTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
- item3->Add(item20, 1, wxGROW|wxALL, 5);
+ m_customPropertyDescription = new wxTextCtrl(item1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
+ item3->Add(m_customPropertyDescription, 1, wxGROW|wxALL, 5);
wxBoxSizer* item21 = new wxBoxSizer(wxHORIZONTAL);
item3->Add(item21, 0, wxGROW|wxALL, 5);
////@end ctCustomPropertyDialog content construction
// Add validators
- FindWindow(ID_CUSTOMPROPERTYNAME)->SetValidator(wxGenericValidator(& m_name));
- FindWindow(ID_CUSTOMPROPERTYTYPE)->SetValidator(wxGenericValidator(& m_type));
- FindWindow(ID_CUSTOMPROPERTYEDITORTYPE)->SetValidator(wxGenericValidator(& m_editorType));
- FindWindow(ID_CUSTOMPROPERTYDESCRIPTION)->SetValidator(wxGenericValidator(& m_description));
+ m_customPropertyName->SetValidator(wxGenericValidator(& m_name));
+ m_customPrototype->SetValidator(wxGenericValidator(& m_type));
+ m_customPropertyEditorType->SetValidator(wxGenericValidator(& m_editorType));
+ m_customPropertyDescription->SetValidator(wxGenericValidator(& m_description));
}
/*!
void ctCustomPropertyDialog::OnUpdatePropertyChoices( wxUpdateUIEvent& event )
{
- wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
- event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") );
+ if(m_customPrototype)
+ event.Enable( m_customPrototype->GetSelection() > -1 && m_customPrototype->GetStringSelection() == wxT("choice") );
}
/*!
void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event) )
{
- wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
- if ( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") )
+ if(m_customPrototype)
{
- wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice"));
- if (!str.IsEmpty())
+ if ( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") )
{
- wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
- listBox->Append(str);
- m_choices.Add(str);
+ wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice"));
+ if (!str.IsEmpty() && m_propertyChoices)
+ {
+ m_propertyChoices->Append(str);
+ m_choices.Add(str);
+ }
}
}
}
void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event )
{
- wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
- event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") );
+ if(m_customPropertyEditorType)
+ event.Enable( m_customPropertyEditorType->GetSelection() > -1 &&
+ m_customPropertyEditorType->GetStringSelection() == wxT("choice") );
}
/*!
void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& WXUNUSED(event) )
{
- /* wxChoice* choice = (wxChoice* ) */ FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
- wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
- if (listBox->GetSelection() > -1)
+ if (m_propertyChoices && m_propertyChoices->GetSelection() > -1)
{
- listBox->Delete(listBox->GetSelection());
- m_choices.RemoveAt(listBox->GetSelection());
+ m_propertyChoices->Delete(m_propertyChoices->GetSelection());
+ m_choices.RemoveAt(m_propertyChoices->GetSelection());
}
}
void ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event )
{
- wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
- wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
- event.Enable( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") &&
- listBox->GetSelection() > -1 );
+ if (m_customPropertyEditorType && m_propertyChoices)
+ event.Enable( m_customPropertyEditorType->GetSelection() > -1 &&
+ m_customPropertyEditorType->GetStringSelection() == wxT("choice") &&
+ m_propertyChoices->GetSelection() > -1 );
}
void ctCustomPropertyDialog::SetChoices(const wxArrayString& choices)
{
- wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
size_t i, len = choices.GetCount();
- for (i = 0; i < len; i++)
- listBox->Append(m_choices[i]);
+ if (m_propertyChoices)
+ for (i = 0; i < len; i++)
+ m_propertyChoices->Append(m_choices[i]);
}
////@begin control identifiers
#define ID_CUSTOMPROPERTYDIALOG 10000
-#define ID_CUSTOMPROPERTYNAME 10003
-#define ID_CUSTOMPROPERTYTYPE 10002
-#define ID_CUSTOMPROPERTYEDITORTYPE 10008
#define ID_PROPERTY_CHOICES 10001
#define ID_PROPERTY_CHOICE_ADD 10005
#define ID_PROPERTY_CHOICE_REMOVE 10006
-#define ID_CUSTOMPROPERTYDESCRIPTION 10004
////@end control identifiers
/*!
{
public:
/// Constructor
- ctCustomPropertyDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Edit Custom Property"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
+ ctCustomPropertyDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Edit Custom Property"));
/// Creates the controls and sizers
void CreateControls();
DECLARE_CLASS( ctCustomPropertyDialog )
DECLARE_EVENT_TABLE()
- wxString m_name;
- wxString m_type;
- wxString m_description;
- wxString m_editorType;
+protected:
+ wxString m_name;
+ wxString m_type;
+ wxString m_description;
+ wxString m_editorType;
wxArrayString m_choices;
+
+ // Dialog controls
+ wxTextCtrl* m_customPropertyName;
+ wxTextCtrl* m_customPropertyDescription;
+ wxChoice* m_customPrototype;
+ wxChoice* m_customPropertyEditorType;
+ wxListBox* m_propertyChoices;
};
#endif
#pragma implementation "htmlparser.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#include "wx/textfile.h"
#include "wx/wfstream.h"
+#include "wx/textfile.h"
#include "wx/txtstrm.h"
-
-#include <ctype.h>
-
#include "htmlparser.h"
/// Useful insertion operators for wxOutputStream.
#pragma implementation "mainframe.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
+#ifndef WX_PRECOMP
+
+#include "wx/splitter.h"
+
+#endif
+
+#include "wx/cshelp.h"
#include "wx/html/htmlwin.h"
#include "wx/notebook.h"
-#include "wx/splitter.h"
-#include "wx/clipbrd.h"
#include "wx/dataobj.h"
-#include "wx/cshelp.h"
-
+#include "wx/clipbrd.h"
#include "wxconfigtool.h"
#include "mainframe.h"
#include "appsettings.h"
#include "wx/imaglist.h"
#include "wx/docview.h"
+#include "wx/notebook.h"
// #define USE_CONFIG_BROWSER_PAGE
#pragma implementation "propeditor.h"
#endif
-#include <wx/wx.h>
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#include "wx/html/htmlwin.h"
+#ifndef WX_PRECOMP
+
#include "wx/grid.h"
#include "wx/filedlg.h"
+
+#endif
+
+#include "wx/html/htmlwin.h"
#include "wx/tokenzr.h"
#include "wx/valgen.h"
-
#include "propeditor.h"
#include "symbols.h"
#include "utils.h"
#include "configtooldoc.h"
#include "configitemselector.h"
+
#include "bitmaps/ellipsis.xpm"
wxTextCtrl *item2 = m_elementTitleTextCtrl;
item1->Add( item2, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- wxButton *item3a = new wxButton( parent, ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS, wxT("Edit..."));
- item1->Add( item3a, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
+ m_attributeEditorEditDetails = new wxButton( parent, ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS, wxT("Edit..."));
+ item1->Add( m_attributeEditorEditDetails, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
/// Add help text
m_elementTitleTextCtrl->SetHelpText(_("The title of the property being edited."));
- FindWindow(ctID_ATTRIBUTE_EDITOR_EDIT_DETAILS)->SetHelpText(_("Click to use an appropriate editor for the selected property (if any)."));
- FindWindow(ctID_ATTRIBUTE_EDITOR_GRID)->SetHelpText(_("Shows the properties of the selected item."));
- FindWindow(ctID_ATTRIBUTE_EDITOR_DESCRIPTION)->SetHelpText(_("Shows a description of the selected property, or a summary of the whole item."));
+ m_attributeEditorEditDetails->SetHelpText(_("Click to use an appropriate editor for the selected property (if any)."));
+ m_attributeEditorGrid->SetHelpText(_("Shows the properties of the selected item."));
+ m_propertyDescriptionWindow->SetHelpText(_("Shows a description of the selected property, or a summary of the whole item."));
/// Set up the grid to display properties
m_attributeEditorGrid->RegisterDataType(ctGRID_VALUE_STRING,
m_attributeEditorGrid->AppendRows(m_item->GetProperties().GetCount());
- wxNode* node = m_item->GetProperties().GetList().GetFirst();
+ wxObjectList::compatibility_iterator node = m_item->GetProperties().GetList().GetFirst();
int i = 0;
while (node)
{
{
UpdateTitle();
- wxNode* node = m_item->GetProperties().GetList().GetFirst();
+ wxObjectList::compatibility_iterator node = m_item->GetProperties().GetList().GetFirst();
int i = 0;
while (node)
{
item4->Add( 5, 5, 1, wxALIGN_CENTRE|wxALL, 5 );
wxButton *item5 = new wxButton( parent, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
- item5->SetDefault();
item4->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );
wxButton *item6 = new wxButton( parent, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
item3->SetFocus();
- ((wxButton*) FindWindow(wxID_OK))->SetDefault();
+ item5->SetDefault();
parent->SetSizer(item0);
item0->Fit(parent);
DECLARE_EVENT_TABLE()
protected:
+ // Dialog controls
+ wxButton* m_attributeEditorEditDetails;
ctPropertyEditorGrid* m_attributeEditorGrid;
wxHtmlWindow* m_propertyDescriptionWindow;
wxSplitterWindow* m_splitterWindow;
#pragma implementation "property.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
#include "property.h"
if (oldProp)
m_list.DeleteObject(oldProp);
- wxNode* insertBeforeNode = NULL;
if (insertAfter)
{
ctProperty* insertAfterProp = FindProperty(insertAfter);
if (insertAfterProp)
{
- wxNode* node = m_list.Member(insertAfterProp);
+ wxObjectList::compatibility_iterator node = m_list.Member(insertAfterProp);
if (node)
- insertBeforeNode = node->GetNext();
+ {
+ wxObjectList::compatibility_iterator insertBeforeNode = node->GetNext();
+ m_list.Insert(insertBeforeNode, property);
+ }
+ else
+ m_list.Append(property);
}
+ else
+ m_list.Append(property);
}
- if (insertBeforeNode)
- m_list.Insert(insertBeforeNode, property);
else
m_list.Append(property);
ctProperty* ctProperties::FindProperty(const wxString& name) const
{
- wxNode* node = m_list.GetFirst();
+ wxObjectList::compatibility_iterator node = m_list.GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
void ctProperties::Clear()
{
- m_list.DeleteContents(true);
- m_list.Clear();
- m_list.DeleteContents(false);
+ WX_CLEAR_LIST(wxObjectList,m_list);
}
void ctProperties::Copy(const ctProperties& properties)
{
- wxNode* node = properties.m_list.GetFirst();
+ wxObjectList::compatibility_iterator node = properties.m_list.GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
wxASSERT( i < (int) GetCount() );
if (i < (int) GetCount())
{
- wxNode* node = m_list.Item(i);
+ wxObjectList::compatibility_iterator node = m_list.Item(i);
return (ctProperty*) node->GetData();
}
return NULL;
/////////////////////////////////////////////////////////////////////////////
// Name: settingsdialog.cpp
-// Purpose:
-// Author:
-// Modified by:
-// Created:
-// RCS-ID:
-// Copyright:
-// Licence:
+// Purpose: Settings dialog
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-06-12
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "settingsdialog.h"
#endif
-#include "wx/wx.h"
-#include "wx/cshelp.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+
#include "wx/statline.h"
#include "wx/splitter.h"
#include "wx/scrolwin.h"
#include "wx/spinctrl.h"
#include "wx/spinbutt.h"
-#include "wx/valgen.h"
-#include "wx/notebook.h"
+#endif
+
+#include "wx/cshelp.h"
+#include "wx/notebook.h"
+#include "wx/valgen.h"
#include "wxconfigtool.h"
#include "settingsdialog.h"
* ctSettingsDialog constructor
*/
-ctSettingsDialog::ctSettingsDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+ctSettingsDialog::ctSettingsDialog( wxWindow* parent )
{
SetExtraStyle(wxDIALOG_EX_CONTEXTHELP|wxWS_EX_VALIDATE_RECURSIVELY);
- wxDialog::Create( parent, id, caption, pos, size, style );
-
+ wxDialog::Create( parent, wxID_ANY, _("Configuration Settings"));
CreateControls();
}
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
- wxNotebook* item3 = new wxNotebook(item1, ID_NOTEBOOK, wxDefaultPosition, wxSize(200, 200), wxNB_TOP);
- ctGeneralSettingsDialog* item4 = new ctGeneralSettingsDialog(item3, ID_GENERAL_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
- item3->AddPage(item4, _("General"));
- ctLocationSettingsDialog* item11 = new ctLocationSettingsDialog(item3, ID_LOCATION_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
- item3->AddPage(item11, _("Locations"));
- item2->Add(item3, 0, wxGROW|wxALL, 5);
+ m_notebook = new wxNotebook(item1, wxID_ANY, wxDefaultPosition, wxSize(200, 200), wxNB_TOP);
+ ctGeneralSettingsDialog* item4 = new ctGeneralSettingsDialog(m_notebook, ID_GENERAL_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
+ m_notebook->AddPage(item4, _("General"));
+ ctLocationSettingsDialog* item11 = new ctLocationSettingsDialog(m_notebook, ID_LOCATION_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
+ m_notebook->AddPage(item11, _("Locations"));
+ item2->Add(m_notebook, 0, wxGROW|wxALL, 5);
wxBoxSizer* item21 = new wxBoxSizer(wxHORIZONTAL);
item2->Add(item21, 0, wxGROW|wxALL, 5);
void ctSettingsDialog::OnHelp( wxCommandEvent& WXUNUSED(event) )
{
- wxNotebook* notebook = (wxNotebook*) FindWindow(ID_NOTEBOOK);
-
- int sel = notebook->GetSelection();
-
- wxASSERT_MSG( (sel != -1), wxT("A notebook tab should always be selected."));
-
- wxWindow* page = (wxWindow*) notebook->GetPage(sel);
-
- wxString helpTopic;
- if (page->GetId() == ID_GENERAL_SETTINGS_DIALOG)
+ if(m_notebook)
{
- helpTopic = wxT("General settings dialog");
- }
- else if (page->GetId() == ID_LOCATION_SETTINGS_DIALOG)
- {
- helpTopic = wxT("Location settings dialog");
- }
-
- if (!helpTopic.IsEmpty())
- {
- wxGetApp().GetHelpController().DisplaySection(helpTopic);
+ int sel = m_notebook->GetSelection();
+
+ wxASSERT_MSG( (sel != -1), wxT("A notebook tab should always be selected."));
+
+ wxWindow* page = (wxWindow*) m_notebook->GetPage(sel);
+
+ wxString helpTopic;
+ if (page->GetId() == ID_GENERAL_SETTINGS_DIALOG)
+ {
+ helpTopic = wxT("General settings dialog");
+ }
+ else if (page->GetId() == ID_LOCATION_SETTINGS_DIALOG)
+ {
+ helpTopic = wxT("Location settings dialog");
+ }
+
+ if (!helpTopic.IsEmpty())
+ {
+ wxGetApp().GetHelpController().DisplaySection(helpTopic);
+ }
}
}
GetSizer()->Fit(this);
////@end ctGeneralSettingsDialog content construction
- FindWindow(ID_LOAD_LAST_DOCUMENT)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_loadLastDocument));
- FindWindow(ID_SHOW_TOOLTIPS)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useToolTips));
- FindWindow(ID_DEFAULT_FILE_KIND)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_defaultFileKind));
+ item7->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_loadLastDocument));
+ item8->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useToolTips));
+ item10->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_defaultFileKind));
}
/*!
wxBoxSizer* item15 = new wxBoxSizer(wxHORIZONTAL);
item13->Add(item15, 0, wxGROW, 5);
- wxTextCtrl* item16 = new wxTextCtrl(item11, ID_WXWIN_HIERARCHY, wxEmptyString, wxDefaultPosition, wxSize(200, wxDefaultCoord), 0);
- item16->SetHelpText(_("Enter the root path of the wxWidgets hierarchy"));
+ m_wxWinHierarchy = new wxTextCtrl(item11, ID_WXWIN_HIERARCHY, wxEmptyString, wxDefaultPosition, wxSize(200, wxDefaultCoord), 0);
+ m_wxWinHierarchy->SetHelpText(_("Enter the root path of the wxWidgets hierarchy"));
#if wxUSE_TOOLTIPS
if (ShowToolTips())
- item16->SetToolTip(_("Enter the root path of the wxWidgets hierarchy"));
+ m_wxWinHierarchy->SetToolTip(_("Enter the root path of the wxWidgets hierarchy"));
#endif
- item15->Add(item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ item15->Add(m_wxWinHierarchy, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* item17 = new wxButton(item11, ID_CHOOSE_WXWIN_HIERARCHY, _("&Choose..."), wxDefaultPosition, wxDefaultSize, 0);
item17->SetHelpText(_("Click to choose the root path of the wxWidgets hierarchy\\n"));
item18->Add(60, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxCheckBox* item20 = new wxCheckBox(item11, ID_USE_WXWIN, _("&Use WXWIN environment variable"), wxDefaultPosition, wxDefaultSize, 0);
- item20->SetValue(false);
- item20->SetHelpText(_("Check to use the value of WXWIN instead"));
+ m_wxWinUse = new wxCheckBox(item11, ID_USE_WXWIN, _("&Use WXWIN environment variable"));
+ m_wxWinUse->SetValue(false);
+ m_wxWinUse->SetHelpText(_("Check to use the value of WXWIN instead"));
#if wxUSE_TOOLTIPS
if (ShowToolTips())
- item20->SetToolTip(_("Check to use the value of WXWIN instead"));
+ m_wxWinUse->SetToolTip(_("Check to use the value of WXWIN instead"));
#endif
- item18->Add(item20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ item18->Add(m_wxWinUse, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
GetSizer()->Fit(this);
////@end ctLocationSettingsDialog content construction
- FindWindow(ID_WXWIN_HIERARCHY)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_frameworkDir));
- FindWindow(ID_USE_WXWIN)->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useEnvironmentVariable));
+ m_wxWinHierarchy->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_frameworkDir));
+ m_wxWinUse->SetValidator(wxGenericValidator(& wxGetApp().GetSettings().m_useEnvironmentVariable));
}
/*!
void ctLocationSettingsDialog::OnUpdateWxwinHierarchy( wxUpdateUIEvent& event )
{
- wxCheckBox* checkbox = (wxCheckBox*) FindWindow(ID_USE_WXWIN);
- event.Enable(!checkbox->GetValue());
+ if(m_wxWinUse)
+ event.Enable(!m_wxWinUse->GetValue());
}
/*!
void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& WXUNUSED(event) )
{
- wxTextCtrl* textCtrl = (wxTextCtrl*) FindWindow( ID_WXWIN_HIERARCHY );
- wxASSERT( textCtrl != NULL );
- wxString defaultPath = textCtrl->GetValue();
-
- wxDirDialog dialog(this, _("Choose the location of the wxWidgets hierarchy"),
- defaultPath);
- if (dialog.ShowModal() == wxID_OK)
+ if (m_wxWinHierarchy)
{
- textCtrl->SetValue(dialog.GetPath());
+ wxString defaultPath = m_wxWinHierarchy->GetValue();
+
+ wxDirDialog dialog(this, _("Choose the location of the wxWidgets hierarchy"),
+ defaultPath);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ m_wxWinHierarchy->SetValue(dialog.GetPath());
+ }
}
}
void ctLocationSettingsDialog::OnUpdateChooseWxwinHierarchy( wxUpdateUIEvent& event )
{
- wxCheckBox* checkbox = (wxCheckBox*) FindWindow(ID_USE_WXWIN);
- event.Enable(!checkbox->GetValue());
+ if (m_wxWinUse)
+ event.Enable(!m_wxWinUse->GetValue());
}
/*!
/////////////////////////////////////////////////////////////////////////////
// Name: settingsdialog.h
-// Purpose:
-// Author:
-// Modified by:
-// Created:
-// RCS-ID:
-// Copyright:
-// Licence:
+// Purpose: Settings dialog
+// Author: Julian Smart
+// Modified by:
+// Created: 2002-09-04
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _SETTINGSDIALOG_H_
{
public:
/// Constructor
- ctSettingsDialog( wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxString& caption = _("Configuration Settings"),
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCAPTION|wxSYSTEM_MENU );
+ ctSettingsDialog( wxWindow* parent );
/// Creates the controls and sizers
void CreateControls();
DECLARE_CLASS( ctSettingsDialog )
DECLARE_EVENT_TABLE()
+
+protected:
+
+ // Dialog controls.
+ wxNotebook* m_notebook;
};
/*!
DECLARE_CLASS( ctLocationSettingsDialog )
DECLARE_EVENT_TABLE()
+
+protected:
+
+ // Dialog controls.
+ wxTextCtrl* m_wxWinHierarchy;
+ wxCheckBox* m_wxWinUse;
};
#endif
/////////////////////////////////////////////////////////////////////////////
// Name: symbols.h
// Purpose: Application symbols file
-// Author:
+// Author: Julian Smart
// Modified by:
-// Created:
+// Created: 2003-06-12
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
// #pragma implementation
#endif
-#include "wx/wx.h"
-#include "wx/image.h"
-#include "wx/notebook.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include <math.h>
+
+#ifndef WX_PRECOMP
+
#include "wx/splitter.h"
-#include "wx/wfstream.h"
#include "wx/datstrm.h"
#include "wx/file.h"
#include "wx/listctrl.h"
-#include "wx/tokenzr.h"
#include "wx/process.h"
-#include "wx/mimetype.h"
#include "wx/variant.h"
-#include "wx/cshelp.h"
#include "wx/cmdline.h"
-#include "wx/imaglist.h"
-#include <math.h>
-
-#ifdef __WXMSW__
-#include <windows.h>
-#include "wx/msw/winundef.h"
#endif
+#include "wx/wfstream.h"
+#include "wx/cshelp.h"
+#include "wx/image.h"
+#include "wx/imaglist.h"
+#include "wx/tokenzr.h"
+#include "wx/notebook.h"
+#include "wx/mimetype.h"
#include "utils.h"
// Returns the image type, or -1, determined from the extension.
#if defined(__WXMAC__) && !defined(__DARWIN__)
dir = wxMacFindFolder( (short) kOnSystemDisk, kTemporaryFolderType, kCreateFolder ) ;
#else // !Mac
- dir = wxGetenv(_T("TMP"));
+ wxString dirEnv(wxGetenv(_T("TMP")));
+ dir = dirEnv;
if ( dir.empty() )
{
- dir = wxGetenv(_T("TEMP"));
+ wxString envVar(wxGetenv(_T("TEMP")));
+ dir = envVar;
}
if ( dir.empty() )
wxString apFindAppPath(const wxString& argv0, const wxString& cwd, const wxString& appVariableName)
{
- wxString str;
-
// Try appVariableName
if (!appVariableName.IsEmpty())
{
- str = wxGetenv(appVariableName);
- if (!str.IsEmpty())
- return str;
+ wxString strVar(wxGetenv(appVariableName.c_str()));
+ if (!strVar.IsEmpty())
+ return strVar;
}
if (wxIsAbsolutePath(argv0))
if (currentDir.Last() != wxFILE_SEP_PATH)
currentDir += wxFILE_SEP_PATH;
- str = currentDir + argv0;
- if (wxFileExists(str))
- return wxPathOnly(str);
+ currentDir += argv0;
+ if (wxFileExists(currentDir))
+ return wxPathOnly(currentDir);
}
// OK, it's neither an absolute path nor a relative path.
wxPathList pathList;
pathList.AddEnvList(wxT("PATH"));
- str = pathList.FindAbsoluteValidPath(argv0);
- if (!str.IsEmpty())
- return wxPathOnly(str);
+ wxString strPath = pathList.FindAbsoluteValidPath(argv0);
+ if (!strPath.IsEmpty())
+ return wxPathOnly(strPath);
// Failed
return wxEmptyString;
wxIconTable::wxIconTable(wxImageList* imageList)
{
m_imageList = imageList;
- DeleteContents(true);
+ WX_CLEAR_LIST(wxIconTable,*this);
}
void wxIconTable::AppendInfo(wxIconInfo* info)
wxIconInfo* wxIconTable::FindInfo(const wxString& name) const
{
- wxNode* node = GetFirst();
+ wxObjectList::compatibility_iterator node = GetFirst();
while (node)
{
wxIconInfo* info = (wxIconInfo*) node->GetData();
#ifndef _AP_UTILS_H_
#define _AP_UTILS_H_
+#include "wx/imaglist.h"
+
#ifndef DOXYGEN_SKIP
/*!
#pragma implementation "wxconfigtool.h"
#endif
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#include "wx/config.h"
+#ifndef WX_PRECOMP
+
#include "wx/laywin.h"
-#include "wx/image.h"
#include "wx/menuitem.h"
#include "wx/tooltip.h"
+#include "wx/variant.h"
+
+#endif
+
#include "wx/cshelp.h"
#include "wx/helphtml.h"
#include "wx/html/htmprint.h"
#include "wx/html/htmlwin.h"
+#include "wx/image.h"
#include "wx/filesys.h"
#include "wx/fs_mem.h"
#include "wx/fs_zip.h"
#include "wx/wfstream.h"
-#include "wx/variant.h"
-
+#include "wx/config.h"
#include "wxconfigtool.h"
#include "configtooldoc.h"
#include "configtoolview.h"
bool ctApp::OnInit(void)
{
+
#if wxUSE_LOG
wxLog::SetTimestamp(NULL);
#endif // wxUSE_LOG
wxString currentDir = wxGetCwd();
// Use argv to get current app directory
- m_appDir = apFindAppPath(argv[0], currentDir, wxT("WXCONFIGTOOLDIR"));
+ wxString argv0(argv[0]);
+ wxString appVariableName(wxT("WXCONFIGTOOLDIR"));
+ m_appDir = apFindAppPath(argv0, currentDir, appVariableName);
#ifdef __WXMSW__
// If the development version, go up a directory.