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_
19 ////@begin control identifiers
20 #define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
21 #define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE _("wxRichTextStylePage")
22 #define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
23 #define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
24 #define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
25 ////@end control identifiers
28 * wxRichTextStylePage class declaration
31 class wxRichTextStylePage
: public wxPanel
33 DECLARE_DYNAMIC_CLASS( wxRichTextStylePage
)
38 wxRichTextStylePage( );
39 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
);
42 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
);
44 /// Initialise members
47 /// Creates the controls and sizers
48 void CreateControls();
50 /// Transfer data from/to window
51 virtual bool TransferDataFromWindow();
52 virtual bool TransferDataToWindow();
54 /// Gets the attributes associated with the main formatting dialog
55 wxTextAttrEx
* GetAttributes();
57 ////@begin wxRichTextStylePage event handler declarations
59 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
60 void OnNextStyleUpdate( wxUpdateUIEvent
& event
);
62 ////@end wxRichTextStylePage event handler declarations
64 ////@begin wxRichTextStylePage member function declarations
66 /// Retrieves bitmap resources
67 wxBitmap
GetBitmapResource( const wxString
& name
);
69 /// Retrieves icon resources
70 wxIcon
GetIconResource( const wxString
& name
);
71 ////@end wxRichTextStylePage member function declarations
73 /// Should we show tooltips?
74 static bool ShowToolTips();
76 ////@begin wxRichTextStylePage member variables
77 wxTextCtrl
* m_styleName
;
78 wxComboBox
* m_basedOn
;
79 wxComboBox
* m_nextStyle
;
80 /// Control identifiers
82 ID_RICHTEXTSTYLEPAGE
= 10403,
83 ID_RICHTEXTSTYLEPAGE_STYLE_NAME
= 10404,
84 ID_RICHTEXTSTYLEPAGE_BASED_ON
= 10405,
85 ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
= 10406
87 ////@end wxRichTextStylePage member variables
91 // _RICHTEXTSTYLEPAGE_H_