00001
00002
00003
00004
00005
00006
00007 #ifndef _AFNI_HEADER_GRAPH_
00008 #define _AFNI_HEADER_GRAPH_
00009
00010
00011
00012
00013
00014
00015
00016 #include "mrilib.h"
00017 #include "display.h"
00018 #include "xutil.h"
00019 #include "bbox.h"
00020 #include "xim.h"
00021
00022 #define WANT_AFNI_BITMAP
00023 #ifdef WANT_AFNI_BITMAP
00024 # include "logo.h"
00025 #endif
00026
00027 #if 0
00028 # include "overfim.h"
00029 # include "pcor.h"
00030 #endif
00031
00032 #ifdef SPARKY
00033 #undef _POSIX_SOURCE
00034 #endif
00035
00036 #include <sys/types.h>
00037 #include <sys/stat.h>
00038
00039 #include <X11/X.h>
00040 #include <X11/cursorfont.h>
00041 #include <X11/Intrinsic.h>
00042
00043 #include <Xm/PushB.h>
00044 #include <Xm/Label.h>
00045 #include <Xm/DrawingA.h>
00046 #include <Xm/Protocols.h>
00047 #include <Xm/AtomMgr.h>
00048 #include <X11/Shell.h>
00049 #include <Xm/MwmUtil.h>
00050 #include <Xm/RowColumn.h>
00051 #include <Xm/CascadeB.h>
00052 #include <Xm/Separator.h>
00053
00054 #ifndef LABEL_ARG
00055 #define LABEL_ARG(str) \
00056 XtVaTypedArg , XmNlabelString , XmRString , (str) , strlen(str)+1
00057 #endif
00058
00059 #ifndef DONT_USE_OPTMENUS
00060 #ifndef USE_OPTMENUS
00061 #define USE_OPTMENUS
00062 #endif
00063 #endif
00064
00065 #ifndef BE_AFNI_IGNORANT
00066 #define BE_AFNI_AWARE
00067 #endif
00068
00069 #ifdef BE_AFNI_AWARE
00070 #undef DONT_MANGLE_XYZ
00071 #endif
00072
00073 #define EXRONE(g) if( (g)->status->num_series < 2 ) EXRETURN
00074 #define RONE(g,v) if( (g)->status->num_series < 2 ) RETURN(v)
00075
00076
00077
00078 #define GX_MAX 512
00079 #define GY_MAX 512
00080 #define GR_DLX 4
00081 #define GT_DLY 4
00082 #define GL_DLX 54
00083 #define GB_DLY 52
00084 #define MAT_MAX 21
00085 #define COL_NUM 5
00086 #define STR_L 256
00087
00088 #define MIN_XSIZE 120
00089 #define MIN_YSIZE 120
00090
00091 #define XSPACE 8
00092 #define YSPACE 20
00093 #define MYTXT 14
00094 #define MDX1 (GL_DLX + 1)
00095 #define MDY1 (GB_DLY + 1)
00096
00097
00098 typedef struct {
00099 Widget fim_menu , fim_cbut ;
00100 Widget fim_plot_menu , fim_plot_cbut ,
00101 fim_plot_firstref_pb , fim_plot_allrefs_pb ,
00102 fim_plot_firstort_pb , fim_plot_allorts_pb ;
00103 Widget fim_editref_menu , fim_editref_cbut ,
00104 fim_editref_clear_pb , fim_editref_equals_pb ,
00105 fim_editref_add_pb , fim_editref_smooth_pb ,
00106 fim_editref_read_pb , fim_editref_write_pb , fim_editref_store_pb ,
00107 fim_editref_setshift_pb , fim_editort_clear_pb ,
00108 fim_polort_choose_pb , fim_bkthr_choose_pb ;
00109 MCW_bbox *fim_editref_winaver_bbox ;
00110 Widget fim_ignore_menu , fim_ignore_cbut ,
00111 fim_ignore_down_pb, fim_ignore_up_pb , fim_ignore_choose_pb ;
00112 Widget fim_pickref_pb , fim_pickort_pb , fim_execute_pb , fim_execfimp_pb ;
00113 Widget fimp_setdefault_pb , fimp_setall_pb , fimp_unsetall_pb ;
00114 Widget fim_pickdset_pb ;
00115
00116 MCW_bbox * fim_opt_bbox , * fimp_opt_bbox ;
00117 MCW_bbox * fimp_user_bbox ;
00118
00119 #ifdef USE_OPTMENUS
00120 MCW_arrowval * fim_ignore_choose_av ;
00121 MCW_arrowval * fim_polort_choose_av ;
00122 #endif
00123
00124 XtCallbackProc cbfunc ;
00125 XtPointer parent ;
00126 } FIM_menu ;
00127
00128
00129 #ifndef HAVE_GET_PTR_TYPEDEF
00130 # define HAVE_GET_PTR_TYPEDEF
00131 typedef XtPointer (*get_ptr)() ;
00132 #endif
00133
00134 typedef struct {
00135 int num_total , num_series ;
00136 int nx , ny , nz ;
00137
00138 void (* send_CB)() ;
00139
00140 MCW_function_list * transforms0D ;
00141 MCW_function_list * transforms1D ;
00142
00143 char namecode[32] ;
00144
00145 XtPointer parent , aux ;
00146 } MCW_grapher_status ;
00147
00148 typedef struct {
00149 char * wcsuffix ;
00150 } GRA_miscellaneous ;
00151
00152 #ifdef MAIN
00153 GRA_miscellaneous Grapher_Stuff = { NULL } ;
00154 #else
00155 extern GRA_miscellaneous Grapher_Stuff ;
00156 #endif
00157
00158 #define MCW_GRAPHER_TYPE 3741
00159
00160 #define GRA_VALID(gr) ((gr)!=NULL && (gr)->type==MCW_GRAPHER_TYPE && (gr)->valid>0)
00161 #define GRA_REALZ(gr) ((gr)!=NULL && (gr)->type==MCW_GRAPHER_TYPE && (gr)->valid>1)
00162
00163
00164
00165 #define MIN_PIN 2
00166 #define MAX_PIN 9999
00167
00168
00169
00170 #define NBOT(gr) ( ((gr)->pin_bot < (gr)->status->num_series) ? (gr)->pin_bot : 0 )
00171
00172 #define NTOP(gr) ( ((gr)->pin_top >= MIN_PIN ) ? (gr)->pin_top \
00173 : (gr)->status->num_series )
00174
00175 #define NPTS(gr) (NTOP(gr)-NBOT(gr))
00176
00177
00178
00179 #define TBOT(gr) NBOT(gr)
00180
00181 #define TTOP(gr) ( ((gr)->pin_top >= MIN_PIN && (gr)->pin_top < (gr)->status->num_series) \
00182 ? (gr)->pin_top : (gr)->status->num_series )
00183
00184 #define TPTS(gr) (TTOP(gr)-TBOT(gr))
00185
00186 #define ISONE(g) ( TPTS(g) < 2 )
00187
00188
00189
00190
00191 #define GRA_NULL_tuser(gr) \
00192 do{ int iq,jq ; \
00193 for( iq=0 ; iq < MAT_MAX ; iq++ ) \
00194 for( jq=0 ; jq < MAT_MAX ; jq++ ) \
00195 (gr)->tuser[iq][jq] = NULL ; } while(0)
00196
00197 #define GRA_CLEAR_tuser(gr) \
00198 do{ int iq,jq ; \
00199 for( iq=0 ; iq < MAT_MAX ; iq++ ) \
00200 for( jq=0 ; jq < MAT_MAX ; jq++ ) \
00201 myXtFree((gr)->tuser[iq][jq]) ; } while(0)
00202
00203
00204
00205 #define BRIGHTEST_COLOR -1
00206 #define DARKEST_COLOR -2
00207 #define REDDEST_COLOR -3
00208 #define GREENEST_COLOR -4
00209 #define BLUEST_COLOR -5
00210
00211 #define DEFAULT_GR_BOXES_COLOR DARKEST_COLOR
00212 #define DEFAULT_GR_BACKG_COLOR BRIGHTEST_COLOR
00213 #define DEFAULT_GR_GRID_COLOR 1
00214 #define DEFAULT_GR_TEXT_COLOR DARKEST_COLOR
00215 #define DEFAULT_GR_DATA_COLOR DARKEST_COLOR
00216 #define DEFAULT_GR_IDEAL_COLOR REDDEST_COLOR
00217 #define DEFAULT_GR_ORT_COLOR GREENEST_COLOR
00218 #define DEFAULT_GR_IGNORE_COLOR BLUEST_COLOR
00219 #define DEFAULT_GR_DPLOT_COLOR REDDEST_COLOR
00220
00221 #ifdef MAIN
00222 int INIT_GR_boxes_color = DEFAULT_GR_BOXES_COLOR ,
00223 INIT_GR_backg_color = DEFAULT_GR_BACKG_COLOR ,
00224 INIT_GR_grid_color = DEFAULT_GR_GRID_COLOR ,
00225 INIT_GR_text_color = DEFAULT_GR_TEXT_COLOR ,
00226 INIT_GR_data_color = DEFAULT_GR_DATA_COLOR ,
00227 INIT_GR_ideal_color = DEFAULT_GR_IDEAL_COLOR ,
00228 INIT_GR_ort_color = DEFAULT_GR_ORT_COLOR ,
00229 INIT_GR_ignore_color = DEFAULT_GR_IGNORE_COLOR ,
00230 INIT_GR_dplot_color = DEFAULT_GR_DPLOT_COLOR ;
00231
00232 int INIT_GR_boxes_thick = 0 ,
00233 INIT_GR_grid_thick = 0 ,
00234 INIT_GR_data_thick = 0 ,
00235 INIT_GR_ideal_thick = 0 ,
00236 INIT_GR_ort_thick = 0 ,
00237 INIT_GR_dplot_thick = 0 ;
00238
00239 int INIT_GR_ggap = 0 ;
00240 int INIT_GR_gthick = 2 ;
00241 int INIT_GR_gmat = 3 ;
00242 #else
00243 extern int INIT_GR_boxes_color ,
00244 INIT_GR_backg_color ,
00245 INIT_GR_grid_color ,
00246 INIT_GR_text_color ,
00247 INIT_GR_data_color ,
00248 INIT_GR_ideal_color ,
00249 INIT_GR_ort_color ,
00250 INIT_GR_ignore_color ,
00251 INIT_GR_dplot_color ;
00252
00253 extern int INIT_GR_boxes_thick ,
00254 INIT_GR_grid_thick ,
00255 INIT_GR_data_thick ,
00256 INIT_GR_ideal_thick ,
00257 INIT_GR_ort_thick ,
00258 INIT_GR_dplot_thick ;
00259
00260 extern int INIT_GR_ggap ;
00261 extern int INIT_GR_gthick ;
00262 extern int INIT_GR_gmat ;
00263 #endif
00264
00265 #define NUM_COLOR_ITEMS 9
00266
00267 #define FG_COLOR(gr) ((gr)->color_index[0])
00268 #define BG_COLOR(gr) ((gr)->color_index[1])
00269 #define GRID_COLOR(gr) ((gr)->color_index[2])
00270 #define TEXT_COLOR(gr) ((gr)->color_index[3])
00271 #define DATA_COLOR(gr) ((gr)->color_index[4])
00272 #define IDEAL_COLOR(gr) ((gr)->color_index[5])
00273 #define ORT_COLOR(gr) ((gr)->color_index[6])
00274 #define IGNORE_COLOR(gr) ((gr)->color_index[7])
00275 #define DPLOT_COLOR(gr) ((gr)->color_index[8])
00276
00277 static char *gr_color_label[NUM_COLOR_ITEMS] = {
00278 "Boxes " , "BackG " , "Grid " , "Text " ,
00279 "Data " , "Ideal " , "Ort " , "Ignore" , "Dplot "
00280 } ;
00281
00282 static char *gr_color_hint[NUM_COLOR_ITEMS] = {
00283 "Color for boxes around graphs" ,
00284 "Background color" ,
00285 "Vertical Grid color" ,
00286 "Color for Text" ,
00287 "Color for Data graphs" ,
00288 "Color for Ideal overplot graph",
00289 "Color for Ort overplot graph" ,
00290 "Color for Ignored timepoints" ,
00291 "Color for Dplot overlay"
00292 } ;
00293
00294 static int gr_setup_default = 1 ;
00295 static int gr_color_default[NUM_COLOR_ITEMS] ;
00296 static int gr_thick_default[NUM_COLOR_ITEMS] ;
00297
00298 static int gr_points_default[NUM_COLOR_ITEMS] = {
00299 -1 , -1 , -1 , -1 ,
00300 0 , -1 , -1 , -1 , 0
00301 } ;
00302
00303 static int gr_color_start[NUM_COLOR_ITEMS] = {
00304 1 , 1 , 0 , 1 ,
00305 1 , 1 , 1 , 1 , 1
00306 } ;
00307
00308 static int gr_unfim[NUM_COLOR_ITEMS] = { 0,0,0,0,0,1,1,1,0 } ;
00309
00310 #define GRA_COLOR(cd) \
00311 ( ((cd) == BRIGHTEST_COLOR) ? (grapher->dc->ovc->ov_brightest) \
00312 :((cd) == DARKEST_COLOR ) ? (grapher->dc->ovc->ov_darkest) \
00313 :((cd) == REDDEST_COLOR ) ? (grapher->dc->ovc->ov_reddest) \
00314 :((cd) == GREENEST_COLOR ) ? (grapher->dc->ovc->ov_greenest)\
00315 :((cd) == BLUEST_COLOR ) ? (grapher->dc->ovc->ov_bluest) \
00316 :(cd) )
00317
00318 #define FG_THICK(gr) ((gr)->thick_index[0] * (gr)->gthick)
00319 #define BG_THICK(gr) ((gr)->thick_index[1] * (gr)->gthick)
00320 #define GRID_THICK(gr) ((gr)->thick_index[2] * (gr)->gthick)
00321 #define TEXT_THICK(gr) ((gr)->thick_index[3] * (gr)->gthick)
00322 #define DATA_THICK(gr) ((gr)->thick_index[4] * (gr)->gthick)
00323 #define IDEAL_THICK(gr) ((gr)->thick_index[5] * (gr)->gthick)
00324 #define ORT_THICK(gr) ((gr)->thick_index[6] * (gr)->gthick)
00325 #define IGNORE_THICK(gr) ((gr)->thick_index[7] * (gr)->gthick)
00326 #define DPLOT_THICK(gr) ((gr)->thick_index[8] * (gr)->gthick)
00327
00328 #define FG_IS_THICK(gr) ((gr)->thick_index[0] != 0)
00329 #define BG_IS_THICK(gr) ((gr)->thick_index[1] != 0)
00330 #define GRID_IS_THICK(gr) ((gr)->thick_index[2] != 0)
00331 #define TEXT_IS_THICK(gr) ((gr)->thick_index[3] != 0)
00332 #define DATA_IS_THICK(gr) ((gr)->thick_index[4] != 0)
00333 #define IDEAL_IS_THICK(gr) ((gr)->thick_index[5] != 0)
00334 #define ORT_IS_THICK(gr) ((gr)->thick_index[6] != 0)
00335 #define IGNORE_IS_THICK(gr) ((gr)->thick_index[7] != 0)
00336 #define DPLOT_IS_THICK(gr) ((gr)->thick_index[8] != 0)
00337
00338
00339
00340 #define FG_POINTS(gr) ((gr)->points_index[0] != 0)
00341 #define BG_POINTS(gr) ((gr)->points_index[1] != 0)
00342 #define GRID_POINTS(gr) ((gr)->points_index[2] != 0)
00343 #define TEXT_POINTS(gr) ((gr)->points_index[3] != 0)
00344 #define DATA_POINTS(gr) ((gr)->points_index[4] != 0)
00345 #define IDEAL_POINTS(gr) ((gr)->points_index[5] != 0)
00346 #define ORT_POINTS(gr) ((gr)->points_index[6] != 0)
00347 #define IGNORE_POINTS(gr) ((gr)->points_index[7] != 0)
00348 #define DPLOT_POINTS(gr) ((gr)->points_index[8] != 0)
00349
00350 #define FG_LINES(gr) ((gr)->points_index[0] != 1)
00351 #define BG_LINES(gr) ((gr)->points_index[1] != 1)
00352 #define GRID_LINES(gr) ((gr)->points_index[2] != 1)
00353 #define TEXT_LINES(gr) ((gr)->points_index[3] != 1)
00354 #define DATA_LINES(gr) ((gr)->points_index[4] != 1)
00355 #define IDEAL_LINES(gr) ((gr)->points_index[5] != 1)
00356 #define ORT_LINES(gr) ((gr)->points_index[6] != 1)
00357 #define IGNORE_LINES(gr) ((gr)->points_index[7] != 1)
00358 #define DPLOT_LINES(gr) ((gr)->points_index[8] != 1)
00359
00360 extern void GRA_color_CB( MCW_arrowval * , XtPointer ) ;
00361 extern void GRA_thick_CB( Widget , XtPointer , XtPointer ) ;
00362
00363
00364
00365 #define PLOTCODE_AUTOSCALE 1
00366
00367 typedef struct {
00368 int type , valid ;
00369
00370 int gx_max , gy_max ;
00371 int fWIDE , fHIGH ;
00372
00373 get_ptr getser ;
00374 XtPointer getaux ;
00375 MCW_grapher_status * status ;
00376
00377
00378
00379 int xorigin[MAT_MAX][MAT_MAX] , yorigin[MAT_MAX][MAT_MAX] ;
00380 float pmin[MAT_MAX][MAT_MAX] , pmax[MAT_MAX][MAT_MAX] ;
00381
00382 float tmean[MAT_MAX][MAT_MAX] , tbot[MAT_MAX][MAT_MAX] ,
00383 ttop[MAT_MAX][MAT_MAX] , tstd[MAT_MAX][MAT_MAX] ;
00384
00385 char * tuser[MAT_MAX][MAT_MAX] ;
00386
00387 int mat,mat_max , xpoint,ypoint,zpoint ;
00388 int grid_index , grid_spacing , grid_fixed ;
00389 int xFD , yFD , gx,gy , xc,yc ;
00390 int grid_color , common_base , init_ignore , polort ;
00391 float fscale ;
00392 int pin_top ;
00393 int pin_bot ;
00394 int HorZ ;
00395
00396 int key_Nlock , key_lock_sum ;
00397 int time_index ;
00398
00399 int ncen_line , nncen ;
00400 XPoint * cen_line ;
00401 MRI_IMAGE * cen_tsim ;
00402 MRI_IMAGE * xax_tsim ;
00403 MRI_IMAGE * ave_tsim ;
00404
00405 int xx_text_1 , xx_text_2 , xx_text_2p , xx_text_3 ;
00406
00407
00408
00409 MRI_IMARR * ref_ts , * ort_ts ;
00410 int ref_ts_color , ort_ts_color ;
00411 int ref_ts_plotall , ort_ts_plotall ;
00412
00413
00414
00415 Pixmap fd_pxWind ;
00416 Widget fdw_graph ;
00417 Widget draw_fd ;
00418 Pixmap glogo_pixmap ;
00419 int glogo_width , glogo_height ;
00420
00421 Widget option_rowcol ;
00422
00423 Widget opt_menu , opt_cbut ;
00424 Widget opt_scale_menu , opt_scale_cbut ,
00425 opt_scale_down_pb , opt_scale_up_pb , opt_scale_choose_pb ,
00426 opt_scale_auto_pb ;
00427 Widget opt_mat_menu , opt_mat_cbut ,
00428 opt_mat_down_pb , opt_mat_up_pb ;
00429 Widget opt_grid_menu , opt_grid_cbut ,
00430 opt_grid_down_pb , opt_grid_up_pb ,
00431 opt_grid_choose_pb , opt_pin_choose_pb ;
00432 Widget opt_grid_auto_pb ;
00433 Widget opt_grid_HorZ_pb ;
00434 Widget opt_slice_menu , opt_slice_cbut ,
00435 opt_slice_down_pb , opt_slice_up_pb ;
00436
00437 Widget opt_colors_menu , opt_colors_cbut ;
00438 MCW_arrowval * opt_color_av[NUM_COLOR_ITEMS] ;
00439 MCW_bbox * opt_thick_bbox[NUM_COLOR_ITEMS] ;
00440 MCW_bbox * opt_points_bbox[NUM_COLOR_ITEMS] ;
00441 int color_index[NUM_COLOR_ITEMS] ;
00442 int thick_index[NUM_COLOR_ITEMS] ;
00443 int points_index[NUM_COLOR_ITEMS] ;
00444
00445 MCW_arrowval *opt_ggap_av ;
00446 int ggap ;
00447 MCW_arrowval *opt_gthick_av ;
00448 int gthick ;
00449
00450 Widget opt_color_up_pb , opt_save_pb ,
00451 opt_write_center_pb , opt_write_suffix_pb ;
00452 Widget opt_quit_pb ;
00453
00454 Widget opt_xaxis_menu , opt_xaxis_cbut ,
00455 opt_xaxis_pick_pb , opt_xaxis_center_pb ,
00456 opt_xaxis_clear_pb ;
00457
00458 Widget opt_baseline_menu , opt_baseline_cbut ,
00459 opt_baseline_setglobal_pb ,
00460 opt_baseline_global_label ;
00461 float global_base ;
00462
00463 MCW_bbox * opt_textgraph_bbox , * opt_baseline_bbox ;
00464 int textgraph ;
00465
00466 #ifdef USE_OPTMENUS
00467 MCW_arrowval * opt_mat_choose_av , * opt_slice_choose_av ;
00468 #else
00469 Widget opt_mat_choose_pb , opt_slice_choose_pb ;
00470 #endif
00471
00472 MCW_arrowval * transform0D_av ;
00473 generic_func * transform0D_func ;
00474 int transform0D_index , transform0D_flags ;
00475
00476 MCW_arrowval * transform1D_av ;
00477 generic_func * transform1D_func ;
00478 int transform1D_index , transform1D_flags ;
00479
00480 Widget opt_dplot_menu , opt_dplot_cbut ;
00481 MCW_bbox * opt_dplot_bbox ;
00482
00483 FIM_menu * fmenu ;
00484
00485 Widget but3_menu , but3_label ;
00486
00487 Widget dialog ;
00488 MCW_arrowval * setshift_inc_av , * setshift_left_av , * setshift_right_av ;
00489 float setshift_inc ;
00490 int setshift_left , setshift_right ;
00491
00492 MCW_DC * dc ;
00493
00494 int never_drawn ;
00495 int button2_enabled ;
00496 int mirror ;
00497
00498 XtPointer parent ;
00499
00500 float tmed[MAT_MAX][MAT_MAX] , tmad[MAT_MAX][MAT_MAX] ;
00501 int sbot[MAT_MAX][MAT_MAX] , stop[MAT_MAX][MAT_MAX] ;
00502
00503 XtIntervalId timer_id ;
00504 int timer_func, timer_param, timer_delay ;
00505
00506 int dont_setref ;
00507 int dont_redraw ;
00508 int tschosen ;
00509
00510 } MCW_grapher ;
00511
00512 #define GRA_TIMERFUNC_INDEX 701
00513 #define GRA_TIMERFUNC_BOUNCE 702
00514
00515 extern void GRA_timer_CB( XtPointer , XtIntervalId * ) ;
00516 extern void GRA_timer_stop( MCW_grapher * ) ;
00517
00518 #define BASELINE_INDIVIDUAL 1
00519 #define BASELINE_COMMON 2
00520 #define BASELINE_GLOBAL 4
00521
00522 #define DPLOT_OFF 1
00523 #define DPLOT_OVERLAY 2
00524 #define DPLOT_PLUSMINUS 4
00525
00526 static int fd_x = 0 ;
00527 static int fd_y[8] = {100, 130, 160, 190, 220, 250, 280, 310};
00528
00529
00530
00531 typedef struct {
00532 int reason ;
00533 XEvent * event ;
00534 int xcen,ycen,zcen, mat ;
00535 int key ;
00536 XtPointer userdata ;
00537 } GRA_cbs ;
00538
00539
00540
00541 #define graCR_getstatus 7701
00542 #define graCR_getseries 7702
00543
00544 #define graCR_newxyzm 7711
00545 #define graCR_keypress 7714
00546
00547 #define graCR_pickref 7721
00548 #define graCR_pickort 7722
00549 #define graCR_clearfim 7723
00550 #define graCR_timeseries_library 7724
00551 #define graCR_clearort 7725
00552 #define graCR_polort 7726
00553 #define graCR_winaver 7727
00554
00555 #define graCR_dofim 7731
00556
00557 #define graCR_refequals 7741
00558 #define graCR_refadd 7742
00559 #define graCR_refsmooth 7745
00560 #define graCR_reflibrary 7746
00561
00562 #define graCR_setignore 7751
00563 #define graCR_setindex 7752
00564
00565 #define graCR_destroy 7777
00566
00567 #define graCR_button2_points 8801
00568
00569
00570
00571
00572 #define graDR_helptext 101
00573 #define graDR_cursor 104
00574 #define graDR_unrealize 105
00575 #define graDR_realize 106
00576 #define graDR_redraw 111
00577 #define graDR_newdata 112
00578 #define graDR_newlength 113
00579 #define graDR_title 114
00580 #define graDR_icon 118
00581
00582 #define graDR_addref_ts 121
00583 #define graDR_addort_ts 122
00584 #define graDR_setignore 123
00585 #define graDR_setindex 124
00586 #define graDR_polort 125
00587 #define graDR_winaver 126
00588
00589 #define graDR_setmatrix 130
00590 #define graDR_setgrid 131
00591 #define graDR_setpinnum graDR_newlength
00592 #define graDR_setpintop graDR_newlength
00593 #define graDR_setpinbot 132
00594 #define graDR_setpins 133
00595
00596 #define graDR_destroy 666
00597
00598 #define graDR_button2_enable 501
00599 #define graDR_button2_disable 502
00600
00601 #define graDR_fim_disable 503
00602
00603 #define graDR_mirror 504
00604
00605 #define graDR_setglobalbaseline 505
00606
00607
00608
00609 extern MCW_grapher * new_MCW_grapher( MCW_DC * , get_ptr , XtPointer ) ;
00610
00611 extern void end_fd_graph_CB(Widget,XtPointer,XtPointer);
00612 extern void fd_px_store(MCW_grapher *);
00613 extern void plot_fdX(MCW_grapher *,int,int,int);
00614 extern void scale_up(MCW_grapher *);
00615 extern void scale_down(MCW_grapher *);
00616
00617 extern void erase_fdw(MCW_grapher *);
00618 extern void fd_txt(MCW_grapher *,int,int,char *);
00619 extern void overlay_txt(MCW_grapher *,int,int,char *);
00620 extern void plot_graphs(MCW_grapher *, int);
00621 extern void draw_grids(MCW_grapher *);
00622 extern void init_mat(MCW_grapher *);
00623 extern void send_newinfo(MCW_grapher *);
00624 extern void mat_down(MCW_grapher *);
00625 extern void mat_up(MCW_grapher *);
00626 extern void grid_down(MCW_grapher *);
00627 extern void grid_up(MCW_grapher *);
00628
00629 extern void text_graphs(MCW_grapher *) ;
00630
00631 extern void redraw_graph( MCW_grapher * , int ) ;
00632 extern void init_const( MCW_grapher * ) ;
00633
00634 extern void GRA_small_circle( MCW_grapher * , int,int,int ) ;
00635 extern void GRA_overlay_circle( MCW_grapher * , int,int,int ) ;
00636
00637 extern void GRA_drawing_EV( Widget , XtPointer , XEvent * , Boolean * ) ;
00638 extern void GRA_handle_keypress( MCW_grapher * , char * , XEvent * ) ;
00639 extern void GRA_new_pixmap( MCW_grapher * , int,int,int ) ;
00640 extern void GRA_opt_CB( Widget , XtPointer , XtPointer ) ;
00641 extern void GRA_fim_CB( Widget , XtPointer , XtPointer ) ;
00642 extern Boolean drive_MCW_grapher( MCW_grapher * , int , XtPointer ) ;
00643
00644 extern void GRA_scale_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00645 extern void GRA_grid_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00646 extern void GRA_pin_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00647 extern void GRA_wcsuffix_choose_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00648 extern void GRA_refread_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00649 extern void GRA_refwrite_choose_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00650 extern void GRA_refstore_choose_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00651
00652 #ifdef USE_OPTMENUS
00653 extern void GRA_mat_choose_CB ( MCW_arrowval * , XtPointer ) ;
00654 extern void GRA_slice_choose_CB ( MCW_arrowval * , XtPointer ) ;
00655 extern void GRA_ignore_choose_CB ( MCW_arrowval * , XtPointer ) ;
00656 extern void GRA_polort_choose_CB ( MCW_arrowval * , XtPointer ) ;
00657 extern void GRA_fmenu_av_CB ( MCW_arrowval * , XtPointer ) ;
00658 extern void GRA_fix_optmenus ( MCW_grapher * ) ;
00659 #else
00660 extern void GRA_mat_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00661 extern void GRA_slice_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00662 extern void GRA_ignore_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00663 extern void GRA_polort_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00664 #endif
00665 extern void GRA_bkthr_choose_CB ( Widget , XtPointer , MCW_choose_cbs * ) ;
00666
00667 extern void GRA_setshift_startup( MCW_grapher * ) ;
00668 extern void GRA_doshift( MCW_grapher * ) ;
00669 extern void GRA_setshift_action_CB( Widget , XtPointer , XtPointer ) ;
00670
00671 extern void GRA_transform_CB ( MCW_arrowval * , XtPointer ) ;
00672 extern char * GRA_transform_label( MCW_arrowval * , XtPointer ) ;
00673
00674 extern void GRA_ggap_CB( MCW_arrowval * , XtPointer ) ;
00675 extern void GRA_gthick_CB( MCW_arrowval * , XtPointer ) ;
00676
00677 extern FIM_menu * AFNI_new_fim_menu( Widget , XtCallbackProc , int ) ;
00678
00679 extern void GRA_redraw_overlay( MCW_grapher * ) ;
00680
00681 extern void GRA_dplot_change_CB( Widget , XtPointer , XtPointer ) ;
00682
00683 extern void GRA_winaver_CB ( Widget , XtPointer , XtPointer ) ;
00684 extern void GRA_winaver_setref ( MCW_grapher * ) ;
00685
00686 extern void GRA_saver_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00687 extern void GRA_file_pixmap( MCW_grapher * , char * ) ;
00688
00689 extern void GRA_fixup_xaxis( MCW_grapher * ) ;
00690 extern void GRA_pick_xaxis_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00691
00692 extern void GRA_mapmenu_CB( Widget , XtPointer , XtPointer ) ;
00693
00694 extern void GRA_textgraph_CB( Widget , XtPointer , XtPointer ) ;
00695 extern void GRA_baseline_CB ( Widget , XtPointer , XtPointer ) ;
00696
00697
00698 extern void GRA_finalize_global_baseline_CB( Widget,
00699 XtPointer, MCW_choose_cbs * );
00700
00701
00702 #endif