]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/font.h
typo fixed
[wxWidgets.git] / include / wx / gtk1 / font.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: font.h
3// Purpose:
4// Author: Robert Roebling
58614078 5// Id: $Id$
c801d85f 6// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8bbe427f 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKFONTH__
11#define __GTKFONTH__
12
13#ifdef __GNUG__
0c5d3e1c 14 #pragma interface
c801d85f
KB
15#endif
16
17#include "wx/defs.h"
18#include "wx/object.h"
19#include "wx/string.h"
20#include "wx/hash.h"
21#include "wx/gdiobj.h"
22
0c5d3e1c 23// ----------------------------------------------------------------------------
c801d85f 24// classes
0c5d3e1c 25// ----------------------------------------------------------------------------
c801d85f
KB
26
27class wxDC;
28class wxPaintDC;
29class wxWindow;
30
31class wxFont;
c801d85f 32
0c5d3e1c 33// ----------------------------------------------------------------------------
c801d85f 34// global variables
0c5d3e1c 35// ----------------------------------------------------------------------------
c801d85f 36
9d2f3c71 37extern const wxChar* wxEmptyString;
c801d85f 38
0c5d3e1c 39// ----------------------------------------------------------------------------
c801d85f 40// wxFont
0c5d3e1c 41// ----------------------------------------------------------------------------
c801d85f 42
0c5d3e1c 43class wxFont : public wxFontBase
c801d85f 44{
358fc25c 45public:
0c5d3e1c
VZ
46 // ctors and such
47 wxFont() { Init(); }
48 wxFont(const wxFont& font) { Init(); Ref(font); }
49
50 // assignment
51 wxFont& operator=(const wxFont& font);
52
53 wxFont(int size,
54 int family,
55 int style,
56 int weight,
57 bool underlined = FALSE,
58 const wxString& face = wxEmptyString,
59 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
60 {
61 Init();
62
63 (void)Create(size, family, style, weight, underlined, face, encoding);
64 }
65
66 bool Create(int size,
67 int family,
68 int style,
69 int weight,
70 bool underlined = FALSE,
71 const wxString& face = wxEmptyString,
72 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
73
74 ~wxFont();
75
76 // implement base class pure virtuals
77 virtual int GetPointSize() const;
78 virtual int GetFamily() const;
79 virtual int GetStyle() const;
80 virtual int GetWeight() const;
81 virtual wxString GetFaceName() const;
82 virtual bool GetUnderlined() const;
83 virtual wxFontEncoding GetEncoding() const;
84
85 virtual void SetPointSize( int pointSize );
86 virtual void SetFamily( int family );
87 virtual void SetStyle( int style );
88 virtual void SetWeight( int weight );
89 virtual void SetFaceName( const wxString& faceName );
90 virtual void SetUnderlined( bool underlined );
91 virtual void SetEncoding(wxFontEncoding encoding);
92
93 // implementation from now on
94 wxFont( GdkFont* font, char *xFontName );
95 void Unshare();
96
97 GdkFont* GetInternalFont(float scale = 1.0) const;
98
99 // no data :-)
100
101protected:
102 // common part of all ctors
103 void Init();
104
105private:
106 DECLARE_DYNAMIC_CLASS(wxFont)
c801d85f
KB
107};
108
c801d85f 109#endif // __GTKFONTH__