Added wxRichTextCtrl superscript and subscript support (Knut Petter Lehre).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-04-10 14:05:25 +00:00
parent df5e687a53
commit b99e1e15be
7 changed files with 324 additions and 25 deletions

View File

@@ -277,6 +277,12 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
#define wxTEXT_ATTR_ALL (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
/*!
* Default superscript/subscript font multiplication factor
*/
#define wxSCRIPT_MUL_FACTOR 1.5
/*!
* wxRichTextRange class declaration
* This stores beginning and end positions for a range of data.

View File

@@ -103,6 +103,12 @@ public:
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL
void OnCapsctrlClick( wxCommandEvent& event );
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT
void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event );
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT
void OnRichtextfontpageSubscriptClick( wxCommandEvent& event );
////@end wxRichTextFontPage event handler declarations
////@begin wxRichTextFontPage member function declarations
@@ -128,6 +134,8 @@ public:
wxRichTextColourSwatchCtrl* m_colourCtrl;
wxCheckBox* m_strikethroughCtrl;
wxCheckBox* m_capitalsCtrl;
wxCheckBox* m_superscriptCtrl;
wxCheckBox* m_subscriptCtrl;
wxRichTextFontPreviewCtrl* m_previewCtrl;
/// Control identifiers
enum {
@@ -142,6 +150,8 @@ public:
ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,
ID_RICHTEXTFONTPAGE_SUPERSCRIPT = 10012,
ID_RICHTEXTFONTPAGE_SUBSCRIPT = 10013,
ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10003
};
////@end wxRichTextFontPage member variables