git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34020
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
enum
{
// no special flags: font with default weight/slant/anti-aliasing
enum
{
// no special flags: font with default weight/slant/anti-aliasing
- wxFONTFLAG_DEFAULT = 0,
// slant flags (default: no slant)
// slant flags (default: no slant)
- wxFONTFLAG_ITALIC = 1 << 0,
- wxFONTFLAG_SLANT = 1 << 1,
+ wxFONTFLAG_ITALIC,
+ wxFONTFLAG_SLANT,
// weight flags (default: medium)
// weight flags (default: medium)
- wxFONTFLAG_LIGHT = 1 << 2,
- wxFONTFLAG_BOLD = 1 << 3,
+ wxFONTFLAG_LIGHT,
+ wxFONTFLAG_BOLD,
// anti-aliasing flag: force on or off (default: the current system default)
// anti-aliasing flag: force on or off (default: the current system default)
- wxFONTFLAG_ANTIALIASED = 1 << 4,
- wxFONTFLAG_NOT_ANTIALIASED = 1 << 5,
+ wxFONTFLAG_ANTIALIASED,
+ wxFONTFLAG_NOT_ANTIALIASED,
// underlined/strikethrough flags (default: no lines)
// underlined/strikethrough flags (default: no lines)
- wxFONTFLAG_UNDERLINED = 1 << 6,
- wxFONTFLAG_STRIKETHROUGH = 1 << 7,
+ wxFONTFLAG_UNDERLINED,
+ wxFONTFLAG_STRIKETHROUGH,
// the mask of all currently used flags
// the mask of all currently used flags
- wxFONTFLAG_MASK = wxFONTFLAG_ITALIC |
- wxFONTFLAG_SLANT |
- wxFONTFLAG_LIGHT |
- wxFONTFLAG_BOLD |
- wxFONTFLAG_ANTIALIASED |
- wxFONTFLAG_NOT_ANTIALIASED |
- wxFONTFLAG_UNDERLINED |
- wxFONTFLAG_STRIKETHROUGH
wxFont( int pointSize, int family, int style, int weight,
bool underline=false, const wxString& face = wxPyEmptyString,
wxFont( int pointSize, int family, int style, int weight,
bool underline=false, const wxString& face = wxPyEmptyString,
- wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+
~wxFont();
%RenameCtor(FontFromNativeInfo, wxFont(const wxNativeFontInfo& info));
~wxFont();
%RenameCtor(FontFromNativeInfo, wxFont(const wxNativeFontInfo& info));
return new wxFont(nfi);
}
return new wxFont(nfi);
}
- %RenameCtor(Font2, wxFont(int pointSize,
+ %RenameCtor(FFont, wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxPyEmptyString,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxPyEmptyString,
}
// There is a real ctor for this on wxMSW, but not the others, so just use
}
// There is a real ctor for this on wxMSW, but not the others, so just use
- // the factory funciton in all cases.
+ // the factory function in all cases.
%extend {
%RenameCtor(FontFromPixelSize, wxFont(const wxSize& pixelSize,
int family,
%extend {
%RenameCtor(FontFromPixelSize, wxFont(const wxSize& pixelSize,
int family,
style, weight, underlined,
face, encoding);
}
style, weight, underlined,
face, encoding);
}
+
+ %RenameCtor(FFontFromPixelSize, wxFont(const wxSize& pixelSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT))
+ {
+ return wxFontBase::New(pixelSize, family, flags, face, encoding);
+ }
static void SetDefaultEncoding(wxFontEncoding encoding);
};
static void SetDefaultEncoding(wxFontEncoding encoding);
};
+%pythoncode { Font2 = wx._deprecated(FFont, "Use `FFont` instead.") }
//---------------------------------------------------------------------------
%newgroup
//---------------------------------------------------------------------------
%newgroup