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_
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "divided.h"
21 * Definition of a region
26 * Box divided into horizontal regions
30 extern wxFont
*g_oglNormalFont
;
31 class WXDLLIMPEXP_OGL wxDividedShape
: public wxRectangleShape
33 DECLARE_DYNAMIC_CLASS(wxDividedShape
)
36 wxDividedShape(double w
= 0.0, double h
= 0.0);
39 void OnDraw(wxDC
& dc
);
40 void OnDrawContents(wxDC
& dc
);
42 void SetSize(double w
, double h
, bool recursive
= true);
44 void MakeControlPoints();
45 void ResetControlPoints();
47 void MakeMandatoryControlPoints();
48 void ResetMandatoryControlPoints();
51 void WriteAttributes(wxExpr
*clause
);
52 void ReadAttributes(wxExpr
*clause
);
55 void Copy(wxShape
©
);
57 // Set all region sizes according to proportions and
58 // this object total size
59 void SetRegionSizes();
61 // Edit region colours/styles
64 // Attachment points correspond to regions in the divided box
65 bool GetAttachmentPosition(int attachment
, double *x
, double *y
,
66 int nth
= 0, int no_arcs
= 1, wxLineShape
*line
= NULL
);
67 bool AttachmentIsValid(int attachment
) const;
68 int GetNumberOfAttachments() const;
70 // Invoke editor on CTRL-right click
71 void OnRightClick(double x
, double y
, int keys
= 0, int attachment
= 0);