1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtextbackgroundpage.h
4 // Author: Julian Smart
6 // Created: 13/11/2010 11:17:25
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTBACKGROUNDPAGE_H_
13 #define _RICHTEXTBACKGROUNDPAGE_H_
19 #include "wx/richtext/richtextdialogpage.h"
22 #include "wx/statline.h"
26 * Forward declarations
29 class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextColourSwatchCtrl
;
35 ////@begin control identifiers
36 #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE wxTAB_TRAVERSAL
37 #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_TITLE wxEmptyString
38 #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME ID_RICHTEXTBACKGROUNDPAGE
39 #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE wxSize(400, 300)
40 #define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION wxDefaultPosition
41 ////@end control identifiers
45 * wxRichTextBackgroundPage class declaration
48 class WXDLLIMPEXP_RICHTEXT wxRichTextBackgroundPage
: public wxRichTextDialogPage
50 DECLARE_DYNAMIC_CLASS( wxRichTextBackgroundPage
)
52 DECLARE_HELP_PROVISION()
56 wxRichTextBackgroundPage();
57 wxRichTextBackgroundPage( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE
);
60 bool Create( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE
);
63 ~wxRichTextBackgroundPage();
65 /// Initialises member variables
68 /// Creates the controls and sizers
69 void CreateControls();
71 /// Gets the attributes from the formatting dialog
72 wxRichTextAttr
* GetAttributes();
75 virtual bool TransferDataToWindow();
76 virtual bool TransferDataFromWindow();
78 /// Respond to colour swatch click
79 void OnColourSwatch(wxCommandEvent
& event
);
81 ////@begin wxRichTextBackgroundPage event handler declarations
83 ////@end wxRichTextBackgroundPage event handler declarations
85 ////@begin wxRichTextBackgroundPage member function declarations
87 /// Retrieves bitmap resources
88 wxBitmap
GetBitmapResource( const wxString
& name
);
90 /// Retrieves icon resources
91 wxIcon
GetIconResource( const wxString
& name
);
92 ////@end wxRichTextBackgroundPage member function declarations
94 /// Should we show tooltips?
95 static bool ShowToolTips();
97 ////@begin wxRichTextBackgroundPage member variables
98 wxCheckBox
* m_backgroundColourCheckBox
;
99 wxRichTextColourSwatchCtrl
* m_backgroundColourSwatch
;
100 /// Control identifiers
102 ID_RICHTEXTBACKGROUNDPAGE
= 10845,
103 ID_RICHTEXT_BACKGROUND_COLOUR_CHECKBOX
= 10846,
104 ID_RICHTEXT_BACKGROUND_COLOUR_SWATCH
= 10847
106 ////@end wxRichTextBackgroundPage member variables
110 // _RICHTEXTBACKGROUNDPAGE_H_