1 // -*- C++ -*-
2 
3 /*
4  * Gnome Chemistry Utils
5  * gccv/structs.h
6  *
7  * Copyright (C) 2008-2010 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
22  * USA
23  */
24 
25 #ifndef GCCV_STRUCTS_H
26 #define GCCV_STRUCTS_H
27 
28 /*!\file*/
29 
30 namespace gccv {
31 
32 /*!
33 Describes a rectangle for which (x0,y0) are the top left coordinates
34 and (x1,y1) the bottom right coordinates.
35 */
36 typedef struct {
37 /*!the top left horizontal position*/
38 	double x0;
39 /*!the bottom right horizontal position*/
40 	double x1;
41 /*!the top left vertical position*/
42 	double y0;
43 /*!the bottom right vertical position*/
44 	double y1;
45 } Rect;
46 
47 /*!
48 Describes a point with (x,y) as coordinates.
49 */
50 typedef struct {
51 /*!the horizontal position*/
52 	double x;
53 /*!the vertical position*/
54 	double y;
55 } Point;
56 
57 /*!Anchor
58 Text anchoring modes.
59 */
60 typedef enum {
61 /*!Anchor at top left.*/
62 	AnchorNorthWest,
63 /*!Anchor at top center.*/
64 	AnchorNorth,
65 /*!Anchor at top right.*/
66 	AnchorNorthEast,
67 /*!Anchor at left of base of the first line.*/
68 	AnchorLineWest,
69 /*!Anchor at center of base of the first line.*/
70 	AnchorLine,
71 /*!Anchor at right of base of the first line.*/
72 	AnchorLineEast,
73 /*!Anchor at left and vertical center.*/
74 	AnchorWest,
75 /*!Anchor at center, both vertically and horizontally.*/
76 	AnchorCenter,
77 /*!Anchor at right and vertical center.*/
78 	AnchorEast,
79 /*!Anchor at bottom left.*/
80 	AnchorSouthWest,
81 /*!Anchor at bottom center.*/
82 	AnchorSouth,
83 /*!Anchor at bottom right.*/
84 	AnchorSouthEast
85 } Anchor;
86 
87 /*!
88 Arrow heads of a line.
89 */
90 typedef enum {
91 /*!No arrow head.*/
92 	ArrowHeadNone,
93 /*!Full arrow head*/
94 	ArrowHeadFull,
95 /*!Half left arrow hea*/
96 	ArrowHeadLeft,
97 /*!Half right arrow head*/
98 	ArrowHeadRight,
99 } ArrowHeads;
100 
101 /*!
102 Describes the position of the scripts relative to the base line.
103 */
104 typedef enum {
105 /*!Text on base line*/
106 	Normalscript,
107 /*!Text below line*/
108 	Subscript,
109 /*!Text above line*/
110 	Superscript
111 } TextPosition;
112 
113 /*!
114 Can be used for underline, overline or strikethrough.
115 */
116 typedef enum {
117 /*!No line.*/
118 	TextDecorationNone,
119 /*!High for underline, low for overline and medium for strikethrough*/
120 	TextDecorationDefault,
121 /*!Line at the hightest position.*/
122 	TextDecorationHigh,
123 /*!Line at intermediate position.*/
124 	TextDecorationMedium,
125 /*!Line at the lowest position.*/
126 	TextDecorationLow,
127 /*!Two lines, one at high and the other at low position.*/
128 	TextDecorationDouble,
129 /*!Line oscillating between highest and lowest position.*/
130 	TextDecorationSquiggle
131 } TextDecoration;
132 
133 }
134 
135 #endif	//	 GCCV_STRUCTS_H
136