Compare commits
1 Commits
BEFORE_LIN
...
BEFORE_LIN
Author | SHA1 | Date | |
---|---|---|---|
|
97f4596300 |
@@ -21,8 +21,6 @@ class WXDLLEXPORT wxTextCtrlCommandProcessor;
|
|||||||
|
|
||||||
#include "wx/scrolwin.h" // for wxScrollHelper
|
#include "wx/scrolwin.h" // for wxScrollHelper
|
||||||
|
|
||||||
#include "wx/univ/inphand.h"
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTextCtrl actions
|
// wxTextCtrl actions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -66,30 +64,16 @@ class WXDLLEXPORT wxTextCtrlCommandProcessor;
|
|||||||
#define wxACTION_TEXT_UNDO _T("undo")
|
#define wxACTION_TEXT_UNDO _T("undo")
|
||||||
#define wxACTION_TEXT_REDO _T("redo")
|
#define wxACTION_TEXT_REDO _T("redo")
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// wxTextCtrl types
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// wxTextPos is the position in the text
|
|
||||||
typedef long wxTextPos;
|
|
||||||
|
|
||||||
// wxTextCoord is the line or row number (which should have been unsigned but
|
|
||||||
// is long for backwards compatibility)
|
|
||||||
typedef long wxTextCoord;
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTextCtrl::HitTest return values
|
// wxTextCtrl::HitTest return values
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// the point asked is ...
|
|
||||||
enum wxTextCtrlHitTestResult
|
enum wxTextCtrlHitTestResult
|
||||||
{
|
{
|
||||||
wxTE_HT_BEFORE = -1, // either to the left or upper
|
wxTE_HT_BEFORE = -1,
|
||||||
wxTE_HT_ON_TEXT, // directly on
|
wxTE_HT_ON_TEXT,
|
||||||
wxTE_HT_BELOW, // below [the last line]
|
wxTE_HT_AFTER
|
||||||
wxTE_HT_BEYOND // after [the end of line]
|
|
||||||
};
|
};
|
||||||
// ... the character returned
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTextCtrl
|
// wxTextCtrl
|
||||||
@@ -134,23 +118,23 @@ public:
|
|||||||
virtual wxString GetValue() const;
|
virtual wxString GetValue() const;
|
||||||
virtual void SetValue(const wxString& value);
|
virtual void SetValue(const wxString& value);
|
||||||
|
|
||||||
virtual int GetLineLength(wxTextCoord lineNo) const;
|
virtual int GetLineLength(long lineNo) const;
|
||||||
virtual wxString GetLineText(wxTextCoord lineNo) const;
|
virtual wxString GetLineText(long lineNo) const;
|
||||||
virtual int GetNumberOfLines() const;
|
virtual int GetNumberOfLines() const;
|
||||||
|
|
||||||
virtual bool IsModified() const;
|
virtual bool IsModified() const;
|
||||||
virtual bool IsEditable() const;
|
virtual bool IsEditable() const;
|
||||||
|
|
||||||
// If the return values from and to are the same, there is no selection.
|
// If the return values from and to are the same, there is no selection.
|
||||||
virtual void GetSelection(wxTextPos* from, wxTextPos* to) const;
|
virtual void GetSelection(long* from, long* to) const;
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
// editing
|
// editing
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual void Replace(wxTextPos from, wxTextPos to, const wxString& value);
|
virtual void Replace(long from, long to, const wxString& value);
|
||||||
virtual void Remove(wxTextPos from, wxTextPos to);
|
virtual void Remove(long from, long to);
|
||||||
|
|
||||||
// clears the dirty flag
|
// clears the dirty flag
|
||||||
virtual void DiscardEdits();
|
virtual void DiscardEdits();
|
||||||
@@ -162,18 +146,11 @@ public:
|
|||||||
|
|
||||||
// translate between the position (which is just an index in the text ctrl
|
// translate between the position (which is just an index in the text ctrl
|
||||||
// considering all its contents as a single strings) and (x, y) coordinates
|
// considering all its contents as a single strings) and (x, y) coordinates
|
||||||
// which represent (logical, i.e. unwrapped) column and line.
|
// which represent column and line.
|
||||||
virtual wxTextPos XYToPosition(wxTextCoord x, wxTextCoord y) const;
|
virtual long XYToPosition(long x, long y) const;
|
||||||
virtual bool PositionToXY(wxTextPos pos,
|
virtual bool PositionToXY(long pos, long *x, long *y) const;
|
||||||
wxTextCoord *x, wxTextCoord *y) const;
|
|
||||||
|
|
||||||
// wxUniv-specific: find a screen position (in client coordinates) of the
|
virtual void ShowPosition(long pos);
|
||||||
// given text position or of the caret
|
|
||||||
bool PositionToLogicalXY(wxTextPos pos, wxCoord *x, wxCoord *y) const;
|
|
||||||
bool PositionToDeviceXY(wxTextPos pos, wxCoord *x, wxCoord *y) const;
|
|
||||||
wxPoint GetCaretPosition() const;
|
|
||||||
|
|
||||||
virtual void ShowPosition(wxTextPos pos);
|
|
||||||
|
|
||||||
// Clipboard operations
|
// Clipboard operations
|
||||||
virtual void Copy();
|
virtual void Copy();
|
||||||
@@ -188,12 +165,12 @@ public:
|
|||||||
virtual bool CanRedo() const;
|
virtual bool CanRedo() const;
|
||||||
|
|
||||||
// Insertion point
|
// Insertion point
|
||||||
virtual void SetInsertionPoint(wxTextPos pos);
|
virtual void SetInsertionPoint(long pos);
|
||||||
virtual void SetInsertionPointEnd();
|
virtual void SetInsertionPointEnd();
|
||||||
virtual wxTextPos GetInsertionPoint() const;
|
virtual long GetInsertionPoint() const;
|
||||||
virtual wxTextPos GetLastPosition() const;
|
virtual long GetLastPosition() const;
|
||||||
|
|
||||||
virtual void SetSelection(wxTextPos from, wxTextPos to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
// wxUniv-specific methods
|
// wxUniv-specific methods
|
||||||
@@ -203,10 +180,11 @@ public:
|
|||||||
virtual void ShowCaret(bool show = TRUE);
|
virtual void ShowCaret(bool show = TRUE);
|
||||||
void HideCaret() { ShowCaret(FALSE); }
|
void HideCaret() { ShowCaret(FALSE); }
|
||||||
void CreateCaret(); // for the current font size
|
void CreateCaret(); // for the current font size
|
||||||
|
wxCoord GetCaretPosition(long pos = -1) const; // in pixels, def => current
|
||||||
|
|
||||||
// helpers for cursor movement
|
// helpers for cursor movement
|
||||||
wxTextPos GetWordStart() const;
|
long GetWordStart() const;
|
||||||
wxTextPos GetWordEnd() const;
|
long GetWordEnd() const;
|
||||||
|
|
||||||
// selection helpers
|
// selection helpers
|
||||||
bool HasSelection() const
|
bool HasSelection() const
|
||||||
@@ -224,7 +202,7 @@ public:
|
|||||||
// NB: pt is in device coords (not adjusted for the client area origin nor
|
// NB: pt is in device coords (not adjusted for the client area origin nor
|
||||||
// for the scrolling)
|
// for the scrolling)
|
||||||
wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
|
wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
|
||||||
wxTextCoord *col, wxTextCoord *row) const;
|
long *col, long *row) const;
|
||||||
|
|
||||||
// find the character at this position in the given line, return value as
|
// find the character at this position in the given line, return value as
|
||||||
// for HitTest()
|
// for HitTest()
|
||||||
@@ -232,14 +210,14 @@ public:
|
|||||||
// NB: x is the logical coord (client and unscrolled)
|
// NB: x is the logical coord (client and unscrolled)
|
||||||
wxTextCtrlHitTestResult HitTestLine(const wxString& line,
|
wxTextCtrlHitTestResult HitTestLine(const wxString& line,
|
||||||
wxCoord x,
|
wxCoord x,
|
||||||
wxTextCoord *colOut) const;
|
long *colOut) const;
|
||||||
|
|
||||||
// bring the given position into view
|
// bring the given position into view
|
||||||
void ShowHorzPosition(wxCoord pos);
|
void ShowHorzPosition(wxCoord pos);
|
||||||
|
|
||||||
// scroll the window horizontally so that the first character shown is in
|
// scroll the window horizontally so that the first character shown is in
|
||||||
// position pos
|
// position pos
|
||||||
void ScrollText(wxTextCoord col);
|
void ScrollText(long col);
|
||||||
|
|
||||||
// adjust the DC for horz text control scrolling too
|
// adjust the DC for horz text control scrolling too
|
||||||
virtual void DoPrepareDC(wxDC& dc);
|
virtual void DoPrepareDC(wxDC& dc);
|
||||||
@@ -250,7 +228,7 @@ public:
|
|||||||
// override this to take into account our scrollbar-less scrolling
|
// override this to take into account our scrollbar-less scrolling
|
||||||
virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
|
virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
|
||||||
|
|
||||||
// set the right colours and border
|
// set the right colours
|
||||||
virtual bool IsContainerWindow() const { return TRUE; }
|
virtual bool IsContainerWindow() const { return TRUE; }
|
||||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
|
virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
|
||||||
|
|
||||||
@@ -267,12 +245,10 @@ protected:
|
|||||||
// draw the text
|
// draw the text
|
||||||
void DrawTextLine(wxDC& dc, const wxRect& rect,
|
void DrawTextLine(wxDC& dc, const wxRect& rect,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
wxTextPos selStart, wxTextPos selEnd);
|
long selStart, long selEnd);
|
||||||
|
|
||||||
void DoDrawTextInRect(wxDC& dc, const wxRect& rectUpdate);
|
void DoDrawTextInRect(wxDC& dc, const wxRect& rectUpdate);
|
||||||
|
|
||||||
// override base class methods
|
|
||||||
virtual void DoDrawBorder(wxDC& dc, const wxRect& rect);
|
|
||||||
virtual void DoDraw(wxControlRenderer *renderer);
|
virtual void DoDraw(wxControlRenderer *renderer);
|
||||||
|
|
||||||
// calc the size from the text extent
|
// calc the size from the text extent
|
||||||
@@ -287,8 +263,7 @@ protected:
|
|||||||
// more readable flag testing methods
|
// more readable flag testing methods
|
||||||
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
|
bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
|
||||||
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
||||||
bool WrapLines() const
|
bool WrapLines() const { return !(GetWindowStyle() & wxHSCROLL); }
|
||||||
{ return !IsSingleLine() && !(GetWindowStyle() & wxHSCROLL); }
|
|
||||||
|
|
||||||
// get the extent (width) of the text
|
// get the extent (width) of the text
|
||||||
wxCoord GetTextWidth(const wxString& text) const;
|
wxCoord GetTextWidth(const wxString& text) const;
|
||||||
@@ -296,12 +271,6 @@ protected:
|
|||||||
// get the logical text width (accounting for scrolling)
|
// get the logical text width (accounting for scrolling)
|
||||||
wxCoord GetTotalWidth() const;
|
wxCoord GetTotalWidth() const;
|
||||||
|
|
||||||
// find the number of rows in this line (only if WrapLines())
|
|
||||||
wxTextCoord GetRowsPerLine(wxTextCoord line) const;
|
|
||||||
|
|
||||||
// get total number of rows before the given line
|
|
||||||
wxTextCoord GetNumberOfRowsBefore(wxTextCoord line) const;
|
|
||||||
|
|
||||||
// the text area is the part of the window in which the text can be
|
// the text area is the part of the window in which the text can be
|
||||||
// displayed, i.e. part of it inside the margins and the real text area is
|
// displayed, i.e. part of it inside the margins and the real text area is
|
||||||
// the area in which the text *is* currently displayed: for example, in the
|
// the area in which the text *is* currently displayed: for example, in the
|
||||||
@@ -311,35 +280,29 @@ protected:
|
|||||||
wxRect GetRealTextArea() const;
|
wxRect GetRealTextArea() const;
|
||||||
|
|
||||||
// refresh the text in the given (in logical coords) rect
|
// refresh the text in the given (in logical coords) rect
|
||||||
void RefreshTextRect(const wxRect& rect);
|
void RefreshTextRect(wxRect& rect);
|
||||||
|
|
||||||
// refresh the text in the given range (in logical coords) of this line, if
|
// refresh the text in the given range (in logical coords) of this line, if
|
||||||
// width is 0, refresh to the end of line
|
// width is 0, refresh to the end of line
|
||||||
void RefreshPixelRange(wxTextCoord line, wxCoord start, wxCoord width);
|
void RefreshPixelRange(long line, wxCoord start, wxCoord width);
|
||||||
|
|
||||||
// refresh the text in the given range (in text coords) in this line
|
// refresh the text in the given range (in text coords) in this line
|
||||||
void RefreshColRange(wxTextCoord line, wxTextPos start, size_t count);
|
void RefreshColRange(long line, long start, long count);
|
||||||
|
|
||||||
// refresh the text from in the given line range (inclusive)
|
// refresh the text from in the given line range (inclusive)
|
||||||
void RefreshLineRange(wxTextCoord lineFirst, wxTextCoord lineLast);
|
void RefreshLineRange(long lineFirst, long lineLast);
|
||||||
|
|
||||||
// refresh the text in the given range which can span multiple lines
|
// refresh the text in the given range which can span multiple lines
|
||||||
// (this method accepts arguments in any order)
|
// (this method accepts arguments in any order)
|
||||||
void RefreshTextRange(wxTextPos start, wxTextPos end);
|
void RefreshTextRange(long start, long end);
|
||||||
|
|
||||||
// get the text to show: either the text itself or the text replaced with
|
// get the text to show: either the text itself or the text replaced with
|
||||||
// starts for wxTE_PASSWORD control
|
// starts for wxTE_PASSWORD control
|
||||||
wxString GetTextToShow(const wxString& text) const;
|
wxString GetTextToShow(const wxString& text) const;
|
||||||
|
|
||||||
// find the number of characters of a line before it wraps
|
|
||||||
// (and optionally also the real width of the line)
|
|
||||||
size_t GetPartOfWrappedLine(const wxChar* text,
|
|
||||||
wxCoord *widthReal = NULL) const;
|
|
||||||
|
|
||||||
// get the start and end of the selection for this line: if the line is
|
// get the start and end of the selection for this line: if the line is
|
||||||
// outside the selection, both will be -1 and FALSE will be returned
|
// outside the selection, both will be -1 and FALSE will be returned
|
||||||
bool GetSelectedPartOfLine(wxTextCoord line,
|
bool GetSelectedPartOfLine(long line, int *start, int *end) const;
|
||||||
wxTextPos *start, wxTextPos *end) const;
|
|
||||||
|
|
||||||
// update the text rect: the zone inside our client rect (its coords are
|
// update the text rect: the zone inside our client rect (its coords are
|
||||||
// client coords) which contains the text
|
// client coords) which contains the text
|
||||||
@@ -350,7 +313,7 @@ protected:
|
|||||||
|
|
||||||
// move caret to the given position unconditionally
|
// move caret to the given position unconditionally
|
||||||
// (SetInsertionPoint() does nothing if the position didn't change)
|
// (SetInsertionPoint() does nothing if the position didn't change)
|
||||||
void DoSetInsertionPoint(wxTextPos pos);
|
void DoSetInsertionPoint(long pos);
|
||||||
|
|
||||||
// set the caret to its initial (default) position
|
// set the caret to its initial (default) position
|
||||||
void InitInsertionPoint();
|
void InitInsertionPoint();
|
||||||
@@ -359,58 +322,20 @@ protected:
|
|||||||
wxCoord GetMaxWidth() const;
|
wxCoord GetMaxWidth() const;
|
||||||
|
|
||||||
// force recalculation of the max line width
|
// force recalculation of the max line width
|
||||||
void RecalcMaxWidth();
|
void RecalcMaxWidth()
|
||||||
|
|
||||||
// update the max width after the given line was modified
|
|
||||||
void UpdateMaxWidth(wxTextCoord line);
|
|
||||||
|
|
||||||
// HitTest2() is more efficient than 2 consecutive HitTest()s with the same
|
|
||||||
// line (i.e. y) and it also returns the offset of the starting position in
|
|
||||||
// pixels
|
|
||||||
//
|
|
||||||
// as the last hack, this function accepts either logical or device (by
|
|
||||||
// default) coords depending on devCoords flag
|
|
||||||
wxTextCtrlHitTestResult HitTest2(wxCoord y,
|
|
||||||
wxCoord x1,
|
|
||||||
wxCoord x2,
|
|
||||||
wxTextCoord *row,
|
|
||||||
wxTextCoord *colStart,
|
|
||||||
wxTextCoord *colEnd,
|
|
||||||
wxTextCoord *colRowStart,
|
|
||||||
bool devCoords = TRUE) const;
|
|
||||||
|
|
||||||
// HitTest() version which takes the logical text coordinates and not the
|
|
||||||
// device ones
|
|
||||||
wxTextCtrlHitTestResult HitTestLogical(const wxPoint& pos,
|
|
||||||
wxTextCoord *col,
|
|
||||||
wxTextCoord *row) const;
|
|
||||||
|
|
||||||
// get the height of one line (the same for all lines)
|
|
||||||
wxCoord GetLineHeight() const
|
|
||||||
{
|
{
|
||||||
// this one should be already precalculated
|
m_widthMax = -1;
|
||||||
wxASSERT_MSG( m_heightLine != -1, _T("should have line height") );
|
(void)GetMaxWidth();
|
||||||
|
|
||||||
return m_heightLine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the average char width
|
// update the max width after the given line was modified
|
||||||
wxCoord GetAverageWidth() const { return m_widthAvg; }
|
void UpdateMaxWidth(long line);
|
||||||
|
|
||||||
// recalc the line height and char width (to call when the font changes)
|
|
||||||
void RecalcFontMetrics();
|
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
void OnChar(wxKeyEvent& event);
|
void OnChar(wxKeyEvent& event);
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
// return the struct containing control-type dependent data
|
|
||||||
struct wxTextSingleLineData& SData() { return *m_data.sdata; }
|
|
||||||
struct wxTextMultiLineData& MData() { return *m_data.mdata; }
|
|
||||||
const wxTextSingleLineData& SData() const { return *m_data.sdata; }
|
|
||||||
const wxTextMultiLineData& MData() const { return *m_data.mdata; }
|
|
||||||
|
|
||||||
// accessors for derived classes (SL stands for single line)
|
// accessors for derived classes (SL stands for single line)
|
||||||
const wxString& GetSLValue() const
|
const wxString& GetSLValue() const
|
||||||
{
|
{
|
||||||
@@ -440,18 +365,21 @@ private:
|
|||||||
// the control text (only used for single line controls)
|
// the control text (only used for single line controls)
|
||||||
wxString m_value;
|
wxString m_value;
|
||||||
|
|
||||||
|
// the lines of text (only used for multiline controls)
|
||||||
|
wxArrayString m_lines;
|
||||||
|
|
||||||
// current position
|
// current position
|
||||||
wxTextPos m_curPos;
|
long m_curPos,
|
||||||
wxTextCoord m_curCol,
|
m_curCol,
|
||||||
m_curRow;
|
m_curRow;
|
||||||
|
|
||||||
// last position (only used by GetLastPosition())
|
// last position (only used by GetLastPosition())
|
||||||
wxTextPos m_posLast;
|
long m_posLast;
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
wxTextPos m_selAnchor,
|
long m_selAnchor,
|
||||||
m_selStart,
|
m_selStart,
|
||||||
m_selEnd;
|
m_selEnd;
|
||||||
|
|
||||||
// flags
|
// flags
|
||||||
bool m_isModified:1,
|
bool m_isModified:1,
|
||||||
@@ -461,20 +389,32 @@ private:
|
|||||||
// the rectangle (in client coordinates) to draw text inside
|
// the rectangle (in client coordinates) to draw text inside
|
||||||
wxRect m_rectText;
|
wxRect m_rectText;
|
||||||
|
|
||||||
// the height of one line (cached value of GetCharHeight)
|
// this section is for the controls without horz scrollbar only
|
||||||
wxCoord m_heightLine;
|
|
||||||
|
|
||||||
// and the average char width (cached value of GetCharWidth)
|
// the position of the first visible pixel and the first visible column
|
||||||
wxCoord m_widthAvg;
|
wxCoord m_ofsHorz;
|
||||||
|
long m_colStart;
|
||||||
|
|
||||||
// we have some data which depends on the kind of control (single or multi
|
// and the last ones (m_posLastVisible is the width but m_colLastVisible
|
||||||
// line)
|
// is an absolute value)
|
||||||
union
|
wxCoord m_posLastVisible;
|
||||||
{
|
long m_colLastVisible;
|
||||||
wxTextSingleLineData *sdata;
|
|
||||||
wxTextMultiLineData *mdata;
|
// this section is for the controls with scrollbar(s)
|
||||||
void *data;
|
|
||||||
} m_data;
|
// the current ranges of the scrollbars
|
||||||
|
int m_scrollRangeX,
|
||||||
|
m_scrollRangeY;
|
||||||
|
|
||||||
|
// should we adjust the horz/vert scrollbar?
|
||||||
|
bool m_updateScrollbarX,
|
||||||
|
m_updateScrollbarY;
|
||||||
|
|
||||||
|
// the max line length in pixels
|
||||||
|
wxCoord m_widthMax;
|
||||||
|
|
||||||
|
// the index of the line which has the length of m_widthMax
|
||||||
|
long m_lineLongest;
|
||||||
|
|
||||||
// the object to which we delegate our undo/redo implementation
|
// the object to which we delegate our undo/redo implementation
|
||||||
wxTextCtrlCommandProcessor *m_cmdProcessor;
|
wxTextCtrlCommandProcessor *m_cmdProcessor;
|
||||||
@@ -483,32 +423,5 @@ private:
|
|||||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// wxStdTextCtrlInputHandler: this control handles only the mouse/kbd actions
|
|
||||||
// common to Win32 and GTK, platform-specific things are implemented elsewhere
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxStdTextCtrlInputHandler : public wxStdInputHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxStdTextCtrlInputHandler(wxInputHandler *inphand);
|
|
||||||
|
|
||||||
virtual bool HandleKey(wxControl *control,
|
|
||||||
const wxKeyEvent& event,
|
|
||||||
bool pressed);
|
|
||||||
virtual bool HandleMouse(wxControl *control,
|
|
||||||
const wxMouseEvent& event);
|
|
||||||
virtual bool HandleMouseMove(wxControl *control,
|
|
||||||
const wxMouseEvent& event);
|
|
||||||
virtual bool HandleFocus(wxControl *control, const wxFocusEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// get the position of the mouse click
|
|
||||||
static wxTextPos HitTest(const wxTextCtrl *text, const wxPoint& pos);
|
|
||||||
|
|
||||||
// capture data
|
|
||||||
wxTextCtrl *m_winCapture;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _WX_UNIV_TEXTCTRL_H_
|
#endif // _WX_UNIV_TEXTCTRL_H_
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user