Add support for background-color style to span element in wxHTML.
Add code for setting/restoring background mode and use it to implement support for changing the text background colour. Closes #14443. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,10 +91,13 @@ public:
|
||||
const wxColour& GetFgColour() const { return m_fgColour; }
|
||||
void SetBgColour(const wxColour& c) { m_bgColour = c; }
|
||||
const wxColour& GetBgColour() const { return m_bgColour; }
|
||||
void SetBgMode(int m) { m_bgMode = m; }
|
||||
int GetBgMode() const { return m_bgMode; }
|
||||
|
||||
private:
|
||||
wxHtmlSelectionState m_selState;
|
||||
wxColour m_fgColour, m_bgColour;
|
||||
int m_bgMode;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -36,8 +36,9 @@
|
||||
// Used by wxHtmlColourCell to determine clr of what is changing
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_CLR_FOREGROUND 0x0001
|
||||
#define wxHTML_CLR_BACKGROUND 0x0002
|
||||
#define wxHTML_CLR_FOREGROUND 0x0001
|
||||
#define wxHTML_CLR_BACKGROUND 0x0002
|
||||
#define wxHTML_CLR_TRANSPARENT_BACKGROUND 0x0004
|
||||
|
||||
|
||||
|
||||
|
@@ -132,6 +132,10 @@ public:
|
||||
void SetLinkColor(const wxColour& clr) { m_LinkColor = clr; }
|
||||
const wxColour& GetActualColor() const { return m_ActualColor; }
|
||||
void SetActualColor(const wxColour& clr) { m_ActualColor = clr ;}
|
||||
const wxColour& GetActualBackgroundColor() const { return m_ActualBackgroundColor; }
|
||||
void SetActualBackgroundColor(const wxColour& clr) { m_ActualBackgroundColor = clr;}
|
||||
int GetActualBackgroundMode() const { return m_ActualBackgroundMode; }
|
||||
void SetActualBackgroundMode(int mode) { m_ActualBackgroundMode = mode;}
|
||||
const wxHtmlLinkInfo& GetLink() const { return m_Link; }
|
||||
void SetLink(const wxHtmlLinkInfo& link);
|
||||
|
||||
@@ -193,6 +197,8 @@ private:
|
||||
int m_FontSize; // From 1 (smallest) to 7, default is 3.
|
||||
wxColour m_LinkColor;
|
||||
wxColour m_ActualColor;
|
||||
wxColour m_ActualBackgroundColor;
|
||||
int m_ActualBackgroundMode;
|
||||
// basic font parameters.
|
||||
wxHtmlLinkInfo m_Link;
|
||||
// actual hypertext link or empty string
|
||||
|
Reference in New Issue
Block a user