diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrAxis.h | 2 | ||||
-rw-r--r-- | src/bltGrLegd.h | 4 | ||||
-rw-r--r-- | src/bltGrPSOutput.h | 87 | ||||
-rw-r--r-- | src/bltGrPen.h | 2 | ||||
-rw-r--r-- | src/bltGrPenBar.h | 2 | ||||
-rw-r--r-- | src/bltGrPenLine.h | 2 | ||||
-rw-r--r-- | src/bltGrPostscript.h | 65 | ||||
-rw-r--r-- | src/bltGrText.h | 59 | ||||
-rw-r--r-- | src/bltGraph.h | 2 | ||||
-rw-r--r-- | src/bltGraphBar.h | 2 | ||||
-rw-r--r-- | src/bltGraphLine.h | 2 |
11 files changed, 119 insertions, 110 deletions
diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index 15e430c..24e90c8 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -108,7 +108,7 @@ typedef struct { const char *formatCmd; int descending; int labelOffset; - TextStyleOptions limitsTextStyle; + Blt::TextStyleOptions limitsTextStyle; const char *limitsFormat; int lineWidth; int logScale; diff --git a/src/bltGrLegd.h b/src/bltGrLegd.h index 8ff447b..be48fb1 100644 --- a/src/bltGrLegd.h +++ b/src/bltGrLegd.h @@ -77,7 +77,7 @@ typedef struct { int exportSelection; Dashes focusDashes; XColor* focusColor; - TextStyleOptions style; + Blt::TextStyleOptions style; int hide; int ixPad; int iyPad; @@ -99,7 +99,7 @@ typedef struct { SelectMode selectMode; int selRelief; const char *title; - TextStyleOptions titleStyle; + Blt::TextStyleOptions titleStyle; } LegendOptions; class Legend : public Pick { diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h index 7e9c539..1e629b2 100644 --- a/src/bltGrPSOutput.h +++ b/src/bltGrPSOutput.h @@ -37,54 +37,57 @@ class Graph; class Postscript; -class PSOutput { - protected: - Graph* graphPtr_; - Tcl_DString dString_; - char scratchArr_[POSTSCRIPT_BUFSIZ+1]; +namespace Blt { - protected: - void addComments(const char**); - void printXColor(XColor*); - unsigned char reverseBits(unsigned char); - void byteToHex(unsigned char, char*); - void setJoinStyle(int); - void setCapStyle(int); - void prolog(); + class PSOutput { + protected: + Graph* graphPtr_; + Tcl_DString dString_; + char scratchArr_[POSTSCRIPT_BUFSIZ+1]; - public: - PSOutput(Graph*); - virtual ~PSOutput(); + protected: + void addComments(const char**); + void printXColor(XColor*); + unsigned char reverseBits(unsigned char); + void byteToHex(unsigned char, char*); + void setJoinStyle(int); + void setCapStyle(int); + void prolog(); - void printPolyline(Point2d*, int); - void printMaxPolyline(Point2d*, int); - void printSegments(Segment2d*, int); - void printBitmap(Display*, Pixmap, double, double); - void printRectangle(int, int, int, int); - void printPolygon(Point2d*, int); - void print3DRectangle(Tk_3DBorder, double, double, int, int, int, int); + public: + PSOutput(Graph*); + virtual ~PSOutput(); - void fillRectangle(double, double, int, int); - void fillRectangles(XRectangle*, int); - void fill3DRectangle(Tk_3DBorder, double, double, int, int, int, int); - void fillPolygon(Point2d*, int); + void printPolyline(Point2d*, int); + void printMaxPolyline(Point2d*, int); + void printSegments(Segment2d*, int); + void printBitmap(Display*, Pixmap, double, double); + void printRectangle(int, int, int, int); + void printPolygon(Point2d*, int); + void print3DRectangle(Tk_3DBorder, double, double, int, int, int, int); - void setFont(Tk_Font); - void setLineWidth(int); - void setBackground(XColor*); - void setForeground(XColor*); - void setBackground(Tk_3DBorder); - void setLineAttributes(XColor*,int, Dashes*, int, int); - void setClearBackground(); - void setDashes(Dashes*); - void setBitmap(Display*, Pixmap, int, int); + void fillRectangle(double, double, int, int); + void fillRectangles(XRectangle*, int); + void fill3DRectangle(Tk_3DBorder, double, double, int, int, int, int); + void fillPolygon(Point2d*, int); - int preamble(const char*); - int computeBBox(int, int); - const char* getValue(int*); - void append(const char*); - void format(const char*, ...); - void varAppend(const char*, ...); + void setFont(Tk_Font); + void setLineWidth(int); + void setBackground(XColor*); + void setForeground(XColor*); + void setBackground(Tk_3DBorder); + void setLineAttributes(XColor*,int, Dashes*, int, int); + void setClearBackground(); + void setDashes(Dashes*); + void setBitmap(Display*, Pixmap, int, int); + + int preamble(const char*); + int computeBBox(int, int); + const char* getValue(int*); + void append(const char*); + void format(const char*, ...); + void varAppend(const char*, ...); + }; }; #endif diff --git a/src/bltGrPen.h b/src/bltGrPen.h index 525cdb9..09cb3f0 100644 --- a/src/bltGrPen.h +++ b/src/bltGrPen.h @@ -43,7 +43,7 @@ typedef struct { XColor* errorBarColor; int valueShow; const char* valueFormat; - TextStyleOptions valueStyle; + Blt::TextStyleOptions valueStyle; } PenOptions; class Pen { diff --git a/src/bltGrPenBar.h b/src/bltGrPenBar.h index 699970e..a06d68f 100644 --- a/src/bltGrPenBar.h +++ b/src/bltGrPenBar.h @@ -41,7 +41,7 @@ typedef struct { XColor* errorBarColor; int valueShow; const char *valueFormat; - TextStyleOptions valueStyle; + Blt::TextStyleOptions valueStyle; XColor* outlineColor; Tk_3DBorder fill; diff --git a/src/bltGrPenLine.h b/src/bltGrPenLine.h index df607e9..aa5ae0f 100644 --- a/src/bltGrPenLine.h +++ b/src/bltGrPenLine.h @@ -54,7 +54,7 @@ typedef struct { XColor* errorBarColor; int valueShow; const char* valueFormat; - TextStyleOptions valueStyle; + Blt::TextStyleOptions valueStyle; Symbol symbol; int traceWidth; diff --git a/src/bltGrPostscript.h b/src/bltGrPostscript.h index 10131d1..461419e 100644 --- a/src/bltGrPostscript.h +++ b/src/bltGrPostscript.h @@ -32,40 +32,43 @@ #include <tk.h> -typedef struct { - int center; - const char **comments; - int decorations; - int footer; - int greyscale; - int landscape; - int level; - int xPad; - int yPad; - int reqPaperWidth; - int reqPaperHeight; - int reqWidth; - int reqHeight; -} PostscriptOptions; +namespace Blt { + + typedef struct { + int center; + const char **comments; + int decorations; + int footer; + int greyscale; + int landscape; + int level; + int xPad; + int yPad; + int reqPaperWidth; + int reqPaperHeight; + int reqWidth; + int reqHeight; + } PostscriptOptions; -class Postscript { - public: - Tk_OptionTable optionTable_; - void* ops_; - Graph* graphPtr_; - unsigned int flags; + class Postscript { + public: + Tk_OptionTable optionTable_; + void* ops_; + Graph* graphPtr_; + unsigned int flags; - short int left; - short int bottom; - short int right; - short int top; - float scale; - int paperHeight; - int paperWidth; + short int left; + short int bottom; + short int right; + short int top; + float scale; + int paperHeight; + int paperWidth; - public: - Postscript(Graph*); - virtual ~Postscript(); + public: + Postscript(Graph*); + virtual ~Postscript(); + }; }; #endif diff --git a/src/bltGrText.h b/src/bltGrText.h index 6c85365..090cf5f 100644 --- a/src/bltGrText.h +++ b/src/bltGrText.h @@ -37,39 +37,42 @@ class Graph; class PSOutput; -typedef struct { - Tk_Anchor anchor; - XColor* color; - Tk_Font font; - double angle; - Tk_Justify justify; -} TextStyleOptions; +namespace Blt { -class TextStyle { - protected: - Graph* graphPtr_; - void* ops_; - GC gc_; - int manageOptions_; + typedef struct { + Tk_Anchor anchor; + XColor* color; + Tk_Font font; + double angle; + Tk_Justify justify; + } TextStyleOptions; - public: - int xPad_; - int yPad_; + class TextStyle { + protected: + Graph* graphPtr_; + void* ops_; + GC gc_; + int manageOptions_; - protected: - void resetStyle(); - Point2d rotateText(int, int, int, int); + public: + int xPad_; + int yPad_; - public: - TextStyle(Graph*); - TextStyle(Graph*, TextStyleOptions*); - virtual ~TextStyle(); + protected: + void resetStyle(); + Point2d rotateText(int, int, int, int); - void* ops() {return ops_;} - void drawText(Drawable, const char*, int, int); - void drawText2(Drawable, const char*, int, int, int*, int*); - void printText(PSOutput*, const char*, int, int); - void getExtents(const char*, int*, int*); + public: + TextStyle(Graph*); + TextStyle(Graph*, TextStyleOptions*); + virtual ~TextStyle(); + + void* ops() {return ops_;} + void drawText(Drawable, const char*, int, int); + void drawText2(Drawable, const char*, int, int, int*, int*); + void printText(PSOutput*, const char*, int, int); + void getExtents(const char*, int*, int*); + }; }; #endif diff --git a/src/bltGraph.h b/src/bltGraph.h index f8104ea..8a1de1b 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -107,7 +107,7 @@ typedef struct { int borderWidth; Margin margins[4]; Tk_Cursor cursor; - TextStyleOptions titleTextStyle; + Blt::TextStyleOptions titleTextStyle; int reqHeight; XColor* highlightBgColor; XColor* highlightColor; diff --git a/src/bltGraphBar.h b/src/bltGraphBar.h index 9f1606e..8d70fae 100644 --- a/src/bltGraphBar.h +++ b/src/bltGraphBar.h @@ -60,7 +60,7 @@ typedef struct { int borderWidth; Margin margins[4]; Tk_Cursor cursor; - TextStyleOptions titleTextStyle; + Blt::TextStyleOptions titleTextStyle; int reqHeight; XColor* highlightBgColor; XColor* highlightColor; diff --git a/src/bltGraphLine.h b/src/bltGraphLine.h index 9144edc..bf5a08e 100644 --- a/src/bltGraphLine.h +++ b/src/bltGraphLine.h @@ -40,7 +40,7 @@ typedef struct { int borderWidth; Margin margins[4]; Tk_Cursor cursor; - TextStyleOptions titleTextStyle; + Blt::TextStyleOptions titleTextStyle; int reqHeight; XColor* highlightBgColor; XColor* highlightColor; |