Commit 11783d83 authored by Ole Streicher's avatar Ole Streicher

Initial upstream version 3.0.1

parents
*.[oa]
*~
Copyright (c) 2016, SAOImageDS9
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This diff is collapsed.
Introduction to the TkBLT library
TkBLT is a library of extensions to the Tk library. It adds new
commands and variables to the application's interpreter.
TkBLT is a derived version of the BLT Toolkit by George A. Howlett,
for Tcl/Tk 8.6, is TEA compatible, with full support for MacOSX and
Windows, and is fully compatible with the Tk API. TkBLT is released
under the original BSD license. TkBLT includes only the Graph and
Barchart Tk widgets, and the Tcl Vector command.
The following commands are added to the interpreter from the TkBLT library:
Graph
A 2D plotting widget. Plots two variable data in a window with an optional
legend and annotations. It has of several components; coordinate axes,
crosshairs, a legend, and a collection of elements and tags.
Barchart
A barchart widget. Plots two-variable data as rectangular bars in a
window. The x-coordinate values designate the position of the bar along
the x-axis, while the y-coordinate values designate the magnitude.
The barchart widget has of several components; coordinate axes,
crosshairs, a legend, and a collection of elements and tags.
Vector
Creates a vector of floating point values. The vector's components
can be manipulated in three ways: through a Tcl array variable, a Tcl
command, or the C API.
Send bug reports, requests, suggestions, etc. to
wjoye@cfa.harvard.edu
# tkblt
Derived version of the BLT Toolkit.
Tcl/Tk 8.5/8.6 TEA compatible.
Full support for MacOSX and Windows.
Original author George Howlett.
#
# Include the TEA standard macro set
#
builtin(include,tclconfig/tcl.m4)
#
# Add here whatever m4 macros you want to define for your package
#
This diff is collapsed.
#!/bin/bash -norc
dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#-----------------------------------------------------------------------
# Sample configure.in for Tcl Extensions. The only places you should
# need to modify this file are marked by the string __CHANGE__
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# __CHANGE__
# Set your package name and version numbers here.
#
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided. These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
# This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
# so that we create the export library with the dll.
#-----------------------------------------------------------------------
AC_INIT([tkblt], [3.0])
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
#--------------------------------------------------------------------
# Load the tclConfig.sh file
#--------------------------------------------------------------------
TEA_PATH_TCLCONFIG
TEA_LOAD_TCLCONFIG
#--------------------------------------------------------------------
# Load the tkConfig.sh file if necessary (Tk extension)
#--------------------------------------------------------------------
TEA_PATH_TKCONFIG
TEA_LOAD_TKCONFIG
#-----------------------------------------------------------------------
# Handle the --prefix=... option by defaulting to what Tcl gave.
# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
#-----------------------------------------------------------------------
TEA_PREFIX
#-----------------------------------------------------------------------
# Standard compiler checks.
# This sets up CC by using the CC env var, or looks for gcc otherwise.
# This also calls AC_PROG_CC and a few others to create the basic setup
# necessary to compile executables.
#-----------------------------------------------------------------------
TEA_SETUP_COMPILER
#-----------------------------------------------------------------------
# __CHANGE__
# Specify the C source files to compile in TEA_ADD_SOURCES,
# public headers that need to be installed in TEA_ADD_HEADERS,
# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
# and PKG_TCL_SOURCES.
#-----------------------------------------------------------------------
TEA_ADD_SOURCES([
src/bltChain.C
src/bltConfig.C
src/bltGrAxis.C
src/bltGrAxisOp.C
src/bltGrAxisOption.C
src/bltGrBind.C
src/bltGrElemOp.C
src/bltGrElemOption.C
src/bltGrElem.C
src/bltGrElemBar.C
src/bltGrElemLine.C
src/bltGrElemLineSpline.C
src/bltGrHairs.C
src/bltGrHairsOp.C
src/bltGrLegd.C
src/bltGrLegdOp.C
src/bltGrMarkerOp.C
src/bltGrMarkerOption.C
src/bltGrMarker.C
src/bltGrMarkerLine.C
src/bltGrMarkerPolygon.C
src/bltGrMarkerText.C
src/bltGrMisc.C
src/bltGrPenOp.C
src/bltGrPenOption.C
src/bltGrPen.C
src/bltGrPenBar.C
src/bltGrPenLine.C
src/bltGrPostscript.C
src/bltGrPostscriptOp.C
src/bltGrPSOutput.C
src/bltGrText.C
src/bltGrXAxisOp.C
src/bltGraph.C
src/bltGraphBar.C
src/bltGraphLine.C
src/bltGraphOp.C
src/bltGraphSup.C
src/bltInt.C
src/bltNsUtil.C
src/bltParse.C
src/bltOp.C
src/bltSwitch.C
src/bltVecCmd.C
src/bltVecOp.C
src/bltVecMath.C
src/bltVector.C
])
TEA_ADD_HEADERS([src/bltVector.h])
TEA_ADD_INCLUDES([-I./src])
TEA_ADD_LIBS([-lstdc++])
TEA_ADD_CFLAGS([])
TEA_ADD_STUB_SOURCES([])
TEA_ADD_TCL_SOURCES([library/graph.tcl])
#--------------------------------------------------------------------
# __CHANGE__
#
# You can add more files to clean if your extension creates any extra
# files by extending CLEANFILES.
# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
#
# A few miscellaneous platform-specific items:
# TEA_ADD_* any platform specific compiler/build info here.
#--------------------------------------------------------------------
#CLEANFILES="$CLEANFILES pkgIndex.tcl"
if test "${TEA_PLATFORM}" = "windows" ; then
# Ensure no empty if clauses
:
#TEA_ADD_SOURCES([win/winFile.c])
#TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
else
# Ensure no empty else clauses
:
#TEA_ADD_SOURCES([unix/unixFile.c])
#TEA_ADD_LIBS([-lsuperfly])
fi
#--------------------------------------------------------------------
# __CHANGE__
# Choose which headers you need. Extension authors should try very
# hard to only rely on the Tcl public header files. Internal headers
# contain private data structures and are subject to change without
# notice.
# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
#--------------------------------------------------------------------
TEA_PUBLIC_TCL_HEADERS
TEA_PRIVATE_TCL_HEADERS
TEA_PUBLIC_TK_HEADERS
TEA_PRIVATE_TK_HEADERS
TEA_PATH_X
#--------------------------------------------------------------------
# Check whether --enable-threads or --disable-threads was given.
# This auto-enables if Tcl was compiled threaded.
#--------------------------------------------------------------------
TEA_ENABLE_THREADS
#--------------------------------------------------------------------
# The statement below defines a collection of symbols related to
# building as a shared library instead of a static library.
#--------------------------------------------------------------------
TEA_ENABLE_SHARED
#--------------------------------------------------------------------
# This macro figures out what flags to use with the compiler/linker
# when building shared/static debug/optimized objects. This information
# can be taken from the tclConfig.sh file, but this figures it all out.
#--------------------------------------------------------------------
TEA_CONFIG_CFLAGS
#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols option.
#--------------------------------------------------------------------
TEA_ENABLE_SYMBOLS
#--------------------------------------------------------------------
# Everyone should be linking against the Tcl stub library. If you
# can't for some reason, remove this definition. If you aren't using
# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
# link against the non-stubbed Tcl library. Add Tk too if necessary.
#--------------------------------------------------------------------
AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
TEA_MAKE_LIB
#--------------------------------------------------------------------
# Determine the name of the tclsh and/or wish executables in the
# Tcl and Tk build directories or the location they were installed
# into. These paths are used to support running test cases only,
# the Makefile should not be making use of these paths to generate
# a pkgIndex.tcl file or anything else at extension build time.
#--------------------------------------------------------------------
TEA_PROG_TCLSH
TEA_PROG_WISH
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
# You may alternatively have a special pkgIndex.tcl.in or other files
# which require substituting th AC variables in. Include these here.
#--------------------------------------------------------------------
AC_OUTPUT([Makefile pkgIndex.tcl])
'\"
'\" 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 1991-1997 by Bell Labs Innovations for Lucent Technologies.
'\"
'\" Permission to use, copy, modify, and distribute this software and its
'\" documentation for any purpose and without fee is hereby granted, provided
'\" that the above copyright notice appear in all copies and that both that the
'\" copyright notice and warranty disclaimer appear in supporting documentation,
'\" and that the names of Lucent Technologies any of their entities not be used
'\" in advertising or publicity pertaining to distribution of the software
'\" without specific, written prior permission.
'\"
'\" Lucent Technologies disclaims all warranties with regard to this software,
'\" including all implied warranties of merchantability and fitness. In no event
'\" shall Lucent Technologies be liable for any special, indirect or
'\" consequential damages or any damages whatsoever resulting from loss of use,
'\" data or profits, whether in an action of contract, negligence or other
'\" tortuous action, arising out of or in connection with the use or performance
'\" of this software.
'\"
.so man.macros
.TH intro n BLT_VERSION BLT "BLT Built-In Commands"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
BLT \- Introduction to the BLT library
.BE
.SH DESCRIPTION
BLT is a library of extensions to the Tk library. It adds new
commands and variables to the application's interpreter.
.LP
.SH COMMANDS
The following commands are added to the interpreter from the BLT library:
.TP 15
\fBgraph\fR
A 2D plotting widget. Plots two variable data in a window with an optional
legend and annotations. It has of several components; coordinate axes,
crosshairs, a legend, and a collection of elements and tags.
.TP 15
\fBbarchart\fR
A barchart widget. Plots two-variable data as rectangular bars in a
window. The x-coordinate values designate the position of the bar along
the x-axis, while the y-coordinate values designate the magnitude.
The \fBbarchart\fR widget has of several components; coordinate axes,
crosshairs, a legend, and a collection of elements and tags.
.TP 15
\fBvector\fR
Creates a vector of floating point values. The vector's components
can be manipulated in three ways: through a Tcl array variable, a Tcl
command, or the C API.
.SH BUGS
Send bug reports, requests, suggestions, etc. to
wjoye@cfa.harvard.edu
.SH KEYWORDS
BLT
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
doc
saveas png?
shape no fill should be transparent, not white (black?)
macosx
update at pack [forget] cmd
windows
x11 calls?
doc
tests
-tkblt 3.1
add strip graph
add marker image
add marker bitmap
add symbol image
add symbol bitmap
-Bargraph issues
-aspect 2 cause plot offpage
-barmode stack cause bars offpage
-plotborderwidth clips legend
-rightmargin moves legend offpage
-Barelement issues
test styleMap/weights
test low/high
errorbar location weirdness (change x)
-invertxy no errorbarcap
-Legend issues
-ipadx 20 wrong
-Linegraph issues
-aspect 2 cause plot offpage
-plotborderwidth clips legend
-rightmargin moves legend offpage
-Lineelement issues
test styleMap/weights
test low/high
trace smoothness
element -x/y low/high (no effect)
redraw uses normal pen, not activepen
-invertxy no errorbarcap
-MacOSX
font size
-Marker issues
line/polygon marker -join round/miter/bevel
-Postscript issues
off dash color
text marker background
ps.tcl
configure options
text rotation
text marker
values
axis limits %g
marker
text-too large bg fill
off dash color
-Structure
bring *Op.C into class
flags RESET/LAYOUT
rm get GraphPtr from window
cleanup bltGrElemLineSpline.C
rm classid
rm bltSwitch
-BLT3.0 changes
-rm'd
graph
-buffergraph
-bufferelements
-unmaphiddenelements
axis
-use
GetOp
FocusOp
element
-halo
-interpolate
-along
GetOp
line element
-areaforeground
-state
symbol
bitmap
image
bar element
-stipple
pen
-type
-stipple
legend
-position @x,y
-position .window
-titleanchor
crosshairs
-position
-hide
marker
window
image
-name
GetOp
bitmap Marker
scale/rotate
-state
text marker
-xpad
-ypad
-state
polygon marker
-fillbg
-outlinebg
-stipple
-state
-xor
line marker
-state
-xor
graph.tcl
printkey
postscript dialog
-add'd
graph -searchhalo -searchmode -searchalong
legend -x -y
crosshairs -x -y
-tkblt render order
---cache---
Legend(MARGIN);
AxesGrids
Axes
AxesLimits
Legend(PLOT,UNDER);
Markers(UNDER);
Elements
ActiveElements
Legend(PLOT,OVER);
---cache---
Markers(OVER);
Crosshairs
Focus
#
# Tcl package index file
#
package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \
[list load [file join $dir @PKG_LIB_FILE@] @PACKAGE_NAME@]
This diff is collapsed.
/*
* 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 _BLT_CHAIN_H
#define _BLT_CHAIN_H
#define Chain_GetLength(c) (((c) == NULL) ? 0 : (c)->nLinks())
#define Chain_FirstLink(c) (((c) == NULL) ? NULL : (c)->head())
#define Chain_LastLink(c) (((c) == NULL) ? NULL : (c)->tail())
#define Chain_PrevLink(l) ((l)->prev())
#define Chain_NextLink(l) ((l)->next())
#define Chain_GetValue(l) ((l)->clientData())
namespace Blt {
class Chain;
class ChainLink {
friend class Chain;
protected:
ChainLink* prev_;
ChainLink* next_;
int manage_;
void* clientData_;
public:
ChainLink(void*);
ChainLink(size_t);
virtual ~ChainLink();
ChainLink* prev() {return prev_;}
ChainLink* next() {return next_;}
void* clientData() {return clientData_;}
void setClientData(void* d) {clientData_ =d;}
};
class Chain {
protected:
ChainLink* head_;
ChainLink* tail_;
long nLinks_;
public:
Chain();
virtual ~Chain();
ChainLink* head() {return head_;}
ChainLink* tail() {return tail_;}
long nLinks() {return nLinks_;}
void reset();
void linkAfter(ChainLink* link, ChainLink* after);
void linkBefore(ChainLink* link, ChainLink* before);
void unlinkLink(ChainLink* linkPtr);
void deleteLink(ChainLink* link);
ChainLink* append(void* clientData);
ChainLink* prepend(void* clientData);
};
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.