/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/generic/fontpickerg.h
ViewVC logotype

Annotation of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/generic/fontpickerg.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (10 years ago) by william
File MIME type: text/plain
File size: 2738 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 william 31 /////////////////////////////////////////////////////////////////////////////
2     // Name: wx/generic/fontpickerg.h
3     // Purpose: wxGenericFontButton header
4     // Author: Francesco Montorsi
5     // Modified by:
6     // Created: 14/4/2006
7     // Copyright: (c) Francesco Montorsi
8     // RCS-ID: $Id: fontpickerg.h 42999 2006-11-03 21:54:13Z VZ $
9     // Licence: wxWindows Licence
10     /////////////////////////////////////////////////////////////////////////////
11    
12     #ifndef _WX_FONTPICKER_H_
13     #define _WX_FONTPICKER_H_
14    
15     #include "wx/button.h"
16     #include "wx/cmndata.h"
17    
18     //-----------------------------------------------------------------------------
19     // wxGenericFontButton: a button which brings up a wxColourDialog
20     //-----------------------------------------------------------------------------
21    
22     #define wxFONTBTN_DEFAULT_STYLE \
23     (wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL)
24    
25     class WXDLLIMPEXP_CORE wxGenericFontButton : public wxButton,
26     public wxFontPickerWidgetBase
27     {
28     public:
29     wxGenericFontButton() {}
30     wxGenericFontButton(wxWindow *parent,
31     wxWindowID id,
32     const wxFont &initial = wxNullFont,
33     const wxPoint& pos = wxDefaultPosition,
34     const wxSize& size = wxDefaultSize,
35     long style = wxFONTBTN_DEFAULT_STYLE,
36     const wxValidator& validator = wxDefaultValidator,
37     const wxString& name = wxFontPickerWidgetNameStr)
38     {
39     Create(parent, id, initial, pos, size, style, validator, name);
40     }
41    
42     virtual ~wxGenericFontButton() {}
43    
44    
45     public: // API extensions specific for wxGenericFontButton
46    
47     // user can override this to init font data in a different way
48     virtual void InitFontData();
49    
50     // returns the font data shown in wxColourDialog
51     wxFontData *GetFontData() { return &ms_data; }
52    
53    
54     public:
55    
56     bool Create(wxWindow *parent,
57     wxWindowID id,
58     const wxFont &initial = *wxNORMAL_FONT,
59     const wxPoint& pos = wxDefaultPosition,
60     const wxSize& size = wxDefaultSize,
61     long style = wxFONTBTN_DEFAULT_STYLE,
62     const wxValidator& validator = wxDefaultValidator,
63     const wxString& name = wxFontPickerWidgetNameStr);
64    
65     void OnButtonClick(wxCommandEvent &);
66    
67    
68     protected:
69    
70     void UpdateFont();
71    
72     // the colour data shown in wxColourPickerCtrlGeneric
73     // controls. This member is static so that all colour pickers
74     // in the program share the same set of custom colours.
75     static wxFontData ms_data;
76    
77     private:
78     DECLARE_DYNAMIC_CLASS(wxGenericFontButton)
79     };
80    
81    
82     #endif // _WX_FONTPICKER_H_

  ViewVC Help
Powered by ViewVC 1.1.22