3 #line 1 "mapper_test.ec"
10 char *
ls[]={
"topography",
51 int ditime[]={30,60,120,180,240,360,540,720,1080,1440,2880,4320,5760,7200,10080};
172 String
fallbacks[]={
"*fontList: -adobe-helvetica-bold-r-*-140-*",NULL};
185 Widget
drawing_area,
menu_bar,
top_level,
main_window,
area_menu,
s_text,
start_dialog,
scrollbar,
twidget[5],
zwidget[3],
owidget[5],
qwidget[10],
bwidget[8],
awidget[8],
tswidget[10],
cwidget[5],
edwidget[5],
bdwidget[5],
scwidget[3];
246 int main(
int argc,
char *argv[])
254 int line_style,cap_style,join_style,
j;
269 #line 263 "mapper_test.ec"
271 #line 263 "mapper_test.ec"
272 sqli_db_open(
"fastetc", 0);
273 #line 263 "mapper_test.ec"
291 for(
i=1;
i<=argc-1;
i++)
294 if(!strcmp(argv[
i],
"-debug"))
298 if(!strcmp(argv[
i],
"-drt"))
352 strcpy(
nexrad_file,
"/local/apps/mapper/nexrad/scratch");
354 legend[0]=
"Air Temperature (Deg F)";
355 legend[1]=
"24hr Air Temperature change (Deg F)";
356 legend[2]=
"Maximum Air Temperature (Deg F)";
357 legend[3]=
"Stage/Pool (Ft)";
358 legend[4]=
"Flow (Kcfs)/Storage (Kac-Ft)";
359 legend[5]=
"Depth above flood stage (Ft)";
360 legend[6]=
"Percent of flood flow";
361 legend[7]=
"Minimum Air Temperature (Deg F)";
362 legend[9]=
"Dewpoint (Deg F)";
363 legend[8]=
"Relative Humidity";
364 legend[10]=
"24hr Dewpoint change (Deg F)";
365 legend[11]=
"Wind Speed (mph)";
366 legend[12]=
"Wind Direction (deg)";
367 legend[13]=
"Instantaneous Precipitation";
368 legend[14]=
"Hourly Precipitation";
369 legend[15]=
"Six Hourly Precipitation";
370 legend[16]=
"Daily Precipitation";
371 legend[17]=
"Snow Water Equivalent";
372 legend[18]=
"Change in Snow Water Equivalent";
373 legend[19]=
"not assigned";
375 legend[20]=
"not assigned";
376 legend[21]=
"Six Hourly Precipitation - QC'd";
377 legend[22]=
"Daily Precipitation - QC'd";
378 legend[23]=
"Monthly Precipitation";
379 legend[24]=
"Monthly Precipitation - %Avg";
380 legend[25]=
"WY Precipitation";
381 legend[26]=
"WY Precipitation - %Avg";
382 legend[27]=
"Snow Water Equivalent (inches)";
383 legend[28]=
"Snow Water Equivalent - %Avg";
384 legend[29]=
"SWE - % of April 1 Average";
385 legend[30]=
"Water Temperature (Deg F)";
413 fp=fopen(
"/local/apps/mapper/maps/area",
"r");
417 printf(
"could not open area\n");
431 XtSetLanguageProc(NULL,NULL,NULL);
437 tstring=
"mapper awips.1.7";
439 XtSetArg(
args[0],XmNtitle,tstring);
448 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
449 XtSetArg(
args[argcount],XmNheight,768);argcount++;
450 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
467 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
468 XtSetArg(
args[argcount],XmNheight,768);argcount++;
469 XtSetArg(
args[argcount],XmNresizePolicy,XmRESIZE_ANY);argcount++;
470 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
479 fontname=
"*Adobe-Helvetica-Medium-r-normal-*-10-100-75*";
483 fontname=
"*Adobe-Helvetica-Bold-o-normal-*-10-100-75*";
487 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-18-180-75*";
491 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-14-140-75*";
495 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-12-120-75*";
537 XtSetArg(
args[argcount],XmNheight,30);argcount++;
538 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
539 XtSetArg(
args[argcount],XmNforeground,0);argcount++;
544 line_style=LineSolid;
546 join_style=JoinMiter;
548 XSetLineAttributes(
display,
gc,line_width,line_style,cap_style,join_style);
564 "/usr/include/X11/bitmaps/left_ptr",
567 printf(
"could not find /usr/include/X11/bitmaps/left_ptr\n");
572 "/usr/include/X11/bitmaps/boxes",
575 printf(
"could not find /usr/include/X11/bitmaps/boxes\n");
580 "/usr/include/X11/bitmaps/cross_weave",
583 printf(
"could not find /usr/include/X11/bitmaps/cross_weave\n");
588 ButtonPressMask | ButtonMotionMask | ButtonReleaseMask,
589 GrabModeAsync,GrabModeAsync,XtWindow(
top_level),
590 XCreateFontCursor(
display,XC_crosshair));
607 Widget pbutton,rowcol;
609 t=XmStringCreateLocalized(
"Map areas");
621 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
622 XtSetArg(
args[argcount],XmNheight,250);argcount++;
623 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
624 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
625 XtSetArg(
args[argcount],XmNdialogStyle,
626 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
627 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
630 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_HELP_BUTTON));
631 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_SEPARATOR));
634 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
637 t=XmStringCreateLocalized(
"Map area");
639 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
640 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
641 XtManageChild(pbutton);
645 XtSetArg(
args[argcount],XmNitemCount,number);argcount++;
646 XtSetArg(
args[argcount],XmNitems,str);argcount++;
647 XtSetArg(
args[argcount],XmNlistSizePolicy,XmCONSTANT);argcount++;
648 XtSetArg(
args[argcount],XmNvisibleItemCount,5);argcount++;
649 XtSetArg(
args[argcount],XmNselectionPolicy,XmSINGLE_SELECT);argcount++;
650 area_menu=XmCreateScrolledList(rowcol,
"areas",
args,argcount);
654 XtManageChild(rowcol);
660 for(
i=0;
i<number;
i++)
661 XmStringFree(str[
i]);
682 XtSetArg(
args[0],XmNtitle,tstring);
693 menu_mnemonic,
struct MenuItem *items)
695 Widget Pulldown, button;
703 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
704 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
705 Pulldown=XmCreatePulldownMenu(parent,
"pulldown",
args,argcount);
712 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
713 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
714 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
717 XtSetArg(
args[argcount],XmNset,True);
720 XtSetArg(
args[argcount],XmNset,False);
723 XtSetArg(
args[argcount],XmNset,True);
726 XtSetArg(
args[argcount],XmNset,False);
730 mbutton[
i]=XmCreateToggleButton(Pulldown,items[
i].label,
args,argcount);
735 XtAddCallback(
mbutton[
i],XmNvalueChangedCallback,items[
i].callback,
736 items[
i].callback_data);
750 Widget Pulldown, button;
756 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
757 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
758 Pulldown=XmCreatePulldownMenu(parent,
"pulldown",
args,argcount);
762 button=XmCreatePushButton(Pulldown,items[
i].label,
args,argcount);
763 XtAddCallback(button,XmNactivateCallback,items[
i].callback,
764 items[
i].callback_data);
765 XtManageChild(button);
778 XtSetArg(
args[argcount],XmNsubMenuId,sub_menu);argcount++;
779 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
780 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
781 cbutton=XmCreateCascadeButton(parent,label,
args,argcount);
782 XtManageChild(cbutton);
788 int scr=DefaultScreen(
display);
789 Colormap def_colormap=DefaultColormap(
display,scr);
790 int ncolors,
i,nplanes,npixels,
a=256,new_map;
791 unsigned long pixels[70];
792 unsigned long planemask;
798 ncolors=DisplayCells(
display,scr);
802 for(
i=0;
i<ncolors;
i++)
805 colors[
i].flags=DoRed|DoGreen|DoBlue;
1011 int scr=DefaultScreen(
display);
1012 Colormap def_colormap=DefaultColormap(
display,scr);
1013 Colormap new_colormap;
1014 int ncolors,
i,nplanes,npixels;
1015 unsigned long planemask;
1016 unsigned long pixels[70];
1020 for(
j=0;
j<maxcolors;
j++)
1023 exact_def.blue=
colors[
j].blue;
1024 exact_def.green=
colors[
j].green;
1026 if(!XAllocColor(
display,def_colormap,&exact_def))
1028 printf(
"could not allocate\n");
1032 fval[0]=abs(exact_def.red -
colors[
j].red);
1033 fval[1]=abs(exact_def.blue -
colors[
j].blue);
1034 fval[2]=abs(exact_def.green -
colors[
j].green);
1036 if(fval[0] > 500 || fval[1] > 500 || fval[2] > 500)
1038 printf(
"allocating %d %d %d %d %d %d %d %d %d %d\n",
1039 j,fval[0],fval[1],fval[2],exact_def.red,
colors[
j].red,
1044 if(!XAllocColorCells(
display,def_colormap,
FALSE,&planemask,nplanes,pixels,npixels))
1046 printf(
"could not allocate\n");
1053 color.pixel=pixels[0];
1055 color.flags=DoRed|DoGreen|DoBlue;
1061 colors[
j].pixel=exact_def.pixel;
1085 signed long XSIZE,
YSIZE,xsize,ysize,xbegin,ybegin;
1272 Widget
dialog,rowcol,pbutton;
1277 int slider_size,scrollm,ivalue,increment,page_increment,
j;
1279 char *p, ibuf[256],dbuf[100];
1293 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
1294 XtSetArg(
args[argcount],XmNheight,30);argcount++;
1295 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1296 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1298 text=XmStringCreateLocalized(
"Reading map backgrounds and data");
1301 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
1302 XtSetArg(
args[argcount],XmNheight,300);argcount++;
1303 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1304 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1305 XtSetArg(
args[argcount],XmNmessageString,
text);argcount++;
1306 XtSetArg(
args[argcount],XmNdialogStyle,
1307 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
1309 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_CANCEL_BUTTON));
1310 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_HELP_BUTTON));
1311 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_SEPARATOR));
1315 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1316 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1317 rowcol=XtCreateWidget(
"rowcolo",xmRowColumnWidgetClass,
dialog,
args,argcount);
1320 XtSetArg(
args[argcount],XmNeditMode,XmMULTI_LINE_EDIT);argcount++;
1321 XtSetArg(
args[argcount],XmNscrollBarDisplayPolicy,XmSTATIC);argcount++;
1322 XtSetArg(
args[argcount],XmNeditable,False);argcount++;
1323 XtSetArg(
args[argcount],XmNcolumns,40);argcount++;
1324 XtSetArg(
args[argcount],XmNrows,10);argcount++;
1325 XtSetArg(
args[argcount],XmNscrollVertical,True);argcount++;
1326 XtSetArg(
args[argcount],XmNscrollHorizontal,False);argcount++;
1327 XtSetArg(
args[argcount],XmNcursorPositionVisible,False);argcount++;
1328 XtSetArg(
args[argcount],XmNscrollingPolicy,XmAPPLICATION_DEFINED);argcount++;
1329 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1330 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1331 s_text=XmCreateScrolledText(rowcol,
"text",
args,argcount);
1337 XtManageChild(rowcol);
1341 XtSetSensitive(XmMessageBoxGetChild(
dialog,XmDIALOG_OK_BUTTON),False);
1364 strcpy(
data_file,
"/local/apps/mapper/data");
1367 fr=fopen((
char *)data,
"r");
1372 p=fgets(ibuf,256,fr);
1377 p=strchr(ibuf,
'\n');
1382 p=
pars_line(ibuf,
"topo_elevation=",rbuf);
1392 ier=sscanf(rbuf,
"%d %d %d %d %d",
1410 p=
pars_line(ibuf,
"rain_bar=hourly",rbuf);
1414 p=
pars_line(ibuf,
"rain_bar=6_hourly",rbuf);
1418 p=
pars_line(ibuf,
"rain_bar=24_hourly",rbuf);
1423 p=
pars_line(ibuf,
"1_hr_rainfall_max=",rbuf);
1428 p=
pars_line(ibuf,
"6_hr_rainfall_max=",rbuf);
1433 p=
pars_line(ibuf,
"24_hr_rainfall_max=",rbuf);
1438 p=
pars_line(ibuf,
"past_time_series_days=",rbuf);
1442 p=
pars_line(ibuf,
"future_time_series_days=",rbuf);
1447 p=
pars_line(ibuf,
"rainfall_level_1=",rbuf);
1457 ier=sscanf(rbuf,
"%f %f %f %f %f %f %f %f %f %f %f %f",
1466 p=
pars_line(ibuf,
"rainfall_level_2=",rbuf);
1476 ier=sscanf(rbuf,
"%f %f %f %f %f %f %f %f %f %f %f %f",
1497 items[0].
label=NULL;
1506 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1507 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1509 pbutton=XmCreatePushButton(main_bar,
"Print",
args,argcount);
1510 XtAddCallback(pbutton,XmNactivateCallback,
print_screen,NULL);
1511 XtManageChild(pbutton);
1515 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1516 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1518 pbutton=XmCreatePushButton(main_bar,
"Quit",
args,argcount);
1519 XtAddCallback(pbutton,XmNactivateCallback,
quit_all,NULL);
1520 XtManageChild(pbutton);
1529 strcpy(dbuf,
"reading data\n");
1533 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1534 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1535 &increment,&page_increment);
1536 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1537 slider_size,increment,page_increment,True);
1550 strcpy(dbuf,
"No data\n");
1552 strcpy(dbuf,
"Data found\n");
1557 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1558 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1559 &increment,&page_increment);
1560 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1561 slider_size,increment,page_increment,True);
1570 items[0].
label=
"Precipitation";
1573 items[1].
label=
"Stage";
1576 items[2].
label=
"Air Temperature";
1579 items[3].
label=
"Humidity";
1582 items[4].
label=
"Wind";
1585 items[5].
label=
"Snow";
1588 items[6].
label=
"Water Temperature";
1591 items[7].
label=NULL;
1596 items[0].
label=
"Find station";
1600 items[1].
label=
"Zoom";
1604 items[2].
label=
"Edit";
1608 items[3].
label=NULL;
1613 items[0].
label=
"1 day ";
1617 items[1].
label=
"3 days";
1621 items[2].
label=
"5 days";
1625 items[3].
label=
"7 days";
1629 items[4].
label=NULL;
1634 items[0].
label=
"Refresh Now";
1638 items[1].
label=
"DRT Mode";
1642 items[2].
label=NULL;
1653 XtSetSensitive(XmMessageBoxGetChild(
dialog,XmDIALOG_OK_BUTTON),True);
1655 strcpy(dbuf,
"Done!!!\n");
1659 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1660 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1661 &increment,&page_increment);
1662 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1663 slider_size,increment,page_increment,True);
1673 void print_screen(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1680 void kill_dialog(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1688 void change_rain(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1704 static Position x,y;
1710 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
1713 Atom WM_DELETE_WINDOW;
1719 XtSetArg(
args[0],XmNx,&x);
1720 XtSetArg(
args[1],XmNy,&y);
1742 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
1743 XtSetArg(
args[argcount],XmNy, y);argcount++;
1744 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
1745 XtSetArg(
args[argcount],XmNwidth,252);argcount++;
1746 XtSetArg(
args[argcount],XmNheight,500);argcount++;
1747 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1748 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1751 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
1752 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
1753 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
1754 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
1757 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
1761 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1762 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1763 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
1764 rowcol=XmCreateRowColumn(
main_widget,
"View Precipitation",
args,argcount);
1766 t=XmStringCreateLocalized(
"Display:");
1769 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1770 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1771 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1772 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
1774 XtSetArg(
args[0],XmNsubMenuId,&
widg);
1775 XtGetValues(rowcol1,
args,1);
1781 s[4]=
"QC'd Six hrly";
1784 s[7]=
"Monthly - %Avg";
1790 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
1791 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
1798 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1799 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1800 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
1801 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
1802 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1803 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
1805 t=XmStringCreateLocalized(
"Time:");
1807 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1808 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1809 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1810 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
1811 XtManageChild(pbutton);
1815 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1816 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1817 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
1818 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
1822 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1823 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1824 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
1825 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
1828 XtManageChild(arrow1);
1829 XtManageChild(arrow2);
1831 t=XmStringCreateLocalized(
"Data:");
1833 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1834 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1835 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1836 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
1838 XtSetArg(
args[0],XmNsubMenuId,&
widg);
1839 XtGetValues(rowcol4,
args,1);
1850 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
1851 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
1855 XtSetArg(
args[0],XmNmenuHistory,pbutton);
1856 XtSetValues(rowcol4,
args,1);
1860 t=XmStringCreateLocalized(
"Station type");
1862 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1863 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1864 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1865 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
1866 XtManageChild(pbutton);
1870 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1871 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1872 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
1873 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
1874 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
1875 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
1890 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1891 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1892 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
1895 XtSetArg(
args[argcount],XmNset,True);
1897 XtSetArg(
args[argcount],XmNset,False);
1900 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
1908 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
1910 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1911 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1912 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
1913 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
1914 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
1915 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
1916 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
1917 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1918 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
1919 XtManageChild(
scale);
1924 t=XmStringCreateLocalized(
"Filter Precipitation (Inches)");
1926 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1927 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1928 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
1929 XtSetArg(
args[argcount],XmNmaximum,100);argcount++;
1930 XtSetArg(
args[argcount],XmNdecimalPoints,2);argcount++;
1931 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
1932 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
1933 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1934 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
1935 XtManageChild(
scale);
2008 XtManageChild(rowcol);
2009 XtManageChild(rowcol1);
2010 XtManageChild(rowcol2);
2011 XtManageChild(rowcol3);
2012 XtManageChild(rowcol4);
2025 static Position x,y;
2031 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2034 Atom WM_DELETE_WINDOW;
2040 XtSetArg(
args[0],XmNx,&x);
2041 XtSetArg(
args[1],XmNy,&y);
2053 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2054 XtSetArg(
args[argcount],XmNy, y);argcount++;
2055 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2056 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
2057 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2058 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2059 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2062 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2063 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2064 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2065 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2068 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2072 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2073 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2074 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2075 rowcol=XmCreateRowColumn(
main_widget,
"View Water Temperature",
args,argcount);
2077 t=XmStringCreateLocalized(
"Display:");
2080 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2081 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2082 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2083 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2085 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2086 XtGetValues(rowcol1,
args,1);
2092 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2093 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2100 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2101 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2102 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2103 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2104 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2105 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2107 t=XmStringCreateLocalized(
"Time:");
2109 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2110 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2111 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2112 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2113 XtManageChild(pbutton);
2117 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2118 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2119 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2120 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2124 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2125 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2126 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2127 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2130 XtManageChild(arrow1);
2131 XtManageChild(arrow2);
2133 t=XmStringCreateLocalized(
"Data:");
2135 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2136 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2137 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2138 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2140 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2141 XtGetValues(rowcol4,
args,1);
2152 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2153 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2157 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2158 XtSetValues(rowcol4,
args,1);
2162 t=XmStringCreateLocalized(
"Station type");
2164 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2165 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2166 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2167 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2168 XtManageChild(pbutton);
2172 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2173 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2174 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2175 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2176 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2177 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2190 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2191 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2192 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2195 XtSetArg(
args[argcount],XmNset,True);
2197 XtSetArg(
args[argcount],XmNset,False);
2201 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2207 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2209 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2210 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2211 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2212 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2213 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2214 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2215 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2216 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2217 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2218 XtManageChild(
scale);
2236 XtManageChild(rowcol);
2237 XtManageChild(rowcol1);
2238 XtManageChild(rowcol2);
2239 XtManageChild(rowcol3);
2240 XtManageChild(rowcol4);
2249 static Position x,y;
2255 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2258 Atom WM_DELETE_WINDOW;
2264 XtSetArg(
args[0],XmNx,&x);
2265 XtSetArg(
args[1],XmNy,&y);
2277 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2278 XtSetArg(
args[argcount],XmNy, y);argcount++;
2279 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2280 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
2281 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2282 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2283 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2286 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2287 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2288 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2289 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2292 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2296 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2297 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2298 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2299 rowcol=XmCreateRowColumn(
main_widget,
"View Air Temperature",
args,argcount);
2301 t=XmStringCreateLocalized(
"Display:");
2304 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2305 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2306 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2307 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2309 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2310 XtGetValues(rowcol1,
args,1);
2319 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2320 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2327 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2328 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2329 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2330 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2331 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2332 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2334 t=XmStringCreateLocalized(
"Time:");
2336 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2337 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2338 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2339 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2340 XtManageChild(pbutton);
2344 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2345 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2346 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2347 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2351 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2352 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2353 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2354 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2357 XtManageChild(arrow1);
2358 XtManageChild(arrow2);
2360 t=XmStringCreateLocalized(
"Data:");
2362 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2363 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2364 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2365 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2367 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2368 XtGetValues(rowcol4,
args,1);
2379 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2380 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2384 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2385 XtSetValues(rowcol4,
args,1);
2389 t=XmStringCreateLocalized(
"Station type");
2391 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2392 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2393 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2394 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2395 XtManageChild(pbutton);
2399 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2400 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2401 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2402 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2403 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2404 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2417 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2418 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2419 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2422 XtSetArg(
args[argcount],XmNset,True);
2424 XtSetArg(
args[argcount],XmNset,False);
2428 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2435 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2437 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2438 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2439 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2440 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2441 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2442 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2443 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2444 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2445 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2446 XtManageChild(
scale);
2522 XtManageChild(rowcol);
2523 XtManageChild(rowcol1);
2524 XtManageChild(rowcol2);
2525 XtManageChild(rowcol3);
2526 XtManageChild(rowcol4);
2540 static Position x,y;
2546 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2547 Widget rowcol45,
scale;
2549 Atom WM_DELETE_WINDOW;
2555 XtSetArg(
args[0],XmNx,&x);
2556 XtSetArg(
args[1],XmNy,&y);
2568 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2569 XtSetArg(
args[argcount],XmNy, y);argcount++;
2570 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2571 XtSetArg(
args[argcount],XmNwidth,246);argcount++;
2572 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2573 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2574 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2577 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2578 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2579 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2580 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2583 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2587 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2588 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2589 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2590 rowcol=XmCreateRowColumn(
main_widget,
"Edit Precipitation",
args,argcount);
2592 t=XmStringCreateLocalized(
"Display:");
2595 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2596 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2597 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2598 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2600 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2601 XtGetValues(rowcol1,
args,1);
2604 s[1]=
"Dewpt 24hr chg";
2609 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2610 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2615 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2616 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2617 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2618 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2619 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2620 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2622 t=XmStringCreateLocalized(
"Time:");
2624 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2625 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2626 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2627 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2628 XtManageChild(pbutton);
2632 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2633 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2634 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2635 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2639 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2640 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2641 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2642 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2645 XtManageChild(arrow1);
2646 XtManageChild(arrow2);
2648 t=XmStringCreateLocalized(
"Data:");
2650 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2651 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2652 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2653 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2655 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2656 XtGetValues(rowcol4,
args,1);
2667 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2668 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2672 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2673 XtSetValues(rowcol4,
args,1);
2677 t=XmStringCreateLocalized(
"Station type");
2679 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2680 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2681 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2682 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2683 XtManageChild(pbutton);
2687 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2688 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2689 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2690 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2691 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2692 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2705 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2706 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2707 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2710 XtSetArg(
args[argcount],XmNset,True);
2712 XtSetArg(
args[argcount],XmNset,False);
2716 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2724 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2726 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2727 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2728 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2729 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2730 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2731 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2732 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2733 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2734 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2735 XtManageChild(
scale);
2808 XtManageChild(rowcol);
2809 XtManageChild(rowcol1);
2810 XtManageChild(rowcol2);
2811 XtManageChild(rowcol3);
2812 XtManageChild(rowcol4);
2827 static Position x,y;
2833 Widget rowcol,pbutton,rowcol0,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,arrow1,arrow2;
2834 Widget rowcol7,
scale;
2836 Atom WM_DELETE_WINDOW;
2842 XtSetArg(
args[0],XmNx,&x);
2843 XtSetArg(
args[1],XmNy,&y);
2855 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2856 XtSetArg(
args[argcount],XmNy, y);argcount++;
2857 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2858 XtSetArg(
args[argcount],XmNwidth,274);argcount++;
2859 XtSetArg(
args[argcount],XmNheight,530);argcount++;
2860 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2861 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2864 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2865 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2866 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2867 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2870 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2874 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2875 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2876 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2879 t=XmStringCreateLocalized(
"Display:");
2881 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2882 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2883 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2884 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2886 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2887 XtGetValues(rowcol1,
args,1);
2890 s[1]=
"Flow/Storage";
2891 s[2]=
"Depth abv flood stg";
2892 s[3]=
"Pcnt of flood flow";
2896 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2897 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2904 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2905 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2906 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2907 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2908 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2909 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2911 t=XmStringCreateLocalized(
"Time:");
2913 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2914 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2915 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2916 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2917 XtManageChild(pbutton);
2921 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2922 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2923 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2924 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2928 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2929 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2930 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2931 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2934 XtManageChild(arrow1);
2935 XtManageChild(arrow2);
2937 t=XmStringCreateLocalized(
"Data:");
2939 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2940 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2941 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2942 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2944 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2945 XtGetValues(rowcol4,
args,1);
2956 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2957 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2961 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2962 XtSetValues(rowcol4,
args,1);
2966 t=XmStringCreateLocalized(
"Type:");
2969 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2970 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2971 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2972 rowcol0=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2974 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2975 XtGetValues(rowcol0,
args,1);
2985 hgwidget[
i]=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2991 XtSetValues(rowcol0,
args,1);
2995 t=XmStringCreateLocalized(
"Forecasts:");
2997 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2998 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2999 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3000 rowcol7=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3002 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3003 XtGetValues(rowcol7,
args,1);
3010 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3011 XtAddCallback(pbutton,XmNactivateCallback,
rfs_options,
3017 t=XmStringCreateLocalized(
"Station type");
3019 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3020 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3021 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3022 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3023 XtManageChild(pbutton);
3027 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3028 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3029 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3030 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3031 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3032 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3045 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3046 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3047 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3050 XtSetArg(
args[argcount],XmNset,True);
3052 XtSetArg(
args[argcount],XmNset,False);
3056 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3063 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3065 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3066 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3067 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3068 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3069 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3070 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3071 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3072 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3073 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3074 XtManageChild(
scale);
3128 XtManageChild(rowcol);
3129 XtManageChild(rowcol0);
3130 XtManageChild(rowcol1);
3131 XtManageChild(rowcol2);
3132 XtManageChild(rowcol3);
3133 XtManageChild(rowcol4);
3134 XtManageChild(rowcol7);
3146 static Position x,y;
3152 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
3153 Widget rowcol7,
scale;
3155 Atom WM_DELETE_WINDOW;
3161 XtSetArg(
args[0],XmNx,&x);
3162 XtSetArg(
args[1],XmNy,&y);
3174 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
3175 XtSetArg(
args[argcount],XmNy, y);argcount++;
3176 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
3177 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
3178 XtSetArg(
args[argcount],XmNheight,400);argcount++;
3179 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3180 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3183 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
3184 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
3185 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
3186 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
3189 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
3193 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3194 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3195 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3198 t=XmStringCreateLocalized(
"Display:");
3201 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3202 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3203 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3204 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3206 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3207 XtGetValues(rowcol1,
args,1);
3213 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3214 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
3221 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3222 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3223 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
3224 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
3225 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3226 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3228 t=XmStringCreateLocalized(
"Time:");
3230 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3231 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3232 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3233 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
3234 XtManageChild(pbutton);
3238 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3239 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3240 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
3241 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
3245 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3246 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3247 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
3248 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
3251 XtManageChild(arrow1);
3252 XtManageChild(arrow2);
3254 t=XmStringCreateLocalized(
"Data:");
3256 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3257 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3258 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3259 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3261 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3262 XtGetValues(rowcol4,
args,1);
3273 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3274 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
3278 XtSetArg(
args[0],XmNmenuHistory,pbutton);
3279 XtSetValues(rowcol4,
args,1);
3283 t=XmStringCreateLocalized(
"Station type");
3285 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3286 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3287 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3288 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3289 XtManageChild(pbutton);
3293 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3294 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3295 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3296 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3297 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3298 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3311 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3312 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3313 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3316 XtSetArg(
args[argcount],XmNset,True);
3318 XtSetArg(
args[argcount],XmNset,False);
3322 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3329 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3331 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3332 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3333 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3334 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3335 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3336 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3337 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3338 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3339 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3340 XtManageChild(
scale);
3413 XtManageChild(rowcol);
3414 XtManageChild(rowcol1);
3415 XtManageChild(rowcol2);
3416 XtManageChild(rowcol3);
3417 XtManageChild(rowcol4);
3431 static Position x,y;
3437 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
3438 Widget rowcol45,
scale;
3440 Atom WM_DELETE_WINDOW;
3446 XtSetArg(
args[0],XmNx,&x);
3447 XtSetArg(
args[1],XmNy,&y);
3459 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
3460 XtSetArg(
args[argcount],XmNy, y);argcount++;
3461 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
3462 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
3463 XtSetArg(
args[argcount],XmNheight,400);argcount++;
3464 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3465 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3468 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
3469 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
3470 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
3471 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
3474 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
3478 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3479 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3480 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3481 rowcol=XmCreateRowColumn(
main_widget,
"Edit Precipitation",
args,argcount);
3483 t=XmStringCreateLocalized(
"Display:");
3486 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3487 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3488 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3489 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3491 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3492 XtGetValues(rowcol1,
args,1);
3506 s[3]=
"Monthly %Avg";
3514 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3515 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
3521 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3522 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3523 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
3524 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
3525 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3526 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3528 t=XmStringCreateLocalized(
"Time:");
3530 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3531 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3532 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3533 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
3534 XtManageChild(pbutton);
3538 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3539 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3540 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
3541 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
3545 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3546 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3547 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
3548 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
3551 XtManageChild(arrow1);
3552 XtManageChild(arrow2);
3554 t=XmStringCreateLocalized(
"Data:");
3556 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3557 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3558 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3559 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3561 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3562 XtGetValues(rowcol4,
args,1);
3573 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3574 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
3578 XtSetArg(
args[0],XmNmenuHistory,pbutton);
3579 XtSetValues(rowcol4,
args,1);
3583 t=XmStringCreateLocalized(
"Station type");
3585 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3586 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3587 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3588 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3589 XtManageChild(pbutton);
3593 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3594 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3595 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3596 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3597 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3598 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3611 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3612 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3613 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3616 XtSetArg(
args[argcount],XmNset,True);
3618 XtSetArg(
args[argcount],XmNset,False);
3622 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3629 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3631 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3632 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3633 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3634 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3635 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3636 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3637 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3638 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3639 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3640 XtManageChild(
scale);
3714 XtManageChild(rowcol);
3715 XtManageChild(rowcol1);
3716 XtManageChild(rowcol2);
3717 XtManageChild(rowcol3);
3718 XtManageChild(rowcol4);
3737 t=XmStringCreateLocalized(
"Enter handbook 5 I.D.");
3739 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3740 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3741 XtSetArg(
args[argcount],XmNdialogStyle,
3742 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
3743 XtSetArg(
args[argcount],XmNselectionLabelString,t);argcount++;
3744 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
3747 XtUnmanageChild(XmSelectionBoxGetChild(
find_widget,
3748 XmDIALOG_HELP_BUTTON));
3767 else if((
int)data==1)
3781 void rfs_options(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
3788 else if((
int)data==1)
3802 void find_name(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
3825 XtSetArg(
args[argcount],XmNtextString,&str);argcount++;
3828 XmStringGetLtoR(str,XmFONTLIST_DEFAULT_TAG,&cstr);
3891 strcat(dbuf,
" not found");
3919 else if((
int)
data==1)
3924 else if((
int)
data==2)
3953 msg=XmStringCreateLocalized(
"Quit mapper?");
3956 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
3957 XtSetArg(
args[argcount],XmNdialogStyle,
3958 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
3960 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_HELP_BUTTON));
3990 while(
ktems[
i].label!=NULL)
3993 XtSetArg(
args[0],XmNset,False);
3999 XtSetArg(
args[0],XmNset,True);
4050 XtSetArg(
args[0],XmNset,True);
4063 XtSetArg(
args[0],XmNset,False);
4085 XEvent *p_event=call_data->event;
4087 if(p_event->xexpose.count==0)
4127 sprintf(tbuf,
"/local/apps/mapper/data/graph.%02d%02d%02d",
4128 gm->tm_hour,gm->tm_min,gm->tm_sec);
4134 sprintf(
cmd,
"/local/apps/mapper/bin/print_graph %s &",tbuf);
4141 void handle_resize(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
4182 int win_x,win_y,xloc,yloc,
i,swin_x,swin_y;
4192 win_x=p_event->xbutton.x;
4193 win_y=p_event->xbutton.y;
4230 for(
i=0;
i < 4;
i++)
4249 if(win_x < width/2 && win_y >=
height/2)
4275 XCopyPlane(
display,
logo[1],
window,
gc,0,0,
w_logo[1],
h_logo[1],xloc,yloc,1);
4300 int win_x,win_y,xsize,ysize;
4301 unsigned int win_button,state;
4303 win_y=p_event->xbutton.y;
4304 win_x=p_event->xbutton.x;
4305 win_button=p_event->xbutton.button;
4306 state=p_event->xbutton.state;
4308 if((state & ControlMask)==4)
4324 if((state & ShiftMask)==1)
4356 else if(
zoom_mode==1 && win_button != Button3)
4369 else if(
edit_mode==1 && win_button==Button1)
4375 else if(win_button==Button3)
4399 char hb5[20],pc[20],*p,snum[10];
4404 float l1,l2,l3,l4,l5;
4413 char file[100],ofile[100];
4414 struct stat statbuf;
4422 int yheight,text_width,length;
4440 "data_directory=<%s>\n"
4467 if(strncasecmp(
"hydro.out",
de->d_name,9)!=0)
4472 strcat(file,
de->d_name);
4474 stat(file,&statbuf);
4476 deltat=ctime-statbuf.st_mtime;
4488 p=fgets(mbuf,100,
fp);
4495 p=strstr(mbuf,
"done");
4501 if(statbuf.st_mtime > newtime)
4503 newtime=statbuf.st_mtime;
4565 strcpy(tbuf,
"READING NEW DATA");
4566 length=strlen(tbuf);
4570 text_width=XTextWidth(
info_font[2],tbuf,length);
4584 fp=fopen(ofile,
"r");
4593 p=fgets(mbuf,5000,
fp);
4602 ier=sscanf(mbuf,
"%d",&
qtime);
4605 printf(
"qtime=%d %02d/%02d/%02d %02d:%02d:%02d\n",
4606 qtime,gm->tm_mon+1,gm->tm_mday,gm->tm_year+1900,gm->tm_hour,gm->tm_min,gm->tm_sec);
4609 tim2=
qtime-gm->tm_hour-12;
4611 if(gm->tm_hour < 12)
4612 tim2=
qtime-(gm->tm_hour+12)*3600 - gm->tm_min*60;
4614 tim2=
qtime-(gm->tm_hour-12)*3600 - gm->tm_min*60;
4621 tim2=
qtime-gm->tm_min*60;
4627 tim2=
qtime-(gm->tm_hour-(gm->tm_hour/6)*6) *3600 - gm->tm_min*60;
4632 p=fgets(mbuf,5000,
fp);
4650 p=strchr(mbuf,
'\n');
4654 ier=sscanf(mbuf,
"%s %s %s %d %f %f %f %f %f",
hb5,
pc,
snum,&
type,
4655 &l1,&l2,&l3,&l4,&l5);
4685 p=fgets(mbuf,5000,
fp);
4689 ier=sscanf(mbuf,
"%f %f %d",&
lat,&
lon,&
num);
4717 sscanf(p,
"%lf",&
data);
4726 p=fgets(mbuf,5000,
fp);
4759 msg=XmStringCreateLocalized(
string);
4762 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
4763 XtSetArg(
args[argcount],XmNdialogStyle,
4764 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
4765 err=XmCreateErrorDialog(widget,
"info",
args,argcount);
4768 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_CANCEL_BUTTON));
4769 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_HELP_BUTTON));
4781 msg=XmStringCreateLocalized(
string);
4784 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
4785 XtSetArg(
args[argcount],XmNdialogStyle,
4786 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
4787 cerr=XmCreateErrorDialog(widget,
"info",
args,argcount);
4789 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_CANCEL_BUTTON));
4790 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_OK_BUTTON));
4791 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_HELP_BUTTON));
4792 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_DEFAULT_BUTTON));
4793 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_SEPARATOR));
4795 XtManageChild(
cerr);
4801 void kill_widget(Widget widget,XtPointer client_data,XtPointer call_data)
4803 XtDestroyWidget(widget);
4828 else if((
int)
data==1)
4830 else if((
int)
data==2)
4832 else if((
int)
data==3)
4834 else if((
int)
data==4)
4836 else if((
int)
data==5)
4838 else if((
int)
data==6)
4840 else if((
int)
data==7)
4842 else if((
int)
data==8)
4844 else if((
int)
data==9)
4856 else if((
int)
data==1)
4858 else if((
int)
data==2)
4860 else if((
int)
data==3)
4866 if(((
int)
data ==2 || (
int)
data==7) &&
4871 else if((
int)
data==1)
4873 else if((
int)
data==2)
4875 else if((
int)
data==3)
4883 else if((
int)
data==1)
4885 else if((
int)
data==2)
4900 else if((
int)
data==1)
4902 else if((
int)
data==2)
4904 else if((
int)
data==3)
4906 else if((
int)
data==4)
4977 XmListCallbackStruct *cbs= (XmListCallbackStruct *) junk;
4978 XmStringGetLtoR(cbs->item, XmFONTLIST_DEFAULT_TAG, &
value);
4985 XmScaleCallbackStruct *cbs= (XmScaleCallbackStruct *) junk;
4993 XmScaleCallbackStruct *cbs= (XmScaleCallbackStruct *) junk;
5006 else if((
int)
data==1)
5011 else if((
int)
data==2)
5035 XmString str[100],t;
5037 Widget pbutton,rowcol;
5039 t=XmStringCreateLocalized(
"DRT Data Files");
5045 str[
i]=XmStringCreateLocalized(
drt_items[
i].label);
5051 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
5052 XtSetArg(
args[argcount],XmNheight,250);argcount++;
5053 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
5054 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
5055 XtSetArg(
args[argcount],XmNdialogStyle,
5056 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
5057 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
5060 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_HELP_BUTTON));
5061 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_SEPARATOR));
5064 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
5067 t=XmStringCreateLocalized(
"Data Files");
5069 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
5070 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
5071 XtManageChild(pbutton);
5075 XtSetArg(
args[argcount],XmNitemCount,number);argcount++;
5076 XtSetArg(
args[argcount],XmNitems,str);argcount++;
5077 XtSetArg(
args[argcount],XmNlistSizePolicy,XmCONSTANT);argcount++;
5078 XtSetArg(
args[argcount],XmNvisibleItemCount,5);argcount++;
5079 XtSetArg(
args[argcount],XmNselectionPolicy,XmSINGLE_SELECT);argcount++;
5080 drt_menu=XmCreateScrolledList(rowcol,
"Files",
args,argcount);
5084 XtManageChild(rowcol);
5092 for(
i=0;
i<number;
i++)
5093 XmStringFree(str[
i]);
5123 #line 5110 "mapper_test.ec"
void change_legend(int win_x, int win_y)
void change_legend_display(int win_x, int win_y)
void change_topo_legend(int win_x, int win_y)
void contour_data(Pixmap pixm, int h, int display_flag)
void contour_topo(Pixmap pixm, int h, int display_flag)
void draw_map(Drawable pix, int h, int display_flag)
void edit_stations(int win_x, int win_y, unsigned int win_button)
void get_custom_list(char *fname)
void get_hrap_coord(double maximum_latitude, double minimum_latitude, double center_longitude)
void get_legend(int type, int kscale, float *delim)
char * pars_line(char *buf, char *s, char *sbuf)
void time_series(int, int, unsigned int, char *)
void plot_topo(Pixmap, int, int)
void read_maps(char *, int, int)
char * strno(char *, char)
void redraw_legend_display(Drawable)
void XmtWaitUntilMapped(Widget)
void redraw_map(int, int, unsigned int)
void redraw_topo_legend(Drawable)
sprintf(fbuf,"/usr/mapper/nexrad/ngrid.%02d-%02d-%02d-%02d", year, month, day, hour)
printf("fbuf is %s\n", fbuf)
void area_select(Widget w, XtPointer data)
void berror(Widget widget, char *string)
int main(int argc, char *argv[])
Widget fgbg_toggle_button
void map_select(Widget w, XtPointer data, XmDrawingAreaCallbackStruct *call_data)
XFontStruct * info_font[10]
float rainfall_level_1[20]
void change_pcp_scaling_mode()
struct sensor_rec * sensor_rec
void kill_widget(Widget widget, XtPointer client_data, XtPointer call_data)
void input_time_step(Widget widget, XtPointer data, XtPointer call_data)
struct datalayer * sdatalayer
Widget BuildPulldownPushMenu(Widget parent, char *menu_title, char menu_mnemonic, struct MenuItem *items)
int elevation_filter_value
static Widget save_widget
struct stn_values * stn_values
char station_list_file[256]
char find_station_buf[10]
void cerror(Widget widget, char *string)
struct datalayer * datalayer
struct hrap_grid * hrap_grid
struct number_rec * number_rec
void clear_drawable(Drawable pixw)
int future_time_series_days
void area_callback(Widget w, XtPointer client_data, XtPointer call_data)
int past_time_series_days
void allocate_colors(int)
void drt_callback(Widget w, XtPointer client_data, XtPointer call_data)
Widget AttachToCascade(Widget parent, char *label, Widget sub_menu)
float rainfall_level_2[20]
struct sensor_type * stype
struct MenuItem ktems[100]
struct MenuItem area_items[10]
void change_pcpn_zoom_mode()
struct sensor_file * sfile
void change_rain(Widget w, XtPointer data, XmDrawingAreaCallbackStruct *call_data)
Widget BuildPulldownToggleMenu(Widget parent, char *menu_title, char menu_mnemonic, struct MenuItem *items)
void Create_Colors(Display *pdisplay)
struct maplayer * smaplayer[100]
void view_precipitation()
struct MenuItem drt_items[100]
void other_pcpn_options()
void clear_error_widget()
void plot_data(Drawable, int, int, int, int)
void raster_data(Drawable, int, int)
void redraw_legend(Drawable)
void render_data(int, int)
void plot_nexrad(Pixmap pixm, int h, int display_flag)