+ // this version is used for the user selection defined with the mouse
+ void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell,
+ const wxPoint& toPos, const wxHtmlCell *toCell);
+ void Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell);
+
+ const wxHtmlCell *GetFromCell() const;
+ const wxHtmlCell *GetToCell() const;
+
+ // these values are in absolute coordinates:
+ const wxPoint& GetFromPos() const;
+ const wxPoint& GetToPos() const;
+
+ // these are From/ToCell's private data
+ void ClearFromToCharacterPos();
+ bool AreFromToCharacterPosSet() const;
+
+ void SetFromCharacterPos (wxCoord pos);
+ void SetToCharacterPos (wxCoord pos);
+ wxCoord GetFromCharacterPos () const;
+ wxCoord GetToCharacterPos () const;
+
+ bool IsEmpty() const;
+};
+
+
+
+enum wxHtmlSelectionState
+{
+ wxHTML_SEL_OUT, // currently rendered cell is outside the selection
+ wxHTML_SEL_IN, // ... is inside selection
+ wxHTML_SEL_CHANGING // ... is the cell on which selection state changes
+};
+
+
+/**
+ @class wxHtmlRenderingState
+
+ Selection state is passed to wxHtmlCell::Draw so that it can render itself
+ differently e.g. when inside text selection or outside it.
+
+ @library{wxhtml}
+ @category{html}
+*/
+class wxHtmlRenderingState
+{
+public:
+ wxHtmlRenderingState();
+
+ void SetSelectionState(wxHtmlSelectionState s);
+ wxHtmlSelectionState GetSelectionState() const;
+
+ void SetFgColour(const wxColour& c);
+ const wxColour& GetFgColour() const;
+ void SetBgColour(const wxColour& c);
+ const wxColour& GetBgColour() const;
+ void SetBgMode(int m);
+ int GetBgMode() const;
+};
+
+
+
+/**
+ @class wxHtmlRenderingStyle
+
+ Allows HTML rendering customizations.
+ This class is used when rendering wxHtmlCells as a callback.