X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffecfa5aeb540b54914739dbb8603edbbd4c00a0..d537baffe90cf5925fed4f5e4d90bb00e7514f9c:/include/wx/palmos/textctrl.h diff --git a/include/wx/palmos/textctrl.h b/include/wx/palmos/textctrl.h index e12608bc79..98d73a6be2 100644 --- a/include/wx/palmos/textctrl.h +++ b/include/wx/palmos/textctrl.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/palmos/textctrl.h // Purpose: wxTextCtrl class -// Author: William Osborne +// Author: William Osborne - minimal working wxPalmOS port // Modified by: // Created: 10/13/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,10 +12,6 @@ #ifndef _WX_TEXTCTRL_H_ #define _WX_TEXTCTRL_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "textctrl.h" -#endif - class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase { public: @@ -35,7 +31,7 @@ public: Create(parent, id, value, pos, size, style, validator, name); } - ~wxTextCtrl(); + virtual ~wxTextCtrl(); bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, @@ -49,9 +45,6 @@ public: // ---------------------------------- virtual wxString GetValue() const; - virtual void SetValue(const wxString& value); - - virtual wxString GetRange(long from, long to) const; virtual int GetLineLength(long lineNo) const; virtual wxString GetLineText(long lineNo) const; @@ -70,8 +63,8 @@ public: virtual void Replace(long from, long to, const wxString& value); virtual void Remove(long from, long to); - // load the controls contents from the file - virtual bool LoadFile(const wxString& file); + // load the control's contents from the file + virtual bool DoLoadFile(const wxString& file, int fileType); // clears the dirty flag virtual void MarkDirty(); @@ -84,10 +77,6 @@ public: virtual void WriteText(const wxString& text); virtual void AppendText(const wxString& text); -#ifdef __WIN32__ - virtual bool EmulateKeyPress(const wxKeyEvent& event); -#endif // __WIN32__ - #if wxUSE_RICHEDIT // apply text attribute to the range of text (only works with richedit // controls) @@ -127,7 +116,7 @@ public: virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(); virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; + virtual wxTextPos GetLastPosition() const; virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); @@ -140,12 +129,8 @@ public: // Implementation from now on // -------------------------- - virtual void SetWindowStyleFlag(long style); - virtual void Command(wxCommandEvent& event); virtual bool MSWCommand(WXUINT param, WXWORD id); - virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam); #if wxUSE_RICHEDIT virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); @@ -159,8 +144,6 @@ public: virtual bool SetForegroundColour(const wxColour& colour); #endif // wxUSE_RICHEDIT - virtual void AdoptAttributesFromHWND(); - virtual bool AcceptsFocus() const; // callbacks @@ -195,6 +178,9 @@ protected: // common part of all ctors void Init(); + virtual void DoSetValue(const wxString& value, int flags = 0); + + // intercept WM_GETDLGCODE virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); @@ -216,10 +202,10 @@ protected: // replace the contents of the selection or of the entire control with the // given text - void DoWriteText(const wxString& text, bool selectionOnly = TRUE); + void DoWriteText(const wxString& text, bool selectionOnly = true); // set the selection possibly without scrolling the caret into view - void DoSetSelection(long from, long to, bool scrollCaret = TRUE); + void DoSetSelection(long from, long to, bool scrollCaret = true); // return true if there is a non empty selection in the control bool HasSelection() const; @@ -228,7 +214,7 @@ protected: // position long GetLengthOfLineContainingPos(long pos) const; - // send TEXT_UPDATED event, return TRUE if it was handled, FALSE otherwise + // send TEXT_UPDATED event, return true if it was handled, false otherwise bool SendUpdateEvent(); // override some base class virtuals @@ -244,7 +230,7 @@ protected: int m_verRichEdit; #endif // wxUSE_RICHEDIT - // if TRUE, SendUpdateEvent() will eat the next event (see comments in the + // if true, SendUpdateEvent() will eat the next event (see comments in the // code as to why this is needed) bool m_suppressNextUpdate;