]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/ogl/divided.h
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_
16 #pragma interface "basic.h"
20 * Definition of a region
25 * Box divided into horizontal regions
29 extern wxFont
*g_oglNormalFont
;
30 class wxDividedShape
: public wxRectangleShape
32 DECLARE_DYNAMIC_CLASS(wxDividedShape
)
35 wxDividedShape(double w
= 0.0, double h
= 0.0);
38 void OnDraw(wxDC
& dc
);
39 void OnDrawContents(wxDC
& dc
);
41 void SetSize(double w
, double h
, bool recursive
= TRUE
);
43 void MakeControlPoints();
44 void ResetControlPoints();
46 void MakeMandatoryControlPoints();
47 void ResetMandatoryControlPoints();
50 void WriteAttributes(wxExpr
*clause
);
51 void ReadAttributes(wxExpr
*clause
);
54 void Copy(wxShape
©
);
56 // Set all region sizes according to proportions and
57 // this object total size
58 void SetRegionSizes();
60 // Edit region colours/styles
63 // Attachment points correspond to regions in the divided box
64 bool GetAttachmentPosition(int attachment
, double *x
, double *y
,
65 int nth
= 0, int no_arcs
= 1, wxLineShape
*line
= NULL
);
66 bool AttachmentIsValid(int attachment
);
67 int GetNumberOfAttachments() const;
69 // Invoke editor on CTRL-right click
70 void OnRightClick(double x
, double y
, int keys
= 0, int attachment
= 0);