]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextfontpage.h
reverted Julian's r44600, it broke help window behavior so that it prevented apps...
[wxWidgets.git] / include / wx / richtext / richtextfontpage.h
CommitLineData
97ff49b3 1/////////////////////////////////////////////////////////////////////////////
b68603d5 2// Name: wx/richtext/richeditfontpage.h
97ff49b3
JS
3// Purpose: Font page for wxRichTextFormattingDialog
4// Author: Julian Smart
5// Modified by:
6// Created: 2006-10-02
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _RICHTEXTFONTPAGE_H_
13#define _RICHTEXTFONTPAGE_H_
14
15/*!
16 * Includes
17 */
18
19////@begin includes
20////@end includes
21
22/*!
23 * Forward declarations
24 */
25
26////@begin forward declarations
27class wxRichTextFontListBox;
28class wxRichTextColourSwatchCtrl;
29class wxRichTextFontPreviewCtrl;
30////@end forward declarations
31
32/*!
33 * Control identifiers
34 */
35
36////@begin control identifiers
2fce6547 37#define SYMBOL_WXRICHTEXTFONTPAGE_STYLE wxTAB_TRAVERSAL
97ff49b3 38#define SYMBOL_WXRICHTEXTFONTPAGE_IDNAME ID_RICHTEXTFONTPAGE
2fce6547 39#define SYMBOL_WXRICHTEXTFONTPAGE_SIZE wxSize(200, 100)
97ff49b3
JS
40#define SYMBOL_WXRICHTEXTFONTPAGE_POSITION wxDefaultPosition
41////@end control identifiers
42
43/*!
44 * wxRichTextFontPage class declaration
45 */
46
47class WXDLLIMPEXP_RICHTEXT wxRichTextFontPage: public wxPanel
48{
49 DECLARE_DYNAMIC_CLASS( wxRichTextFontPage )
50 DECLARE_EVENT_TABLE()
51
52public:
53 /// Constructors
54 wxRichTextFontPage( );
8871035d 55 wxRichTextFontPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
97ff49b3
JS
56
57 /// Initialise members
58 void Init();
59
60 /// Creation
8871035d 61 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
97ff49b3
JS
62
63 /// Creates the controls and sizers
64 void CreateControls();
65
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
69
70 /// Updates the font preview
71 void UpdatePreview();
72
73 void OnFaceListBoxSelected( wxCommandEvent& event );
74 void OnColourClicked( wxCommandEvent& event );
75
76 /// Gets the attributes associated with the main formatting dialog
44cc96a8 77 wxTextAttr* GetAttributes();
97ff49b3
JS
78
79////@begin wxRichTextFontPage event handler declarations
80
81 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL
82 void OnFaceTextCtrlUpdated( wxCommandEvent& event );
83
84 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL
85 void OnSizeTextCtrlUpdated( wxCommandEvent& event );
86
87 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX
88 void OnSizeListBoxSelected( wxCommandEvent& event );
89
90 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_STYLECTRL
91 void OnStyleCtrlSelected( wxCommandEvent& event );
92
93 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL
94 void OnWeightCtrlSelected( wxCommandEvent& event );
95
96 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL
97 void OnUnderliningCtrlSelected( wxCommandEvent& event );
98
42688aea
JS
99 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL
100 void OnStrikethroughctrlClick( wxCommandEvent& event );
101
102 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL
103 void OnCapsctrlClick( wxCommandEvent& event );
104
97ff49b3
JS
105////@end wxRichTextFontPage event handler declarations
106
107////@begin wxRichTextFontPage member function declarations
108
109 /// Retrieves bitmap resources
110 wxBitmap GetBitmapResource( const wxString& name );
111
112 /// Retrieves icon resources
113 wxIcon GetIconResource( const wxString& name );
114////@end wxRichTextFontPage member function declarations
115
116 /// Should we show tooltips?
117 static bool ShowToolTips();
118
119////@begin wxRichTextFontPage member variables
120 wxTextCtrl* m_faceTextCtrl;
121 wxRichTextFontListBox* m_faceListBox;
122 wxTextCtrl* m_sizeTextCtrl;
123 wxListBox* m_sizeListBox;
124 wxComboBox* m_styleCtrl;
125 wxComboBox* m_weightCtrl;
126 wxComboBox* m_underliningCtrl;
127 wxRichTextColourSwatchCtrl* m_colourCtrl;
42688aea
JS
128 wxCheckBox* m_strikethroughCtrl;
129 wxCheckBox* m_capitalsCtrl;
97ff49b3
JS
130 wxRichTextFontPreviewCtrl* m_previewCtrl;
131 /// Control identifiers
132 enum {
133 ID_RICHTEXTFONTPAGE = 10000,
134 ID_RICHTEXTFONTPAGE_FACETEXTCTRL = 10001,
135 ID_RICHTEXTFONTPAGE_FACELISTBOX = 10002,
136 ID_RICHTEXTFONTPAGE_SIZETEXTCTRL = 10005,
137 ID_RICHTEXTFONTPAGE_SIZELISTBOX = 10006,
138 ID_RICHTEXTFONTPAGE_STYLECTRL = 10007,
139 ID_RICHTEXTFONTPAGE_WEIGHTCTRL = 10004,
140 ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL = 10008,
141 ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
42688aea
JS
142 ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
143 ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,
97ff49b3
JS
144 ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10003
145 };
146////@end wxRichTextFontPage member variables
147
148 bool m_dontUpdate;
149 bool m_colourPresent;
150};
151
152#endif
153 // _RICHTEXTFONTPAGE_H_