Use bool constants instead of BOOL ones in propgrid sample.
s/FALSE/false/ and s/TRUE/true for the sake of consistency. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -739,7 +739,7 @@ void FormMain::OnPropertyGridSelect( wxPropertyGridEvent& event )
|
||||
wxPGProperty* property = event.GetProperty();
|
||||
if ( property )
|
||||
{
|
||||
m_itemEnable->Enable( TRUE );
|
||||
m_itemEnable->Enable( true );
|
||||
if ( property->IsEnabled() )
|
||||
m_itemEnable->SetItemLabel( wxT("Disable") );
|
||||
else
|
||||
@@ -747,7 +747,7 @@ void FormMain::OnPropertyGridSelect( wxPropertyGridEvent& event )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_itemEnable->Enable( FALSE );
|
||||
m_itemEnable->Enable( false );
|
||||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
@@ -2029,7 +2029,7 @@ FormMain::FormMain(const wxString& title, const wxPoint& pos, const wxSize& size
|
||||
menuTools1->AppendSeparator();
|
||||
m_itemEnable = menuTools1->Append(ID_ENABLE, wxT("Enable"),
|
||||
wxT("Toggles item's enabled state.") );
|
||||
m_itemEnable->Enable( FALSE );
|
||||
m_itemEnable->Enable( false );
|
||||
menuTools1->Append(ID_HIDE, "Hide", "Hides a property" );
|
||||
menuTools1->Append(ID_SETREADONLY, "Set as Read-Only",
|
||||
"Set property as read-only" );
|
||||
@@ -2974,7 +2974,7 @@ void FormMain::OnMisc ( wxCommandEvent& event )
|
||||
wxVariant list;
|
||||
list.NullList();
|
||||
list.Append( wxVariant((long)1234,wxT("VariantLong")) );
|
||||
list.Append( wxVariant((bool)TRUE,wxT("VariantBool")) );
|
||||
list.Append( wxVariant(true,wxT("VariantBool")) );
|
||||
list.Append( wxVariant(wxT("Test Text"),wxT("VariantString")) );
|
||||
m_pPropGridManager->GetGrid()->SetPropertyValues(list);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@
|
||||
// Dummy comparison required by value type implementation.
|
||||
bool operator == (const wxFontData&, const wxFontData&)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Custom version of wxFontProperty that also holds colour in the value.
|
||||
@@ -299,9 +299,9 @@ bool wxDirsProperty::OnCustomStringEdit( wxWindow* parent, wxString& value )
|
||||
if ( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
value = dlg.GetPath();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -384,22 +384,22 @@ bool wxArrayDoubleEditorDialog::ArrayInsert( const wxString& str, int index )
|
||||
{
|
||||
double d;
|
||||
if ( !str.ToDouble(&d) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (index<0)
|
||||
m_array.Add(d);
|
||||
else
|
||||
m_array.Insert(d,index);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxArrayDoubleEditorDialog::ArraySet( size_t index, const wxString& str )
|
||||
{
|
||||
double d;
|
||||
if ( !str.ToDouble(&d) )
|
||||
return FALSE;
|
||||
return false;
|
||||
m_array[index] = d;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxArrayDoubleEditorDialog::ArrayRemoveAt( int index )
|
||||
@@ -468,7 +468,7 @@ bool wxArrayDoubleEditorDialog::Create(wxWindow *parent,
|
||||
bool operator == (const wxArrayDouble& a, const wxArrayDouble& b)
|
||||
{
|
||||
if ( a.GetCount() != b.GetCount() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
size_t i;
|
||||
|
||||
@@ -478,10 +478,10 @@ bool operator == (const wxArrayDouble& a, const wxArrayDouble& b)
|
||||
if ( fabs(a[i] - b[i]) > 0.0000000001 )
|
||||
{
|
||||
//wxLogDebug(wxT("%f != %f"),a[i],b[i]);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
WX_PG_IMPLEMENT_VARIANT_DATA_DUMMY_EQ(wxArrayDouble)
|
||||
|
@@ -626,7 +626,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
pgman->SetPropertyValue(wxT("StringProperty"),wxT("Text1"));
|
||||
pgman->SetPropertyValue(wxT("IntProperty"),1024);
|
||||
pgman->SetPropertyValue(wxT("FloatProperty"),1024.0000000001);
|
||||
pgman->SetPropertyValue(wxT("BoolProperty"),FALSE);
|
||||
pgman->SetPropertyValue(wxT("BoolProperty"),false);
|
||||
pgman->SetPropertyValue(wxT("EnumProperty"),120);
|
||||
pgman->SetPropertyValue(wxT("ArrayStringProperty"),test_arrstr_1);
|
||||
wxColour emptyCol;
|
||||
@@ -648,7 +648,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
RT_FAILURE();
|
||||
if ( pg->GetPropertyValueAsDouble(wxT("FloatProperty")) != 1024.0000000001 )
|
||||
RT_FAILURE();
|
||||
if ( pg->GetPropertyValueAsBool(wxT("BoolProperty")) != FALSE )
|
||||
if ( pg->GetPropertyValueAsBool(wxT("BoolProperty")) != false )
|
||||
RT_FAILURE();
|
||||
if ( pg->GetPropertyValueAsLong(wxT("EnumProperty")) != 120 )
|
||||
RT_FAILURE();
|
||||
@@ -678,7 +678,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
pg->SetPropertyValue(wxT("StringProperty"),wxT("Text2"));
|
||||
pg->SetPropertyValue(wxT("IntProperty"),512);
|
||||
pg->SetPropertyValue(wxT("FloatProperty"),512.0);
|
||||
pg->SetPropertyValue(wxT("BoolProperty"),TRUE);
|
||||
pg->SetPropertyValue(wxT("BoolProperty"),true);
|
||||
pg->SetPropertyValue(wxT("EnumProperty"),80);
|
||||
pg->SetPropertyValue(wxT("ArrayStringProperty"),test_arrstr_2);
|
||||
pg->SetPropertyValue(wxT("ColourProperty"),(wxObject*)wxWHITE);
|
||||
@@ -699,7 +699,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
RT_FAILURE();
|
||||
if ( pgman->GetPropertyValueAsDouble(wxT("FloatProperty")) != 512.0 )
|
||||
RT_FAILURE();
|
||||
if ( pgman->GetPropertyValueAsBool(wxT("BoolProperty")) != TRUE )
|
||||
if ( pgman->GetPropertyValueAsBool(wxT("BoolProperty")) != true )
|
||||
RT_FAILURE();
|
||||
if ( pgman->GetPropertyValueAsLong(wxT("EnumProperty")) != 80 )
|
||||
RT_FAILURE();
|
||||
@@ -1139,7 +1139,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
{
|
||||
RT_START_TEST(SetPropertyBackgroundColour)
|
||||
wxCommandEvent evt;
|
||||
evt.SetInt(1); // IsChecked() will return TRUE.
|
||||
evt.SetInt(1); // IsChecked() will return true.
|
||||
evt.SetId(ID_COLOURSCHEME4);
|
||||
OnCatColours(evt);
|
||||
OnColourScheme(evt);
|
||||
|
Reference in New Issue
Block a user