use wxNullFont instead of *wxNORMAL_FONT as default parameter for wxFontPickerCtrl/Widget, this fixes compilation with gcc 2.95 and possibly other old compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,7 +64,7 @@ user's input is valid, i.e. recognizable). }
|
|||||||
|
|
||||||
\func{}{wxFontPickerCtrl}{\param{wxWindow *}{parent},\rtfsp
|
\func{}{wxFontPickerCtrl}{\param{wxWindow *}{parent},\rtfsp
|
||||||
\param{wxWindowID}{ id},\rtfsp
|
\param{wxWindowID}{ id},\rtfsp
|
||||||
\param{const wxFont\& }{font = *wxNORMAL\_FONT},\rtfsp
|
\param{const wxFont\& }{font = wxNullFont},\rtfsp
|
||||||
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||||
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||||
\param{long}{ style = wxFNTP\_DEFAULT\_STYLE},\rtfsp
|
\param{long}{ style = wxFNTP\_DEFAULT\_STYLE},\rtfsp
|
||||||
@@ -79,7 +79,7 @@ all the parameters.
|
|||||||
|
|
||||||
\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp
|
\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp
|
||||||
\param{wxWindowID}{ id},\rtfsp
|
\param{wxWindowID}{ id},\rtfsp
|
||||||
\param{const wxFont\& }{font = *wxNORMAL\_FONT},\rtfsp
|
\param{const wxFont\& }{font = wxNullFont},\rtfsp
|
||||||
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||||
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||||
\param{long}{ style = wxFNTP\_DEFAULT\_STYLE},\rtfsp
|
\param{long}{ style = wxFNTP\_DEFAULT\_STYLE},\rtfsp
|
||||||
@@ -92,7 +92,8 @@ all the parameters.
|
|||||||
|
|
||||||
\docparam{id}{The identifier for the control.}
|
\docparam{id}{The identifier for the control.}
|
||||||
|
|
||||||
\docparam{font}{The initial font shown in the control.}
|
\docparam{font}{The initial font shown in the control. The default
|
||||||
|
\texttt{wxNORMAL\_FONT} value means to use the default font.}
|
||||||
|
|
||||||
\docparam{pos}{Initial position.}
|
\docparam{pos}{Initial position.}
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ public:
|
|||||||
|
|
||||||
wxFontPickerCtrl(wxWindow *parent,
|
wxFontPickerCtrl(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxFont& initial = *wxNORMAL_FONT,
|
const wxFont& initial = wxNullFont,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxFNTP_DEFAULT_STYLE,
|
long style = wxFNTP_DEFAULT_STYLE,
|
||||||
@@ -121,7 +121,7 @@ public:
|
|||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxFont& initial = *wxNORMAL_FONT,
|
const wxFont& initial = wxNullFont,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxFNTP_DEFAULT_STYLE,
|
long style = wxFNTP_DEFAULT_STYLE,
|
||||||
|
@@ -29,7 +29,7 @@ public:
|
|||||||
wxGenericFontButton() {}
|
wxGenericFontButton() {}
|
||||||
wxGenericFontButton(wxWindow *parent,
|
wxGenericFontButton(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxFont &initial = *wxNORMAL_FONT,
|
const wxFont &initial = wxNullFont,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxFONTBTN_DEFAULT_STYLE,
|
long style = wxFONTBTN_DEFAULT_STYLE,
|
||||||
|
@@ -27,7 +27,7 @@ public:
|
|||||||
wxFontButton() {}
|
wxFontButton() {}
|
||||||
wxFontButton(wxWindow *parent,
|
wxFontButton(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxFont& initial = *wxNORMAL_FONT,
|
const wxFont& initial = wxNullFont,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxFONTBTN_DEFAULT_STYLE,
|
long style = wxFONTBTN_DEFAULT_STYLE,
|
||||||
@@ -44,7 +44,7 @@ public: // overrides
|
|||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxFont& initial = *wxNORMAL_FONT,
|
const wxFont& initial = wxNullFont,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxFONTBTN_DEFAULT_STYLE,
|
long style = wxFONTBTN_DEFAULT_STYLE,
|
||||||
|
@@ -58,7 +58,9 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id,
|
|||||||
long style, const wxValidator& validator,
|
long style, const wxValidator& validator,
|
||||||
const wxString &name )
|
const wxString &name )
|
||||||
{
|
{
|
||||||
if (!wxPickerBase::CreateBase(parent, id, Font2String(initial),
|
if (!wxPickerBase::CreateBase(parent, id,
|
||||||
|
Font2String(initial.IsOk() ? initial
|
||||||
|
: *wxNORMAL_FONT),
|
||||||
pos, size, style, validator, name))
|
pos, size, style, validator, name))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
|
|
||||||
m_selectedFont = initial;
|
m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
|
||||||
UpdateFont();
|
UpdateFont();
|
||||||
InitFontData();
|
InitFontData();
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
m_widget = gtk_font_button_new();
|
m_widget = gtk_font_button_new();
|
||||||
|
|
||||||
// set initial font
|
// set initial font
|
||||||
m_selectedFont = initial;
|
m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
|
||||||
UpdateFont();
|
UpdateFont();
|
||||||
|
|
||||||
// honour the fontbutton styles
|
// honour the fontbutton styles
|
||||||
|
Reference in New Issue
Block a user