summaryrefslogtreecommitdiffstats
path: root/src/bltGrMarker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bltGrMarker.h')
-rw-r--r--src/bltGrMarker.h105
1 files changed, 62 insertions, 43 deletions
diff --git a/src/bltGrMarker.h b/src/bltGrMarker.h
index c27829b..7752d56 100644
--- a/src/bltGrMarker.h
+++ b/src/bltGrMarker.h
@@ -30,56 +30,75 @@
#ifndef __bltgrmarker_h__
#define __bltgrmarker_h__
-#include "bltGrMarkerOp.h"
-
#include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;
+extern "C" {
+#include "bltGraph.h"
+};
+
namespace Blt {
- class Marker {
- protected:
- ClassId classId_;
- const char *name_;
- const char *className_;
- Tk_OptionTable optionTable_;
- void* ops_;
- Graph* graphPtr_;
- Tcl_HashEntry* hashPtr_;
- int clipped_;
-
- public:
- Blt_ChainLink link;
- unsigned int flags;
-
- private:
- double HMap(Axis*, double);
- double VMap(Axis*, double);
-
- protected:
- Point2d mapPoint(Point2d*, Axis2d*);
- int boxesDontOverlap(Graph*, Region2d*);
-
- public:
- Marker(Graph*, const char*, Tcl_HashEntry*);
- virtual ~Marker();
-
- virtual int configure() =0;
- virtual void draw(Drawable) =0;
- virtual void map() =0;
- virtual int pointIn(Point2d*) =0;
- virtual int regionIn(Region2d*, int) =0;
- virtual void postscript(Blt_Ps) =0;
-
- ClassId classId() {return classId_;}
- const char* name() {return name_;}
- const char* className() {return className_;}
- int clipped() {return clipped_;}
- Tk_OptionTable optionTable() {return optionTable_;}
- MarkerOptions* ops() {return (MarkerOptions*)ops_;}
- };
+ typedef struct {
+ Point2d* points;
+ int num;
+ } Coords;
+
+ typedef struct {
+ const char** tags;
+ Coords* worldPts;
+ const char* elemName;
+ Axis2d axes;
+ int hide;
+ int state;
+ int drawUnder;
+ int xOffset;
+ int yOffset;
+ } MarkerOptions;
+
+ class Marker {
+ protected:
+ ClassId classId_;
+ const char *name_;
+ const char *className_;
+ Tk_OptionTable optionTable_;
+ void* ops_;
+ Graph* graphPtr_;
+ Tcl_HashEntry* hashPtr_;
+ int clipped_;
+
+ public:
+ Blt_ChainLink link;
+ unsigned int flags;
+
+ private:
+ double HMap(Axis*, double);
+ double VMap(Axis*, double);
+
+ protected:
+ Point2d mapPoint(Point2d*, Axis2d*);
+ int boxesDontOverlap(Graph*, Region2d*);
+
+ public:
+ Marker(Graph*, const char*, Tcl_HashEntry*);
+ virtual ~Marker();
+
+ virtual int configure() =0;
+ virtual void draw(Drawable) =0;
+ virtual void map() =0;
+ virtual int pointIn(Point2d*) =0;
+ virtual int regionIn(Region2d*, int) =0;
+ virtual void postscript(Blt_Ps) =0;
+
+ ClassId classId() {return classId_;}
+ const char* name() {return name_;}
+ const char* className() {return className_;}
+ int clipped() {return clipped_;}
+ Tk_OptionTable optionTable() {return optionTable_;}
+ void* ops() {return ops_;}
+ };
};