diff options
author | joye <joye> | 2014-06-27 18:53:51 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-27 18:53:51 (GMT) |
commit | 8f75a9e3b01a1659d13e733d0b48f8ee38fd5a88 (patch) | |
tree | 05cfd4dbf6b6d4fc7ab45b5e96176dfdcb4fc1d0 | |
parent | 47c3b1013b75080fea9fbd63b8d5c80971e9902b (diff) | |
download | blt-8f75a9e3b01a1659d13e733d0b48f8ee38fd5a88.zip blt-8f75a9e3b01a1659d13e733d0b48f8ee38fd5a88.tar.gz blt-8f75a9e3b01a1659d13e733d0b48f8ee38fd5a88.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrElem.h | 12 | ||||
-rw-r--r-- | src/bltGrElemBar.h | 20 | ||||
-rw-r--r-- | src/bltGrElemLine.h | 38 | ||||
-rw-r--r-- | src/bltGrPen.h | 63 | ||||
-rw-r--r-- | src/bltGrPenBar.h | 55 | ||||
-rw-r--r-- | src/bltGrPenLine.h | 81 | ||||
-rw-r--r-- | src/bltGrPenOp.h | 2 | ||||
-rw-r--r-- | src/bltGraph.h | 8 |
8 files changed, 142 insertions, 137 deletions
diff --git a/src/bltGrElem.h b/src/bltGrElem.h index 8ce9072..4105232 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -38,10 +38,10 @@ extern "C" { }; class Element; -class Pen; namespace Blt { class Axis; + class Pen; class Postscript; }; @@ -93,7 +93,7 @@ typedef struct { typedef struct { Weight weight; - Pen* penPtr; + Blt::Pen* penPtr; } PenStyle; typedef struct { @@ -113,10 +113,10 @@ typedef struct { int hide; int legendRelief; Blt_Chain stylePalette; - Pen* builtinPenPtr; - Pen* activePenPtr; - Pen* normalPenPtr; - PenOptions builtinPen; + Blt::Pen* builtinPenPtr; + Blt::Pen* activePenPtr; + Blt::Pen* normalPenPtr; + Blt::PenOptions builtinPen; } ElementOptions; class Element { diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h index 3787c65..edd61fd 100644 --- a/src/bltGrElemBar.h +++ b/src/bltGrElemBar.h @@ -47,7 +47,7 @@ typedef struct { typedef struct { Weight weight; - BarPen* penPtr; + Blt::BarPen* penPtr; XRectangle* bars; int nBars; GraphSegments xeb; @@ -73,10 +73,10 @@ typedef struct { int hide; int legendRelief; Blt_Chain stylePalette; - BarPen* builtinPenPtr; - BarPen* activePenPtr; - BarPen* normalPenPtr; - BarPenOptions builtinPen; + Blt::BarPen* builtinPenPtr; + Blt::BarPen* activePenPtr; + Blt::BarPen* normalPenPtr; + Blt::BarPenOptions builtinPen; // derived double barWidth; @@ -85,7 +85,7 @@ typedef struct { class BarElement : public Element { protected: - BarPen* builtinPenPtr; + Blt::BarPen* builtinPenPtr; int* barToData_; XRectangle* bars_; int* activeToData_; @@ -102,10 +102,10 @@ class BarElement : public Element { void mapActive(); void reset(); void mapErrorBars(BarStyle**); - void drawSegments(Drawable, BarPen*, XRectangle*, int); - void drawValues(Drawable, BarPen*, XRectangle*, int, int*); - void printSegments(Blt::PSOutput*, BarPen*, XRectangle*, int); - void printValues(Blt::PSOutput*, BarPen*, XRectangle*, int, int*); + void drawSegments(Drawable, Blt::BarPen*, XRectangle*, int); + void drawValues(Drawable, Blt::BarPen*, XRectangle*, int, int*); + void printSegments(Blt::PSOutput*, Blt::BarPen*, XRectangle*, int); + void printValues(Blt::PSOutput*, Blt::BarPen*, XRectangle*, int, int*); public: BarElement(Graph*, const char*, Tcl_HashEntry*); diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h index d764910..4e6dc8a 100644 --- a/src/bltGrElemLine.h +++ b/src/bltGrElemLine.h @@ -55,7 +55,7 @@ typedef struct { typedef struct { Weight weight; - LinePen* penPtr; + Blt::LinePen* penPtr; GraphPoints symbolPts; GraphSegments xeb; GraphSegments yeb; @@ -80,10 +80,10 @@ typedef struct { int hide; int legendRelief; Blt_Chain stylePalette; - LinePen *builtinPenPtr; - LinePen *activePenPtr; - LinePen *normalPenPtr; - LinePenOptions builtinPen; + Blt::LinePen *builtinPenPtr; + Blt::LinePen *activePenPtr; + Blt::LinePen *normalPenPtr; + Blt::LinePenOptions builtinPen; // derived Tk_3DBorder fillBg; @@ -100,7 +100,7 @@ class LineElement : public Element { enum Smoothing {LINEAR, STEP, CUBIC, QUADRATIC, CATROM}; protected: - LinePen* builtinPenPtr; + Blt::LinePen* builtinPenPtr; Smoothing smooth_; Point2d *fillPts_; int nFillPts_; @@ -112,12 +112,12 @@ class LineElement : public Element { int symbolCounter_; Blt_Chain traces_; - void drawCircle(Display*, Drawable, LinePen*, int, Point2d*, int); - void drawSquare(Display*, Drawable, LinePen*, int, Point2d*, int); - void drawSCross(Display*, Drawable, LinePen*, int, Point2d*, int); - void drawCross(Display*, Drawable, LinePen*, int, Point2d*, int); - void drawDiamond(Display*, Drawable, LinePen*, int, Point2d*, int); - void drawArrow(Display*, Drawable, LinePen*, int, Point2d*, int); + void drawCircle(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); + void drawSquare(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); + void drawSCross(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); + void drawCross(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); + void drawDiamond(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); + void drawArrow(Display*, Drawable, Blt::LinePen*, int, Point2d*, int); protected: int scaleSymbol(int); @@ -139,13 +139,13 @@ class LineElement : public Element { void resetLine(); int closestTrace(); void closestPoint(ClosestSearch*); - void drawSymbols(Drawable, LinePen*, int, int, Point2d*); - void drawTraces(Drawable, LinePen*); - void drawValues(Drawable, LinePen*, int, Point2d*, int*); - void setLineAttributes(Blt::PSOutput*, LinePen*); - void printTraces(Blt::PSOutput*, LinePen*); - void printValues(Blt::PSOutput*, LinePen*, int, Point2d*, int*); - void printSymbols(Blt::PSOutput*, LinePen*, int, int, Point2d*); + void drawSymbols(Drawable, Blt::LinePen*, int, int, Point2d*); + void drawTraces(Drawable, Blt::LinePen*); + void drawValues(Drawable, Blt::LinePen*, int, Point2d*, int*); + void setLineAttributes(Blt::PSOutput*, Blt::LinePen*); + void printTraces(Blt::PSOutput*, Blt::LinePen*); + void printValues(Blt::PSOutput*, Blt::LinePen*, int, Point2d*, int*); + void printSymbols(Blt::PSOutput*, Blt::LinePen*, int, int, Point2d*); double distanceToLine(int, int, Point2d*, Point2d*, Point2d*); double distanceToX(int, int, Point2d*, Point2d*, Point2d*); double distanceToY(int, int, Point2d*, Point2d*, Point2d*); diff --git a/src/bltGrPen.h b/src/bltGrPen.h index 09cb3f0..4854f82 100644 --- a/src/bltGrPen.h +++ b/src/bltGrPen.h @@ -36,42 +36,45 @@ class Graph; -typedef struct { - int errorBarShow; - int errorBarLineWidth; - int errorBarCapWidth; - XColor* errorBarColor; - int valueShow; - const char* valueFormat; - Blt::TextStyleOptions valueStyle; -} PenOptions; +namespace Blt { -class Pen { - protected: - Tk_OptionTable optionTable_; - void* ops_; + typedef struct { + int errorBarShow; + int errorBarLineWidth; + int errorBarCapWidth; + XColor* errorBarColor; + int valueShow; + const char* valueFormat; + TextStyleOptions valueStyle; + } PenOptions; - public: - Graph* graphPtr_; - const char *name_; - Tcl_HashEntry *hashPtr_; - int refCount_; - unsigned int flags; - int manageOptions_; + class Pen { + protected: + Tk_OptionTable optionTable_; + void* ops_; - public: - Pen(); - Pen(Graph*, const char*, Tcl_HashEntry*); - virtual ~Pen(); + public: + Graph* graphPtr_; + const char *name_; + Tcl_HashEntry *hashPtr_; + int refCount_; + unsigned int flags; + int manageOptions_; - virtual ClassId classId() =0; - virtual const char* className() =0; - virtual const char* typeName() =0; + public: + Pen(); + Pen(Graph*, const char*, Tcl_HashEntry*); + virtual ~Pen(); - Tk_OptionTable optionTable() {return optionTable_;} - void* ops() {return ops_;} + virtual ClassId classId() =0; + virtual const char* className() =0; + virtual const char* typeName() =0; - virtual int configure() =0; + Tk_OptionTable optionTable() {return optionTable_;} + void* ops() {return ops_;} + + virtual int configure() =0; + }; }; #endif diff --git a/src/bltGrPenBar.h b/src/bltGrPenBar.h index a06d68f..76cae0b 100644 --- a/src/bltGrPenBar.h +++ b/src/bltGrPenBar.h @@ -34,39 +34,40 @@ #include "bltGrPen.h" -typedef struct { - int errorBarShow; - int errorBarLineWidth; - int errorBarCapWidth; - XColor* errorBarColor; - int valueShow; - const char *valueFormat; - Blt::TextStyleOptions valueStyle; +namespace Blt { - XColor* outlineColor; - Tk_3DBorder fill; - int borderWidth; - int relief; -} BarPenOptions; + typedef struct { + int errorBarShow; + int errorBarLineWidth; + int errorBarCapWidth; + XColor* errorBarColor; + int valueShow; + const char *valueFormat; + TextStyleOptions valueStyle; -class BarPen : public Pen { - friend class BarElement; + XColor* outlineColor; + Tk_3DBorder fill; + int borderWidth; + int relief; + } BarPenOptions; - protected: - GC fillGC_; - GC outlineGC_; - GC errorBarGC_; + class BarPen : public Pen { + public: + GC fillGC_; + GC outlineGC_; + GC errorBarGC_; - public: - BarPen(Graph*, const char*, Tcl_HashEntry*); - BarPen(Graph*, const char*, void*); - virtual ~BarPen(); + public: + BarPen(Graph*, const char*, Tcl_HashEntry*); + BarPen(Graph*, const char*, void*); + virtual ~BarPen(); - ClassId classId() {return CID_ELEM_BAR;} - const char* className() {return "BarElement";} - const char* typeName() {return "bar";} + ClassId classId() {return CID_ELEM_BAR;} + const char* className() {return "BarElement";} + const char* typeName() {return "bar";} - int configure(); + int configure(); + }; }; #endif diff --git a/src/bltGrPenLine.h b/src/bltGrPenLine.h index aa5ae0f..bb8e5cc 100644 --- a/src/bltGrPenLine.h +++ b/src/bltGrPenLine.h @@ -32,54 +32,55 @@ #include "bltGrPen.h" -typedef enum { - SYMBOL_NONE, SYMBOL_SQUARE, SYMBOL_CIRCLE, SYMBOL_DIAMOND, SYMBOL_PLUS, - SYMBOL_CROSS, SYMBOL_SPLUS, SYMBOL_SCROSS, SYMBOL_TRIANGLE, SYMBOL_ARROW -} SymbolType; +namespace Blt { -typedef struct { - SymbolType type; - int size; - XColor* outlineColor; - int outlineWidth; - GC outlineGC; - XColor* fillColor; - GC fillGC; -} Symbol; + typedef enum { + SYMBOL_NONE, SYMBOL_SQUARE, SYMBOL_CIRCLE, SYMBOL_DIAMOND, SYMBOL_PLUS, + SYMBOL_CROSS, SYMBOL_SPLUS, SYMBOL_SCROSS, SYMBOL_TRIANGLE, SYMBOL_ARROW + } SymbolType; -typedef struct { - int errorBarShow; - int errorBarLineWidth; - int errorBarCapWidth; - XColor* errorBarColor; - int valueShow; - const char* valueFormat; - Blt::TextStyleOptions valueStyle; + typedef struct { + SymbolType type; + int size; + XColor* outlineColor; + int outlineWidth; + GC outlineGC; + XColor* fillColor; + GC fillGC; + } Symbol; - Symbol symbol; - int traceWidth; - Dashes traceDashes; - XColor* traceColor; - XColor* traceOffColor; -} LinePenOptions; + typedef struct { + int errorBarShow; + int errorBarLineWidth; + int errorBarCapWidth; + XColor* errorBarColor; + int valueShow; + const char* valueFormat; + TextStyleOptions valueStyle; -class LinePen : public Pen { - friend class LineElement; + Symbol symbol; + int traceWidth; + Dashes traceDashes; + XColor* traceColor; + XColor* traceOffColor; + } LinePenOptions; - protected: - GC traceGC_; - GC errorBarGC_; + class LinePen : public Pen { + public: + GC traceGC_; + GC errorBarGC_; - public: - LinePen(Graph*, const char*, Tcl_HashEntry*); - LinePen(Graph*, const char*, void*); - virtual ~LinePen(); + public: + LinePen(Graph*, const char*, Tcl_HashEntry*); + LinePen(Graph*, const char*, void*); + virtual ~LinePen(); - ClassId classId() {return CID_ELEM_LINE;} - const char* className() {return "LineElement";} - const char* typeName() {return "line";} + ClassId classId() {return CID_ELEM_LINE;} + const char* className() {return "LineElement";} + const char* typeName() {return "line";} - int configure(); + int configure(); + }; }; extern const char* symbolObjOption[]; diff --git a/src/bltGrPenOp.h b/src/bltGrPenOp.h index 58bdc85..9b16e28 100644 --- a/src/bltGrPenOp.h +++ b/src/bltGrPenOp.h @@ -34,7 +34,7 @@ extern const Ensemble penEnsemble[]; -extern int PenObjConfigure(Graph* graphPtr, Pen* penPtr, +extern int PenObjConfigure(Graph* graphPtr, Blt::Pen* penPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]); #endif diff --git a/src/bltGraph.h b/src/bltGraph.h index 9964ae7..ae72b07 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -40,10 +40,8 @@ extern "C" { #include "bltGrText.h" class Graph; -class Crosshairs; class Element; class Legend; -class Pen; class Pick { public: @@ -53,7 +51,9 @@ class Pick { namespace Blt { class Axis; class BindTable; + class Crosshairs; class Marker; + class Pen; class Postscript; class PSOutput; }; @@ -149,7 +149,7 @@ class Graph : public Pick { Blt_Chain axisChain_[4]; Legend* legend_; - Crosshairs* crosshairs_; + Blt::Crosshairs* crosshairs_; Blt::Postscript* postscript_; int inset_; @@ -241,7 +241,7 @@ class Graph : public Pick { ClientData elementTag(const char*); virtual int createPen(const char*, int, Tcl_Obj* const []) =0; - int getPen(Tcl_Obj*, Pen**); + int getPen(Tcl_Obj*, Blt::Pen**); int getXY(const char*, int*, int*); void getTextExtents(Tk_Font, const char*, int, int*, int*); |