X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..9b61f868b597a84fd3c589b2e8539624c491f86b:/include/wx/msw/font.h?ds=inline diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index 5c1f7dc6b0..a7a6609d2f 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __FONTH__ -#define __FONTH__ +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ #ifdef __GNUG__ #pragma interface "font.h" @@ -25,6 +25,7 @@ class WXDLLEXPORT wxFontRefData: public wxGDIRefData friend class WXDLLEXPORT wxFont; public: wxFontRefData(void); + wxFontRefData(const wxFontRefData& data); ~wxFontRefData(void); protected: bool m_temporary; // If TRUE, the pointer to the actual font @@ -43,7 +44,7 @@ protected: #define M_FONTDATA ((wxFontRefData *)m_refData) -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; +WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // Font class WXDLLEXPORT wxFont: public wxGDIObject @@ -53,7 +54,6 @@ public: wxFont(void); wxFont(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString); inline wxFont(const wxFont& font) { Ref(font); } - inline wxFont(const wxFont* font) { /* UnRef(); */ if (font) Ref(*font); } ~wxFont(void); @@ -68,7 +68,7 @@ public: virtual bool ReleaseResource(void); */ - virtual bool IsFree(void); + virtual bool IsFree() const; virtual bool Ok(void) const { return (m_refData != NULL) ; } inline int GetPointSize(void) const { return M_FONTDATA->m_pointSize; } @@ -89,10 +89,13 @@ public: void SetFaceName(const wxString& faceName); void SetUnderlined(bool underlined); - inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } - inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; } - inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; } + wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; } + bool operator == (const wxFont& font) const { return m_refData == font.m_refData; } + bool operator != (const wxFont& font) const { return m_refData != font.m_refData; } + +protected: + void Unshare(); }; #endif - // __FONTH__ + // _WX_FONT_H_