wxFreeChart
wxfreechartdefs.h
1 // Name: wxfreechartdefs.h
3 // Purpose: base declarations
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef WXFREECHARTDEFS_H
11 #define WXFREECHARTDEFS_H
12 
13 #include <wx/wxprec.h>
14 
15 #ifdef __BORLANDC__
16  #pragma hdrstop
17 #endif
18 
19 #ifndef WX_PRECOMP
20  #include <wx/wx.h>
21 #endif
22 
23 // dll impexp macros. Thanks to Mike Sazonov
24 #ifdef WXMAKINGDLL_FREECHART
25 #define WXDLLIMPEXP_FREECHART WXEXPORT
26 #define WXDLLIMPEXP_DATA_FREECHART(type) WXEXPORT type
27 #elif defined(WXUSINGDLL) && !defined(_LOCAL_)
28 #define WXDLLIMPEXP_FREECHART WXIMPORT
29 #define WXDLLIMPEXP_DATA_FREECHART(type) WXIMPORT type
30 #else // not making nor using DLL
31 #define WXDLLIMPEXP_FREECHART
32 #define WXDLLIMPEXP_DATA_FREECHART(type) type
33 #endif
34 
35 #define ABS(a) ((a) < 0) ? (-1*(a)) : (a)
36 
37 #define wxREPLACE(dst, src) do { \
38  wxDELETE(dst); \
39  dst = src; \
40 } while (0)
41 
42 
43 inline static int RoundHigh(double value)
44 {
45  int iv = (int) value;
46 
47  if (((double) iv) > value)
48  iv++;
49  return iv;
50 }
51 
52 // Default Colours
53 #define DEFAULT_LINE_COLOUR_0 wxColour("#5B9BD5")
54 #define DEFAULT_LINE_COLOUR_1 wxColour("#ED7D31")
55 #define DEFAULT_LINE_COLOUR_2 wxColour("#FFC000")
56 #define DEFAULT_LINE_COLOUR_3 wxColour("#4472C4")
57 #define DEFAULT_LINE_COLOUR_4 wxColour("#70AD47")
58 #define DEFAULT_LINE_COLOUR_5 wxColour("#9E480E")
59 #define DEFAULT_LINE_COLOUR_6 wxColour("#997300")
60 #define DEFAULT_LINE_COLOUR_7 wxColour("#A5A5A5")
61 
62 #define DEFAULT_BAR_FILL_COLOUR_0 wxColour("#5B9BD5")
63 #define DEFAULT_BAR_FILL_COLOUR_1 wxColour("#ED7D31")
64 #define DEFAULT_BAR_FILL_COLOUR_2 wxColour("#FFC000")
65 #define DEFAULT_BAR_FILL_COLOUR_3 wxColour("#4472C4")
66 #define DEFAULT_BAR_FILL_COLOUR_4 wxColour("#70AD47")
67 #define DEFAULT_BAR_FILL_COLOUR_5 wxColour("#9E480E")
68 #define DEFAULT_BAR_FILL_COLOUR_6 wxColour("#997300")
69 #define DEFAULT_BAR_FILL_COLOUR_7 wxColour("#A5A5A5")
70 
71 #define DEFAULT_TEXT_COLOUR wxColour("#686868")
72 
73 #define DEFAULT_AXIS_LABEL_COLOUR DEFAULT_TEXT_COLOUR
74 #define DEFAULT_AXIS_BORDER_COLOUR wxColour("#8B8B8B")
75 #define DEFAULT_AXIS_TICK_COLOUR wxColour("#8B8B8B")
76 #define DEFAULT_TITLE_COLOUR DEFAULT_TEXT_COLOUR
77 
78 #define DEFAULT_MAJOR_GRIDLINE_PEN_COLOUR wxColour("#DADADA")
79 #define DEFAULT_MINOR_GRIDLINE_PEN_COLOUR wxColour("#F0F0F0")
80 
81 // Default Values
82 #define DEFAULT_MAJOR_LABEL_COUNT 10
83 
84 #endif /* WXFREECHARTDEFS_H */