]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/textctrl.h
add missing sample stc
[wxWidgets.git] / include / wx / msw / textctrl.h
index c12e9089bc572ea2ffd2d28a37229a29a20e8dd7..a56a3ff7d67cf95f69daee965203fb10283f2b84 100644 (file)
@@ -45,7 +45,7 @@ public:
     // ----------------------------------
 
     virtual wxString GetValue() const;
-    virtual void SetValue(const wxString& value);
+    virtual bool IsEmpty() const;
 
     virtual wxString GetRange(long from, long to) const;
 
@@ -66,8 +66,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();
@@ -139,6 +139,10 @@ public:
 
     // Implementation from now on
     // --------------------------
+#if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
+    virtual void SetDropTarget(wxDropTarget *dropTarget);
+#endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
 
     virtual void SetWindowStyleFlag(long style);
 
@@ -156,6 +160,8 @@ public:
     // the colours for them otherwise
     virtual bool SetBackgroundColour(const wxColour& colour);
     virtual bool SetForegroundColour(const wxColour& colour);
+#else
+    bool IsRich() const { return false; }
 #endif // wxUSE_RICHEDIT
 
 #if wxUSE_INKEDIT && wxUSE_RICHEDIT
@@ -168,6 +174,9 @@ public:
 
     virtual bool AcceptsFocus() const;
 
+    // returns true if the platform should explicitly apply a theme border
+    virtual bool CanApplyThemeBorder() const;
+
     // callbacks
     void OnDropFiles(wxDropFilesEvent& event);
     void OnChar(wxKeyEvent& event); // Process 'enter' if required
@@ -207,6 +216,17 @@ protected:
     // common part of all ctors
     void Init();
 
+    // creates the control of appropriate class (plain or rich edit) with the
+    // styles corresponding to m_windowStyle
+    //
+    // this is used by ctor/Create() and when we need to recreate the control
+    // later
+    bool MSWCreateText(const wxString& value,
+                       const wxPoint& pos,
+                       const wxSize& size);
+
+    virtual void DoSetValue(const wxString &value, int flags = 0);
+
     // return true if this control has a user-set limit on amount of text (i.e.
     // the limit is due to a previous call to SetMaxLength() and not built in)
     bool HasSpaceLimit(unsigned int *len) const;
@@ -229,7 +249,8 @@ 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,
+                     int flags = SetValue_SendEvent | SetValue_SelectionOnly);
 
     // set the selection possibly without scrolling the caret into view
     void DoSetSelection(long from, long to, bool scrollCaret = true);