Cleaning among the g++ compiler flags.
[shapes.git] / source / consts.cc
bloba6db69995eae1e5b6f3719cde1b762fcaaf104ec
1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * any later version.
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008 Henrik Tidefelt
19 #include "Shapes_Kernel_decls.h"
21 #include "consts.h"
22 #include "shapesexceptions.h"
23 #include "classtypes.h"
24 #include "statetypes.h"
25 #include "fonttypes.h"
27 using namespace Shapes;
29 RefCountPtr< const char > Interaction::SEVERAL_TYPES = strrefdup( "(several types)" );
30 RefCountPtr< const char > Interaction::PUBLIC_SCOPE_NAME = strrefdup( "public" );
31 RefCountPtr< const char > Interaction::PROTECTED_SCOPE_NAME = strrefdup( "protected" );
33 const char * Interaction::DYNAMIC_VARIABLE_PREFIX = "@";
34 const char * Interaction::STATE_PREFIX = "•";
36 RefCountPtr< const char > Lang::ARCDELTA_ID = strrefdup( "arcdelta" );
37 /* The initialization of Lang::TEX_SYNTAX_ID is placed in globals.cc to ensure it gets initialized before we need it there.
39 // RefCountPtr< const char > Lang::TEX_SYNTAX_ID = strrefdup( "teX" );
41 const char * Lang::CANVAS_ID = "page";
42 const char * Lang::CATALOG_ID = "catalog";
43 const char * Lang::SELF_ID = "self";
44 const char * Kernel::SEQUENTIAL_EXPR_VAR_ID = ".seqvar"; /* Note that the leading dot puts this variable aside all user-variables. */
45 const char * Kernel::SPLIT_VAR_PREFIX = ".splvar"; /* Note that the leading dot puts this variable aside all user-variables. */
46 const char * Kernel::HTML_DIR = HTML_DIRDEF;
47 const char * Kernel::RESOURCES_DIR = RESOURCES_DIRDEF;
49 const char * Lang::DYNAMIC_VARIABLE_ID_EYEZ = "eyez";
50 const char * Lang::DYNAMIC_VARIABLE_ID_TEX_BLEED = "TeX_bleed";
51 const char * Lang::DYNAMIC_VARIABLE_ID_DEFAULT_UNIT = "defaultunit";
52 const char * Lang::DYNAMIC_VARIABLE_ID_BLEND_SPACE = "blendspace";
53 const char * Lang::DYNAMIC_VARIABLE_ID_STROKING = "stroking";
54 const char * Lang::DYNAMIC_VARIABLE_ID_WIDTH = "width";
55 const char * Lang::DYNAMIC_VARIABLE_ID_NONSTROKING = "nonstroking";
56 const char * Lang::DYNAMIC_VARIABLE_ID_AUTOINTENSITY = "autointensity";
58 const char * Lang::DYNAMIC_VARIABLE_ID_TEXT_SIZE = "text_size";
59 const char * Lang::DYNAMIC_VARIABLE_ID_TEXT_FONT = "text_font";
61 const char * Lang::CONTINUATION_ID_ERROR = "error";
63 const Ast::MemberMode Ast::MEMBER_ACCESS_BITS = 0x000F;
64 const Ast::MemberMode Ast::MEMBER_ACCESS_PRIVATE = 0x0000;
65 const Ast::MemberMode Ast::MEMBER_ACCESS_PUBLIC_GET = 0x0001;
66 const Ast::MemberMode Ast::MEMBER_ACCESS_PUBLIC_INSERT = 0x0002;
67 const Ast::MemberMode Ast::MEMBER_ACCESS_PROTECTED_GET = 0x0004;
68 const Ast::MemberMode Ast::MEMBER_ACCESS_PROTECTED_INSERT = 0x0008;
69 const Ast::MemberMode Ast::MEMBER_CONST = 0x0010;
70 const Ast::MemberMode Ast::MEMBER_METHOD = 0x0020;
71 const Ast::MemberMode Ast::MEMBER_ABSTRACT = 0x0040;
72 const Ast::MemberMode Ast::MEMBER_FINAL = 0x0080;
73 const Ast::MemberMode Ast::MEMBER_TRANSFORMING = 0x0100;
75 const Ast::ClassMode Ast::CLASS_MODE_ABSTRACT = 0x0001;
76 const Ast::ClassMode Ast::CLASS_MODE_FINAL = 0x0002;
78 const Ast::FunctionMode Ast::FUNCTION_TRANSFORMING = 0x0001;
80 const char * Lang::MESSAGE_DRAWABLE_DRAW_ID = "draw";
82 const char * Lang::HANDLER_NO_INTERSECTION = "handler_NoIntersection";
84 const double Computation::SINGULAR_TRANSFORM_LIMIT = 1e-8;
87 RefCountPtr< const char > BuiltInFonts::TIMES_ROMAN = strrefdup( "Times-Roman" );
88 RefCountPtr< const char > BuiltInFonts::TIMES_BOLD = strrefdup( "Times-Bold" );
89 RefCountPtr< const char > BuiltInFonts::TIMES_ITALIC = strrefdup( "Times-Italic" );
90 RefCountPtr< const char > BuiltInFonts::TIMES_BOLDITALIC = strrefdup( "Times-BoldItalic" );
91 // HELVETICA is initialized in globals.cc to ensure correct order of initialization.
92 RefCountPtr< const char > BuiltInFonts::HELVETICA_BOLD = strrefdup( "Helvetica-Bold" );
93 RefCountPtr< const char > BuiltInFonts::HELVETICA_OBLIQUE = strrefdup( "Helvetica-Oblique" );
94 RefCountPtr< const char > BuiltInFonts::HELVETICA_BOLDOBLIQUE = strrefdup( "Helvetica-BoldOblique" );
95 RefCountPtr< const char > BuiltInFonts::COURIER = strrefdup( "Courier" );
96 RefCountPtr< const char > BuiltInFonts::COURIER_BOLD = strrefdup( "Courier-Bold" );
97 RefCountPtr< const char > BuiltInFonts::COURIER_OBLIQUE = strrefdup( "Courier-Oblique" );
98 RefCountPtr< const char > BuiltInFonts::COURIER_BOLDOBLIQUE = strrefdup( "Courier-BoldOblique" );
99 RefCountPtr< const char > BuiltInFonts::SYMBOL = strrefdup( "Symbol" );
100 RefCountPtr< const char > BuiltInFonts::ZAPFDINGBATS = strrefdup( "ZapfDingbats" );
103 const size_t Computation::RREL_SIZE = 33;
104 const double Computation::RREL_TH_STEP = 0.1;
105 const double Computation::RREL_TABLE[RREL_SIZE] =
106 { 1/3,0.3341686344960354,0.33668841107954134,
107 0.3409422096583605,0.34701519474761894,
108 0.35502910405887494,0.36514854168289823,
109 0.3775911942845651,0.3926341399960872,
110 0.41062983298282885,0.43202211298939736,
111 0.45737337400783484,0.4873946524706331,
112 0.522992662410542,0.5653317708668038,
113 0.6159221561762755,0.6767424374123584,
114 0.7504184408114359,0.8404852622717847,
115 0.9517742868557572,1.0910034113732654,
116 1.267683405767762,1.4955440295942208,
117 1.7947857010553352,2.1956618428196286,
118 2.7440092614738933,3.5090279091817442,
119 4.590771723726686,6.112526284299868,8.144027798714662,
120 10.441038625842998,12.076454051457787,13};