]> git.saurik.com Git - wxWidgets.git/blame - utils/ogl/src/divided.h
spurious error messages from wxRegKey::HasValue() suppressed
[wxWidgets.git] / utils / ogl / src / divided.h
CommitLineData
0fc1a713
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _OGL_DIVIDED_H_
13#define _OGL_DIVIDED_H_
14
15#ifdef __GNUG__
16#pragma interface "basic.h"
17#endif
18
19/*
20 * Definition of a region
21 *
22 */
23
24/*
25 * Box divided into horizontal regions
26 *
27 */
28
29extern wxFont *g_oglNormalFont;
30class wxDividedShape: public wxRectangleShape
31{
32 DECLARE_DYNAMIC_CLASS(wxDividedShape)
33
34 public:
35 wxDividedShape(float w = 0.0, float h = 0.0);
36 ~wxDividedShape();
37
38 void OnDraw(wxDC& dc);
39 void OnDrawContents(wxDC& dc);
40
41 void SetSize(float w, float h, bool recursive = TRUE);
42
43 void MakeControlPoints();
44 void ResetControlPoints();
45
46 void MakeMandatoryControlPoints();
47 void ResetMandatoryControlPoints();
48
49#ifdef PROLOGIO
50 // Prolog database stuff
51 void WritePrologAttributes(wxExpr *clause);
52 void ReadPrologAttributes(wxExpr *clause);
53#endif
54
2bb0cd28 55 void Copy(wxShape &copy);
0fc1a713
JS
56
57 // Set all region sizes according to proportions and
58 // this object total size
59 void SetRegionSizes();
60
61 // Edit region colours/styles
62 void EditRegions();
63
64 // Attachment points correspond to regions in the divided box
65 bool GetAttachmentPosition(int attachment, float *x, float *y,
66 int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
67 bool AttachmentIsValid(int attachment);
68 int GetNumberOfAttachments();
69
70 // Invoke editor on CTRL-right click
71 void OnRightClick(float x, float y, int keys = 0, int attachment = 0);
72};
73
74#endif
75 // _OGL_DIVIDED_H_
76