1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDividedShape
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _OGL_DIVIDED_H_
13 #define _OGL_DIVIDED_H_
17 * Definition of a region
22 * Box divided into horizontal regions
26 extern wxFont
*g_oglNormalFont
;
27 class WXDLLIMPEXP_OGL wxDividedShape
: public wxRectangleShape
29 DECLARE_DYNAMIC_CLASS(wxDividedShape
)
32 wxDividedShape(double w
= 0.0, double h
= 0.0);
35 void OnDraw(wxDC
& dc
);
36 void OnDrawContents(wxDC
& dc
);
38 void SetSize(double w
, double h
, bool recursive
= true);
40 void MakeControlPoints();
41 void ResetControlPoints();
43 void MakeMandatoryControlPoints();
44 void ResetMandatoryControlPoints();
47 void WriteAttributes(wxExpr
*clause
);
48 void ReadAttributes(wxExpr
*clause
);
51 void Copy(wxShape
©
);
53 // Set all region sizes according to proportions and
54 // this object total size
55 void SetRegionSizes();
57 // Edit region colours/styles
60 // Attachment points correspond to regions in the divided box
61 bool GetAttachmentPosition(int attachment
, double *x
, double *y
,
62 int nth
= 0, int no_arcs
= 1, wxLineShape
*line
= NULL
);
63 bool AttachmentIsValid(int attachment
) const;
64 int GetNumberOfAttachments() const;
66 // Invoke editor on CTRL-right click
67 void OnRightClick(double x
, double y
, int keys
= 0, int attachment
= 0);