// Created: 2006-03-05
// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wx.h"
#endif
+#include "wx/fontdlg.h"
+
// -----------------------------------------------------------------------
// Custom version of wxFontProperty that also holds colour in the value.
// Original version by Vladimir Vainer.
-#include <wx/fontdlg.h>
-
IMPLEMENT_VARIANT_OBJECT_SHALLOWCMP(wxFontData)
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFontDataProperty,wxFontProperty,
Item(6)->SetValue( variant );
}
-void wxFontDataProperty::ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const
+wxVariant wxFontDataProperty::ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const
{
wxFontData fontData;
fontData << thisValue;
fontData.SetChosenFont(font);
}
- thisValue << fontData;
+ wxVariant newVariant;
+ newVariant << fontData;
+ return newVariant;
}
// -----------------------------------------------------------------------
Item(1)->SetValue( (long)size.y );
}
-void wxSizeProperty::ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const
+wxVariant wxSizeProperty::ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const
{
wxSize& size = wxSizeRefFromVariant(thisValue);
- int val = wxPGVariantToInt(childValue);
+ int val = childValue.GetLong();
switch ( childIndex )
{
case 0: size.x = val; break;
case 1: size.y = val; break;
}
+ wxVariant newVariant;
+ newVariant << size;
+ return newVariant;
}
// -----------------------------------------------------------------------
Item(1)->SetValue( (long)point.y );
}
-void wxPointProperty::ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const
+wxVariant wxPointProperty::ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const
{
wxPoint& point = wxPointRefFromVariant(thisValue);
- int val = wxPGVariantToInt(childValue);
+ int val = childValue.GetLong();
switch ( childIndex )
{
case 0: point.x = val; break;
case 1: point.y = val; break;
}
+ wxVariant newVariant;
+ newVariant << point;
+ return newVariant;
}
// Dirs Property
// -----------------------------------------------------------------------
-WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(wxDirsProperty,wxT(','),wxT("Browse"))
+WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(wxDirsProperty, ',',
+ "Browse")
#if wxUSE_VALIDATORS
// by replacing each ArrayDouble with ArrayXXX.
//
-class wxArrayDoubleEditorDialog : public wxArrayEditorDialog
+class wxArrayDoubleEditorDialog : public wxPGArrayEditorDialog
{
public:
wxArrayDoubleEditorDialog();
DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayDoubleEditorDialog)
};
-IMPLEMENT_DYNAMIC_CLASS(wxArrayDoubleEditorDialog, wxArrayEditorDialog)
+IMPLEMENT_DYNAMIC_CLASS(wxArrayDoubleEditorDialog, wxPGArrayEditorDialog)
//
// Array dialog array access and manipulation
//
wxArrayDoubleEditorDialog::wxArrayDoubleEditorDialog()
- : wxArrayEditorDialog()
+ : wxPGArrayEditorDialog()
{
Init();
}
void wxArrayDoubleEditorDialog::Init()
{
- wxArrayEditorDialog::Init();
+ wxPGArrayEditorDialog::Init();
SetPrecision(-1);
}
long style,
const wxPoint& pos,
const wxSize& sz )
- : wxArrayEditorDialog()
+ : wxPGArrayEditorDialog()
{
Init();
Create(parent,message,caption,array,style,pos,sz);
m_array = array;
- return wxArrayEditorDialog::Create (parent,message,caption,style,pos,sz);
+ return wxPGArrayEditorDialog::Create (parent,message,caption,style,pos,sz);
}
// -----------------------------------------------------------------------
WX_PG_TOKENIZER1_BEGIN(text,delimiter)
- if ( token.length() )
+ if ( !token.empty() )
{
// If token was invalid, exit the loop now