#include "wx/richtext/richtextbuffer.h"
#include "wx/richtext/richtextstyles.h"
-class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog;
-class WXDLLIMPEXP_CORE wxImageList;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextFormattingDialog;
+class WXDLLIMPEXP_FWD_CORE wxImageList;
/*!
* Flags determining the pages and buttons to be created in the dialog
#define wxRICHTEXT_FORMAT_HELP_BUTTON 0x0100
+/*!
+ * Indices for bullet styles in list control
+ */
+
+enum {
+ wxRICHTEXT_BULLETINDEX_NONE = 0,
+ wxRICHTEXT_BULLETINDEX_ARABIC,
+ wxRICHTEXT_BULLETINDEX_UPPER_CASE,
+ wxRICHTEXT_BULLETINDEX_LOWER_CASE,
+ wxRICHTEXT_BULLETINDEX_UPPER_CASE_ROMAN,
+ wxRICHTEXT_BULLETINDEX_LOWER_CASE_ROMAN,
+ wxRICHTEXT_BULLETINDEX_OUTLINE,
+ wxRICHTEXT_BULLETINDEX_SYMBOL,
+ wxRICHTEXT_BULLETINDEX_BITMAP,
+ wxRICHTEXT_BULLETINDEX_STANDARD
+};
+
/*!
* Shorthand for common combinations of pages
*/
public:
wxRichTextFormattingDialog() { Init(); }
- wxRichTextFormattingDialog(long flags, wxWindow* parent, const wxString& title = _("Formatting"), wxWindowID id = wxID_ANY,
+ wxRichTextFormattingDialog(long flags, wxWindow* parent, const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE)
{
void Init();
- bool Create(long flags, wxWindow* parent, const wxString& title = _("Formatting"), wxWindowID id = wxID_ANY,
+ bool Create(long flags, wxWindow* parent, const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE);
virtual bool GetStyle(wxRichTextCtrl* ctrl, const wxRichTextRange& range);
/// Set the attributes and optionally update the display
- virtual bool SetStyle(const wxTextAttrEx& style, bool update = true);
+ virtual bool SetStyle(const wxRichTextAttr& style, bool update = true);
/// Set the style definition and optionally update the display
virtual bool SetStyleDefinition(const wxRichTextStyleDefinition& styleDef, wxRichTextStyleSheet* sheet, bool update = true);
virtual bool ApplyStyle(wxRichTextCtrl* ctrl, const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE);
/// Gets and sets the attributes
- const wxTextAttrEx& GetAttributes() const { return m_attributes; }
- wxTextAttrEx& GetAttributes() { return m_attributes; }
- void SetAttributes(const wxTextAttrEx& attr) { m_attributes = attr; }
+ const wxRichTextAttr& GetAttributes() const { return m_attributes; }
+ wxRichTextAttr& GetAttributes() { return m_attributes; }
+ void SetAttributes(const wxRichTextAttr& attr) { m_attributes = attr; }
/// Transfers the data and from to the window
virtual bool TransferDataToWindow();
static wxRichTextFormattingDialog* GetDialog(wxWindow* win);
/// Helper for pages to get the attributes
- static wxTextAttrEx* GetDialogAttributes(wxWindow* win);
+ static wxRichTextAttr* GetDialogAttributes(wxWindow* win);
/// 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;
+ wxRichTextAttr m_attributes;
wxRichTextStyleDefinition* m_styleDefinition;
wxRichTextStyleSheet* m_styleSheet;
wxArrayInt m_pageIds; // mapping of book control indexes to page ids
class WXDLLIMPEXP_RICHTEXT wxRichTextFontPreviewCtrl : public wxWindow
{
public:
- wxRichTextFontPreviewCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0) :
- wxWindow(parent, id, pos, sz, style)
- {
- SetBackgroundColour(*wxWHITE);
- }
+ wxRichTextFontPreviewCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0);
+
+ void SetTextEffects(int effects) { m_textEffects = effects; }
+ int GetTextEffects() const { return m_textEffects; }
private:
+ int m_textEffects;
+
void OnPaint(wxPaintEvent& event);
DECLARE_EVENT_TABLE()
};