X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/97ff49b3834325cfe53813aeb53d326d7661f184..bb8204ef8236a9d1f39516832947ea4081f22146:/include/wx/richtext/richtextformatdlg.h diff --git a/include/wx/richtext/richtextformatdlg.h b/include/wx/richtext/richtextformatdlg.h index 234594ddb8..279231699e 100644 --- a/include/wx/richtext/richtextformatdlg.h +++ b/include/wx/richtext/richtextformatdlg.h @@ -21,6 +21,8 @@ #if wxUSE_RICHTEXT #include "wx/propdlg.h" +#include "wx/bookctrl.h" + #if wxUSE_HTML #include "wx/htmllbox.h" #endif @@ -28,11 +30,11 @@ #include "wx/richtext/richtextbuffer.h" #include "wx/richtext/richtextstyles.h" -class WXDLLEXPORT wxNotebookEvent; class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog; +class WXDLLIMPEXP_CORE wxImageList; /*! - * Flags determining the pages to be created in the dialog + * Flags determining the pages and buttons to be created in the dialog */ #define wxRICHTEXT_FORMAT_STYLE_EDITOR 0x0001 @@ -40,6 +42,9 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog; #define wxRICHTEXT_FORMAT_TABS 0x0004 #define wxRICHTEXT_FORMAT_BULLETS 0x0008 #define wxRICHTEXT_FORMAT_INDENTS_SPACING 0x0010 +#define wxRICHTEXT_FORMAT_LIST_STYLE 0x0020 + +#define wxRICHTEXT_FORMAT_HELP_BUTTON 0x0100 /*! * Shorthand for common combinations of pages @@ -108,7 +113,7 @@ public: void Init(); - bool Create(long flags, wxWindow* parent, const wxString& title, wxWindowID id, + bool Create(long flags, wxWindow* parent, const wxString& title = _("Formatting"), wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE); @@ -144,7 +149,10 @@ public: /// Apply the styles when a different tab is selected, so the previews are /// up to date - void OnTabChanged(wxNotebookEvent& event); + void OnTabChanged(wxBookCtrlEvent& event); + + /// Respond to help command + void OnHelp(wxCommandEvent& event); /// Set/get image list void SetImageList(wxImageList* imageList) { m_imageList = imageList; } @@ -163,14 +171,25 @@ public: /// Helper for pages to get the style static wxRichTextStyleDefinition* GetDialogStyleDefinition(wxWindow* win); + /// Should we show tooltips? + static bool ShowToolTips() { return sm_showToolTips; } + + /// Determines whether tooltips will be shown + static void SetShowToolTips(bool show) { sm_showToolTips = show; } + + /// Map book control page index to our page id + void AddPageId(int id) { m_pageIds.Add(id); } + protected: wxImageList* m_imageList; wxTextAttrEx m_attributes; wxRichTextStyleDefinition* m_styleDefinition; wxRichTextStyleSheet* m_styleSheet; + wxArrayInt m_pageIds; // mapping of book control indexes to page ids static wxRichTextFormattingDialogFactory* ms_FormattingDialogFactory; + static bool sm_showToolTips; DECLARE_EVENT_TABLE() }; @@ -204,7 +223,6 @@ public: wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); ~wxRichTextColourSwatchCtrl(); - void OnPaint(wxPaintEvent& event); void OnMouseEvent(wxMouseEvent& event); void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); } @@ -277,4 +295,3 @@ private: #endif // _WX_RICHTEXTFORMATDLG_H_ -