Use our own getters and properties for wxVisualAttributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,15 +34,27 @@ struct wxVisualAttributes
|
|||||||
~wxVisualAttributes() { delete self; }
|
~wxVisualAttributes() { delete self; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// the font used for control label/text inside it
|
// // the font used for control label/text inside it
|
||||||
wxFont font;
|
// wxFont font;
|
||||||
|
// // the foreground colour
|
||||||
|
// wxColour colFg;
|
||||||
|
// // the background colour, may be wxNullColour if the controls background
|
||||||
|
// // colour is not solid
|
||||||
|
// wxColour colBg;
|
||||||
|
|
||||||
// the foreground colour
|
// Use our own getters and properties instead of the ones that SWIG will
|
||||||
wxColour colFg;
|
// 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
|
%property(font, _get_font)
|
||||||
// colour is not solid
|
%property(colFg, _get_colFg)
|
||||||
wxColour colBg;
|
%property(colBg, _get_colBg)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user