removed SetAutoLayout(true) calls when a corresponding SetSizer() was also called (the latter already calls SetAutoLayout(true) in case of a non-NULL window); usual cleanup: removing tabs and end of line whitespace, TRUE->true, FALSE->false, -1->wxID_ANY, Enable(false)->Disable(), ""->wxEmptyString

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2004-06-12 23:44:08 +00:00
parent 3d4875664f
commit dabbc6a5a1
47 changed files with 560 additions and 584 deletions

View File

@@ -58,14 +58,13 @@ ctConfigurationBrowserWindow::ctConfigurationBrowserWindow( wxWindow* parent, wx
*/
void ctConfigurationBrowserWindow::CreateControls()
{
{
////@begin ctConfigurationBrowserWindow content construction
ctConfigurationBrowserWindow* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(true);
wxSplitterWindow* item3 = new wxSplitterWindow(item1, ID_CONFIGBROWSER_SPLITTERWINDOW, wxDefaultPosition, wxSize(400, 400), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE);
wxTreeCtrl* item4 = new wxTreeCtrl(item3, ID_CONFIGURATION_BROWSER_TREECTRL, wxDefaultPosition, wxSize(100, 100), wxTR_SINGLE|wxNO_BORDER);
@@ -142,14 +141,13 @@ ctConfigurationBrowserControlPanel::ctConfigurationBrowserControlPanel( wxWindow
*/
void ctConfigurationBrowserControlPanel::CreateControls()
{
{
////@begin ctConfigurationBrowserControlPanel content construction
ctConfigurationBrowserControlPanel* item5 = this;
wxBoxSizer* item6 = new wxBoxSizer(wxVERTICAL);
item5->SetSizer(item6);
item5->SetAutoLayout(true);
wxStaticText* item7 = new wxStaticText(item5, wxID_STATIC, _("Browse, add and remove configurations"), wxDefaultPosition, wxDefaultSize, 0);
item6->Add(item7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
@@ -170,7 +168,7 @@ void ctConfigurationBrowserControlPanel::CreateControls()
wxStaticText* item13 = new wxStaticText(item5, ID_CONFIGURATION_NAME, _("Configuration:"), wxDefaultPosition, wxDefaultSize, 0);
item6->Add(item13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxTextCtrl* item14 = new wxTextCtrl(item5, ID_CONFIGURATION_DESCRIPTION, _(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
wxTextCtrl* item14 = new wxTextCtrl(item5, ID_CONFIGURATION_DESCRIPTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
item6->Add(item14, 1, wxGROW|wxALL, 5);
////@end ctConfigurationBrowserControlPanel content construction

View File

@@ -74,14 +74,13 @@ ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, c
*/
void ctConfigItemsSelector::CreateControls()
{
{
////@begin ctConfigItemsSelector content construction
ctConfigItemsSelector* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(true);
wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
item2->Add(item3, 1, wxGROW|wxALL, 5);

View File

@@ -70,14 +70,13 @@ ctCustomPropertyDialog::ctCustomPropertyDialog( wxWindow* parent, wxWindowID id,
*/
void ctCustomPropertyDialog::CreateControls()
{
{
////@begin ctCustomPropertyDialog content construction
ctCustomPropertyDialog* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(true);
wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
item2->Add(item3, 1, wxGROW|wxALL, 5);
@@ -88,7 +87,7 @@ void ctCustomPropertyDialog::CreateControls()
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, _(""), wxDefaultPosition, wxDefaultSize, 0);
wxTextCtrl* item6 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item6, 0, wxGROW|wxALL, 5);
wxBoxSizer* item7 = new wxBoxSizer(wxHORIZONTAL);
@@ -148,7 +147,7 @@ void ctCustomPropertyDialog::CreateControls()
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, _(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
wxTextCtrl* item20 = new wxTextCtrl(item1, ID_CUSTOMPROPERTYDESCRIPTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
item3->Add(item20, 1, wxGROW|wxALL, 5);
wxBoxSizer* item21 = new wxBoxSizer(wxHORIZONTAL);

View File

@@ -99,7 +99,6 @@ void ctPropertyEditor::CreateControls(wxWindow* parent)
item0->Add( m_splitterWindow, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
this->SetAutoLayout(true);
this->SetSizer( item0 );
/// Add help text
@@ -159,7 +158,7 @@ void ctPropertyEditor::ClearEditor()
{
m_attributeEditorGrid->ClearAttributes();
m_propertyDescriptionWindow->SetPage(WrapDescription(wxEmptyString));
m_elementTitleTextCtrl->SetValue(_T(""));
m_elementTitleTextCtrl->SetValue(wxEmptyString);
}
/// Handles detailed editing event.
@@ -294,13 +293,13 @@ bool ctPropertyEditor::DisplayProperty(int row, ctProperty* prop, bool valueOnly
if (!m_item->CanEditProperty(prop->GetName()))
{
m_attributeEditorGrid->SetReadOnly(row, 1);
wxColour col(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
m_attributeEditorGrid->SetCellTextColour(row, 1, col);
}
else
{
m_attributeEditorGrid->SetReadOnly(row, 1, false);
m_attributeEditorGrid->SetReadOnly(row, 1, false);
m_attributeEditorGrid->SetCellTextColour(row, 1, * wxBLACK);
}
@@ -346,7 +345,7 @@ bool ctPropertyEditor::DisplayProperty(int row, ctProperty* prop, bool valueOnly
m_attributeEditorGrid->SetCellEditor(row, 1,
new ctGridCellTextEditor);
}
return true;
}
@@ -411,7 +410,7 @@ ctProperty* ctPropertyEditor::FindSelectedProperty(int& row)
if (selRow > -1)
{
row = selRow;
if (selRow < (int) m_item->GetProperties().GetCount())
{
ctProperty* prop = m_item->GetProperties().GetNth(selRow);
@@ -536,7 +535,7 @@ void ctPropertyEditor::UpdateDescription(int row)
}
if (row == -1)
{
wxString str = WrapDescription(wxEmptyString);
wxString str = WrapDescription(wxEmptyString);
m_propertyDescriptionWindow->SetPage(str);
}
else
@@ -544,7 +543,7 @@ void ctPropertyEditor::UpdateDescription(int row)
ctProperty* prop = FindProperty(row);
if (prop)
{
wxString str = WrapDescription(m_item->GetDescription(prop));
wxString str = WrapDescription(m_item->GetDescription(prop));
m_propertyDescriptionWindow->SetPage(str);
}
}
@@ -557,13 +556,13 @@ wxString ctPropertyEditor::WrapDescription(const wxString& s)
wxColour col = ctDESCRIPTION_BACKGROUND_COLOUR;
wxString colStr = apColourToHexString(col);
colStr = wxT("#") + colStr;
wxString str;
str << _T("<HTML><BODY BGCOLOR=\"") << colStr << wxT("\"><FONT SIZE=-1>") ;
str << s;
str << _T("</FONT></BODY></HTML>");
return str;
return str;
}
/// Intercept cell data change event.
@@ -655,13 +654,13 @@ void ctPropertyEditor::ApplyPropertyValue(ctConfigItem* item, ctProperty* proper
// Apply the new value
property->GetVariant() = variant;
item->ApplyProperty(property, oldValue);
item->ApplyProperty(property, oldValue);
item->Modify();
UpdateItem();
wxString menuLabel(_T("Change ") + property->GetName());
// This won't do anything first time Do is applied,
// since we've already done the action for this property.
// But when we Undo or Redo, the changed properties will be applied.
@@ -791,7 +790,7 @@ ctMultiLineTextEditor::ctMultiLineTextEditor( wxWindow *parent, wxWindowID id, c
AddControls(this, msg);
Centre();
}
bool ctMultiLineTextEditor::AddControls(wxWindow* parent, const wxString& msg)
{
wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
@@ -801,7 +800,7 @@ bool ctMultiLineTextEditor::AddControls(wxWindow* parent, const wxString& msg)
wxStaticText *item2 = new wxStaticText( parent, wxID_STATIC, msg, wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT, 5 );
wxTextCtrl *item3 = new wxTextCtrl( parent, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(330,180), wxTE_MULTILINE|wxTE_RICH );
wxTextCtrl *item3 = new wxTextCtrl( parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(330,180), wxTE_MULTILINE|wxTE_RICH );
item1->Add( item3, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
@@ -826,7 +825,6 @@ bool ctMultiLineTextEditor::AddControls(wxWindow* parent, const wxString& msg)
item3->SetFocus();
((wxButton*) FindWindow(wxID_OK))->SetDefault();
parent->SetAutoLayout( true );
parent->SetSizer(item0);
item0->Fit(parent);

View File

@@ -69,14 +69,13 @@ ctSettingsDialog::ctSettingsDialog( wxWindow* parent, wxWindowID id, const wxStr
*/
void ctSettingsDialog::CreateControls()
{
{
////@begin ctSettingsDialog content construction
ctSettingsDialog* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(true);
wxNotebook* item3 = new wxNotebook(item1, ID_NOTEBOOK, wxDefaultPosition, wxSize(200, 200), wxNB_TOP);
wxNotebookSizer* item3Sizer = new wxNotebookSizer(item3);
@@ -204,14 +203,13 @@ ctGeneralSettingsDialog::ctGeneralSettingsDialog( wxWindow* parent, wxWindowID i
*/
void ctGeneralSettingsDialog::CreateControls()
{
{
////@begin ctGeneralSettingsDialog content construction
ctGeneralSettingsDialog* item4 = this;
wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
item4->SetSizer(item5);
item4->SetAutoLayout(true);
wxStaticBox* item6Static = new wxStaticBox(item4, wxID_ANY, _("General settings"));
wxStaticBoxSizer* item6 = new wxStaticBoxSizer(item6Static, wxVERTICAL);
@@ -306,14 +304,13 @@ ctLocationSettingsDialog::ctLocationSettingsDialog( wxWindow* parent, wxWindowID
*/
void ctLocationSettingsDialog::CreateControls()
{
{
////@begin ctLocationSettingsDialog content construction
ctLocationSettingsDialog* item11 = this;
wxBoxSizer* item12 = new wxBoxSizer(wxVERTICAL);
item11->SetSizer(item12);
item11->SetAutoLayout(true);
wxStaticBox* item13Static = new wxStaticBox(item11, wxID_ANY, _("Locations"));
wxStaticBoxSizer* item13 = new wxStaticBoxSizer(item13Static, wxVERTICAL);
@@ -325,7 +322,7 @@ void ctLocationSettingsDialog::CreateControls()
wxBoxSizer* item15 = new wxBoxSizer(wxHORIZONTAL);
item13->Add(item15, 0, wxGROW, 5);
wxTextCtrl* item16 = new wxTextCtrl(item11, ID_WXWIN_HIERARCHY, _(""), wxDefaultPosition, wxSize(200, wxDefaultSize.y), 0);
wxTextCtrl* item16 = new wxTextCtrl(item11, ID_WXWIN_HIERARCHY, wxEmptyString, wxDefaultPosition, wxSize(200, wxDefaultSize.y), 0);
item16->SetHelpText(_("Enter the root path of the wxWidgets hierarchy"));
#if wxUSE_TOOLTIPS
if (ShowToolTips())