%newgroup
+MustHaveApp(wxPen);
+
class wxPen : public wxGDIObject {
public:
wxPen(wxColour& colour, int width=1, int style=wxSOLID);
int GetStyle();
int GetWidth();
- bool Ok();
+ bool IsOk();
+ %pythoncode { Ok = IsOk }
void SetCap(int cap_style);
void SetColour(wxColour& colour);
PyObject* GetDashes() {
wxDash* dashes;
int count = self->GetDashes(&dashes);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* retval = PyList_New(0);
for (int x=0; x<count; x++) {
PyObject* pyint = PyInt_FromLong(dashes[x]);
}
void _SetDashes(PyObject* _self, PyObject* pyDashes) {
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
int size = PyList_Size(pyDashes);
wxDash* dashes = (wxDash*)byte_LIST_helper(pyDashes);
#ifndef __WXMAC__
int GetDashCount() const;
+ %property(DashCount, GetDashCount, doc="See `GetDashCount`");
#endif
#ifdef __WXMSW__
wxBitmap* GetStipple();
void SetStipple(wxBitmap& stipple);
+ %property(Stipple, GetStipple, SetStipple, doc="See `GetStipple` and `SetStipple`");
#endif
%extend {
- bool __eq__(const wxPen* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxPen* other) { return other ? (*self != *other) : True; }
+ bool __eq__(const wxPen* other) { return other ? (*self == *other) : false; }
+ bool __ne__(const wxPen* other) { return other ? (*self != *other) : true; }
}
- %pythoncode { def __nonzero__(self): return self.Ok() }
+ %pythoncode { def __nonzero__(self): return self.IsOk() }
+
+ %property(Cap, GetCap, SetCap, doc="See `GetCap` and `SetCap`");
+ %property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`");
+ %property(Dashes, GetDashes, SetDashes, doc="See `GetDashes` and `SetDashes`");
+ %property(Join, GetJoin, SetJoin, doc="See `GetJoin` and `SetJoin`");
+ %property(Style, GetStyle, SetStyle, doc="See `GetStyle` and `SetStyle`");
+ %property(Width, GetWidth, SetWidth, doc="See `GetWidth` and `SetWidth`");
};