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.
============================= =====================================
+ %pythonAppend Destroy "args[0].thisown = 0"
DocDeclStr(
virtual bool , Destroy(),
"Destroys the window safely. Frames and dialogs are not destroyed
// window attributes
// -----------------
- DocDeclStr(
- virtual void , SetTitle( const wxString& title),
- "Sets the window's title. Applicable only to frames and dialogs.", "");
-
- DocDeclStr(
- virtual wxString , GetTitle() const,
- "Gets the window's title. Applicable only to frames and dialogs.", "");
+ //DocDeclStr(
+ // virtual void , SetTitle( const wxString& title),
+ // "Sets the window's title. Applicable only to frames and dialogs.", "");
+ //DocDeclStr(
+ // virtual wxString , GetTitle() const,
+ // "Gets the window's title. Applicable only to frames and dialogs.", "");
DocDeclStr(
virtual void , SetLabel(const wxString& label),
DocDeclStr(
virtual void , Raise(),
- "Raises the window to the top of the window hierarchy if it is a
-managed window (dialog or frame).", "");
+ "Raises the window to the top of the window hierarchy. In current
+version of wxWidgets this works both for manage and child windows.", "");
DocDeclStr(
virtual void , Lower(),
- "Lowers the window to the bottom of the window hierarchy if it is a
-managed window (dialog or frame).", "");
+ "Lowers the window to the bottom of the window hierarchy. In current
+version of wxWidgets this works both for manage and child windows.", "");
"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(
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
+ %disownarg( wxCaret *caret );
DocDeclStr(
void , SetCaret(wxCaret *caret),
"Sets the caret associated with the window.", "");
+ %cleardisown( wxCaret *caret );
DocDeclStr(
wxCaret *, GetCaret() const,
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.",
"
"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.", "");
%Rename(SetToolTipString, void, SetToolTip( const wxString &tip ));
+
+ %disownarg( wxToolTip *tip );
void SetToolTip( wxToolTip *tip );
+ %cleardisown( wxToolTip *tip );
DocDeclStr(
wxToolTip* , GetToolTip() const,
// drag and drop
// -------------
- // set/retrieve the drop target associated with this window (may be
- // NULL; it's owned by the window and will be deleted by it)
- %apply SWIGTYPE *DISOWN { wxPyDropTarget *dropTarget };
-
+ %disownarg( wxPyDropTarget *dropTarget );
DocDeclStr(
virtual void , SetDropTarget( wxPyDropTarget *dropTarget ),
"Associates a drop target with this window. If the window already has
a drop target, it is deleted.", "");
-
- %clear wxPyDropTarget *dropTarget;
+ %cleardisown( wxPyDropTarget *dropTarget );
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
handler when the window is resized.", "");
+ %disownarg( wxSizer *sizer );
DocDeclStr(
void , SetSizer(wxSizer *sizer, bool deleteOld = true ),
"Sets the window to have the given layout sizer. The window will then
void , SetSizerAndFit( wxSizer *sizer, bool deleteOld = true ),
"The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.", "");
-
+ %cleardisown( wxSizer *sizer );
+
DocDeclStr(
wxSizer *, GetSizer() const,
if hasattr(self, '_setCallbackInfo'):
self._setCallbackInfo(self, self.__class__)
}
+
+ %pythoncode {
+ def SendSizeEvent(self):
+ self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1)))
+ }
};
WXHWND hWnd = (WXHWND)_hWnd;
long id = wxGetWindowId(hWnd);
wxWindow* win = new wxWindow;
- parent->AddChild(win);
+ if (parent)
+ parent->AddChild(win);
win->SetEventHandler(win);
win->SetHWND(hWnd);
win->SetId(id);
}
%}
+//---------------------------------------------------------------------------
+
+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);
+ }
+%}
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------