summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-04-15 20:34:17 (GMT)
committerjoye <joye>2014-04-15 20:34:17 (GMT)
commit0b7b638f9da04a988387a781d7809ebf9e981b70 (patch)
tree0fb79093afce2caae67fa27d8c95a81d4c133dec /src
parentd22a045eade95b1c4a55fb32c725dee3cceb198e (diff)
downloadblt-0b7b638f9da04a988387a781d7809ebf9e981b70.zip
blt-0b7b638f9da04a988387a781d7809ebf9e981b70.tar.gz
blt-0b7b638f9da04a988387a781d7809ebf9e981b70.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrAxis.C1
-rw-r--r--src/bltGrDef.h45
-rw-r--r--src/bltGrElem.h6
-rw-r--r--src/bltGrElemBar.C1
-rw-r--r--src/bltGrElemLine.C1
-rw-r--r--src/bltGrLegd.C1
-rw-r--r--src/bltGrMarkerLine.C1
-rw-r--r--src/bltGrMarkerPolygon.C1
-rw-r--r--src/bltGrMarkerText.C1
-rw-r--r--src/bltGrPenBar.C1
-rw-r--r--src/bltGrPenLine.C1
-rw-r--r--src/bltGraph.C1
-rw-r--r--src/bltGraph.h20
13 files changed, 70 insertions, 11 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index b0ff7d7..ebf9a03 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -36,6 +36,7 @@ extern "C" {
#include "bltGrAxis.h"
#include "bltGrAxisOption.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
#define AXIS_PAD_TITLE 2
diff --git a/src/bltGrDef.h b/src/bltGrDef.h
new file mode 100644
index 0000000..638b631
--- /dev/null
+++ b/src/bltGrDef.h
@@ -0,0 +1,45 @@
+/*
+ * Smithsonian Astrophysical Observatory, Cambridge, MA, USA
+ * This code has been modified under the terms listed below and is made
+ * available under the same terms.
+ */
+
+/*
+ * Copyright 1993-2004 George A Howlett.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __BltGrDef_h__
+#define __BltGrDef_h__
+
+#define STD_NORMAL_BACKGROUND "gray85"
+#define STD_NORMAL_FOREGROUND "black"
+#define STD_ACTIVE_BACKGROUND "gray90"
+#define STD_ACTIVE_FOREGROUND "black"
+
+#define STD_FONT_LARGE "helvetica 14 normal roman"
+#define STD_FONT_MEDIUM "helvetica 12 normal roman"
+#define STD_FONT_NORMAL "helvetica 10 normal roman"
+#define STD_FONT_SMALL "helvetica 8 normal roman"
+
+#define STD_BORDERWIDTH "2"
+
+#endif
diff --git a/src/bltGrElem.h b/src/bltGrElem.h
index 70f551e..4546ebe 100644
--- a/src/bltGrElem.h
+++ b/src/bltGrElem.h
@@ -59,6 +59,12 @@ extern "C" {
class Element;
typedef struct {
+ Segment2d *segments;
+ int length;
+ int *map;
+} GraphSegments;
+
+typedef struct {
Blt_VectorId vector;
} VectorDataSource;
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index efba3b5..a0fbc2a 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -35,6 +35,7 @@
#include "bltGrAxis.h"
#include "bltGrAxisOp.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
#define CLAMP(x,l,h) ((x) = (((x)<(l))? (l) : ((x)>(h)) ? (h) : (x)))
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index 438a005..cd6ae6c 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -39,6 +39,7 @@ extern "C" {
#include "bltGrAxis.h"
#include "bltGrAxisOp.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
#define SEARCH_X 0
#define SEARCH_Y 1
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C
index ab5a91d..e0238da 100644
--- a/src/bltGrLegd.C
+++ b/src/bltGrLegd.C
@@ -36,6 +36,7 @@ extern "C" {
#include "bltGrElemOp.h"
#include "bltGrHairsOp.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
static void SelectCmdProc(ClientData);
static Tcl_IdleProc DisplayProc;
diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C
index a80063a..28a973f 100644
--- a/src/bltGrMarkerLine.C
+++ b/src/bltGrMarkerLine.C
@@ -30,6 +30,7 @@
#include "bltGrMarkerLine.h"
#include "bltGrMarkerOption.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
#define BOUND(x, lo, hi) (((x) > (hi)) ? (hi) : ((x) < (lo)) ? (lo) : (x))
diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C
index 0662413..ef445bf 100644
--- a/src/bltGrMarkerPolygon.C
+++ b/src/bltGrMarkerPolygon.C
@@ -30,6 +30,7 @@
#include "bltGrMarkerPolygon.h"
#include "bltGrMarkerOption.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
using namespace Blt;
diff --git a/src/bltGrMarkerText.C b/src/bltGrMarkerText.C
index e5ade3f..e9711e3 100644
--- a/src/bltGrMarkerText.C
+++ b/src/bltGrMarkerText.C
@@ -30,6 +30,7 @@
#include "bltGrMarkerText.h"
#include "bltGrMarkerOption.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
using namespace Blt;
diff --git a/src/bltGrPenBar.C b/src/bltGrPenBar.C
index 3340a8c..def8ecc 100644
--- a/src/bltGrPenBar.C
+++ b/src/bltGrPenBar.C
@@ -28,6 +28,7 @@
*/
#include "bltGrPenBar.h"
+#include "bltGrDef.h"
static Tk_OptionSpec barPenOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
diff --git a/src/bltGrPenLine.C b/src/bltGrPenLine.C
index 455b5d7..19fbe94 100644
--- a/src/bltGrPenLine.C
+++ b/src/bltGrPenLine.C
@@ -29,6 +29,7 @@
#include "bltGrPenLine.h"
#include "bltGrMisc.h"
+#include "bltGrDef.h"
typedef struct {
const char* name;
diff --git a/src/bltGraph.C b/src/bltGraph.C
index c8753a2..40f261f 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -46,6 +46,7 @@ extern "C" {
#include "bltGrLegdOp.h"
#include "bltGrHairs.h"
#include "bltGrHairsOp.h"
+#include "bltGrDef.h"
using namespace Blt;
diff --git a/src/bltGraph.h b/src/bltGraph.h
index e832e56..387821a 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -78,12 +78,6 @@ typedef struct {
} ClosestSearch;
typedef struct {
- Segment2d *segments;
- int length;
- int *map;
-} GraphSegments;
-
-typedef struct {
int nSegments;
Axis2d axes;
float sum;
@@ -115,6 +109,12 @@ typedef struct {
int site;
} Margin;
+typedef struct {
+ Tcl_HashTable table;
+ Blt_Chain displayList;
+ Tcl_HashTable tagTable;
+} Component;
+
struct _Graph {
Tcl_Interp* interp;
Tk_Window tkwin;
@@ -147,11 +147,9 @@ struct _Graph {
int height;
Tcl_HashTable penTable;
- struct Component {
- Tcl_HashTable table;
- Blt_Chain displayList;
- Tcl_HashTable tagTable;
- } elements, markers, axes;
+ Component elements;
+ Component markers;
+ Component axes;
Tcl_HashTable dataTables;
Blt_BindTable bindTable;