X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e39af974ef7846e26686ae39d74e4696c1fef0c3..31ad423e4fb556ec225a63b161154d3bf3445c1b:/include/wx/univ/textctrl.h diff --git a/include/wx/univ/textctrl.h b/include/wx/univ/textctrl.h index 3dbaa38f8e..eba0ae2314 100644 --- a/include/wx/univ/textctrl.h +++ b/include/wx/univ/textctrl.h @@ -12,7 +12,7 @@ #ifndef _WX_UNIV_TEXTCTRL_H_ #define _WX_UNIV_TEXTCTRL_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "univtextctrl.h" #endif @@ -66,31 +66,6 @@ class WXDLLEXPORT wxTextCtrlCommandProcessor; #define wxACTION_TEXT_UNDO _T("undo") #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 -// ---------------------------------------------------------------------------- - -// the point asked is ... -enum wxTextCtrlHitTestResult -{ - wxTE_HT_BEFORE = -1, // either to the left or upper - wxTE_HT_ON_TEXT, // directly on - wxTE_HT_BELOW, // below [the last line] - wxTE_HT_BEYOND // after [the end of line] -}; -// ... the character returned - // ---------------------------------------------------------------------------- // wxTextCtrl // ---------------------------------------------------------------------------- @@ -152,7 +127,8 @@ public: virtual void Replace(wxTextPos from, wxTextPos to, const wxString& value); virtual void Remove(wxTextPos from, wxTextPos to); - // clears the dirty flag + // sets/clears the dirty flag + virtual void MarkDirty(); virtual void DiscardEdits(); // writing text inserts it at the current position, appending always @@ -215,16 +191,9 @@ public: void RemoveSelection(); wxString GetSelectionText() const; - // find the character at this position, return 0 if the character is - // really there, -1 if the point is before the beginning of the text/line - // and the returned character is the first one to follow it or +1 if it the - // position is beyond the end of line/text and the returned character is - // the last one - // - // NB: pt is in device coords (not adjusted for the client area origin nor - // for the scrolling) - wxTextCtrlHitTestResult HitTest(const wxPoint& pt, - wxTextCoord *col, wxTextCoord *row) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const; // find the character at this position in the given line, return value as // for HitTest() @@ -251,8 +220,7 @@ public: virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const; virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const; - // set the right colours and border - virtual bool IsContainerWindow() const { return TRUE; } + // ensure we have correct default border virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; } // perform an action