1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtexttabspage.h
4 // Author: Julian Smart
6 // Created: 10/4/2006 8:03:20 AM
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTTABSPAGE_H_
13 #define _RICHTEXTTABSPAGE_H_
23 * Forward declarations
26 ////@begin forward declarations
27 ////@end forward declarations
33 ////@begin control identifiers
34 #define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
35 #define SYMBOL_WXRICHTEXTTABSPAGE_TITLE _("wxRichTextFontPage")
36 #define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
37 #define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
38 #define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
39 ////@end control identifiers
46 #define wxCLOSE_BOX 0x1000
50 * wxRichTextTabsPage class declaration
53 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage
: public wxPanel
55 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage
)
60 wxRichTextTabsPage( );
61 wxRichTextTabsPage( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTTABSPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
64 bool Create( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTTABSPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
66 /// Creates the controls and sizers
67 void CreateControls();
69 /// Initialise members
72 /// Transfer data from/to window
73 virtual bool TransferDataFromWindow();
74 virtual bool TransferDataToWindow();
76 /// Sorts the tab array
77 virtual void SortTabs();
79 /// Gets the attributes associated with the main formatting dialog
80 wxTextAttrEx
* GetAttributes();
82 ////@begin wxRichTextTabsPage event handler declarations
84 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST
85 void OnTablistSelected( wxCommandEvent
& event
);
87 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
88 void OnNewTabClick( wxCommandEvent
& event
);
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
91 void OnNewTabUpdate( wxUpdateUIEvent
& event
);
93 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
94 void OnDeleteTabClick( wxCommandEvent
& event
);
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
97 void OnDeleteTabUpdate( wxUpdateUIEvent
& event
);
99 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
100 void OnDeleteAllTabsClick( wxCommandEvent
& event
);
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
103 void OnDeleteAllTabsUpdate( wxUpdateUIEvent
& event
);
105 ////@end wxRichTextTabsPage event handler declarations
107 ////@begin wxRichTextTabsPage member function declarations
109 /// Retrieves bitmap resources
110 wxBitmap
GetBitmapResource( const wxString
& name
);
112 /// Retrieves icon resources
113 wxIcon
GetIconResource( const wxString
& name
);
114 ////@end wxRichTextTabsPage member function declarations
116 /// Should we show tooltips?
117 static bool ShowToolTips();
119 ////@begin wxRichTextTabsPage member variables
120 wxTextCtrl
* m_tabEditCtrl
;
121 wxListBox
* m_tabListCtrl
;
122 /// Control identifiers
124 ID_RICHTEXTTABSPAGE
= 10200,
125 ID_RICHTEXTTABSPAGE_TABEDIT
= 10213,
126 ID_RICHTEXTTABSPAGE_TABLIST
= 10214,
127 ID_RICHTEXTTABSPAGE_NEW_TAB
= 10201,
128 ID_RICHTEXTTABSPAGE_DELETE_TAB
= 10202,
129 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
= 10203
131 ////@end wxRichTextTabsPage member variables
137 // _RICHTEXTTABSPAGE_H_