Better compatibility between wxRichTextCtrl and wxTextCtrlBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,6 +83,7 @@ public:
|
|||||||
|
|
||||||
// load the controls contents from the file
|
// load the controls contents from the file
|
||||||
virtual bool LoadFile(const wxString& file);
|
virtual bool LoadFile(const wxString& file);
|
||||||
|
virtual bool LoadFile(const wxString& file, int WXUNUSED(fileType)) { return LoadFile(file); }
|
||||||
|
|
||||||
// sets/clears the dirty flag
|
// sets/clears the dirty flag
|
||||||
virtual void MarkDirty();
|
virtual void MarkDirty();
|
||||||
|
@@ -68,6 +68,7 @@ public:
|
|||||||
|
|
||||||
// load the controls contents from the file
|
// load the controls contents from the file
|
||||||
virtual bool LoadFile(const wxString& file);
|
virtual bool LoadFile(const wxString& file);
|
||||||
|
virtual bool LoadFile(const wxString& file, int WXUNUSED(fileType)) { return LoadFile(file); }
|
||||||
|
|
||||||
// clears the dirty flag
|
// clears the dirty flag
|
||||||
virtual void MarkDirty();
|
virtual void MarkDirty();
|
||||||
|
@@ -917,8 +917,8 @@ public:
|
|||||||
virtual bool SetStyle(const wxRichTextRange& range, const wxTextAttrEx& style, bool withUndo = true);
|
virtual bool SetStyle(const wxRichTextRange& range, const wxTextAttrEx& style, bool withUndo = true);
|
||||||
|
|
||||||
/// Get the text attributes for this position.
|
/// Get the text attributes for this position.
|
||||||
virtual bool GetStyle(long position, wxTextAttrEx& style) const;
|
virtual bool GetStyle(long position, wxTextAttrEx& style);
|
||||||
virtual bool GetStyle(long position, wxRichTextAttr& style) const;
|
virtual bool GetStyle(long position, wxRichTextAttr& style);
|
||||||
|
|
||||||
/// Test if this whole range has character attributes of the specified kind. If any
|
/// Test if this whole range has character attributes of the specified kind. If any
|
||||||
/// of the attributes are different within the range, the test fails. You
|
/// of the attributes are different within the range, the test fails. You
|
||||||
|
@@ -158,8 +158,10 @@ public:
|
|||||||
virtual void Remove(long from, long to);
|
virtual void Remove(long from, long to);
|
||||||
|
|
||||||
// load/save the controls contents from/to the file
|
// load/save the controls contents from/to the file
|
||||||
virtual bool LoadFile(const wxString& file, int type = wxRICHTEXT_TYPE_ANY);
|
virtual bool LoadFile(const wxString& file) { return LoadFile(file, wxRICHTEXT_TYPE_ANY); }
|
||||||
virtual bool SaveFile(const wxString& file = wxEmptyString, int type = wxRICHTEXT_TYPE_ANY);
|
virtual bool LoadFile(const wxString& file, int type);
|
||||||
|
virtual bool SaveFile(const wxString& file = wxEmptyString) { return SaveFile(file, wxRICHTEXT_TYPE_ANY); }
|
||||||
|
virtual bool SaveFile(const wxString& file, int type);
|
||||||
|
|
||||||
// sets/clears the dirty flag
|
// sets/clears the dirty flag
|
||||||
virtual void MarkDirty();
|
virtual void MarkDirty();
|
||||||
@@ -180,9 +182,9 @@ public:
|
|||||||
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
||||||
virtual bool SetStyle(long start, long end, const wxTextAttrEx& style);
|
virtual bool SetStyle(long start, long end, const wxTextAttrEx& style);
|
||||||
virtual bool SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style);
|
virtual bool SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style);
|
||||||
virtual bool GetStyle(long position, wxTextAttr& style) const;
|
virtual bool GetStyle(long position, wxTextAttr& style);
|
||||||
virtual bool GetStyle(long position, wxTextAttrEx& style) const;
|
virtual bool GetStyle(long position, wxTextAttrEx& style);
|
||||||
virtual bool GetStyle(long position, wxRichTextAttr& style) const;
|
virtual bool GetStyle(long position, wxRichTextAttr& style);
|
||||||
virtual bool SetDefaultStyle(const wxTextAttrEx& style);
|
virtual bool SetDefaultStyle(const wxTextAttrEx& style);
|
||||||
virtual bool SetDefaultStyle(const wxTextAttr& style);
|
virtual bool SetDefaultStyle(const wxTextAttr& style);
|
||||||
|
|
||||||
@@ -495,16 +497,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Is all of the selection bold?
|
/// Is all of the selection bold?
|
||||||
virtual bool IsSelectionBold() const;
|
virtual bool IsSelectionBold();
|
||||||
|
|
||||||
/// Is all of the selection italics?
|
/// Is all of the selection italics?
|
||||||
virtual bool IsSelectionItalics() const;
|
virtual bool IsSelectionItalics();
|
||||||
|
|
||||||
/// Is all of the selection underlined?
|
/// Is all of the selection underlined?
|
||||||
virtual bool IsSelectionUnderlined() const;
|
virtual bool IsSelectionUnderlined();
|
||||||
|
|
||||||
/// Is all of the selection aligned according to the specified flag?
|
/// Is all of the selection aligned according to the specified flag?
|
||||||
virtual bool IsSelectionAligned(wxTextAttrAlignment alignment) const;
|
virtual bool IsSelectionAligned(wxTextAttrAlignment alignment);
|
||||||
|
|
||||||
/// Apply bold to the selection
|
/// Apply bold to the selection
|
||||||
virtual bool ApplyBoldToSelection();
|
virtual bool ApplyBoldToSelection();
|
||||||
|
@@ -322,7 +322,9 @@ public:
|
|||||||
|
|
||||||
// load/save the controls contents from/to the file
|
// load/save the controls contents from/to the file
|
||||||
virtual bool LoadFile(const wxString& file);
|
virtual bool LoadFile(const wxString& file);
|
||||||
|
virtual bool LoadFile(const wxString& file, int WXUNUSED(fileType)) { return LoadFile(file); }
|
||||||
virtual bool SaveFile(const wxString& file = wxEmptyString);
|
virtual bool SaveFile(const wxString& file = wxEmptyString);
|
||||||
|
virtual bool SaveFile(const wxString& file, int WXUNUSED(fileType)) { return SaveFile(file); }
|
||||||
|
|
||||||
// sets/clears the dirty flag
|
// sets/clears the dirty flag
|
||||||
virtual void MarkDirty() = 0;
|
virtual void MarkDirty() = 0;
|
||||||
|
@@ -1633,7 +1633,7 @@ bool wxRichTextParagraphLayoutBox::SetStyle(const wxRichTextRange& range, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the text attributes for this position.
|
/// Get the text attributes for this position.
|
||||||
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxTextAttrEx& style) const
|
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxTextAttrEx& style)
|
||||||
{
|
{
|
||||||
wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
|
wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
|
||||||
|
|
||||||
@@ -1652,7 +1652,7 @@ bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxTextAttrEx& style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the text attributes for this position.
|
/// Get the text attributes for this position.
|
||||||
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxRichTextAttr& style) const
|
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxRichTextAttr& style)
|
||||||
{
|
{
|
||||||
wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
|
wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
|
||||||
|
|
||||||
|
@@ -2244,7 +2244,7 @@ const wxTextAttr& wxRichTextCtrl::GetDefaultStyle() const
|
|||||||
return GetBuffer().GetDefaultStyle();
|
return GetBuffer().GetDefaultStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRichTextCtrl::GetStyle(long position, wxTextAttr& style) const
|
bool wxRichTextCtrl::GetStyle(long position, wxTextAttr& style)
|
||||||
{
|
{
|
||||||
wxTextAttrEx attr;
|
wxTextAttrEx attr;
|
||||||
if (GetBuffer().GetStyle(position, attr))
|
if (GetBuffer().GetStyle(position, attr))
|
||||||
@@ -2256,12 +2256,12 @@ bool wxRichTextCtrl::GetStyle(long position, wxTextAttr& style) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRichTextCtrl::GetStyle(long position, wxTextAttrEx& style) const
|
bool wxRichTextCtrl::GetStyle(long position, wxTextAttrEx& style)
|
||||||
{
|
{
|
||||||
return GetBuffer().GetStyle(position, style);
|
return GetBuffer().GetStyle(position, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRichTextCtrl::GetStyle(long position, wxRichTextAttr& style) const
|
bool wxRichTextCtrl::GetStyle(long position, wxRichTextAttr& style)
|
||||||
{
|
{
|
||||||
return GetBuffer().GetStyle(position, style);
|
return GetBuffer().GetStyle(position, style);
|
||||||
}
|
}
|
||||||
@@ -2419,7 +2419,7 @@ bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Is all of the selection bold?
|
/// Is all of the selection bold?
|
||||||
bool wxRichTextCtrl::IsSelectionBold() const
|
bool wxRichTextCtrl::IsSelectionBold()
|
||||||
{
|
{
|
||||||
if (HasSelection())
|
if (HasSelection())
|
||||||
{
|
{
|
||||||
@@ -2449,7 +2449,7 @@ bool wxRichTextCtrl::IsSelectionBold() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Is all of the selection italics?
|
/// Is all of the selection italics?
|
||||||
bool wxRichTextCtrl::IsSelectionItalics() const
|
bool wxRichTextCtrl::IsSelectionItalics()
|
||||||
{
|
{
|
||||||
if (HasSelection())
|
if (HasSelection())
|
||||||
{
|
{
|
||||||
@@ -2479,7 +2479,7 @@ bool wxRichTextCtrl::IsSelectionItalics() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Is all of the selection underlined?
|
/// Is all of the selection underlined?
|
||||||
bool wxRichTextCtrl::IsSelectionUnderlined() const
|
bool wxRichTextCtrl::IsSelectionUnderlined()
|
||||||
{
|
{
|
||||||
if (HasSelection())
|
if (HasSelection())
|
||||||
{
|
{
|
||||||
@@ -2551,7 +2551,7 @@ bool wxRichTextCtrl::ApplyUnderlineToSelection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Is all of the selection aligned according to the specified flag?
|
/// Is all of the selection aligned according to the specified flag?
|
||||||
bool wxRichTextCtrl::IsSelectionAligned(wxTextAttrAlignment alignment) const
|
bool wxRichTextCtrl::IsSelectionAligned(wxTextAttrAlignment alignment)
|
||||||
{
|
{
|
||||||
if (HasSelection())
|
if (HasSelection())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user