]> Creatis software - bbtkGEditor.git/blob - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
bd274231795708303b368c7bcec329699a59d8ba
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GlobalConstants.h
1 /*
2 # ---------------------------------------------------------------------
3 #
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
5 #                        pour la Santé)
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 #
8 #  This software is governed by the CeCILL-B license under French law and 
9 #  abiding by the rules of distribution of free software. You can  use, 
10 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
11 #  license as circulated by CEA, CNRS and INRIA at the following URL 
12 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
13 #  or in the file LICENSE.txt.
14 #
15 #  As a counterpart to the access to the source code and  rights to copy,
16 #  modify and redistribute granted by the license, users are provided only
17 #  with a limited warranty  and the software's author,  the holder of the
18 #  economic rights,  and the successive licensors  have only  limited
19 #  liability. 
20 #
21 #  The fact that you are presently reading this means that you have had
22 #  knowledge of the CeCILL-B license and that you accept its terms.
23 # ------------------------------------------------------------------------  
24 */
25
26 /*=========================================================================
27 Program:   bbtk
28 Module:    $RCSfile$
29 Language:  C++
30 Date:      $Date$
31 Version:   $Revision$
32 =========================================================================*/
33
34 /* ---------------------------------------------------------------------
35
36  * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
37  * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
38  *
39  *  This software is governed by the CeCILL-B license under French law and
40  *  abiding by the rules of distribution of free software. You can  use,
41  *  modify and/ or redistribute the software under the terms of the CeCILL-B
42  *  license as circulated by CEA, CNRS and INRIA at the following URL
43  *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
44  *  or in the file LICENSE.txt.
45  *
46  *  As a counterpart to the access to the source code and  rights to copy,
47  *  modify and redistribute granted by the license, users are provided only
48  *  with a limited warranty  and the software's author,  the holder of the
49  *  economic rights,  and the successive licensors  have only  limited
50  *  liability.
51  *
52  *  The fact that you are presently reading this means that you have had
53  *  knowledge of the CeCILL-B license and that you accept its terms.
54  * ------------------------------------------------------------------------ */
55
56
57 /****
58  * Design and Developpement of BBTK GEditor
59  * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
60  * RaC - 2010
61  ****/
62
63 #ifndef __GlobalConstants_h__
64 #define __GlobalConstants_h__
65
66 namespace bbtk {
67
68         // Object types
69         const int GBLACKBOX                                     =       1;
70         const int GCONNECTOR                            =       2;
71         const int GPORT                                         =       3;
72         const int GINPUTPORT                            =       4;
73         const int GOUTPUTPORT                           =       5;
74         const int GCOMPLEXINPUTPORT                     =       6;
75         const int GCOMPLEXOUTPUTPORT            =       7;
76
77         const double GPOSITION_Z                        =       -900;
78         
79         // Object states
80         
81         // JGRR
82         const int POSSIBLE_CONNECTION           =       107;
83         const int SELECTED_POSSIBLE_CONNECTION = 108; 
84         // EO JGRR
85     
86         const int NOTHING_HAPPENS                       =       101;
87         const int HIGHLIGHTED                           =       102;
88         const int CLICKED                                       =       103;
89         const int DRAG                                          =       104;
90         const int SELECTED                                      =       105;
91         const int CREATING_CONTOUR                      =       106;
92
93         // Object dimensions
94 //EED 2020-01-15
95 //  const double BOX_WIDTH              =   100;
96 //  const double BOX_HEIGHT             =   10;
97     const double BOX_WIDTH              =   25;
98         const double BOX_HEIGHT                         =       2.5;  // BOX_WIDTH / 10
99 //      const double PORT_WIDTH                         =       2.8;
100 //  const double PORT_HEIGHT            =   1.8;
101     const double PORT_WIDTH             =   1.6;
102     const double PORT_HEIGHT            =   0.8; // PORT_WIDTH / 2
103 //      const double COMPLEXPORT_HEIGHT         =       8;
104 //      const double COMPLEXPORT_WIDTH          =       8;
105     const double COMPLEXPORT_HEIGHT     =   3.3;   //  BOX_HEIGHT + PORT_HEIGHT
106     const double COMPLEXPORT_WIDTH      =   3.3;   //  BOX_HEIGHT + PORT_HEIGHT
107
108         // Commands
109         const int NO_COMMAND                            =       201;
110         const int INIT_CREATION_CONTOUR         =       202;
111         const int FIN_CREATION_CONTOUR          =       203;
112         const int ADD_TO_SELECTED                       =       204;
113         const int DRAG_OBJECTS                          =       205;
114         const int EDIT_BLACKBOX                         =       206;
115         const int REMOVE_FROM_SELECTED          =       207;
116
117
118         //// COLORS (object_state_(R|G|B))
119
120         //Object Border colors
121
122         const double BOXBORDER_NH_R                                     =       0.5;
123         const double BOXBORDER_NH_G                                     =       0.25;
124         const double BOXBORDER_NH_B                                     =       0.0;
125
126         const double COMPLEXINPUTPORTBORDER_NH_R        =       0.7;
127         const double COMPLEXINPUTPORTBORDER_NH_G        =       0.1;
128         const double COMPLEXINPUTPORTBORDER_NH_B        =       0.1;
129
130         const double COMPLEXOUTPUTPORTBORDER_NH_R       =       0.3;
131         const double COMPLEXOUTPUTPORTBORDER_NH_G       =       0.55;
132         const double COMPLEXOUTPUTPORTBORDER_NH_B       =       0.1;
133
134         const double BOXBORDER_HIGHLIGHTED_R            =       0.05;
135         const double BOXBORDER_HIGHLIGHTED_G            =       0.25;
136         const double BOXBORDER_HIGHLIGHTED_B            =       0.45;
137
138         const double BOXBORDER_DRAG_R                           =       0.75;
139         const double BOXBORDER_DRAG_G                           =       0.75;
140         const double BOXBORDER_DRAG_B                           =       0.75;
141
142         const double BOXBORDER_SELECTED_R                       =       0.45;
143         const double BOXBORDER_SELECTED_G                       =       0.45;
144         const double BOXBORDER_SELECTED_B                       =       0.00;
145
146
147         //Object Fill colors
148
149         const double BOXFILL_NH_R                               =       0.5;
150         const double BOXFILL_NH_G                               =       0.35;
151         const double BOXFILL_NH_B                               =       0.15;
152
153         const double COMPLEXINPUTPORTFILL_NH_R  =       0.8;
154         const double COMPLEXINPUTPORTFILL_NH_G  =       0.1;
155         const double COMPLEXINPUTPORTFILL_NH_B  =       0.1;
156
157         const double COMPLEXOUTPUTPORTFILL_NH_R =       0.5;
158         const double COMPLEXOUTPUTPORTFILL_NH_G =       0.85;
159         const double COMPLEXOUTPUTPORTFILL_NH_B =       0.1;
160
161         const double BOXFILL_HIGHLIGHTED_R              =       0.05;
162         const double BOXFILL_HIGHLIGHTED_G              =       0.30;
163         const double BOXFILL_HIGHLIGHTED_B              =       0.45;
164
165         const double BOXFILL_DRAG_R                             =       0.75;
166         const double BOXFILL_DRAG_G                             =       0.75;
167         const double BOXFILL_DRAG_B                             =       0.75;
168
169         const double BOXFILL_SELECTED_R                 =       0.65;
170         const double BOXFILL_SELECTED_G                 =       0.65;
171         const double BOXFILL_SELECTED_B                 =       0.05;
172
173
174         //Object Text colors
175
176
177         const double PORTFILL_NH_R                              =       0.0;
178         const double PORTFILL_NH_G                              =       0.0;
179         const double PORTFILL_NH_B                              =       0.0;
180
181         const double PORTTEXT_NH_R                              =       1.0;
182         const double PORTTEXT_NH_G                              =       1.0;
183         const double PORTTEXT_NH_B                              =       0.0;
184
185         const double BOXTEXT_NH_R                               =       0.25;
186         const double BOXTEXT_NH_G                               =       0.0;
187         const double BOXTEXT_NH_B                               =       0.0;
188
189         const double BOXTEXT_HIGHLIGHTED_R              =       0.05;
190         const double BOXTEXT_HIGHLIGHTED_G              =       0.05;
191         const double BOXTEXT_HIGHLIGHTED_B              =       0.4;
192
193         const double BOXTEXT_DRAG_R                             =       0.75;
194         const double BOXTEXT_DRAG_G                             =       0.75;
195         const double BOXTEXT_DRAG_B                             =       0.75;
196
197         const double BOXTEXT_SELECTED_R                 =       0.35;
198         const double BOXTEXT_SELECTED_G                 =       0.35;
199         const double BOXTEXT_SELECTED_B                 =       0.05;
200
201         // GUI Id's
202         const int ID_NEW                                                =       1000;
203         const int ID_SAVE_AS_DIAGRAM                    =       1001;
204         const int ID_SAVE_DIAGRAM                               =       1015; //last DFCH
205         const int ID_OPEN                                               =       1002;
206         const int ID_RUN                                                =       1003;
207         const int ID_DELETEALL                                  =       1004;
208         const int ID_CENTERVIEW                                 =       1005;
209         const int ID_BTNCOMPLEXBOX                              =       1006;
210         const int ID_ADDCOMPLEXBOXINPUT                 =       1007;
211         const int ID_ADDCOMPLEXBOXOUTPUT                =       1008;
212         const int ID_OPEN_BBS                                   =       1009;
213         const int ID_SAVE_AS_BBS                                =       1010;
214         const int ID_SAVE_AS_COMPLEXBOX                 =       1011;
215         const int ID_COPY_TO_COMPLEXDIAGRAM             =       1012;
216         const int ID_BTNBOX                                             =       1013;
217         const int ID_HELP_BBEDITOR                              =       1014;
218         const int ID_BTEXECUTABLEBOX                    =       1016; // EED
219         const int ID_EXPORT_CONSOLEAPP                  =       1017; // RaC
220         const int ID_EDIT_COMPLEXBOX_SCRIPT             =       1018; // EED
221         
222         const int wxID_NOTEBOOK                                 =       1018;  // EED updated
223         
224         const int ID_bbEditor_Tool_Menu_CreatePackage   =       1019;  // EED
225         const int ID_bbEditor_Tool_Menu_CreateBlackBox          =       1020;  // EED
226         const int ID_bbEditor_Tool_Menu_PlugPackage                     =       1021;  // EED
227         const int ID_bbEditor_Tool_Menu_EditConfig                      =       1022;  // EED
228         const int ID_bbEditor_Tool_Menu_ShowHTMLDoc                     =       1023;  // EED
229         const int ID_bbEditor_Tool_Menu_CreateIndex                     =       1024;  // EED
230         
231         const int ID_UNDO                                                                       =       1025;  // FCY
232         const int ID_REDO                                                                       =       1026;  // FCY
233         const int ID_CHANGENAME                                                         =   1027;
234
235         const int ID_EDITPROPERTIES                                                                     =       1028;  // RaC 2nd HackFest
236         const int ID_SHOWTREE                                                                   =       1029;  // CFT
237 }
238 // namespace bbtk
239 #endif
240