wx.WS_EX_PROCESS_IDLE This window should always process idle
events, even if the mode set by
- wx.IdleEvent.SetMode is
+ `wx.IdleEvent.SetMode` is
wx.IDLE_PROCESS_SPECIFIED.
wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI
update events, even if the mode
- set by wxUpdateUIEvent::SetMode is
+ set by `wx.UpdateUIEvent.SetMode` is
wxUPDATE_UI_PROCESS_SPECIFIED.
============================= =====================================
int sizeFlags = wxSIZE_AUTO ),
"Sets the position and size of the window in pixels. The sizeFlags
parameter indicates the interpretation of the other params if they are
--1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
-shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
-used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
-dimensions of -1 and less to be interpreted as real dimensions, not
-default values.", "",
+equal to -1.
+
+ ======================== ======================================
+ wx.SIZE_AUTO A -1 indicates that a class-specific
+ default should be used.
+ wx.SIZE_USE_EXISTING Axisting dimensions should be used if
+ -1 values are supplied.
+ wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
+ interpreted as real dimensions, not
+ default values.
+ ======================== ======================================
+", "",
SetDimensions);
dimensions the border or title bar have when trying to fit the window
around panel items, for example.", "");
void SetClientSize( const wxSize& size );
- %name(SetClientSizeWH) void SetClientSize( int width, int height );
- %name(SetClientRect) void SetClientSize(const wxRect& rect);
+ %Rename(SetClientSizeWH, void, SetClientSize( int width, int height ));
+ %Rename(SetClientRect, void, SetClientSize(const wxRect& rect));
DocStr(GetPosition, // sets the docstring for both
"Reset the cached best size value so it will be recalculated the next
time it is needed.", "");
+ DocDeclStr(
+ void , CacheBestSize(const wxSize& size) const,
+ "Cache the best size so it doesn't need to be calculated again, (at least until
+some properties of the window change.)", "");
DocDeclStr(
virtual void SetSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
- %name(SetSizeHintsSz) void SetSizeHints( const wxSize& minSize,
- const wxSize& maxSize=wxDefaultSize,
- const wxSize& incSize=wxDefaultSize);
+ %Rename(SetSizeHintsSz, void, SetSizeHints( const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize,
+ const wxSize& incSize=wxDefaultSize));
DocStr(SetVirtualSizeHints,
the virtual area of the window outside the given bounds.", "");
virtual void SetVirtualSizeHints( int minW, int minH,
int maxW = -1, int maxH = -1 );
- %name(SetVirtualSizeHintsSz)void SetVirtualSizeHints(
- const wxSize& minSize, const wxSize& maxSize=wxDefaultSize);
+ %Rename(SetVirtualSizeHintsSz, void, SetVirtualSizeHints(
+ const wxSize& minSize, const wxSize& maxSize=wxDefaultSize));
is just the client area of the window, but for some like scrolled
windows it is more or less independent of the screen window size.", "");
void SetVirtualSize(const wxSize& size );
- %name(SetVirtualSizeWH) void SetVirtualSize( int w, int h );
+ %Rename(SetVirtualSizeWH, void, SetVirtualSize( int w, int h ));
DocStr(GetVirtualSize,
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.", "");
- %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
- %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
- %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
- %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz);
+ %Rename(ConvertDialogPointToPixels, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+ %Rename(ConvertDialogSizeToPixels, wxSize, ConvertDialogToPixels(const wxSize& sz));
+ %Rename(DLG_PNT, wxPoint, ConvertDialogToPixels(const wxPoint& pt));
+ %Rename(DLG_SZE, wxSize, ConvertDialogToPixels(const wxSize& sz));
DocStr(ConvertPixelPointToDialog,
average character width and then divided by 4. For the y dimension,
the dialog units are multiplied by the average character height and
then divided by 8.", "");
- %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
- %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz);
+ %Rename(ConvertPixelPointToDialog, wxPoint, ConvertPixelsToDialog(const wxPoint& pt));
+ %Rename(ConvertPixelSizeToDialog, wxSize, ConvertPixelsToDialog(const wxSize& sz));
DocDeclStr(
- void , RefreshRect(const wxRect& rect),
+ void , RefreshRect(const wxRect& rect, bool eraseBackground = true),
"Redraws the contents of the given rectangle: the area inside it will
be repainted. This is the same as Refresh but has a nicer syntax.", "");
optimize redrawing by only redrawing those areas, which have been
exposed.", "");
bool IsExposed( int x, int y, int w=1, int h=1 ) const;
- %name(IsExposedPoint) bool IsExposed( const wxPoint& pt ) const;
- %name(IsExposedRect) bool IsExposed( const wxRect& rect ) const;
+ %Rename(IsExposedPoint, bool, IsExposed( const wxPoint& pt ) const);
+ %Rename(IsExposedRect, bool, IsExposed( const wxRect& rect ) const);
"Returns the foreground colour of the window. The interpretation of
foreground colour is dependent on the window class; it may be the text
colour or other colour, or it may not be used at all.", "");
+
+ DocDeclStr(
+ bool , InheritsBackgroundColour() const,
+ "", "");
+
+ DocDeclStr(
+ bool , UseBgCol() const,
+ "", "");
+
+// TODO:
+// // if the window shouldn't inherit its colour from the parent, override
+// // this function to return true
+// //
+// // this is currently only used by wxMSW and wxUniv but should be useful for
+// // the other ports too
+// virtual bool ProvidesBackground() const;
+
// Set/get the background style.
// Pass one of wxBG_STYLE_SYSTEM, wxBG_STYLE_COLOUR, wxBG_STYLE_CUSTOM
"Returns the background style of the window.
:see: `SetBackgroundStyle`", "");
+
+ DocDeclStr(
+ bool , HasTransparentBackground(),
+ "Returns True if this window's background is transparent (as, for
+example, for `wx.StaticText`) and should show the parent window's
+background.
+This method is mostly used internally by the library itself and you
+normally shouldn't have to call it. You may, however, have to override
+it in your custom control classes to ensure that background is painted
+correctly.", "");
+
DocDeclStr(
virtual bool , SetCursor( const wxCursor &cursor ),
function from your application to ensure that your UI is up-to-date at
a particular point in time (as far as your EVT_UPDATE_UI handlers are
concerned). This may be necessary if you have called
-wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
+`wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
limit the overhead that wxWindows incurs by sending update UI events
in idle time.",
"
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);
+ %Rename(PopupMenuXY, bool, PopupMenu(wxMenu *menu, int x=-1, int y=-1));
bool PopupMenu(wxMenu *menu, const wxPoint& pos=wxDefaultPosition);
"Physically scrolls the pixels in the window and move child windows
accordingly. Use this function to optimise your scrolling
implementations, to minimise the area that must be redrawn. Note that
-it is rarely required to call this function from a user program.",
-"
+it is rarely required to call this function from a user program.","
+
:param dx: Amount to scroll horizontally.
:param dy: Amount to scroll vertically.
DocStr(SetToolTip,
"Attach a tooltip to the window.", "");
- %name(SetToolTipString) void SetToolTip( const wxString &tip );
+ %Rename(SetToolTipString, void, SetToolTip( const wxString &tip ));
void SetToolTip( wxToolTip *tip );
DocDeclStr(
"Returns the associated drop target, which may be None.", "");
-#ifdef __WXMSW__ // TODO: should I drop-kick this?
- DocDeclStr(
- void , DragAcceptFiles(bool accept),
+ DocStr(DragAcceptFiles,
"Enables or disables eligibility for drop file events, EVT_DROP_FILES.
-Only available on Windows.", "");
+Only functional on Windows.", "");
+#ifdef __WXMSW__
+ void DragAcceptFiles(bool accept);
+#else
+ %extend {
+ void DragAcceptFiles(bool accept) {}
+ }
#endif
#endif
ShouldInheritColours to return false, the colours will not be changed
no matter what and only the font might.
-This rather complicated logic is necessary in order to accomodate the
-different usage scenarius. The most common one is when all default
+This rather complicated logic is necessary in order to accommodate the
+different usage scenarios. The most common one is when all default
attributes are used and in this case, nothing should be inherited as
in modern GUIs different controls use different fonts (and colours)
than their siblings so they can't inherit the same value from the
}
%}
+//---------------------------------------------------------------------------
+
+DocStr(GetTopLevelWindows,
+"Returns a list of the the application's top-level windows, (frames,
+dialogs, etc.) NOTE: Currently this is a copy of the list maintained
+by wxWidgets, and so it is only valid as long as no top-level windows
+are closed or new top-level windows are created.
+", "");
+%inline %{
+ PyObject* GetTopLevelWindows() {
+ return wxPy_ConvertList(&wxTopLevelWindows);
+ }
+%}
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------