git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62166
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/fontenum.h"
static const wxChar* gs_fp_es_family_labels[] = {
#include "wx/fontenum.h"
static const wxChar* gs_fp_es_family_labels[] = {
- wxT("Default"), wxT("Decorative"),
- wxT("Roman"), wxT("Script"),
- wxT("Swiss"), wxT("Modern"),
+ wxS("Default"), wxS("Decorative"),
+ wxS("Roman"), wxS("Script"),
+ wxS("Swiss"), wxS("Modern"),
+ wxS("Teletype"), wxS("Unknown"),
(const wxChar*) NULL
};
static long gs_fp_es_family_values[] = {
(const wxChar*) NULL
};
static long gs_fp_es_family_values[] = {
- wxDEFAULT, wxDECORATIVE,
- wxROMAN, wxSCRIPT,
- wxSWISS, wxMODERN
+ wxFONTFAMILY_DEFAULT, wxFONTFAMILY_DECORATIVE,
+ wxFONTFAMILY_ROMAN, wxFONTFAMILY_SCRIPT,
+ wxFONTFAMILY_SWISS, wxFONTFAMILY_MODERN,
+ wxFONTFAMILY_TELETYPE, wxFONTFAMILY_UNKNOWN
};
static const wxChar* gs_fp_es_style_labels[] = {
};
static const wxChar* gs_fp_es_style_labels[] = {
AddPrivateChild( new wxIntProperty( _("Point Size"),
wxS("Point Size"),(long)font.GetPointSize() ) );
AddPrivateChild( new wxIntProperty( _("Point Size"),
wxS("Point Size"),(long)font.GetPointSize() ) );
- AddPrivateChild( new wxEnumProperty(_("Family"), wxS("PointSize"),
- gs_fp_es_family_labels,gs_fp_es_family_values,
- font.GetFamily()) );
-
wxString faceName = font.GetFaceName();
// If font was not in there, add it now
if ( faceName.length() &&
wxString faceName = font.GetFaceName();
// If font was not in there, add it now
if ( faceName.length() &&
AddPrivateChild( new wxBoolProperty(_("Underlined"), wxS("Underlined"),
font.GetUnderlined()) );
AddPrivateChild( new wxBoolProperty(_("Underlined"), wxS("Underlined"),
font.GetUnderlined()) );
+
+ AddPrivateChild( new wxEnumProperty(_("Family"), wxS("PointSize"),
+ gs_fp_es_family_labels,gs_fp_es_family_values,
+ font.GetFamily()) );
}
wxFontProperty::~wxFontProperty() { }
}
wxFontProperty::~wxFontProperty() { }
wxFont font;
font << m_value;
Item(0)->SetValue( (long)font.GetPointSize() );
wxFont font;
font << m_value;
Item(0)->SetValue( (long)font.GetPointSize() );
- Item(1)->SetValue( (long)font.GetFamily() );
- Item(2)->SetValueFromString( font.GetFaceName(), wxPG_FULL_VALUE );
- Item(3)->SetValue( (long)font.GetStyle() );
- Item(4)->SetValue( (long)font.GetWeight() );
- Item(5)->SetValue( font.GetUnderlined() );
+ Item(1)->SetValueFromString( font.GetFaceName(), wxPG_FULL_VALUE );
+ Item(2)->SetValue( (long)font.GetStyle() );
+ Item(3)->SetValue( (long)font.GetWeight() );
+ Item(4)->SetValue( font.GetUnderlined() );
+ Item(5)->SetValue( (long)font.GetFamily() );
}
wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue,
}
wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue,
font.SetPointSize( childValue.GetLong() );
}
else if ( ind == 1 )
font.SetPointSize( childValue.GetLong() );
}
else if ( ind == 1 )
- {
- int fam = childValue.GetLong();
- if ( fam < wxDEFAULT ||
- fam > wxTELETYPE )
- fam = wxDEFAULT;
- font.SetFamily( fam );
- }
- else if ( ind == 2 )
{
wxString faceName;
int faceIndex = childValue.GetLong();
{
wxString faceName;
int faceIndex = childValue.GetLong();
font.SetFaceName( faceName );
}
font.SetFaceName( faceName );
}
{
int st = childValue.GetLong();
if ( st != wxFONTSTYLE_NORMAL &&
{
int st = childValue.GetLong();
if ( st != wxFONTSTYLE_NORMAL &&
st = wxFONTWEIGHT_NORMAL;
font.SetStyle( st );
}
st = wxFONTWEIGHT_NORMAL;
font.SetStyle( st );
}
{
int wt = childValue.GetLong();
if ( wt != wxFONTWEIGHT_NORMAL &&
{
int wt = childValue.GetLong();
if ( wt != wxFONTWEIGHT_NORMAL &&
wt = wxFONTWEIGHT_NORMAL;
font.SetWeight( wt );
}
wt = wxFONTWEIGHT_NORMAL;
font.SetWeight( wt );
}
{
font.SetUnderlined( childValue.GetBool() );
}
{
font.SetUnderlined( childValue.GetBool() );
}
+ else if ( ind == 5 )
+ {
+ int fam = childValue.GetLong();
+ if ( fam < wxDEFAULT ||
+ fam > wxTELETYPE )
+ fam = wxDEFAULT;
+ font.SetFamily( fam );
+ }
wxVariant newVariant;
newVariant << font;
wxVariant newVariant;
newVariant << font;