2014-08-24 01:50:11 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/font.h
|
|
|
|
// Author: Peter Most, Javier Torres, Mariano Reingart
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_QT_FONT_H_
|
|
|
|
#define _WX_QT_FONT_H_
|
|
|
|
|
2014-09-29 02:55:33 +00:00
|
|
|
class QFont;
|
2014-08-24 01:50:11 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxFont();
|
|
|
|
wxFont(const wxFontInfo& info);
|
|
|
|
wxFont(const wxString& nativeFontInfoString);
|
|
|
|
wxFont(const wxNativeFontInfo& info);
|
|
|
|
wxFont(const QFont& font);
|
|
|
|
wxFont(int size,
|
|
|
|
wxFontFamily family,
|
|
|
|
wxFontStyle style,
|
|
|
|
wxFontWeight weight,
|
|
|
|
bool underlined = false,
|
|
|
|
const wxString& face = wxEmptyString,
|
|
|
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
|
|
|
wxFont(const wxSize& pixelSize,
|
|
|
|
wxFontFamily family,
|
|
|
|
wxFontStyle style,
|
|
|
|
wxFontWeight weight,
|
|
|
|
bool underlined = false,
|
|
|
|
const wxString& face = wxEmptyString,
|
|
|
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
|
|
|
|
2018-09-13 22:05:44 +00:00
|
|
|
wxDEPRECATED_MSG("use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants")
|
2014-08-24 01:50:11 +00:00
|
|
|
wxFont(int size,
|
|
|
|
int family,
|
|
|
|
int style,
|
|
|
|
int weight,
|
|
|
|
bool underlined = false,
|
|
|
|
const wxString& face = wxEmptyString,
|
|
|
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
|
|
|
|
|
|
|
bool Create(wxSize size,
|
|
|
|
wxFontFamily family,
|
|
|
|
wxFontStyle style,
|
|
|
|
wxFontWeight weight,
|
|
|
|
bool underlined = false,
|
|
|
|
const wxString& face = wxEmptyString,
|
|
|
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
|
|
|
|
|
|
|
// accessors: get the font characteristics
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual int GetPointSize() const wxOVERRIDE;
|
2018-09-13 22:11:28 +00:00
|
|
|
virtual float GetFractionalPointSize() const wxOVERRIDE;
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual wxSize GetPixelSize() const wxOVERRIDE;
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual wxFontStyle GetStyle() const wxOVERRIDE;
|
2018-09-13 22:11:28 +00:00
|
|
|
virtual int GetNumericWeight() const wxOVERRIDE;
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual bool GetUnderlined() const wxOVERRIDE;
|
|
|
|
virtual wxString GetFaceName() const wxOVERRIDE;
|
|
|
|
virtual wxFontEncoding GetEncoding() const wxOVERRIDE;
|
|
|
|
virtual const wxNativeFontInfo *GetNativeFontInfo() const wxOVERRIDE;
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual bool GetStrikethrough() const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
// change the font characteristics
|
2018-09-13 22:11:28 +00:00
|
|
|
virtual void SetFractionalPointSize(float pointSize) wxOVERRIDE;
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual void SetPixelSize(const wxSize& pixelSize) wxOVERRIDE;
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual void SetFamily( wxFontFamily family ) wxOVERRIDE;
|
|
|
|
virtual void SetStyle( wxFontStyle style ) wxOVERRIDE;
|
2018-09-13 22:11:28 +00:00
|
|
|
virtual void SetNumericWeight(int weight) wxOVERRIDE;
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual bool SetFaceName(const wxString& facename) wxOVERRIDE;
|
|
|
|
virtual void SetUnderlined( bool underlined ) wxOVERRIDE;
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual void SetStrikethrough(bool strikethrough) wxOVERRIDE;
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual void SetEncoding(wxFontEncoding encoding) wxOVERRIDE;
|
2019-01-30 16:28:08 +00:00
|
|
|
|
2014-08-24 01:50:11 +00:00
|
|
|
wxDECLARE_COMMON_FONT_METHODS();
|
|
|
|
|
|
|
|
virtual QFont GetHandle() const;
|
2019-01-30 16:28:08 +00:00
|
|
|
|
2014-08-24 01:50:11 +00:00
|
|
|
protected:
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const wxOVERRIDE;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const wxOVERRIDE;
|
|
|
|
virtual wxFontFamily DoGetFamily() const wxOVERRIDE;
|
2019-01-09 11:17:23 +00:00
|
|
|
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxFont);
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _WX_QT_FONT_H_
|