1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Julian Smart
5 // Copyright: (c) Julian Smart
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_FONTDATA_H_
10 #define _WX_FONTDATA_H_
13 #include "wx/colour.h"
14 #include "wx/encinfo.h"
16 class WXDLLIMPEXP_CORE wxFontData
: public wxObject
20 virtual ~wxFontData();
22 wxFontData(const wxFontData
& data
);
23 wxFontData
& operator=(const wxFontData
& data
);
25 void SetAllowSymbols(bool flag
) { m_allowSymbols
= flag
; }
26 bool GetAllowSymbols() const { return m_allowSymbols
; }
28 void SetColour(const wxColour
& colour
) { m_fontColour
= colour
; }
29 const wxColour
& GetColour() const { return m_fontColour
; }
31 void SetShowHelp(bool flag
) { m_showHelp
= flag
; }
32 bool GetShowHelp() const { return m_showHelp
; }
34 void EnableEffects(bool flag
) { m_enableEffects
= flag
; }
35 bool GetEnableEffects() const { return m_enableEffects
; }
37 void SetInitialFont(const wxFont
& font
) { m_initialFont
= font
; }
38 wxFont
GetInitialFont() const { return m_initialFont
; }
40 void SetChosenFont(const wxFont
& font
) { m_chosenFont
= font
; }
41 wxFont
GetChosenFont() const { return m_chosenFont
; }
43 void SetRange(int minRange
, int maxRange
) { m_minSize
= minRange
; m_maxSize
= maxRange
; }
45 // encoding info is split into 2 parts: the logical wxWin encoding
46 // (wxFontEncoding) and a structure containing the native parameters for
47 // it (wxNativeEncodingInfo)
48 wxFontEncoding
GetEncoding() const { return m_encoding
; }
49 void SetEncoding(wxFontEncoding encoding
) { m_encoding
= encoding
; }
51 wxNativeEncodingInfo
& EncodingInfo() { return m_encodingInfo
; }
54 // public for backwards compatibility only: don't use directly
55 wxColour m_fontColour
;
65 wxFontEncoding m_encoding
;
66 wxNativeEncodingInfo m_encodingInfo
;
68 DECLARE_DYNAMIC_CLASS(wxFontData
)
71 #endif // _WX_FONTDATA_H_