]>
git.saurik.com Git - wxWidgets.git/blob - utils/ogl/src/divided.h
dde6251367dc54473ef08f4b74e4d66195793f25
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 // Prolog database stuff
51 void WritePrologAttributes(wxExpr
*clause
);
52 void ReadPrologAttributes(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
);
68 int GetNumberOfAttachments();
70 // Invoke editor on CTRL-right click
71 void OnRightClick(double x
, double y
, int keys
= 0, int attachment
= 0);