DocStr(GetPosition, // sets the docstring for both
- "Get the window's position.", "");
- wxPoint GetPosition();
+ "Get the window's position. Notice that the position is in client
+coordinates for child windows and screen coordinates for the top level
+ones, use `GetScreenPosition` if you need screen coordinates for all
+kinds of windows.", "");
+ wxPoint GetPosition() const;
DocDeclAName(
- void, GetPosition(int *OUTPUT, int *OUTPUT),
+ void, GetPosition(int *OUTPUT, int *OUTPUT) const,
"GetPositionTuple() -> (x,y)",
GetPositionTuple);
+
+ DocStr(GetScreenPosition, // sets the docstring for both
+ "Get the position of the window in screen coordinantes.", "");
+ wxPoint GetScreenPosition() const;
+ DocDeclAName(
+ void, GetScreenPosition(int *OUTPUT, int *OUTPUT) const,
+ "GetScreenPositionTuple() -> (x,y)",
+ GetScreenPositionTuple);
+
+ DocDeclStr(
+ wxRect , GetScreenRect() const,
+ "Returns the size and position of the window in screen coordinantes as
+a `wx.Rect` object.", "
+:see: `GetRect`, `GetScreenPosition`");
+
DocStr(GetSize, "Get the window size.", "");
wxSize GetSize() const;
DocDeclStr(
wxRect , GetRect() const,
- "Returns the size and position of the window as a wx.Rect object.", "");
+ "Returns the size and position of the window as a `wx.Rect` object.", "");
DocStr(GetClientSize,
DocDeclStr(
virtual void , SetTmpDefaultItem(wxWindow * win),
"Set this child as temporary default", "");
+
+ DocDeclStr(
+ virtual wxWindow *, GetTmpDefaultItem() const,
+ "Return the temporary default item, which can be None.", "");
+
DocDeclAStr(
virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward),
"Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool",
"Removes a child window. This is called automatically by window
deletion functions so should not be required by the application
programmer.", "");
-
+ DocStr(SetDoubleBuffered,
+ "Currently wxGTK2 only.", "");
+#ifdef __WXGTK__
+ void SetDoubleBuffered(bool on);
+#else
+ %extend {
+ void SetDoubleBuffered(bool on) {}
+ }
+#endif
+
// looking for windows
// -------------------
void , SetHelpText(const wxString& text),
"Sets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
-wxHelpProvider implementation, and not in the window object itself.", "");
+`wx.HelpProvider` implementation, and not in the window object itself.", "");
DocDeclStr(
DocDeclStr(
+ virtual wxString , GetHelpTextAtPoint(const wxPoint& pt,
+ wxHelpEvent::Origin origin) const,
+ "Get the help string associated with the given position in this window.
+
+Notice that pt may be invalid if event origin is keyboard or unknown
+and this method should return the global window help text then
+", "");
+
+
+ DocDeclStr(
wxString , GetHelpText() const,
"Gets the help text to be used as context-sensitive help for this
window. Note that the text is actually stored by the current
-wxHelpProvider implementation, and not in the window object itself.", "");
+`wx.HelpProvider` implementation, and not in the window object itself.", "");
// constraints and sizers
// ----------------------
- // set the constraints for this window or retrieve them (may be NULL)
+ %disownarg(wxLayoutConstraints*);
DocDeclStr(
void , SetConstraints( wxLayoutConstraints *constraints ),
"Sets the window to have the given layout constraints. If an existing
wxLayoutConstraints *, GetConstraints() const,
"Returns a pointer to the window's layout constraints, or None if there
are none.", "");
+ %cleardisown(wxLayoutConstraints*);
DocDeclStr(
%pythoncode {
def SendSizeEvent(self):
- self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1)))
+ self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1)))
}
};