"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
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
"Allows specification of minimum and maximum window sizes, and window
size increments. If a pair of values is not set (or set to -1), the
default values will be used. If this function is called, the user
-will not be able to size the window outside the given bounds. The
-resizing increments are only significant under Motif or Xt.", "");
- virtual void SetSizeHints( int minW, int minH,
- int maxW = -1, int maxH = -1,
- int incW = -1, int incH = -1 );
+will not be able to size the window outside the given bounds (if it is
+a top-level window.) Sizers will also inspect the minimum window size
+and will use that value if set when calculating layout.
+
+The resizing increments are only significant under Motif or Xt.", "
+
+:see: `GetMinSize`, `GetMaxSize`, `SetMinSize`, `SetMaxSize`
+");
void SetSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize,
const wxSize& incSize=wxDefaultSize);
+ virtual void SetSizeHints( int minW, int minH,
+ int maxW = -1, int maxH = -1,
+ int incW = -1, int incH = -1 );
%nokwargs SetVirtualSizeHints;
pair of values is not set (or set to -1), the default values will be
used. If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.", "");
- virtual void SetVirtualSizeHints( int minW, int minH,
- int maxW = -1, int maxH = -1 );
void SetVirtualSizeHints( const wxSize& minSize,
const wxSize& maxSize=wxDefaultSize);
+ virtual void SetVirtualSizeHints( int minW, int minH,
+ int maxW = -1, int maxH = -1 );
DocDeclStr(
- virtual int , GetMinWidth() const,
+ virtual wxSize , GetMaxSize() const,
"", "");
DocDeclStr(
- virtual int , GetMinHeight() const,
+ virtual wxSize , GetMinSize() const,
"", "");
DocDeclStr(
- int , GetMaxWidth() const,
+ void , SetMinSize(const wxSize& minSize),
+ "A more convenient method than `SetSizeHints` for setting just the
+min size.", "");
+
+ DocDeclStr(
+ void , SetMaxSize(const wxSize& maxSize),
+ "A more convenient method than `SetSizeHints` for setting just the
+max size.", "");
+
+
+
+ DocDeclStr(
+ virtual int , GetMinWidth() const,
"", "");
DocDeclStr(
- int , GetMaxHeight() const,
+ virtual int , GetMinHeight() const,
"", "");
-
DocDeclStr(
- virtual wxSize , GetMaxSize() const,
+ int , GetMaxWidth() const,
"", "");
-
DocDeclStr(
- virtual wxSize , GetMinSize() const,
+ int , GetMaxHeight() const,
"", "");
+
DocStr(SetVirtualSize,
"Set the the virtual size of a window in pixels. For most windows this
is just the client area of the window, but for some like scrolled
"Set this child as temporary default", "");
+ DocDeclAStr(
+ virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward),
+ "Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool",
+ "Does keyboard navigation from this window to another, by sending a
+`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.
+
+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.");
+
+
// parent/children relations
// -------------------------
"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),
be reset back to default.", "");
DocDeclStr(
- wxCursor& , GetCursor(),
+ wxCursor , GetCursor(),
"Return the cursor associated with this window.", "");
DocDeclStr(
- wxFont& , GetFont(),
+ wxFont , GetFont(),
"Returns the default font used for this window.", "");
DocStr(PopupMenu,
- "Pops up the given menu at the specified coordinates, relative to this
-window, and returns control when the user has dismissed the menu. If a
-menu item is selected, the corresponding menu event is generated and
-will be processed as usual.", "");
- %name(PopupMenuXY) bool PopupMenu(wxMenu *menu, int x, int y);
- bool PopupMenu(wxMenu *menu, const wxPoint& pos);
+ "Pops up the given menu at the specified coordinates, relative to this window,
+and returns control when the user has dismissed the menu. If a menu item is
+selected, the corresponding menu event is generated and will be processed as
+usual. If the default position is given then the current position of the
+mouse cursor will be used.", "");
+ %name(PopupMenuXY) bool PopupMenu(wxMenu *menu, int x=-1, int y=-1);
+ bool PopupMenu(wxMenu *menu, const wxPoint& pos=wxDefaultPosition);