]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/textctrl.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / textctrl.h
index b9f7a81a44cb4c16e425feaa68e3f1041e89860e..cc1d8d1e056da3cc2aabd24dab3086fb477d2479 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        textctrl.h
+// Name:        wx/os2/textctrl.h
 // Purpose:     wxTextCtrl class
 // Author:      David Webster
 // Modified by:
 // Created:     10/17/99
 // Purpose:     wxTextCtrl class
 // Author:      David Webster
 // Modified by:
 // Created:     10/17/99
-// RCS-ID:      $Id$
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -12,7 +11,9 @@
 #ifndef _WX_TEXTCTRL_H_
 #define _WX_TEXTCTRL_H_
 
 #ifndef _WX_TEXTCTRL_H_
 #define _WX_TEXTCTRL_H_
 
-class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
+typedef int (wxCALLBACK *wxTreeCtrlCompare)(long lItem1, long lItem2, long lSortData);
+
+class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
 {
 public:
     wxTextCtrl();
 {
 public:
     wxTextCtrl();
@@ -22,14 +23,13 @@ public:
                ,const wxPoint&     rPos = wxDefaultPosition
                ,const wxSize&      rSize = wxDefaultSize
                ,long               lStyle = 0
                ,const wxPoint&     rPos = wxDefaultPosition
                ,const wxSize&      rSize = wxDefaultSize
                ,long               lStyle = 0
-#if wxUSE_VALIDATORS
                ,const wxValidator& rValidator = wxDefaultValidator
                ,const wxValidator& rValidator = wxDefaultValidator
-#endif
                ,const wxString&    rsName = wxTextCtrlNameStr
               )
     {
         Create(pParent, vId, rsValue, rPos, rSize, lStyle, rValidator, rsName);
     }
                ,const wxString&    rsName = wxTextCtrlNameStr
               )
     {
         Create(pParent, vId, rsValue, rPos, rSize, lStyle, rValidator, rsName);
     }
+    virtual ~wxTextCtrl();
 
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
 
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
@@ -37,9 +37,7 @@ public:
                 ,const wxPoint&     rPos = wxDefaultPosition
                 ,const wxSize&      rSize = wxDefaultSize
                 ,long               lStyle = 0
                 ,const wxPoint&     rPos = wxDefaultPosition
                 ,const wxSize&      rSize = wxDefaultSize
                 ,long               lStyle = 0
-#if wxUSE_VALIDATORS
                 ,const wxValidator& rValidator = wxDefaultValidator
                 ,const wxValidator& rValidator = wxDefaultValidator
-#endif
                 ,const wxString&    rsName = wxTextCtrlNameStr
                );
 
                 ,const wxString&    rsName = wxTextCtrlNameStr
                );
 
@@ -48,7 +46,6 @@ public:
     // ----------------------------------
     //
     virtual      wxString GetValue(void) const;
     // ----------------------------------
     //
     virtual      wxString GetValue(void) const;
-    virtual void SetValue(const wxString& rsValue);
 
     virtual int      GetLineLength(long nLineNo) const;
     virtual wxString GetLineText(long nLineNo) const;
 
     virtual int      GetLineLength(long nLineNo) const;
     virtual wxString GetLineText(long nLineNo) const;
@@ -73,12 +70,14 @@ public:
                         ,long lTo
                        );
 
                         ,long lTo
                        );
 
-    virtual bool LoadFile(const wxString& rsFile);
+    virtual bool DoLoadFile(const wxString& rsFile, int fileType);
 
 
+    virtual void MarkDirty();
     virtual void DiscardEdits(void);
 
     virtual void WriteText(const wxString& rsText);
     virtual void AppendText(const wxString& rsText);
     virtual void DiscardEdits(void);
 
     virtual void WriteText(const wxString& rsText);
     virtual void AppendText(const wxString& rsText);
+    virtual bool EmulateKeyPress(const wxKeyEvent& rEvent);
 
     virtual bool SetStyle( long              lStart
                           ,long              lEnd
 
     virtual bool SetStyle( long              lStart
                           ,long              lEnd
@@ -111,12 +110,13 @@ public:
     virtual void SetInsertionPoint(long lPos);
     virtual void SetInsertionPointEnd(void);
     virtual long GetInsertionPoint(void) const;
     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 SetSelection( long lFrom
                               ,long lTo
                              );
     virtual void SetEditable(bool bEditable);
+    virtual void SetWindowStyleFlag(long lStyle);
 
     //
     // Implementation from now on
 
     //
     // Implementation from now on
@@ -152,12 +152,16 @@ public:
     void OnPaste(wxCommandEvent& rEvent);
     void OnUndo(wxCommandEvent& rEvent);
     void OnRedo(wxCommandEvent& rEvent);
     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 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;}
 
     inline bool IsMLE(void) {return m_bIsMLE;}
     inline void SetMLE(bool bIsMLE) {m_bIsMLE = bIsMLE;}
@@ -171,7 +175,19 @@ protected:
     virtual wxSize DoGetBestSize(void) const;
     virtual bool   OS2ShouldPreProcessMessage(WXMSG* pMsg);
 
     virtual wxSize DoGetBestSize(void) const;
     virtual bool   OS2ShouldPreProcessMessage(WXMSG* pMsg);
 
+    virtual WXDWORD OS2GetStyle( long     lStyle
+                                ,WXDWORD* dwExstyle
+                               ) const;
+
+    virtual void DoSetValue(const wxString &value, int flags = 0);
+
+    bool m_bSkipUpdate;
+
 private:
 private:
+    // implement wxTextEntry pure virtual: it implements all the operations for
+    // the simple EDIT controls
+    virtual WXHWND GetEditHWND() const { return m_hWnd; }
+
     bool                            m_bIsMLE;
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxTextCtrl)
     bool                            m_bIsMLE;
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxTextCtrl)