3 // $Log: barChartDriver.C,v $
4 // Revision 1.1 1994/09/29 19:50:51 tamches
5 // initial implementation.
6 // entrypoint for barchart C++ program. we create new tcl
7 // commands (which will eventually call back to barChartTcl.C
8 // and from there barChart.C) and then launch barChart.tcl.
17 #include "barChartTcl.h"
19 void panic(char *msg) {
25 int Blt_Init(Tcl_Interp *);
28 Tcl_Interp *MainInterp;
30 int Tcl_AppInit(Tcl_Interp *interp) {
31 // tk library's main() will call this routine for us. We must perform all
32 // needed initializations here...
34 MainInterp = interp; // needed by Dg
36 if (TCL_ERROR == Tcl_Init(interp))
39 if (TCL_ERROR == Tk_Init(interp))
42 // if (TCL_ERROR == Blt_Init(interp))
43 // // for blt_drag n' drop
46 if (TCL_ERROR == Dg2_Init(interp))
47 // installs lots of tcl and C++ callbacks
50 tcl_RcFileName = "~/.wishrc";
52 // Install our new tcl commands
53 Tcl_CreateCommand(interp, "resizeCallback", resizeCallbackCommand,
57 Tcl_CreateCommand(interp, "exposeCallback", exposeCallbackCommand,
61 Tcl_CreateCommand(interp, "xAxisHasChanged", xAxisHasChangedCommand,
65 Tcl_CreateCommand(interp, "yAxisHasChanged", yAxisHasChangedCommand,
69 Tcl_CreateCommand(interp, "newScrollPosition", newScrollPositionCommand,
73 Tcl_CreateCommand(interp, "dataFormatHasChanged", dataFormatHasChangedCommand,
77 Tcl_CreateCommand(interp, "launchBarChart", launchBarChartCommand,
79 deleteLaunchBarChartCommand);
84 // we use main() from the tk library, which is rigged to call
85 // int Tcl_AppInit(Tcl_Interp *) which gives us a change to install
88 extern int main(int argc, char **argv);
89 int (*dummy)(int, char**) = main; // make use of main() to ensure it gets linked in...