~wxVisualAttributes() { delete self; }
}
- // the font used for control label/text inside it
- wxFont font;
-
- // the foreground colour
- wxColour colFg;
+// // the font used for control label/text inside it
+// wxFont font;
+// // the foreground colour
+// wxColour colFg;
+// // the background colour, may be wxNullColour if the controls background
+// // colour is not solid
+// wxColour colBg;
+
+ // Use our own getters and properties instead of the ones that SWIG will
+ // generate, so copies of the attributes will be made when they are
+ // accessed, instead of using a pointer to the one in the object which may
+ // be temporary.
+ %extend {
+ wxFont _get_font() { return self->font; }
+ wxColour _get_colFg() { return self->colFg; }
+ wxColour _get_colBg() { return self->colBg; }
+ }
- // the background colour, may be wxNullColour if the controls background
- // colour is not solid
- wxColour colBg;
+ %property(font, _get_font)
+ %property(colFg, _get_colFg)
+ %property(colBg, _get_colBg)
};
long , GetExtraStyle() const,
"Returns the extra style bits for the window.", "");
+ DocDeclStr(
+ bool , HasExtraStyle(int exFlag) const,
+ "Returns ``True`` if the given extra flag is set.", "");
DocDeclStr(
"Can this window be assigned focus from keyboard right now?", "");
+ DocDeclStr(
+ virtual void , SetCanFocus(bool canFocus),
+ "", "");
+
+
DocDeclAStr(
virtual bool , NavigateIn(int flags = wxNavigationKeyEvent::IsForward),
void , PushEventHandler( wxEvtHandler *handler ),
"Pushes this event handler onto the event handler stack for the window.
An event handler is an object that is capable of processing the events
-sent to a window. (In other words, is able to dispatch the events to
+sent to a window. (In other words, is able to dispatch the events to a
handler function.) By default, the window is its own event handler,
but an application may wish to substitute another, for example to
allow central implementation of event-handling for a variety of