1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextstylepage.h
4 // Author: Julian Smart
6 // Created: 10/5/2006 11:34:55 AM
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _RICHTEXTSTYLEPAGE_H_
12 #define _RICHTEXTSTYLEPAGE_H_
14 #include "wx/richtext/richtextdialogpage.h"
20 ////@begin control identifiers
21 #define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
22 #define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE wxEmptyString
23 #define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
24 #define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
25 #define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
26 ////@end control identifiers
29 * wxRichTextStylePage class declaration
32 class WXDLLIMPEXP_RICHTEXT wxRichTextStylePage
: public wxRichTextDialogPage
34 DECLARE_DYNAMIC_CLASS( wxRichTextStylePage
)
36 DECLARE_HELP_PROVISION()
40 wxRichTextStylePage( );
41 wxRichTextStylePage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE
);
44 bool Create( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE
);
46 /// Initialise members
49 /// Creates the controls and sizers
50 void CreateControls();
52 /// Transfer data from/to window
53 virtual bool TransferDataFromWindow();
54 virtual bool TransferDataToWindow();
56 /// Gets the attributes associated with the main formatting dialog
57 wxRichTextAttr
* GetAttributes();
59 ////@begin wxRichTextStylePage event handler declarations
61 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
62 void OnNextStyleUpdate( wxUpdateUIEvent
& event
);
64 ////@end wxRichTextStylePage event handler declarations
66 ////@begin wxRichTextStylePage member function declarations
68 /// Retrieves bitmap resources
69 wxBitmap
GetBitmapResource( const wxString
& name
);
71 /// Retrieves icon resources
72 wxIcon
GetIconResource( const wxString
& name
);
73 ////@end wxRichTextStylePage member function declarations
75 /// Should we show tooltips?
76 static bool ShowToolTips();
78 ////@begin wxRichTextStylePage member variables
79 wxTextCtrl
* m_styleName
;
80 wxComboBox
* m_basedOn
;
81 wxComboBox
* m_nextStyle
;
82 /// Control identifiers
84 ID_RICHTEXTSTYLEPAGE
= 10403,
85 ID_RICHTEXTSTYLEPAGE_STYLE_NAME
= 10404,
86 ID_RICHTEXTSTYLEPAGE_BASED_ON
= 10405,
87 ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
= 10406
89 ////@end wxRichTextStylePage member variables
93 // _RICHTEXTSTYLEPAGE_H_