]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_window.i
Wrappers for *ToText
[wxWidgets.git] / wxPython / src / _window.i
index d907a437595e564444c32b10c8eede65740a171c..f30260b29798e62799e9fe01adfdc4f0ca8fe2e0 100644 (file)
@@ -32,7 +32,7 @@ struct wxVisualAttributes
     %extend {
         wxVisualAttributes() { return new wxVisualAttributes; }
         ~wxVisualAttributes() { delete self; }
-    }
+    } 
     
     // the font used for control label/text inside it
     wxFont font;
@@ -190,7 +190,9 @@ Extra Styles
 MustHaveApp(wxWindow);
 MustHaveApp(wxWindow::FindFocus);
 MustHaveApp(wxWindow::GetCapture);
-MustHaveApp(wxWindow::GetClassDefaultAttributes);
+
+// This one is not restricted to wxWindow
+MustHaveApp(GetClassDefaultAttributes);
 
 class wxWindow : public wxEvtHandler
 {
@@ -415,8 +417,13 @@ default values.", "",
         "Moves the window to the given position.", "",
         MoveXY);
     
+    DocDeclStr(
+        void , SetBestFittingSize(const wxSize& size=wxDefaultSize),
+        "A 'Smart' SetSize that will fill in default size components with the
+window's *best size* values.  Also set's the minsize for use with sizers.", "");
+    
 
-
+    
     DocDeclStr(
         virtual void , Raise(),
         "Raises the window to the top of the window hierarchy if it is a
@@ -504,6 +511,21 @@ after calling Fit.", "");
         GetBestSizeTuple);
     
 
+    DocDeclStr(
+        void , InvalidateBestSize(),
+        "Reset the cached best size value so it will be recalculated the next
+time it is needed.", "");
+
+
+    
+    DocDeclStr(
+        wxSize , GetBestFittingSize() const,
+        "This function will merge the window's best size into the window's
+minimum size, giving priority to the min size components, and returns
+the results.
+", "");
+    
+
     DocDeclStr(
         wxSize , GetAdjustedBestSize() const,
         "This method is similar to GetBestSize, except in one
@@ -829,7 +851,6 @@ by pressing <Enter> such as the OK button on a wx.Dialog.", "");
         "Set this child as temporary default", "");
     
 
-    // Navigates in the specified direction by sending a wxNavigationKeyEvent
     DocDeclAStr(
         virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward),
         "Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool",
@@ -837,22 +858,43 @@ by pressing <Enter> such as the OK button on a wx.Dialog.", "");
 `wx.NavigationKeyEvent`.", "
  
     :param flags: A combination of the ``IsForward`` and ``WinChange``
-                  values in the `wx.NavigationKeyEvent` class, which
-                  determine if the navigation should be in forward or
-                  reverse order, and if it should be able to cross
-                  parent window boundaries, such as between notebook
-                  pages or MDI child frames.  Typically the status of
-                  the Shift key (for forward or reverse) or the
-                  Control key (for WinChange) would be used to
-                  determine how to set the flags.
+        values in the `wx.NavigationKeyEvent` class, which determine
+        if the navigation should be in forward or reverse order, and
+        if it should be able to cross parent window boundaries, such
+        as between notebook pages or MDI child frames.  Typically the
+        status of the Shift key (for forward or reverse) or the
+        Control key (for WinChange) would be used to determine how to
+        set the flags.
 
 One situation in which you may wish to call this method is from a text
 control custom keypress handler to do the default navigation behaviour
 for the tab key, since the standard default behaviour for a multiline
 text control with the wx.TE_PROCESS_TAB style is to insert a tab and
 not navigate to the next control.");
+
     
 
+    DocDeclStr(
+        void , MoveAfterInTabOrder(wxWindow *win),
+        "Moves this window in the tab navigation order after the specified
+sibling window.  This means that when the user presses the TAB key on
+that other window, the focus switches to this window.
+
+The default tab order is the same as creation order.  This function
+and `MoveBeforeInTabOrder` allow to change it after creating all the
+windows.
+", "");
+
+    
+    DocDeclStr(
+        void , MoveBeforeInTabOrder(wxWindow *win),
+        "Same as `MoveAfterInTabOrder` except that it inserts this window just
+before win instead of putting it right after it.", "");
+    
+
+    
+
+
 
 
 
@@ -1269,19 +1311,20 @@ this.", "");
         "Sets the background colour of the window.  Returns True if the colour
 was changed.  The background colour is usually painted by the default
 EVT_ERASE_BACKGROUND event handler function under Windows and
-automatically under GTK.
+automatically under GTK.  Using `wx.NullColour` will reset the window
+to the default background colour.
 
 Note that setting the background colour may not cause an immediate
-refresh, so you may wish to call ClearBackground or Refresh after
+refresh, so you may wish to call `ClearBackground` or `Refresh` after
 calling this function.
 
-Use this function with care under GTK+ as the new appearance of the
-window might not look equally well when used with themes, i.e GTK+'s
-ability to change its look as the user wishes with run-time loadable
-modules.", "");
+Using this function will disable attempts to use themes for this
+window, if the system supports them.  Use with care since usually the
+themes represent the appearance chosen by the user to be used for all
+applications on the system.", "");
 
     DocDeclStr(
-        void , SetDefaultBackgroundColour(const wxColour& colour),
+        void , SetOwnBackgroundColour(const wxColour& colour),
         "", "");
     
 
@@ -1294,7 +1337,7 @@ the window class; it may be the text colour or other colour, or it may
 not be used at all.", "");
 
     DocDeclStr(
-        void , SetDefaultForegroundColour(const wxColour& colour),
+        void , SetOwnForegroundColour(const wxColour& colour),
         "", "");
     
 
@@ -1321,7 +1364,7 @@ The cursor may be wx.NullCursor in which case the window cursor will
 be reset back to default.", "");
     
     DocDeclStr(
-        wxCursor& , GetCursor(),
+        wxCursor , GetCursor(),
         "Return the cursor associated with this window.", "");
     
 
@@ -1331,13 +1374,13 @@ be reset back to default.", "");
         "Sets the font for this window.", "");
     
     DocDeclStr(
-        void , SetDefaultFont(const wxFont& font),
+        void , SetOwnFont(const wxFont& font),
         "", "");
     
 
     
     DocDeclStr(
-        wxFont& , GetFont(),
+        wxFont , GetFont(),
         "Returns the default font used for this window.", "");
 
     
@@ -1789,7 +1832,7 @@ colours.
 By 'intelligently' the following is meant: by default, all windows use
 their own default attributes. However if some of the parent's
 attributes are explicitly changed (that is, using SetFont and not
-SetDefaultFont) and if the corresponding attribute hadn't been
+SetOwnFont) and if the corresponding attribute hadn't been
 explicitly set for this window itself, then this window takes the same
 value as used by the parent. In addition, if the window overrides
 ShouldInheritColours to return false, the colours will not be changed