X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..2d4957f2401a8814f90cda21ef945d99bc74596e:/include/wx/univ/textctrl.h diff --git a/include/wx/univ/textctrl.h b/include/wx/univ/textctrl.h index 1c854e5149..444962d382 100644 --- a/include/wx/univ/textctrl.h +++ b/include/wx/univ/textctrl.h @@ -5,14 +5,14 @@ // Modified by: // Created: 15.09.00 // RCS-ID: $Id$ -// Copyright: (c) 2000 Vadim Zeitlin +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_UNIV_TEXTCTRL_H_ #define _WX_UNIV_TEXTCTRL_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "univtextctrl.h" #endif @@ -152,7 +152,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 @@ -251,8 +252,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 @@ -265,7 +265,6 @@ public: virtual bool Enable(bool enable = TRUE); // more readable flag testing methods - bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); } bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; } bool WrapLines() const { return !IsSingleLine() && !(GetWindowStyle() & wxHSCROLL); } @@ -456,7 +455,6 @@ protected: // event handlers // -------------- - void OnIdle(wxIdleEvent& event); void OnChar(wxKeyEvent& event); void OnSize(wxSizeEvent& event); @@ -477,6 +475,8 @@ protected: bool DoCut(); bool DoPaste(); + // idle processing + virtual void OnInternalIdle(); private: // all these methods are for multiline text controls only @@ -562,14 +562,14 @@ class WXDLLEXPORT wxStdTextCtrlInputHandler : public wxStdInputHandler public: wxStdTextCtrlInputHandler(wxInputHandler *inphand); - virtual bool HandleKey(wxControl *control, + virtual bool HandleKey(wxInputConsumer *consumer, const wxKeyEvent& event, bool pressed); - virtual bool HandleMouse(wxControl *control, + virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event); - virtual bool HandleMouseMove(wxControl *control, + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event); - virtual bool HandleFocus(wxControl *control, const wxFocusEvent& event); + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event); protected: // get the position of the mouse click