Implement different underline styles for wxTextCtrl

This commit is contained in:
Igor Korot
2019-06-15 07:48:53 +02:00
committed by Maarten Bent
parent 8e15849706
commit f99ae84d7c
8 changed files with 280 additions and 5 deletions

View File

@@ -219,6 +219,19 @@ enum wxTextAttrLineSpacing
};
/**
The values that can be used with SetFontUnderline
@since 3.1.3
*/
enum wxTextAttrUnderlineType
{
wxTEXT_ATTR_UNDERLINE_NONE,
wxTEXT_ATTR_UNDERLINE_SOLID,
wxTEXT_ATTR_UNDERLINE_DOUBLE,
wxTEXT_ATTR_UNDERLINE_WAVE
};
/**
Describes the possible return values of wxTextCtrl::HitTest().
@@ -422,6 +435,20 @@ public:
*/
bool GetFontUnderlined() const;
/**
Returns the underline type, which is one of the @wxTextAttrUnderlineType values
@since 3.1.3
*/
wxTextAttrUnderlineType GetUnderlinedType() const;
/**
Returns the underline color used
@since 3.1.3
*/
const wxColour& GetUnderlineColour() const;
/**
Returns the font weight.
*/
@@ -604,6 +631,14 @@ public:
*/
bool HasFontUnderlined() const;
/**
Returns @true if the attribute object specifies different underline types
and color
@since 3.1.3
*/
bool HasFontUnderline() const;
/**
Returns @true if the attribute object specifies font weight (bold, light or
normal).
@@ -807,6 +842,13 @@ public:
*/
void SetFontUnderlined(bool underlined);
/**
Set the different underline type and the underline color
@since 3.1.3
*/
void SetFontUnderline(wxTextAttrUnderlineType type = wxTEXT_ATTR_UNDERLINE_SOLID, wxColour colour = *wxBLACK);
/**
Sets the font weight.
*/