1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Julian Smart
4 // Copyright: (c) Julian Smart
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
8 #ifndef _WX_FONTDATA_H_
9 #define _WX_FONTDATA_H_
12 #include "wx/colour.h"
13 #include "wx/encinfo.h"
15 class WXDLLIMPEXP_CORE wxFontData
: public wxObject
19 virtual ~wxFontData();
21 wxFontData(const wxFontData
& data
);
22 wxFontData
& operator=(const wxFontData
& data
);
24 void SetAllowSymbols(bool flag
) { m_allowSymbols
= flag
; }
25 bool GetAllowSymbols() const { return m_allowSymbols
; }
27 void SetColour(const wxColour
& colour
) { m_fontColour
= colour
; }
28 const wxColour
& GetColour() const { return m_fontColour
; }
30 void SetShowHelp(bool flag
) { m_showHelp
= flag
; }
31 bool GetShowHelp() const { return m_showHelp
; }
33 void EnableEffects(bool flag
) { m_enableEffects
= flag
; }
34 bool GetEnableEffects() const { return m_enableEffects
; }
36 void SetInitialFont(const wxFont
& font
) { m_initialFont
= font
; }
37 wxFont
GetInitialFont() const { return m_initialFont
; }
39 void SetChosenFont(const wxFont
& font
) { m_chosenFont
= font
; }
40 wxFont
GetChosenFont() const { return m_chosenFont
; }
42 void SetRange(int minRange
, int maxRange
) { m_minSize
= minRange
; m_maxSize
= maxRange
; }
44 // encoding info is split into 2 parts: the logical wxWin encoding
45 // (wxFontEncoding) and a structure containing the native parameters for
46 // it (wxNativeEncodingInfo)
47 wxFontEncoding
GetEncoding() const { return m_encoding
; }
48 void SetEncoding(wxFontEncoding encoding
) { m_encoding
= encoding
; }
50 wxNativeEncodingInfo
& EncodingInfo() { return m_encodingInfo
; }
53 // public for backwards compatibility only: don't use directly
54 wxColour m_fontColour
;
64 wxFontEncoding m_encoding
;
65 wxNativeEncodingInfo m_encodingInfo
;
67 DECLARE_DYNAMIC_CLASS(wxFontData
)
70 #endif // _WX_FONTDATA_H_