]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/ogl/divided.h
generate makefile.unx files using bakefile
[wxWidgets.git] / contrib / include / wx / ogl / divided.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: divided.h
3 // Purpose: wxDividedShape
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 12/07/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _OGL_DIVIDED_H_
13 #define _OGL_DIVIDED_H_
14
15
16 /*
17 * Definition of a region
18 *
19 */
20
21 /*
22 * Box divided into horizontal regions
23 *
24 */
25
26 extern wxFont *g_oglNormalFont;
27 class WXDLLIMPEXP_OGL wxDividedShape: public wxRectangleShape
28 {
29 DECLARE_DYNAMIC_CLASS(wxDividedShape)
30
31 public:
32 wxDividedShape(double w = 0.0, double h = 0.0);
33 ~wxDividedShape();
34
35 void OnDraw(wxDC& dc);
36 void OnDrawContents(wxDC& dc);
37
38 void SetSize(double w, double h, bool recursive = true);
39
40 void MakeControlPoints();
41 void ResetControlPoints();
42
43 void MakeMandatoryControlPoints();
44 void ResetMandatoryControlPoints();
45
46 #if wxUSE_PROLOGIO
47 void WriteAttributes(wxExpr *clause);
48 void ReadAttributes(wxExpr *clause);
49 #endif
50
51 void Copy(wxShape &copy);
52
53 // Set all region sizes according to proportions and
54 // this object total size
55 void SetRegionSizes();
56
57 // Edit region colours/styles
58 void EditRegions();
59
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;
65
66 // Invoke editor on CTRL-right click
67 void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
68 };
69
70 #endif
71 // _OGL_DIVIDED_H_
72