1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtextstylepage.h
4 // Author: Julian Smart
6 // Created: 10/5/2006 11:34:55 AM
8 // Copyright: (c) Julian Smart
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
46 #define wxCLOSE_BOX 0x1000
50 * wxRichTextStylePage class declaration
53 class wxRichTextStylePage
: public wxPanel
55 DECLARE_DYNAMIC_CLASS( wxRichTextStylePage
)
60 wxRichTextStylePage( );
61 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
);
64 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
);
66 /// Initialise members
69 /// Creates the controls and sizers
70 void CreateControls();
72 /// Transfer data from/to window
73 virtual bool TransferDataFromWindow();
74 virtual bool TransferDataToWindow();
76 /// Gets the attributes associated with the main formatting dialog
77 wxTextAttrEx
* GetAttributes();
79 ////@begin wxRichTextStylePage event handler declarations
81 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
82 void OnNextStyleUpdate( wxUpdateUIEvent
& event
);
84 ////@end wxRichTextStylePage event handler declarations
86 ////@begin wxRichTextStylePage member function declarations
88 /// Retrieves bitmap resources
89 wxBitmap
GetBitmapResource( const wxString
& name
);
91 /// Retrieves icon resources
92 wxIcon
GetIconResource( const wxString
& name
);
93 ////@end wxRichTextStylePage member function declarations
95 /// Should we show tooltips?
96 static bool ShowToolTips();
98 ////@begin wxRichTextStylePage member variables
99 wxTextCtrl
* m_styleName
;
100 wxComboBox
* m_basedOn
;
101 wxComboBox
* m_nextStyle
;
102 /// Control identifiers
104 ID_RICHTEXTSTYLEPAGE
= 10403,
105 ID_RICHTEXTSTYLEPAGE_STYLE_NAME
= 10404,
106 ID_RICHTEXTSTYLEPAGE_BASED_ON
= 10405,
107 ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
= 10406
109 ////@end wxRichTextStylePage member variables
113 // _RICHTEXTSTYLEPAGE_H_