]>
Commit | Line | Data |
---|---|---|
1fc25a89 JS |
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 | |
2ba06d5a | 9 | // Licence: wxWindows licence |
1fc25a89 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _OGL_DIVIDED_H_ | |
13 | #define _OGL_DIVIDED_H_ | |
14 | ||
5f331691 | 15 | |
1fc25a89 JS |
16 | /* |
17 | * Definition of a region | |
18 | * | |
19 | */ | |
20 | ||
21 | /* | |
22 | * Box divided into horizontal regions | |
23 | * | |
24 | */ | |
25 | ||
26 | extern wxFont *g_oglNormalFont; | |
5f331691 | 27 | class WXDLLIMPEXP_OGL wxDividedShape: public wxRectangleShape |
1fc25a89 JS |
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 | ||
2ba06d5a | 38 | void SetSize(double w, double h, bool recursive = true); |
1fc25a89 JS |
39 | |
40 | void MakeControlPoints(); | |
41 | void ResetControlPoints(); | |
42 | ||
43 | void MakeMandatoryControlPoints(); | |
44 | void ResetMandatoryControlPoints(); | |
45 | ||
2b5f62a0 | 46 | #if wxUSE_PROLOGIO |
1fc25a89 JS |
47 | void WriteAttributes(wxExpr *clause); |
48 | void ReadAttributes(wxExpr *clause); | |
49 | #endif | |
50 | ||
51 | void Copy(wxShape ©); | |
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); | |
0a2c0398 | 63 | bool AttachmentIsValid(int attachment) const; |
1fc25a89 JS |
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 |