]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/textentry.h
Correct wxEVT_AUXn_XXX event types names.
[wxWidgets.git] / interface / wx / textentry.h
index df1ddc9100869dd9b61066b8879a94b21a117d2d..89bbe2acaa6d9c1ade63e9b072cf52f3384277d3 100644 (file)
@@ -111,7 +111,7 @@ public:
         Sets the new text control value.
 
         It also marks the control as not-modified which means that IsModified()
         Sets the new text control value.
 
         It also marks the control as not-modified which means that IsModified()
-        would return @false immediately after the call to SetValue().
+        would return @false immediately after the call to ChangeValue().
 
         The insertion point is set to the start of the control (i.e. position
         0) by this function.
 
         The insertion point is set to the start of the control (i.e. position
         0) by this function.
@@ -198,6 +198,11 @@ public:
             The returned first position.
         @param to
             The returned last position.
             The returned first position.
         @param to
             The returned last position.
+
+        @beginWxPerlOnly
+        In wxPerl this method takes no parameters and returns a
+        2-element list (from, to).
+        @endWxPerlOnly
     */
     virtual void GetSelection(long* from, long* to) const;
 
     */
     virtual void GetSelection(long* from, long* to) const;
 
@@ -351,6 +356,65 @@ public:
     */
     virtual void SelectAll();
 
     */
     virtual void SelectAll();
 
+    /**
+        Sets a hint shown in an empty unfocused text control.
+
+        The hints are usually used to indicate to the user what is supposed to
+        be entered into the given entry field, e.g. a common use of them is to
+        show an explanation of what can be entered in a wxSearchCtrl.
+
+        The hint is shown (usually greyed out) for an empty control until it
+        gets focus and is shown again if the control loses it and remains
+        empty. It won't be shown once the control has a non-empty value,
+        although it will be shown again if the control contents is cleared.
+        Because of this, it generally only makes sense to use hints with the
+        controls which are initially empty.
+
+        Notice that hints are known as <em>cue banners</em> under MSW or
+        <em>placeholder strings</em> under OS X.
+
+        @since 2.9.0
+     */
+    virtual void SetHint(const wxString& hint);
+
+    /**
+        Returns the current hint string.
+
+        See SetHint() for more information about hints.
+
+        @since 2.9.0
+     */
+    virtual wxString GetHint() const;
+
+    //@{
+    /**
+        Attempts to set the control margins. When margins are given as wxPoint,
+        x indicates the left and y the top margin. Use -1 to indicate that
+        an existing value should be used.
+
+        @return
+            @true if setting of all requested margins was successful.
+
+        @since 2.9.1
+    */
+    bool SetMargins(const wxPoint& pt);
+    bool SetMargins(wxCoord left, wxCoord top = -1);
+    //@}
+
+    /**
+        Returns the margins used by the control. The @c x field of the returned
+        point is the horizontal margin and the @c y field is the vertical one.
+
+        @remarks If given margin cannot be accurately determined, its value
+                will be set to -1. On some platforms you cannot obtain valid
+                margin values until you have called SetMargins().
+
+        @see SetMargins()
+
+        @since 2.9.1
+    */
+    wxPoint GetMargins() const;
+
     /**
         Sets the new text control value.
 
     /**
         Sets the new text control value.