]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/font.h
Added wxCountingStream for measuring the size of streamed data
[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
10
11#ifndef __GTKFONTH__
12#define __GTKFONTH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/string.h"
21#include "wx/hash.h"
22#include "wx/gdiobj.h"
23
24//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
28class wxDC;
29class wxPaintDC;
30class wxWindow;
31
32class wxFont;
36b3b54a 33/*
c801d85f 34class wxFontNameDirectory;
36b3b54a 35*/
c801d85f
KB
36
37//-----------------------------------------------------------------------------
38// global variables
39//-----------------------------------------------------------------------------
40
36b3b54a 41/*
358fc25c 42extern wxFontNameDirectory *wxTheFontNameDirectory;
36b3b54a 43*/
9d2f3c71 44extern const wxChar* wxEmptyString;
c801d85f
KB
45
46//-----------------------------------------------------------------------------
47// wxFont
48//-----------------------------------------------------------------------------
49
8bbe427f 50class wxFont: public wxGDIObject
c801d85f
KB
51{
52 DECLARE_DYNAMIC_CLASS(wxFont)
8bbe427f 53
358fc25c
RR
54public:
55 wxFont();
56 wxFont( int pointSize, int family, int style, int weight, bool underlined = FALSE,
57 const wxString& face = wxEmptyString );
58 wxFont( const wxFont& font );
59 ~wxFont();
60 wxFont& operator = ( const wxFont& font );
f03fc89f
VZ
61 bool operator == ( const wxFont& font ) const;
62 bool operator != ( const wxFont& font ) const;
358fc25c
RR
63 bool Ok() const;
64
65 int GetPointSize() const;
66 int GetFamily() const;
358fc25c
RR
67 int GetStyle() const;
68 int GetWeight() const;
69 bool GetUnderlined() const;
70
71 void SetPointSize( int pointSize );
72 void SetFamily( int family );
73 void SetStyle( int style );
74 void SetWeight( int weight );
75 void SetFaceName( const wxString& faceName );
76 void SetUnderlined( bool underlined );
77
78 wxString GetFaceName() const;
79 wxString GetFamilyString() const;
80 wxString GetStyleString() const;
81 wxString GetWeightString() const;
82
8bbe427f 83 // implementation
358fc25c
RR
84
85 wxFont( char *xFontName );
86 void Unshare();
8bbe427f 87
358fc25c 88 GdkFont* GetInternalFont(float scale = 1.0) const;
c801d85f 89
358fc25c 90 // no data :-)
c801d85f
KB
91};
92
36b3b54a 93/*
c801d85f
KB
94//-----------------------------------------------------------------------------
95// wxFontDirectory
96//-----------------------------------------------------------------------------
97
8bbe427f 98class wxFontNameDirectory: public wxObject
c801d85f
KB
99{
100 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
8bbe427f 101
c801d85f 102 public:
8bbe427f 103 wxFontNameDirectory();
c801d85f
KB
104 ~wxFontNameDirectory();
105
8bbe427f 106 void Initialize();
c801d85f
KB
107 void Initialize(int fontid, int family, const char *name);
108
109 int FindOrCreateFontId(const char *name, int family);
110 char* GetAFMName(int fontid, int weight, int style);
111 int GetFamily(int fontid);
112 int GetFontId(const char *name);
113 char* GetFontName(int fontid);
8bbe427f 114 int GetNewFontId();
c801d85f
KB
115 char* GetPostScriptName(int fontid, int weight, int style);
116 char* GetScreenName(int fontid, int weight, int style);
8bbe427f 117
c801d85f
KB
118 class wxHashTable *table;
119 int nextFontId;
120};
36b3b54a 121*/
c801d85f 122
c801d85f 123#endif // __GTKFONTH__