]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/os2/private.h"
18 WXDLLIMPEXP_DATA_CORE(extern const wxChar
*) wxEmptyString
;
20 // ----------------------------------------------------------------------------
22 // ----------------------------------------------------------------------------
24 class WXDLLIMPEXP_CORE wxFont
: public wxFontBase
30 #if FUTURE_WXWIN_COMPATIBILITY_3_0
35 bool underlined
= false,
36 const wxString
& face
= wxEmptyString
,
37 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
39 (void)Create(size
, (wxFontFamily
)family
, (wxFontStyle
)style
, (wxFontWeight
)weight
, underlined
, face
, encoding
);
47 bool underlined
= false,
48 const wxString
& face
= wxEmptyString
,
49 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
51 Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
54 wxFont(const wxSize
& pixelSize
,
58 bool underlined
= false,
59 const wxString
& face
= wxEmptyString
,
60 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
62 Create(10, family
, style
, weight
, underlined
, face
, encoding
);
63 SetPixelSize(pixelSize
);
70 bool underlined
= false,
71 const wxString
& face
= wxEmptyString
,
72 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
74 wxFont( const wxNativeFontInfo
& rInfo
84 wxFont(const wxString
& rsFontDesc
);
86 bool Create( const wxNativeFontInfo
& rInfo
93 // Implement base class pure virtuals
95 virtual int GetPointSize(void) const;
96 virtual wxFontFamily
GetFamily() const;
97 virtual wxFontStyle
GetStyle() const;
98 virtual wxFontWeight
GetWeight() const;
99 virtual bool GetUnderlined(void) const;
100 virtual wxString
GetFaceName(void) const;
101 virtual wxFontEncoding
GetEncoding(void) const;
102 virtual const wxNativeFontInfo
* GetNativeFontInfo() const;
104 virtual void SetPointSize(int nPointSize
);
105 virtual void SetFamily(wxFontFamily family
);
106 virtual void SetStyle(wxFontStyle style
);
107 virtual void SetWeight(wxFontWeight weight
);
108 virtual bool SetFaceName(const wxString
& rsFaceName
);
109 virtual void SetUnderlined(bool bUnderlined
);
110 virtual void SetEncoding(wxFontEncoding vEncoding
);
112 WXDECLARE_COMPAT_SETTERS
115 // For internal use only!
118 void SetFM( PFONTMETRICS pFM
122 // Implementation only from now on
123 // -------------------------------
125 virtual bool IsFree(void) const;
126 virtual bool RealizeResource(void);
127 virtual WXHANDLE
GetResourceHandle(void) const;
128 virtual bool FreeResource(bool bForce
= false);
130 WXHFONT
GetHFONT(void) const;
133 virtual void DoSetNativeFontInfo(const wxNativeFontInfo
& rInfo
);
135 // implement wxObject virtuals which are used by AllocExclusive()
136 virtual wxGDIRefData
*CreateGDIRefData() const;
137 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
140 DECLARE_DYNAMIC_CLASS(wxFont
)
143 #endif // _WX_FONT_H_