int GetFormatMode();
wxString GetName();
wxString GetColour();
- wxColour *GetActualColourObject();
+ wxColour GetActualColourObject();
wxList& GetFormattedText();
wxString GetPenColour();
int GetPenStyle();
};
+//---------------------------------------------------------------------------
+
+/*
+ * User-defined attachment point
+ */
+
+class wxAttachmentPoint: public wxObject
+{
+public:
+ wxAttachmentPoint(int id=0, double x=0.0, double y=0.0);
+ int m_id; // Identifier
+ double m_x; // x offset from centre of object
+ double m_y; // y offset from centre of object
+};
+
+
//---------------------------------------------------------------------------
%{
class wxPyShapeEvtHandler : public wxObject {
public:
- %addtofunc wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)"
+ %pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)"
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
wxPyShape *shape = NULL);
class wxPyShape : public wxPyShapeEvtHandler {
public:
- %addtofunc wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)"
+ %pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)"
wxPyShape(wxPyShapeCanvas *can = NULL);
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
int GetNumberOfAttachments();
bool AttachmentIsValid(int attachment);
+
+ %extend {
+ PyObject* GetAttachments() {
+ wxList& list = self->GetAttachments();
+ return wxPy_ConvertList(&list);
+ }
+ }
+
bool GetAttachmentPositionEdge(int attachment, double *OUTPUT, double *OUTPUT,
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
void CopyWithHandler(wxPyShape& copy);
void Rotate(double x, double y, double theta);
double GetRotation();
+ void SetRotation(double rotation);
void ClearAttachments();
void Recentre(wxDC& dc);
void ClearPointList(wxList& list);