struct wxVisualAttributes
{
%extend {
- wxVisualAttributes() {}
+ wxVisualAttributes() { return new wxVisualAttributes; }
~wxVisualAttributes() {}
}
RefDoc(wxWindow, ""); // turn it off for the ctors
DocCtorStr(
- wxWindow(wxWindow* parent, const wxWindowID id,
+ wxWindow(wxWindow* parent, const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
DocDeclStr(
- bool , Create(wxWindow* parent, const wxWindowID id,
+ bool , Create(wxWindow* parent, const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
anything if there are no subwindows.");
-
- DocDeclStr(
- virtual void , SetSizeHints( int minW, int minH,
- int maxW = -1, int maxH = -1,
- int incW = -1, int incH = -1 ),
+
+ %nokwargs SetSizeHints;
+ DocStr(SetSizeHints,
"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 );
+ void SetSizeHints( const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize,
+ const wxSize& incSize=wxDefaultSize);
- DocDeclStr(
- virtual void , SetVirtualSizeHints( int minW, int minH,
- int maxW = -1, int maxH = -1 ),
+
+ %nokwargs SetVirtualSizeHints;
+ DocStr(SetVirtualSizeHints,
"Allows specification of minimum and maximum virtual window sizes. 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 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);
DocDeclStr(
virtual int , GetMinWidth() const,
"");
+ DocDeclStr(
+ virtual wxSize , GetMinSize() const,
+ "");
+
DocStr(SetVirtualSize,
"Set the the virtual size of a window in pixels. For most windows this
virtual wxValidator *, GetValidator(),
"Returns a pointer to the current validator for the window, or None if
there is none.");
+
+
+ DocDeclStr(
+ virtual bool , Validate(),
+ "Validates the current values of the child controls using their
+validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
+extra style flag set, the method will also call Validate() of all
+child windows. Returns false if any of the validations failed.");
+
+
+ DocDeclStr(
+ virtual bool , TransferDataToWindow(),
+ "Transfers values to child controls from data areas specified by
+their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
+extra style flag set, the method will also call
+TransferDataToWindow() of all child windows.");
+
+ DocDeclStr(
+ virtual bool , TransferDataFromWindow(),
+ "Transfers values from child controls to data areas specified by
+their validators. Returns false if a transfer failed. If the
+window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the
+method will also call TransferDataFromWindow() of all child
+windows.");
+
+
+ DocDeclStr(
+ virtual void , InitDialog(),
+ "Sends an EVT_INIT_DIALOG event, whose handler usually transfers
+data to the dialog via validators.");
+
use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
hotkey was registered successfully.");
bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) {
- #if wxUSE_HOTKEY
+ %#if wxUSE_HOTKEY
return self->RegisterHotKey(hotkeyId, modifiers, keycode);
- #else
+ %#else
return False;
- #endif
+ %#endif
}
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.");
+
+ DocDeclStr(
+ void , SetDefaultBackgroundColour(const wxColour& colour),
+ "");
+
+
DocDeclStr(
virtual bool , SetForegroundColour( const wxColour &colour ),
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),
+ "");
+
+
DocDeclStr(
wxColour , GetBackgroundColour() const,
"Returns the background colour of the window.");
virtual bool , SetFont( const wxFont &font ),
"Sets the font for this window.");
+ DocDeclStr(
+ void , SetDefaultFont(const wxFont& font),
+ "");
+
+
+
DocDeclStr(
wxFont& , GetFont(),
"Returns the default font used for this window.");
#endif
+// TODO: These are currently protected, but woudl be nice ot have them in wxPython...
+//
+// // inherit the parents visual attributes if they had been explicitly set
+// // by the user (i.e. we don't inherit default attributes) and if we don't
+// // have our own explicitly set
+// virtual void InheritAttributes();
+
+// // returns false from here if this window doesn't want to inherit the
+// // parents colours even if InheritAttributes() would normally do it
+// //
+// // this just provides a simple way to customize InheritAttributes()
+// // behaviour in the most common case
+// virtual bool ShouldInheritColours() const { return false; }
+
%pythoncode {
def PostCreate(self, pre):