X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca8f0290a44c5b1ecfaa8da0013757ea203092ea..254fbd140e67b60f46d7380c6ac242110ddd7585:/include/wx/os2/textctrl.h diff --git a/include/wx/os2/textctrl.h b/include/wx/os2/textctrl.h index 175edc8ebe..7e4a1127b8 100644 --- a/include/wx/os2/textctrl.h +++ b/include/wx/os2/textctrl.h @@ -12,12 +12,11 @@ #ifndef _WX_TEXTCTRL_H_ #define _WX_TEXTCTRL_H_ +typedef int (wxCALLBACK *wxTreeCtrlCompare)(long lItem1, long lItem2, long lSortData); + class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase { public: - // creation - // -------- - wxTextCtrl(); wxTextCtrl( wxWindow* pParent ,wxWindowID vId @@ -25,14 +24,13 @@ public: ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize ,long lStyle = 0 -#if wxUSE_VALIDATORS ,const wxValidator& rValidator = wxDefaultValidator -#endif ,const wxString& rsName = wxTextCtrlNameStr ) { Create(pParent, vId, rsValue, rPos, rSize, lStyle, rValidator, rsName); } + ~wxTextCtrl(); bool Create( wxWindow* pParent ,wxWindowID vId @@ -40,15 +38,14 @@ public: ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize ,long lStyle = 0 -#if wxUSE_VALIDATORS ,const wxValidator& rValidator = wxDefaultValidator -#endif ,const wxString& rsName = wxTextCtrlNameStr ); - // implement base class pure virtuals + // + // Implement base class pure virtuals // ---------------------------------- - + // virtual wxString GetValue(void) const; virtual void SetValue(const wxString& rsValue); @@ -59,15 +56,13 @@ public: virtual bool IsModified(void) const; virtual bool IsEditable(void) const; - // If the return values from and to are the same, there is no selection. virtual void GetSelection( long* pFrom ,long* pTo ) const; - - // operations + // + // Operations // ---------- - - // editing + // virtual void Clear(void); virtual void Replace( long lFrom ,long lTo @@ -77,20 +72,19 @@ public: ,long lTo ); - // load the controls contents from the file virtual bool LoadFile(const wxString& rsFile); - // clears the dirty flag + virtual void MarkDirty(); virtual void DiscardEdits(void); - // writing text inserts it at the current position, appending always - // inserts it at the end virtual void WriteText(const wxString& rsText); virtual void AppendText(const wxString& rsText); + virtual bool EmulateKeyPress(const wxKeyEvent& rEvent); - // 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 - // which represent column and line. + virtual bool SetStyle( long lStart + ,long lEnd + ,const wxTextAttr& rStyle + ); virtual long XYToPosition( long lX ,long lY ) const; @@ -101,7 +95,6 @@ public: virtual void ShowPosition(long lPos); - // Clipboard operations virtual void Copy(void); virtual void Cut(void); virtual void Paste(void); @@ -110,23 +103,22 @@ public: virtual bool CanCut(void) const; virtual bool CanPaste(void) const; - // Undo/redo virtual void Undo(void); virtual void Redo(void); virtual bool CanUndo(void) const; virtual bool CanRedo(void) const; - // Insertion point virtual void SetInsertionPoint(long lPos); virtual void SetInsertionPointEnd(void); virtual long GetInsertionPoint(void) const; - virtual long GetLastPosition(void) const; + virtual wxTextPos GetLastPosition(void) const; virtual void SetSelection( long lFrom ,long lTo ); virtual void SetEditable(bool bEditable); + virtual void SetWindowStyleFlag(long lStyle); // // Implementation from now on @@ -162,12 +154,16 @@ public: void OnPaste(wxCommandEvent& rEvent); void OnUndo(wxCommandEvent& rEvent); void OnRedo(wxCommandEvent& rEvent); + void OnDelete(wxCommandEvent& rEvent); + void OnSelectAll(wxCommandEvent& rEvent); void OnUpdateCut(wxUpdateUIEvent& rEvent); void OnUpdateCopy(wxUpdateUIEvent& rEvent); void OnUpdatePaste(wxUpdateUIEvent& rEvent); void OnUpdateUndo(wxUpdateUIEvent& rEvent); void OnUpdateRedo(wxUpdateUIEvent& rEvent); + void OnUpdateDelete(wxUpdateUIEvent& rEvent); + void OnUpdateSelectAll(wxUpdateUIEvent& rEvent); inline bool IsMLE(void) {return m_bIsMLE;} inline void SetMLE(bool bIsMLE) {m_bIsMLE = bIsMLE;} @@ -179,7 +175,11 @@ protected: // void AdjustSpaceLimit(void); virtual wxSize DoGetBestSize(void) const; + virtual bool OS2ShouldPreProcessMessage(WXMSG* pMsg); + virtual WXDWORD OS2GetStyle( long lStyle + ,WXDWORD* dwExstyle + ) const; private: bool m_bIsMLE; DECLARE_EVENT_TABLE()