Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

pbar.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002    Major portions of this software are copyrighted by the Medical College
00003    of Wisconsin, 1994-2000, and are released under the Gnu General Public
00004    License, Version 2.  See the file README.Copyright for details.
00005 ******************************************************************************/
00006 
00007 #ifndef _MCW_PBAR_H_
00008 #define _MCW_PBAR_H_
00009 
00010 #include <Xm/Label.h>
00011 #include <Xm/PanedW.h>
00012 #include <Xm/DrawnB.h>
00013 #include <Xm/BulletinB.h>
00014 
00015 #include <stdio.h>
00016 #include <string.h>
00017 #include <math.h>
00018 
00019 #include "mrilib.h"      /* 15 Jun 2000 */
00020 #include "mcw_malloc.h"
00021 
00022 #include "display.h"
00023 #include "bbox.h"
00024 #include "xutil.h"
00025 
00026 void PBAR_click_CB( Widget , XtPointer , XtPointer ) ;
00027 void PBAR_set_CB( Widget , XtPointer , MCW_choose_cbs * ) ;
00028 void PBAR_resize_CB( Widget , XtPointer , XtPointer ) ;
00029 void PBAR_labelize( float , char * ) ;
00030 
00031 #define check_width 8
00032 #define check_height 8
00033 static char check_bits[] = {
00034    0x11, 0xaa, 0x44, 0xaa, 0x11, 0xaa, 0x44, 0xaa};
00035 
00036 static Pixmap check_pixmap = XmUNSPECIFIED_PIXMAP ;
00037 
00038 #define NPANE_MIN        2
00039 #define NPANE_MAX       20
00040 #define PANE_WIDTH      15
00041 #define PANE_MIN_HEIGHT  5
00042 #define PANE_LOFF        6
00043 #define PANE_SPACING     2
00044 
00045 #define PANE_MAXMODE     2
00046 
00047 #define NPANE_NOSASH    21  /* doesn't work well */
00048 #define SASH_HYES        5
00049 #define SASH_HNO         1
00050 
00051 #define KEEP_LABEL(ip,np) ( ((ip)<=(np) && (np)<NPANE_NOSASH) || ((ip)==0 || (ip)==(np)) )
00052 
00053 #define pbCR_COLOR       (1<<0)
00054 #define pbCR_VALUE       (1<<1)
00055 
00056 #define NPANE_BIG      128    /* 30 Jan 2003: # colors in "big" mode */
00057 
00058 typedef struct {
00059   Widget top , panew , panes[NPANE_MAX]   , labels[NPANE_MAX+1] ;
00060   int num_panes , panes_sum , panew_height , ov_index[NPANE_MAX] , renew_all ;
00061   float pval[NPANE_MAX+1] ;
00062   MCW_DC * dc ;
00063 
00064   float pval_save[NPANE_MAX+1][NPANE_MAX+1][PANE_MAXMODE] ;  /* saved values */
00065   int   ovin_save[NPANE_MAX+1][NPANE_MAX+1][PANE_MAXMODE] ;
00066   int   npan_save[PANE_MAXMODE] ;
00067 
00068   int   pane_hsum[NPANE_MAX+1] ;  /* Dec 1997 */
00069 
00070   int   update_me , mode , hide_changes , keep_pval ;
00071 
00072   gen_func * pb_CB ;
00073   XtPointer  pb_data ;
00074 
00075   XtPointer parent ;
00076 
00077   int    bigmode , bigset ;     /* 30 Jan 2003 */
00078   float  bigtop , bigbot ;
00079   rgbyte bigcolor[NPANE_BIG] ;
00080   char * bigname ;              /* 22 Oct 2003 */
00081   XImage * bigxim ;
00082   int    bigmap_index ;         /* 31 Jan 2003 */
00083   float  bigfac ;               /* 11 Feb 2003 */
00084   int    bigflip ;              /* 07 Feb 2004 */
00085   int    bigrota ;              /* 07 Feb 2004 */
00086 
00087   Widget big_menu , big_label , big_choose_pb ;
00088 } MCW_pbar ;
00089 
00090 MCW_pbar * new_MCW_pbar( Widget , MCW_DC * ,
00091                          int,int , float,float , gen_func * , XtPointer ) ;
00092 
00093 void alter_MCW_pbar( MCW_pbar * , int , float * ) ;
00094 void update_MCW_pbar( MCW_pbar * ) ;
00095 
00096 MRI_IMAGE * MCW_pbar_to_mri( MCW_pbar *,int,int ) ; /* 15 Jun 2000 */
00097 
00098 void rotate_MCW_pbar( MCW_pbar * , int ) ; /* 30 Mar 2001 */
00099 
00100 void PBAR_set_panecolor( MCW_pbar *, int , int ) ;  /* 17 Jan 2003 */
00101 
00102 void PBAR_set_bigmode( MCW_pbar *, int, float,float ) ;     /* 30 Jan 2003 */
00103 void PBAR_bigexpose_CB( Widget , XtPointer , XtPointer ) ;  /* 30 Jan 2003 */
00104 void PBAR_add_bigmap( char * , rgbyte * ) ;                 /* 31 Jan 2003 */
00105 void PBAR_read_bigmap( char *, MCW_DC * ) ;                 /* 01 Feb 2003 */
00106 void PBAR_make_bigmap( char *,
00107                        int, float *, rgbyte *, MCW_DC * );  /* 02 Feb 2003 */
00108 
00109 void PBAR_set_bigmap( MCW_pbar * , char * ) ;               /* 03 Feb 2003 */
00110 char * PBAR_get_bigmap( MCW_pbar * ) ;                      /* 03 Feb 2003 */
00111 int PBAR_define_bigmap( char *cmd ) ;                       /* 07 Feb 2003 */
00112 void PBAR_flip( MCW_pbar * ) ;                              /* 07 Feb 2004 */
00113 
00114 #endif
 

Powered by Plone

This site conforms to the following standards: