1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextstylepage.h
4 // Author: Julian Smart
6 // Created: 10/5/2006 11:34:55 AM
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTSTYLEPAGE_H_
13 #define _RICHTEXTSTYLEPAGE_H_
23 * Forward declarations
26 ////@begin forward declarations
27 ////@end forward declarations
33 ////@begin control identifiers
34 #define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
35 #define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE _("wxRichTextStylePage")
36 #define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
37 #define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
38 #define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
39 ////@end control identifiers
42 * wxRichTextStylePage class declaration
45 class wxRichTextStylePage
: public wxPanel
47 DECLARE_DYNAMIC_CLASS( wxRichTextStylePage
)
52 wxRichTextStylePage( );
53 wxRichTextStylePage( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE
);
56 bool Create( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE
);
58 /// Initialise members
61 /// Creates the controls and sizers
62 void CreateControls();
64 /// Transfer data from/to window
65 virtual bool TransferDataFromWindow();
66 virtual bool TransferDataToWindow();
68 /// Gets the attributes associated with the main formatting dialog
69 wxTextAttrEx
* GetAttributes();
71 ////@begin wxRichTextStylePage event handler declarations
73 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
74 void OnNextStyleUpdate( wxUpdateUIEvent
& event
);
76 ////@end wxRichTextStylePage event handler declarations
78 ////@begin wxRichTextStylePage member function declarations
80 /// Retrieves bitmap resources
81 wxBitmap
GetBitmapResource( const wxString
& name
);
83 /// Retrieves icon resources
84 wxIcon
GetIconResource( const wxString
& name
);
85 ////@end wxRichTextStylePage member function declarations
87 /// Should we show tooltips?
88 static bool ShowToolTips();
90 ////@begin wxRichTextStylePage member variables
91 wxTextCtrl
* m_styleName
;
92 wxComboBox
* m_basedOn
;
93 wxComboBox
* m_nextStyle
;
94 /// Control identifiers
96 ID_RICHTEXTSTYLEPAGE
= 10403,
97 ID_RICHTEXTSTYLEPAGE_STYLE_NAME
= 10404,
98 ID_RICHTEXTSTYLEPAGE_BASED_ON
= 10405,
99 ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
= 10406
101 ////@end wxRichTextStylePage member variables
105 // _RICHTEXTSTYLEPAGE_H_