more work on text selection: selecting should work now, but there's no clipboard interaction yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,8 +101,9 @@ private:
|
||||
// Flags for wxHtmlCell::FindCellByPos
|
||||
enum
|
||||
{
|
||||
wxHTML_FIND_TERMINAL = 0x0001,
|
||||
wxHTML_FIND_NONTERMINAL = 0x0002
|
||||
wxHTML_FIND_EXACT = 1,
|
||||
wxHTML_FIND_NEAREST_BEFORE = 2,
|
||||
wxHTML_FIND_NEAREST_AFTER = 4,
|
||||
};
|
||||
|
||||
|
||||
@@ -216,7 +217,17 @@ public:
|
||||
// nonterminal cells or both. In either case, returned cell is deepest
|
||||
// cell in cells tree that contains [x,y].
|
||||
virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y,
|
||||
unsigned flags = wxHTML_FIND_TERMINAL) const;
|
||||
unsigned flags = wxHTML_FIND_EXACT) const;
|
||||
|
||||
// Returns absolute position of the cell on HTML canvas
|
||||
wxPoint GetAbsPos() const;
|
||||
|
||||
// Returns first (last) terminal cell inside this cell. It may return NULL,
|
||||
// but it is rare -- only if there are no terminals in the tree.
|
||||
virtual wxHtmlCell *GetFirstTerminal() const
|
||||
{ return wxConstCast(this, wxHtmlCell); }
|
||||
virtual wxHtmlCell *GetLastTerminal() const
|
||||
{ return wxConstCast(this, wxHtmlCell); }
|
||||
|
||||
protected:
|
||||
wxHtmlCell *m_Next;
|
||||
@@ -325,7 +336,10 @@ public:
|
||||
virtual bool IsTerminalCell() const { return FALSE; }
|
||||
|
||||
virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y,
|
||||
unsigned flags = wxHTML_FIND_TERMINAL) const;
|
||||
unsigned flags = wxHTML_FIND_EXACT) const;
|
||||
|
||||
virtual wxHtmlCell *GetFirstTerminal() const;
|
||||
virtual wxHtmlCell *GetLastTerminal() const;
|
||||
|
||||
protected:
|
||||
void UpdateRenderingStatePre(wxHtmlRenderingState& state,
|
||||
|
@@ -210,7 +210,8 @@ protected:
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMouseMove(wxMouseEvent& event);
|
||||
void OnMouseButton(wxMouseEvent& event);
|
||||
void OnMouseDown(wxMouseEvent& event);
|
||||
void OnMouseUp(wxMouseEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Returns new filter (will be stored into m_DefaultFilter variable)
|
||||
@@ -252,7 +253,17 @@ protected:
|
||||
|
||||
int m_Style;
|
||||
|
||||
// current text selection or NULL
|
||||
wxHtmlSelection *m_selection;
|
||||
|
||||
// true if the user is dragging mouse to select text
|
||||
bool m_makingSelection;
|
||||
|
||||
private:
|
||||
// variables used when user is selecting text
|
||||
wxPoint m_tmpSelFromPos;
|
||||
wxHtmlCell *m_tmpSelFromCell;
|
||||
|
||||
// a flag indicated if mouse moved
|
||||
// (if TRUE we will try to change cursor in last call to OnIdle)
|
||||
bool m_tmpMouseMoved;
|
||||
|
Reference in New Issue
Block a user