diff options
author | joye <joye> | 2014-04-08 18:07:00 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-08 18:07:00 (GMT) |
commit | 622da74278fc8a94d912b88fd4d51670b681558c (patch) | |
tree | beca821048106aa0aba0ff2363dd3c30e9cbb402 /src | |
parent | 48bc17d9aacca05c5ea150a487356d8f1d5f222f (diff) | |
download | blt-622da74278fc8a94d912b88fd4d51670b681558c.zip blt-622da74278fc8a94d912b88fd4d51670b681558c.tar.gz blt-622da74278fc8a94d912b88fd4d51670b681558c.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrLegd.C | 33 | ||||
-rw-r--r-- | src/bltGrLegd.h | 94 | ||||
-rw-r--r-- | src/bltGrLegdOp.C | 35 |
3 files changed, 91 insertions, 71 deletions
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 0e040e6..c85bd86 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -27,14 +27,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include <X11/Xatom.h> - -#include "bltC.h" - extern "C" { -#include "bltInt.h" #include "bltGraph.h" #include "bltOp.h" }; @@ -44,23 +37,15 @@ extern "C" { #include "bltGrElem.h" #include "bltGrElemOp.h" -/* - * Selection related flags: - * - * SELECT_PENDING A "selection" command idle task is pending. - * - * SELECT_CLEAR Clear selection flag of entry. - * - * SELECT_SET Set selection flag of entry. - * - * SELECT_TOGGLE Toggle selection flag of entry. - * Mask of selection set/clear/toggle flags. - * - * SELECT_SORTED Indicates if the entries in the selection - * should be sorted or displayed in the order - * they were selected. - * - */ +// Selection related flags: +// SELECT_PENDING A "selection" command idle task is pending. +// SELECT_CLEAR Clear selection flag of entry. +// SELECT_SET Set selection flag of entry. +// SELECT_TOGGLE Toggle selection flag of entry. +// Mask of selection set/clear/toggle flags. +// SELECT_SORTED Indicates if the entries in the selection +// should be sorted or displayed in the order +// they were selected. #define SELECT_CLEAR (1<<24) #define SELECT_PENDING (1<<25) diff --git a/src/bltGrLegd.h b/src/bltGrLegd.h index 89af198..a0b8bff 100644 --- a/src/bltGrLegd.h +++ b/src/bltGrLegd.h @@ -42,16 +42,14 @@ extern "C" { #include "bltGraph.h" }; -#define LEGEND_RIGHT (1<<0) /* Right margin */ -#define LEGEND_LEFT (1<<1) /* Left margin */ -#define LEGEND_BOTTOM (1<<2) /* Bottom margin */ -#define LEGEND_TOP (1<<3) /* Top margin, below the graph title. */ -#define LEGEND_PLOT (1<<4) /* Plot area */ -#define LEGEND_XY (1<<5) /* Screen coordinates in the plotting - * area. */ -#define LEGEND_WINDOW (1<<6) /* External window. */ -#define LEGEND_MARGIN_MASK \ - (LEGEND_RIGHT | LEGEND_LEFT | LEGEND_BOTTOM | LEGEND_TOP) +#define LEGEND_RIGHT (1<<0) // Right margin +#define LEGEND_LEFT (1<<1) // Left margin +#define LEGEND_BOTTOM (1<<2) // Bottom margin +#define LEGEND_TOP (1<<3) // Top margin, below the graph title +#define LEGEND_PLOT (1<<4) // Plot area +#define LEGEND_XY (1<<5) // Screen coordinates in the plotting area +#define LEGEND_WINDOW (1<<6) // External window +#define LEGEND_MARGIN_MASK (LEGEND_RIGHT|LEGEND_LEFT|LEGEND_BOTTOM|LEGEND_TOP) #define LEGEND_PLOTAREA_MASK (LEGEND_PLOT | LEGEND_XY) typedef enum { @@ -59,50 +57,60 @@ typedef enum { } SelectMode; struct _Legend { + Tk_3DBorder activeBg; + XColor* activeFgColor; + int activeRelief; + Tk_3DBorder normalBg; + XColor* fgColor; + Tk_Anchor anchor; + int borderWidth; + int reqColumns; + int exportSelection; + Blt_Dashes focusDashes; + XColor* focusColor; + TextStyle style; + int hide; + int ixPad; + int iyPad; + int xPad; + int yPad; + int raised; + int relief; + int reqRows; + int entryBW; + int selBW; + const char *selectCmd; + Tk_3DBorder selOutFocusBg; + Tk_3DBorder selInFocusBg; + XColor* selOutFocusFgColor; + XColor* selInFocusFgColor; + SelectMode selectMode; + int selRelief; + const char *takeFocus; + const char *title; + TextStyle titleStyle; + + Graph* graphPtr; + ClassId classId; Tk_OptionTable optionTable; unsigned int flags; - ClassId classId; int nEntries; - int nColumns, nRows; + int nColumns; + int nRows; int width; int height; - int entryWidth, entryHeight; + int entryWidth; + int entryHeight; int site; int xReq; int yReq; - Tk_Anchor anchor; int x; int y; - Graph* graphPtr; Tcl_Command cmdToken; - int reqColumns; - int reqRows; - int ixPad; - int iyPad; - int xPad; - int yPad; Tk_Window tkwin; - TextStyle style; int maxSymSize; - XColor* fgColor; - Tk_3DBorder activeBg; - XColor* activeFgColor; - int activeRelief; - int entryBW; - Tk_3DBorder normalBg; - int borderWidth; - int relief; Blt_BindTable bindTable; - int selRelief; - int selBW; - XColor* selInFocusFgColor; - XColor* selOutFocusFgColor; - Tk_3DBorder selInFocusBg; - Tk_3DBorder selOutFocusBg; - XColor* focusColor; - Blt_Dashes focusDashes; GC focusGC; - const char *takeFocus; int focus; int cursorX; int cursorY; @@ -113,27 +121,19 @@ struct _Legend { Element *selMarkPtr; Element *selFirstPtr; Element *selLastPtr; - int hide; - int raised; - int exportSelection; int active; int cursorOn; int onTime; int offTime; Tcl_TimerToken timerToken; - const char *selectCmd; - SelectMode selectMode; Tcl_HashTable selectTable; Blt_Chain selected; - const char *title; unsigned int titleWidth; unsigned int titleHeight; - TextStyle titleStyle; }; extern int Blt_CreateLegend(Graph *graphPtr); extern void Blt_DestroyLegend(Graph *graphPtr); - extern void Blt_DrawLegend(Graph *graphPtr, Drawable drawable); extern void Blt_MapLegend(Graph *graphPtr, int width, int height); extern int Blt_LegendOp(Graph *graphPtr, Tcl_Interp* interp, int objc, diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C new file mode 100644 index 0000000..5301c06 --- /dev/null +++ b/src/bltGrLegdOp.C @@ -0,0 +1,35 @@ +/* + * 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. + */ + +extern "C" { +#include "bltGraph.h" +#include "bltOp.h" +}; + +#include "bltGrLegd.h" |