/////////////////////////////////////////////////////////////////////////////
-// Name: font.h
+// Name: wx/os2/font.h
// Purpose: wxFont class
// Author: David Webster
// Modified by:
{
public:
// ctors and such
- wxFont() { Init(); }
- wxFont(const wxFont& rFont) { Init(); Ref(rFont); }
+ wxFont() { }
wxFont( int nSize
,int nFamily
,wxFontEncoding vEncoding = wxFONTENCODING_DEFAULT
)
{
- Init();
-
(void)Create( nSize
,nFamily
,nStyle
)
{
- Init();
-
(void)Create( rInfo
,hFont
);
virtual ~wxFont();
- //
- // Assignment
- //
- wxFont& operator=(const wxFont& rFont);
-
//
// Implement base class pure virtuals
//
virtual void SetFamily(int nFamily);
virtual void SetStyle(int nStyle);
virtual void SetWeight(int nWeight);
- virtual void SetFaceName(const wxString& rsFaceName);
+ virtual bool SetFaceName(const wxString& rsFaceName);
virtual void SetUnderlined(bool bUnderlined);
virtual void SetEncoding(wxFontEncoding vEncoding);
//
virtual bool IsFree(void) const;
virtual bool RealizeResource(void);
- virtual WXHANDLE GetResourceHandle(void);
+ virtual WXHANDLE GetResourceHandle(void) const;
virtual bool FreeResource(bool bForce = false);
WXHFONT GetHFONT(void) const;
protected:
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& rInfo);
- //
- // Common part of all ctors
- //
- void Init(void);
- void Unshare(void);
+ // implement wxObject virtuals which are used by AllocExclusive()
+ virtual wxGDIRefData *CreateGDIRefData() const;
+ virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
private:
DECLARE_DYNAMIC_CLASS(wxFont)