]> git.saurik.com Git - wxWidgets.git/blame - src/os2/gdiobj.cpp
fix printf() argument type in GetOsInfo()
[wxWidgets.git] / src / os2 / gdiobj.cpp
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
f6630099 2// Name: src/os2/gdiobj.cpp
0e320a79
DW
3// Purpose: wxGDIObject class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
f6630099 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
0371a691 12#include "wx/wxprec.h"
0e320a79
DW
13
14#include "wx/gdiobj.h"
48a1108e
WS
15
16#ifndef WX_PRECOMP
17 #include "wx/font.h"
dd05139a 18 #include "wx/gdicmn.h"
48a1108e
WS
19#endif
20
0e320a79 21IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject)
0e320a79 22
f516d986
VZ
23class wxStockGDIPM: public wxStockGDI
24{
25public:
26 wxStockGDIPM();
27
28 virtual const wxFont* GetFont(Item item);
29
30private:
31 typedef wxStockGDI super;
32};
33
34static wxStockGDIPM gs_wxStockGDIPM_instance;
35
36wxStockGDIPM::wxStockGDIPM()
37{
38 // Override default instance
39 ms_instance = this;
40}
41
42const wxFont* wxStockGDIPM::GetFont(Item item)
43{
44 wxFont* font = wx_static_cast(wxFont*, ms_stockObject[item]);
45 if (font == NULL)
46 {
47 const int fontSize = 12;
48 switch (item)
49 {
50 case FONT_NORMAL:
51 font = new wxFont(fontSize, wxMODERN, wxNORMAL, wxBOLD);
52 break;
53 case FONT_SMALL:
54 font = new wxFont(fontSize - 4, wxSWISS, wxNORMAL, wxNORMAL);
55 break;
56 default:
57 font = wx_const_cast(wxFont*, super::GetFont(item));
58 break;
59 }
60 ms_stockObject[item] = font;
61 }
62 return font;
63}