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];
247 int main(
int argc,
char *argv[])
255 int line_style,cap_style,join_style,
j;
270 #line 264 "mapper.ec"
272 #line 264 "mapper.ec"
273 sqli_db_open(
"fastetc", 0);
274 #line 264 "mapper.ec"
292 for(
i=1;
i<=argc-1;
i++)
295 if(!strcmp(argv[
i],
"-debug"))
299 if(!strcmp(argv[
i],
"-drt"))
353 strcpy(
nexrad_file,
"/local/apps/mapper/nexrad/scratch");
355 legend[0]=
"Air Temperature (Deg F)";
356 legend[1]=
"24hr Air Temperature change (Deg F)";
357 legend[2]=
"Maximum Air Temperature (Deg F)";
358 legend[3]=
"Stage/Pool (Ft)";
359 legend[4]=
"Flow (Kcfs)/Storage (Kac-Ft)";
360 legend[5]=
"Depth above flood stage (Ft)";
361 legend[6]=
"Percent of flood flow";
362 legend[7]=
"Minimum Air Temperature (Deg F)";
363 legend[9]=
"Dewpoint (Deg F)";
364 legend[8]=
"Relative Humidity";
365 legend[10]=
"24hr Dewpoint change (Deg F)";
366 legend[11]=
"Wind Speed (mph)";
367 legend[12]=
"Wind Direction (deg)";
368 legend[13]=
"Instantaneous Precipitation";
369 legend[14]=
"Hourly Precipitation";
370 legend[15]=
"Six Hourly Precipitation";
371 legend[16]=
"Daily Precipitation";
372 legend[17]=
"Snow Water Equivalent";
373 legend[18]=
"Change in Snow Water Equivalent";
374 legend[19]=
"not assigned";
376 legend[20]=
"not assigned";
377 legend[21]=
"Six Hourly Precipitation - QC'd";
378 legend[22]=
"Daily Precipitation - QC'd";
379 legend[23]=
"Monthly Precipitation";
380 legend[24]=
"Monthly Precipitation - %Avg";
381 legend[25]=
"WY Precipitation";
382 legend[26]=
"WY Precipitation - %Avg";
383 legend[27]=
"Snow Water Equivalent (inches)";
384 legend[28]=
"Snow Water Equivalent - %Avg";
385 legend[29]=
"SWE - % of April 1 Average";
386 legend[30]=
"Water Temperature (Deg F)";
414 fp=fopen(
"/local/apps/mapper/maps/area",
"r");
418 printf(
"could not open area\n");
432 XtSetLanguageProc(NULL,NULL,NULL);
438 tstring=
"mapper awips.1.7";
440 XtSetArg(
args[0],XmNtitle,tstring);
449 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
450 XtSetArg(
args[argcount],XmNheight,768);argcount++;
451 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
468 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
469 XtSetArg(
args[argcount],XmNheight,768);argcount++;
470 XtSetArg(
args[argcount],XmNresizePolicy,XmRESIZE_ANY);argcount++;
471 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
480 fontname=
"*Adobe-Helvetica-Medium-r-normal-*-10-100-75*";
484 fontname=
"*Adobe-Helvetica-Bold-o-normal-*-10-100-75*";
488 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-18-180-75*";
492 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-14-140-75*";
496 fontname=
"*Adobe-Helvetica-Bold-r-normal-*-12-120-75*";
538 XtSetArg(
args[argcount],XmNheight,30);argcount++;
539 XtSetArg(
args[argcount],XmNbackground,0);argcount++;
540 XtSetArg(
args[argcount],XmNforeground,0);argcount++;
545 line_style=LineSolid;
547 join_style=JoinMiter;
549 XSetLineAttributes(
display,
gc,line_width,line_style,cap_style,join_style);
565 "/usr/include/X11/bitmaps/left_ptr",
568 printf(
"could not find /usr/include/X11/bitmaps/left_ptr\n");
573 "/usr/include/X11/bitmaps/boxes",
576 printf(
"could not find /usr/include/X11/bitmaps/boxes\n");
581 "/usr/include/X11/bitmaps/cross_weave",
584 printf(
"could not find /usr/include/X11/bitmaps/cross_weave\n");
589 ButtonPressMask | ButtonMotionMask | ButtonReleaseMask,
590 GrabModeAsync,GrabModeAsync,XtWindow(
top_level),
591 XCreateFontCursor(
display,XC_crosshair));
608 Widget pbutton,rowcol;
610 t=XmStringCreateLocalized(
"Map areas");
622 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
623 XtSetArg(
args[argcount],XmNheight,250);argcount++;
624 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
625 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
626 XtSetArg(
args[argcount],XmNdialogStyle,
627 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
628 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
631 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_HELP_BUTTON));
632 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_SEPARATOR));
635 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
638 t=XmStringCreateLocalized(
"Map area");
640 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
641 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
642 XtManageChild(pbutton);
646 XtSetArg(
args[argcount],XmNitemCount,number);argcount++;
647 XtSetArg(
args[argcount],XmNitems,str);argcount++;
648 XtSetArg(
args[argcount],XmNlistSizePolicy,XmCONSTANT);argcount++;
649 XtSetArg(
args[argcount],XmNvisibleItemCount,5);argcount++;
650 XtSetArg(
args[argcount],XmNselectionPolicy,XmSINGLE_SELECT);argcount++;
651 area_menu=XmCreateScrolledList(rowcol,
"areas",
args,argcount);
655 XtManageChild(rowcol);
661 for(
i=0;
i<number;
i++)
662 XmStringFree(str[
i]);
683 XtSetArg(
args[0],XmNtitle,tstring);
694 menu_mnemonic,
struct MenuItem *items)
696 Widget Pulldown, button;
704 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
705 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
706 Pulldown=XmCreatePulldownMenu(parent,
"pulldown",
args,argcount);
713 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
714 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
715 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
718 XtSetArg(
args[argcount],XmNset,True);
721 XtSetArg(
args[argcount],XmNset,False);
724 XtSetArg(
args[argcount],XmNset,True);
727 XtSetArg(
args[argcount],XmNset,False);
731 mbutton[
i]=XmCreateToggleButton(Pulldown,items[
i].label,
args,argcount);
736 XtAddCallback(
mbutton[
i],XmNvalueChangedCallback,items[
i].callback,
737 items[
i].callback_data);
751 Widget Pulldown, button;
757 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
758 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
759 Pulldown=XmCreatePulldownMenu(parent,
"pulldown",
args,argcount);
763 button=XmCreatePushButton(Pulldown,items[
i].label,
args,argcount);
764 XtAddCallback(button,XmNactivateCallback,items[
i].callback,
765 items[
i].callback_data);
766 XtManageChild(button);
779 XtSetArg(
args[argcount],XmNsubMenuId,sub_menu);argcount++;
780 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
781 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
782 cbutton=XmCreateCascadeButton(parent,label,
args,argcount);
783 XtManageChild(cbutton);
789 int scr=DefaultScreen(
display);
790 Colormap def_colormap=DefaultColormap(
display,scr);
791 int ncolors,
i,nplanes,npixels,
a=256,new_map;
792 unsigned long pixels[70];
793 unsigned long planemask;
799 ncolors=DisplayCells(
display,scr);
803 for(
i=0;
i<ncolors;
i++)
806 colors[
i].flags=DoRed|DoGreen|DoBlue;
1012 int scr=DefaultScreen(
display);
1013 Colormap def_colormap=DefaultColormap(
display,scr);
1014 Colormap new_colormap;
1015 int ncolors,
i,nplanes,npixels;
1016 unsigned long planemask;
1017 unsigned long pixels[70];
1021 for(
j=0;
j<maxcolors;
j++)
1024 exact_def.blue=
colors[
j].blue;
1025 exact_def.green=
colors[
j].green;
1027 if(!XAllocColor(
display,def_colormap,&exact_def))
1029 printf(
"could not allocate\n");
1033 fval[0]=abs(exact_def.red -
colors[
j].red);
1034 fval[1]=abs(exact_def.blue -
colors[
j].blue);
1035 fval[2]=abs(exact_def.green -
colors[
j].green);
1037 if(fval[0] > 500 || fval[1] > 500 || fval[2] > 500)
1039 printf(
"allocating %d %d %d %d %d %d %d %d %d %d\n",
1040 j,fval[0],fval[1],fval[2],exact_def.red,
colors[
j].red,
1045 if(!XAllocColorCells(
display,def_colormap,
FALSE,&planemask,nplanes,pixels,npixels))
1047 printf(
"could not allocate\n");
1054 color.pixel=pixels[0];
1056 color.flags=DoRed|DoGreen|DoBlue;
1062 colors[
j].pixel=exact_def.pixel;
1086 signed long XSIZE,
YSIZE,xsize,ysize,xbegin,ybegin;
1273 Widget
dialog,rowcol,pbutton;
1278 int slider_size,scrollm,ivalue,increment,page_increment,
j;
1280 char *p, ibuf[256],dbuf[100];
1294 XtSetArg(
args[argcount],XmNwidth,1024);argcount++;
1295 XtSetArg(
args[argcount],XmNheight,30);argcount++;
1296 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1297 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1299 text=XmStringCreateLocalized(
"Reading map backgrounds and data");
1302 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
1303 XtSetArg(
args[argcount],XmNheight,300);argcount++;
1304 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1305 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1306 XtSetArg(
args[argcount],XmNmessageString,
text);argcount++;
1307 XtSetArg(
args[argcount],XmNdialogStyle,
1308 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
1310 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_CANCEL_BUTTON));
1311 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_HELP_BUTTON));
1312 XtUnmanageChild(XmMessageBoxGetChild(
dialog,XmDIALOG_SEPARATOR));
1316 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1317 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1318 rowcol=XtCreateWidget(
"rowcolo",xmRowColumnWidgetClass,
dialog,
args,argcount);
1321 XtSetArg(
args[argcount],XmNeditMode,XmMULTI_LINE_EDIT);argcount++;
1322 XtSetArg(
args[argcount],XmNscrollBarDisplayPolicy,XmSTATIC);argcount++;
1323 XtSetArg(
args[argcount],XmNeditable,False);argcount++;
1324 XtSetArg(
args[argcount],XmNcolumns,40);argcount++;
1325 XtSetArg(
args[argcount],XmNrows,10);argcount++;
1326 XtSetArg(
args[argcount],XmNscrollVertical,True);argcount++;
1327 XtSetArg(
args[argcount],XmNscrollHorizontal,False);argcount++;
1328 XtSetArg(
args[argcount],XmNcursorPositionVisible,False);argcount++;
1329 XtSetArg(
args[argcount],XmNscrollingPolicy,XmAPPLICATION_DEFINED);argcount++;
1330 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1331 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1332 s_text=XmCreateScrolledText(rowcol,
"text",
args,argcount);
1338 XtManageChild(rowcol);
1342 XtSetSensitive(XmMessageBoxGetChild(
dialog,XmDIALOG_OK_BUTTON),False);
1365 strcpy(
data_file,
"/local/apps/mapper/data");
1368 fr=fopen((
char *)data,
"r");
1373 p=fgets(ibuf,256,fr);
1378 p=strchr(ibuf,
'\n');
1383 p=
pars_line(ibuf,
"topo_elevation=",rbuf);
1393 ier=sscanf(rbuf,
"%d %d %d %d %d",
1411 p=
pars_line(ibuf,
"rain_bar=hourly",rbuf);
1415 p=
pars_line(ibuf,
"rain_bar=6_hourly",rbuf);
1419 p=
pars_line(ibuf,
"rain_bar=24_hourly",rbuf);
1424 p=
pars_line(ibuf,
"1_hr_rainfall_max=",rbuf);
1429 p=
pars_line(ibuf,
"6_hr_rainfall_max=",rbuf);
1434 p=
pars_line(ibuf,
"24_hr_rainfall_max=",rbuf);
1439 p=
pars_line(ibuf,
"past_time_series_days=",rbuf);
1443 p=
pars_line(ibuf,
"future_time_series_days=",rbuf);
1448 p=
pars_line(ibuf,
"rainfall_level_1=",rbuf);
1458 ier=sscanf(rbuf,
"%f %f %f %f %f %f %f %f %f %f %f %f",
1467 p=
pars_line(ibuf,
"rainfall_level_2=",rbuf);
1477 ier=sscanf(rbuf,
"%f %f %f %f %f %f %f %f %f %f %f %f",
1498 items[0].
label=NULL;
1507 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1508 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1510 pbutton=XmCreatePushButton(main_bar,
"Print",
args,argcount);
1511 XtAddCallback(pbutton,XmNactivateCallback,
print_screen,NULL);
1512 XtManageChild(pbutton);
1516 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1517 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1519 pbutton=XmCreatePushButton(main_bar,
"Quit",
args,argcount);
1520 XtAddCallback(pbutton,XmNactivateCallback,
quit_all,NULL);
1521 XtManageChild(pbutton);
1530 strcpy(dbuf,
"reading data\n");
1534 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1535 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1536 &increment,&page_increment);
1537 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1538 slider_size,increment,page_increment,True);
1551 strcpy(dbuf,
"No data\n");
1553 strcpy(dbuf,
"Data found\n");
1558 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1559 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1560 &increment,&page_increment);
1561 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1562 slider_size,increment,page_increment,True);
1571 items[0].
label=
"Precipitation";
1574 items[1].
label=
"Stage";
1577 items[2].
label=
"Air Temperature";
1580 items[3].
label=
"Humidity";
1583 items[4].
label=
"Wind";
1586 items[5].
label=
"Snow";
1589 items[6].
label=
"Water Temperature";
1592 items[7].
label=NULL;
1597 items[0].
label=
"Find station";
1601 items[1].
label=
"Zoom";
1605 items[2].
label=
"Edit";
1609 items[3].
label=NULL;
1614 items[0].
label=
"1 day ";
1618 items[1].
label=
"3 days";
1622 items[2].
label=
"5 days";
1626 items[3].
label=
"7 days";
1630 items[4].
label=NULL;
1635 items[0].
label=
"Refresh Current Data Now";
1639 items[1].
label=
"Displaced RealTime Mode";
1643 items[2].
label=NULL;
1654 XtSetSensitive(XmMessageBoxGetChild(
dialog,XmDIALOG_OK_BUTTON),True);
1656 strcpy(dbuf,
"Done!!!\n");
1660 XtVaGetValues(
scrollbar,XmNmaximum,&scrollm,NULL);
1661 XmScrollBarGetValues(
scrollbar,&ivalue,&slider_size,
1662 &increment,&page_increment);
1663 XmScrollBarSetValues(
scrollbar,scrollm-slider_size,
1664 slider_size,increment,page_increment,True);
1674 void print_screen(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1681 void kill_dialog(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1689 void change_rain(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
1705 static Position x,y;
1711 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
1714 Atom WM_DELETE_WINDOW;
1720 XtSetArg(
args[0],XmNx,&x);
1721 XtSetArg(
args[1],XmNy,&y);
1743 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
1744 XtSetArg(
args[argcount],XmNy, y);argcount++;
1745 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
1746 XtSetArg(
args[argcount],XmNwidth,252);argcount++;
1747 XtSetArg(
args[argcount],XmNheight,500);argcount++;
1748 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1749 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1752 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
1753 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
1754 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
1755 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
1758 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
1762 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1763 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1764 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
1765 rowcol=XmCreateRowColumn(
main_widget,
"View Precipitation",
args,argcount);
1767 t=XmStringCreateLocalized(
"Display:");
1770 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1771 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1772 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1773 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
1775 XtSetArg(
args[0],XmNsubMenuId,&
widg);
1776 XtGetValues(rowcol1,
args,1);
1782 s[4]=
"QC'd Six hrly";
1785 s[7]=
"Monthly - %Avg";
1791 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
1792 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
1799 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1800 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1801 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
1802 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
1803 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1804 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
1806 t=XmStringCreateLocalized(
"Time:");
1808 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1809 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1810 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1811 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
1812 XtManageChild(pbutton);
1816 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1817 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1818 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
1819 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
1823 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1824 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1825 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
1826 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
1829 XtManageChild(arrow1);
1830 XtManageChild(arrow2);
1832 t=XmStringCreateLocalized(
"Data:");
1834 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1835 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1836 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1837 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
1839 XtSetArg(
args[0],XmNsubMenuId,&
widg);
1840 XtGetValues(rowcol4,
args,1);
1851 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
1852 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
1856 XtSetArg(
args[0],XmNmenuHistory,pbutton);
1857 XtSetValues(rowcol4,
args,1);
1861 t=XmStringCreateLocalized(
"Station type");
1863 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1864 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1865 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
1866 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
1867 XtManageChild(pbutton);
1871 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1872 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1873 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
1874 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
1875 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
1876 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
1891 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1892 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1893 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
1896 XtSetArg(
args[argcount],XmNset,True);
1898 XtSetArg(
args[argcount],XmNset,False);
1901 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
1909 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
1911 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1912 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1913 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
1914 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
1915 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
1916 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
1917 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
1918 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1919 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
1920 XtManageChild(
scale);
1925 t=XmStringCreateLocalized(
"Filter Precipitation (Inches)");
1927 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
1928 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
1929 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
1930 XtSetArg(
args[argcount],XmNmaximum,100);argcount++;
1931 XtSetArg(
args[argcount],XmNdecimalPoints,2);argcount++;
1932 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
1933 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
1934 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
1935 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
1936 XtManageChild(
scale);
2009 XtManageChild(rowcol);
2010 XtManageChild(rowcol1);
2011 XtManageChild(rowcol2);
2012 XtManageChild(rowcol3);
2013 XtManageChild(rowcol4);
2026 static Position x,y;
2032 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2035 Atom WM_DELETE_WINDOW;
2041 XtSetArg(
args[0],XmNx,&x);
2042 XtSetArg(
args[1],XmNy,&y);
2054 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2055 XtSetArg(
args[argcount],XmNy, y);argcount++;
2056 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2057 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
2058 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2059 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2060 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2063 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2064 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2065 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2066 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2069 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2073 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2074 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2075 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2076 rowcol=XmCreateRowColumn(
main_widget,
"View Water Temperature",
args,argcount);
2078 t=XmStringCreateLocalized(
"Display:");
2081 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2082 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2083 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2084 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2086 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2087 XtGetValues(rowcol1,
args,1);
2093 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2094 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2101 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2102 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2103 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2104 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2105 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2106 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2108 t=XmStringCreateLocalized(
"Time:");
2110 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2111 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2112 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2113 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2114 XtManageChild(pbutton);
2118 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2119 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2120 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2121 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2125 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2126 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2127 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2128 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2131 XtManageChild(arrow1);
2132 XtManageChild(arrow2);
2134 t=XmStringCreateLocalized(
"Data:");
2136 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2137 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2138 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2139 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2141 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2142 XtGetValues(rowcol4,
args,1);
2153 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2154 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2158 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2159 XtSetValues(rowcol4,
args,1);
2163 t=XmStringCreateLocalized(
"Station type");
2165 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2166 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2167 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2168 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2169 XtManageChild(pbutton);
2173 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2174 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2175 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2176 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2177 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2178 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2191 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2192 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2193 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2196 XtSetArg(
args[argcount],XmNset,True);
2198 XtSetArg(
args[argcount],XmNset,False);
2202 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2208 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2210 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2211 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2212 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2213 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2214 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2215 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2216 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2217 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2218 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2219 XtManageChild(
scale);
2237 XtManageChild(rowcol);
2238 XtManageChild(rowcol1);
2239 XtManageChild(rowcol2);
2240 XtManageChild(rowcol3);
2241 XtManageChild(rowcol4);
2250 static Position x,y;
2256 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2259 Atom WM_DELETE_WINDOW;
2265 XtSetArg(
args[0],XmNx,&x);
2266 XtSetArg(
args[1],XmNy,&y);
2278 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2279 XtSetArg(
args[argcount],XmNy, y);argcount++;
2280 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2281 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
2282 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2283 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2284 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2287 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2288 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2289 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2290 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2293 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2297 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2298 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2299 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2300 rowcol=XmCreateRowColumn(
main_widget,
"View Air Temperature",
args,argcount);
2302 t=XmStringCreateLocalized(
"Display:");
2305 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2306 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2307 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2308 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2310 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2311 XtGetValues(rowcol1,
args,1);
2320 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2321 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2328 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2329 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2330 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2331 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2332 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2333 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2335 t=XmStringCreateLocalized(
"Time:");
2337 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2338 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2339 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2340 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2341 XtManageChild(pbutton);
2345 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2346 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2347 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2348 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2352 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2353 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2354 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2355 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2358 XtManageChild(arrow1);
2359 XtManageChild(arrow2);
2361 t=XmStringCreateLocalized(
"Data:");
2363 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2364 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2365 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2366 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2368 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2369 XtGetValues(rowcol4,
args,1);
2380 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2381 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2385 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2386 XtSetValues(rowcol4,
args,1);
2390 t=XmStringCreateLocalized(
"Station type");
2392 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2393 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2394 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2395 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2396 XtManageChild(pbutton);
2400 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2401 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2402 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2403 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2404 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2405 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2418 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2419 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2420 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2423 XtSetArg(
args[argcount],XmNset,True);
2425 XtSetArg(
args[argcount],XmNset,False);
2429 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2436 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2438 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2439 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2440 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2441 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2442 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2443 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2444 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2445 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2446 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2447 XtManageChild(
scale);
2523 XtManageChild(rowcol);
2524 XtManageChild(rowcol1);
2525 XtManageChild(rowcol2);
2526 XtManageChild(rowcol3);
2527 XtManageChild(rowcol4);
2541 static Position x,y;
2547 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
2548 Widget rowcol45,
scale;
2550 Atom WM_DELETE_WINDOW;
2556 XtSetArg(
args[0],XmNx,&x);
2557 XtSetArg(
args[1],XmNy,&y);
2569 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2570 XtSetArg(
args[argcount],XmNy, y);argcount++;
2571 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2572 XtSetArg(
args[argcount],XmNwidth,246);argcount++;
2573 XtSetArg(
args[argcount],XmNheight,400);argcount++;
2574 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2575 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2578 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2579 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2580 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2581 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2584 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2588 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2589 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2590 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2591 rowcol=XmCreateRowColumn(
main_widget,
"Edit Precipitation",
args,argcount);
2593 t=XmStringCreateLocalized(
"Display:");
2596 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2597 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2598 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2599 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2601 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2602 XtGetValues(rowcol1,
args,1);
2605 s[1]=
"Dewpt 24hr chg";
2610 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2611 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2616 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2617 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2618 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2619 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2620 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2621 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2623 t=XmStringCreateLocalized(
"Time:");
2625 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2626 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2627 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2628 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2629 XtManageChild(pbutton);
2633 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2634 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2635 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2636 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2640 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2641 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2642 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2643 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2646 XtManageChild(arrow1);
2647 XtManageChild(arrow2);
2649 t=XmStringCreateLocalized(
"Data:");
2651 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2652 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2653 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2654 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2656 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2657 XtGetValues(rowcol4,
args,1);
2668 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2669 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2673 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2674 XtSetValues(rowcol4,
args,1);
2678 t=XmStringCreateLocalized(
"Station type");
2680 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2681 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2682 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2683 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
2684 XtManageChild(pbutton);
2688 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2689 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2690 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
2691 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
2692 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2693 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2706 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2707 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2708 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
2711 XtSetArg(
args[argcount],XmNset,True);
2713 XtSetArg(
args[argcount],XmNset,False);
2717 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
2725 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
2727 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2728 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2729 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
2730 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
2731 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
2732 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
2733 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
2734 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2735 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
2736 XtManageChild(
scale);
2809 XtManageChild(rowcol);
2810 XtManageChild(rowcol1);
2811 XtManageChild(rowcol2);
2812 XtManageChild(rowcol3);
2813 XtManageChild(rowcol4);
2828 static Position x,y;
2834 Widget rowcol,pbutton,rowcol0,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,arrow1,arrow2;
2835 Widget rowcol7,
scale;
2837 Atom WM_DELETE_WINDOW;
2843 XtSetArg(
args[0],XmNx,&x);
2844 XtSetArg(
args[1],XmNy,&y);
2856 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
2857 XtSetArg(
args[argcount],XmNy, y);argcount++;
2858 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
2859 XtSetArg(
args[argcount],XmNwidth,274);argcount++;
2860 XtSetArg(
args[argcount],XmNheight,530);argcount++;
2861 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2862 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2865 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
2866 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
2867 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
2868 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
2871 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
2875 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2876 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2877 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
2880 t=XmStringCreateLocalized(
"Display:");
2882 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2883 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2884 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2885 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2887 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2888 XtGetValues(rowcol1,
args,1);
2891 s[1]=
"Flow/Storage";
2892 s[2]=
"Depth abv flood stg";
2893 s[3]=
"Pcnt of flood flow";
2897 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2898 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
2905 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2906 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2907 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
2908 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
2909 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
2910 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
2912 t=XmStringCreateLocalized(
"Time:");
2914 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2915 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2916 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2917 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
2918 XtManageChild(pbutton);
2922 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2923 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2924 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
2925 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
2929 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2930 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2931 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
2932 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
2935 XtManageChild(arrow1);
2936 XtManageChild(arrow2);
2938 t=XmStringCreateLocalized(
"Data:");
2940 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2941 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2942 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2943 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2945 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2946 XtGetValues(rowcol4,
args,1);
2957 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2958 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
2962 XtSetArg(
args[0],XmNmenuHistory,pbutton);
2963 XtSetValues(rowcol4,
args,1);
2967 t=XmStringCreateLocalized(
"Type:");
2970 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2971 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
2972 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
2973 rowcol0=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
2975 XtSetArg(
args[0],XmNsubMenuId,&
widg);
2976 XtGetValues(rowcol0,
args,1);
2986 hgwidget[
i]=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
2992 XtSetValues(rowcol0,
args,1);
2996 t=XmStringCreateLocalized(
"Forecasts:");
2998 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
2999 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3000 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3001 rowcol7=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3003 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3004 XtGetValues(rowcol7,
args,1);
3011 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3012 XtAddCallback(pbutton,XmNactivateCallback,
rfs_options,
3018 t=XmStringCreateLocalized(
"Station type");
3020 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3021 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3022 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3023 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3024 XtManageChild(pbutton);
3028 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3029 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3030 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3031 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3032 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3033 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3046 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3047 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3048 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3051 XtSetArg(
args[argcount],XmNset,True);
3053 XtSetArg(
args[argcount],XmNset,False);
3057 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3064 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3066 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3067 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3068 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3069 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3070 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3071 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3072 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3073 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3074 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3075 XtManageChild(
scale);
3129 XtManageChild(rowcol);
3130 XtManageChild(rowcol0);
3131 XtManageChild(rowcol1);
3132 XtManageChild(rowcol2);
3133 XtManageChild(rowcol3);
3134 XtManageChild(rowcol4);
3135 XtManageChild(rowcol7);
3147 static Position x,y;
3153 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
3154 Widget rowcol7,
scale;
3156 Atom WM_DELETE_WINDOW;
3162 XtSetArg(
args[0],XmNx,&x);
3163 XtSetArg(
args[1],XmNy,&y);
3175 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
3176 XtSetArg(
args[argcount],XmNy, y);argcount++;
3177 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
3178 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
3179 XtSetArg(
args[argcount],XmNheight,400);argcount++;
3180 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3181 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3184 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
3185 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
3186 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
3187 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
3190 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
3194 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3195 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3196 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3199 t=XmStringCreateLocalized(
"Display:");
3202 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3203 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3204 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3205 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3207 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3208 XtGetValues(rowcol1,
args,1);
3214 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3215 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
3222 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3223 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3224 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
3225 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
3226 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3227 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3229 t=XmStringCreateLocalized(
"Time:");
3231 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3232 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3233 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3234 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
3235 XtManageChild(pbutton);
3239 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3240 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3241 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
3242 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
3246 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3247 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3248 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
3249 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
3252 XtManageChild(arrow1);
3253 XtManageChild(arrow2);
3255 t=XmStringCreateLocalized(
"Data:");
3257 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3258 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3259 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3260 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3262 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3263 XtGetValues(rowcol4,
args,1);
3274 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3275 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
3279 XtSetArg(
args[0],XmNmenuHistory,pbutton);
3280 XtSetValues(rowcol4,
args,1);
3284 t=XmStringCreateLocalized(
"Station type");
3286 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3287 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3288 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3289 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3290 XtManageChild(pbutton);
3294 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3295 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3296 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3297 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3298 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3299 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3312 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3313 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3314 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3317 XtSetArg(
args[argcount],XmNset,True);
3319 XtSetArg(
args[argcount],XmNset,False);
3323 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3330 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3332 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3333 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3334 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3335 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3336 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3337 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3338 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3339 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3340 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3341 XtManageChild(
scale);
3414 XtManageChild(rowcol);
3415 XtManageChild(rowcol1);
3416 XtManageChild(rowcol2);
3417 XtManageChild(rowcol3);
3418 XtManageChild(rowcol4);
3432 static Position x,y;
3438 Widget rowcol,pbutton,rowcol2,rowcol1,rowcol3,rowcol4,rowcol5,rowcol6,arrow1,arrow2;
3439 Widget rowcol45,
scale;
3441 Atom WM_DELETE_WINDOW;
3447 XtSetArg(
args[0],XmNx,&x);
3448 XtSetArg(
args[1],XmNy,&y);
3460 XtSetArg(
args[argcount],XmNx, xpos);argcount++;
3461 XtSetArg(
args[argcount],XmNy, y);argcount++;
3462 XtSetArg(
args[argcount],XmNdefaultPosition, False);argcount++;
3463 XtSetArg(
args[argcount],XmNwidth,221);argcount++;
3464 XtSetArg(
args[argcount],XmNheight,400);argcount++;
3465 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3466 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3469 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_CANCEL_BUTTON));
3470 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_HELP_BUTTON));
3471 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_OK_BUTTON));
3472 XtUnmanageChild(XmMessageBoxGetChild(
main_widget,XmDIALOG_SEPARATOR));
3475 WM_DELETE_WINDOW=XmInternAtom(XtDisplay(
top_level),
"WM_DELETE_WINDOW",False);
3479 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3480 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3481 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3482 rowcol=XmCreateRowColumn(
main_widget,
"Edit Precipitation",
args,argcount);
3484 t=XmStringCreateLocalized(
"Display:");
3487 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3488 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3489 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3490 rowcol1=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3492 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3493 XtGetValues(rowcol1,
args,1);
3507 s[3]=
"Monthly %Avg";
3515 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3516 XtAddCallback(pbutton,XmNactivateCallback,
change_mode,
3522 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3523 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3524 XtSetArg(
args[argcount],XmNpacking,XmPACK_TIGHT); argcount++;
3525 XtSetArg(
args[argcount],XmNnumColumns,4);argcount++;
3526 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3527 rowcol2=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3529 t=XmStringCreateLocalized(
"Time:");
3531 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3532 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3533 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3534 pbutton=XmCreateLabel(rowcol2,
"Label",
args,argcount);
3535 XtManageChild(pbutton);
3539 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3540 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3541 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_UP);argcount++;
3542 arrow1=XmCreateArrowButton(rowcol2,
"up",
args,argcount);
3546 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3547 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3548 XtSetArg(
args[argcount],XmNarrowDirection,XmARROW_DOWN);argcount++;
3549 arrow2=XmCreateArrowButton(rowcol2,
"down",
args,argcount);
3552 XtManageChild(arrow1);
3553 XtManageChild(arrow2);
3555 t=XmStringCreateLocalized(
"Data:");
3557 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3558 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3559 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3560 rowcol4=XmCreateSimpleOptionMenu(rowcol,
"Edit Stations",
args,argcount);
3562 XtSetArg(
args[0],XmNsubMenuId,&
widg);
3563 XtGetValues(rowcol4,
args,1);
3574 pbutton=XtVaCreateManagedWidget(s[
i],xmPushButtonGadgetClass,
widg,NULL);
3575 XtAddCallback(pbutton,XmNactivateCallback,
change_plot,
3579 XtSetArg(
args[0],XmNmenuHistory,pbutton);
3580 XtSetValues(rowcol4,
args,1);
3584 t=XmStringCreateLocalized(
"Station type");
3586 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3587 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3588 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
3589 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
3590 XtManageChild(pbutton);
3594 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3595 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3596 XtSetArg(
args[argcount],XmNpacking,XmPACK_COLUMN); argcount++;
3597 XtSetArg(
args[argcount],XmNnumColumns,2);argcount++;
3598 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
3599 rowcol3=XmCreateRowColumn(rowcol,
"Edit Stations",
args,argcount);
3612 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3613 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3614 XtSetArg(
args[argcount],XmNselectColor,
cmap[4]);argcount++;
3617 XtSetArg(
args[argcount],XmNset,True);
3619 XtSetArg(
args[argcount],XmNset,False);
3623 bwidget[
i]=XmCreateToggleButton(rowcol3,s[
i],
args,argcount);
3630 t=XmStringCreateLocalized(
"Filter Elevation (Feet)");
3632 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3633 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3634 XtSetArg(
args[argcount],XmNminimum,0);argcount++;
3635 XtSetArg(
args[argcount],XmNmaximum,12000);argcount++;
3636 XtSetArg(
args[argcount],XmNdecimalPoints,0);argcount++;
3637 XtSetArg(
args[argcount],XmNshowValue,True);argcount++;
3638 XtSetArg(
args[argcount],XmNtitleString,t);argcount++;
3639 XtSetArg(
args[argcount],XmNorientation,XmHORIZONTAL);argcount++;
3640 scale=XmCreateScale(rowcol,
"scale",
args,argcount);
3641 XtManageChild(
scale);
3715 XtManageChild(rowcol);
3716 XtManageChild(rowcol1);
3717 XtManageChild(rowcol2);
3718 XtManageChild(rowcol3);
3719 XtManageChild(rowcol4);
3738 t=XmStringCreateLocalized(
"Enter handbook 5 I.D.");
3740 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
3741 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
3742 XtSetArg(
args[argcount],XmNdialogStyle,
3743 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
3744 XtSetArg(
args[argcount],XmNselectionLabelString,t);argcount++;
3745 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
3748 XtUnmanageChild(XmSelectionBoxGetChild(
find_widget,
3749 XmDIALOG_HELP_BUTTON));
3768 else if((
int)data==1)
3782 void rfs_options(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
3789 else if((
int)data==1)
3803 void find_name(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
3826 XtSetArg(
args[argcount],XmNtextString,&str);argcount++;
3829 XmStringGetLtoR(str,XmFONTLIST_DEFAULT_TAG,&cstr);
3892 strcat(dbuf,
" not found");
3920 else if((
int)
data==1)
3925 else if((
int)
data==2)
3954 msg=XmStringCreateLocalized(
"Quit mapper?");
3957 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
3958 XtSetArg(
args[argcount],XmNdialogStyle,
3959 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
3961 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_HELP_BUTTON));
3991 while(
ktems[
i].label!=NULL)
3994 XtSetArg(
args[0],XmNset,False);
4000 XtSetArg(
args[0],XmNset,True);
4051 XtSetArg(
args[0],XmNset,True);
4064 XtSetArg(
args[0],XmNset,False);
4086 XEvent *p_event=call_data->event;
4088 if(p_event->xexpose.count==0)
4128 sprintf(tbuf,
"/local/apps/mapper/data/graph.%02d%02d%02d",
4129 gm->tm_hour,gm->tm_min,gm->tm_sec);
4135 sprintf(
cmd,
"/local/apps/mapper/bin/print_graph %s &",tbuf);
4142 void handle_resize(Widget w,XtPointer data,XmDrawingAreaCallbackStruct *call_data)
4183 int win_x,win_y,xloc,yloc,
i,swin_x,swin_y;
4193 win_x=p_event->xbutton.x;
4194 win_y=p_event->xbutton.y;
4231 for(
i=0;
i < 4;
i++)
4250 if(win_x < width/2 && win_y >=
height/2)
4276 XCopyPlane(
display,
logo[1],
window,
gc,0,0,
w_logo[1],
h_logo[1],xloc,yloc,1);
4301 int win_x,win_y,xsize,ysize;
4302 unsigned int win_button,state;
4304 win_y=p_event->xbutton.y;
4305 win_x=p_event->xbutton.x;
4306 win_button=p_event->xbutton.button;
4307 state=p_event->xbutton.state;
4309 if((state & ControlMask)==4)
4325 if((state & ShiftMask)==1)
4357 else if(
zoom_mode==1 && win_button != Button3)
4370 else if(
edit_mode==1 && win_button==Button1)
4376 else if(win_button==Button3)
4400 char hb5[20],pc[20],*p,snum[10];
4405 float l1,l2,l3,l4,l5;
4414 char file[100],ofile[100];
4415 struct stat statbuf;
4423 int yheight,text_width,length;
4439 strcpy(
directory,
"/local/apps/mapper/data/drt");
4442 "data_directory=<%s>\n"
4472 if(strncasecmp(
"hydro.out",
de->d_name,9)!=0)
4477 strcat(file,
de->d_name);
4479 stat(file,&statbuf);
4481 deltat=ctime-statbuf.st_mtime;
4493 p=fgets(mbuf,100,
fp);
4500 p=strstr(mbuf,
"done");
4506 if(statbuf.st_mtime > newtime)
4508 newtime=statbuf.st_mtime;
4570 strcpy(tbuf,
"READING NEW DATA");
4571 length=strlen(tbuf);
4575 text_width=XTextWidth(
info_font[2],tbuf,length);
4589 fp=fopen(ofile,
"r");
4598 p=fgets(mbuf,5000,
fp);
4607 ier=sscanf(mbuf,
"%d",&
qtime);
4610 printf(
"qtime=%d %02d/%02d/%02d %02d:%02d:%02d\n",
4611 qtime,gm->tm_mon+1,gm->tm_mday,gm->tm_year+1900,gm->tm_hour,gm->tm_min,gm->tm_sec);
4614 tim2=
qtime-gm->tm_hour-12;
4616 if(gm->tm_hour < 12)
4617 tim2=
qtime-(gm->tm_hour+12)*3600 - gm->tm_min*60;
4619 tim2=
qtime-(gm->tm_hour-12)*3600 - gm->tm_min*60;
4626 tim2=
qtime-gm->tm_min*60;
4632 tim2=
qtime-(gm->tm_hour-(gm->tm_hour/6)*6) *3600 - gm->tm_min*60;
4637 p=fgets(mbuf,5000,
fp);
4655 p=strchr(mbuf,
'\n');
4659 ier=sscanf(mbuf,
"%s %s %s %d %f %f %f %f %f",
hb5,
pc,
snum,&
type,
4660 &l1,&l2,&l3,&l4,&l5);
4690 p=fgets(mbuf,5000,
fp);
4694 ier=sscanf(mbuf,
"%f %f %d",&
lat,&
lon,&
num);
4722 sscanf(p,
"%lf",&
data);
4731 p=fgets(mbuf,5000,
fp);
4764 msg=XmStringCreateLocalized(
string);
4767 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
4768 XtSetArg(
args[argcount],XmNdialogStyle,
4769 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
4770 err=XmCreateErrorDialog(widget,
"info",
args,argcount);
4773 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_CANCEL_BUTTON));
4774 XtUnmanageChild(XmMessageBoxGetChild(err,XmDIALOG_HELP_BUTTON));
4786 msg=XmStringCreateLocalized(
string);
4789 XtSetArg(
args[argcount],XmNmessageString,msg);argcount++;
4790 XtSetArg(
args[argcount],XmNdialogStyle,
4791 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
4792 cerr=XmCreateErrorDialog(widget,
"info",
args,argcount);
4794 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_CANCEL_BUTTON));
4795 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_OK_BUTTON));
4796 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_HELP_BUTTON));
4797 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_DEFAULT_BUTTON));
4798 XtUnmanageChild(XmMessageBoxGetChild(
cerr,XmDIALOG_SEPARATOR));
4800 XtManageChild(
cerr);
4806 void kill_widget(Widget widget,XtPointer client_data,XtPointer call_data)
4808 XtDestroyWidget(widget);
4833 else if((
int)
data==1)
4835 else if((
int)
data==2)
4837 else if((
int)
data==3)
4839 else if((
int)
data==4)
4841 else if((
int)
data==5)
4843 else if((
int)
data==6)
4845 else if((
int)
data==7)
4847 else if((
int)
data==8)
4849 else if((
int)
data==9)
4861 else if((
int)
data==1)
4863 else if((
int)
data==2)
4865 else if((
int)
data==3)
4871 if(((
int)
data ==2 || (
int)
data==7) &&
4876 else if((
int)
data==1)
4878 else if((
int)
data==2)
4880 else if((
int)
data==3)
4888 else if((
int)
data==1)
4890 else if((
int)
data==2)
4905 else if((
int)
data==1)
4907 else if((
int)
data==2)
4909 else if((
int)
data==3)
4911 else if((
int)
data==4)
4982 XmListCallbackStruct *cbs= (XmListCallbackStruct *) junk;
4983 XmStringGetLtoR(cbs->item, XmFONTLIST_DEFAULT_TAG, &
value);
4990 XmScaleCallbackStruct *cbs= (XmScaleCallbackStruct *) junk;
4998 XmScaleCallbackStruct *cbs= (XmScaleCallbackStruct *) junk;
5011 else if((
int)
data==1)
5016 else if((
int)
data==2)
5030 strcpy(drt_file,
"/local/apps/mapper/data/drt");
5040 XmString str[100],t;
5042 Widget pbutton,rowcol;
5044 t=XmStringCreateLocalized(
"DRT Data Files");
5050 str[
i]=XmStringCreateLocalized(
drt_items[
i].label);
5056 XtSetArg(
args[argcount],XmNwidth, 300);argcount++;
5057 XtSetArg(
args[argcount],XmNheight,250);argcount++;
5058 XtSetArg(
args[argcount],XmNbackground,
mmap[1]);argcount++;
5059 XtSetArg(
args[argcount],XmNforeground,
mmap[0]);argcount++;
5060 XtSetArg(
args[argcount],XmNdialogStyle,
5061 XmDIALOG_FULL_APPLICATION_MODAL);argcount++;
5062 XtSetArg(
args[argcount],XmNautoUnmanage,False);argcount++;
5065 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_HELP_BUTTON));
5066 XtUnmanageChild(XmMessageBoxGetChild(
start_dialog,XmDIALOG_SEPARATOR));
5069 XtSetArg(
args[argcount],XmNorientation,XmVERTICAL);argcount++;
5072 t=XmStringCreateLocalized(
"Available Data Files");
5074 XtSetArg(
args[argcount],XmNlabelString,t);argcount++;
5075 pbutton=XmCreateLabel(rowcol,
"Label",
args,argcount);
5076 XtManageChild(pbutton);
5080 XtSetArg(
args[argcount],XmNitemCount,number);argcount++;
5081 XtSetArg(
args[argcount],XmNitems,str);argcount++;
5082 XtSetArg(
args[argcount],XmNlistSizePolicy,XmCONSTANT);argcount++;
5083 XtSetArg(
args[argcount],XmNvisibleItemCount,5);argcount++;
5084 XtSetArg(
args[argcount],XmNselectionPolicy,XmSINGLE_SELECT);argcount++;
5085 drt_menu=XmCreateScrolledList(rowcol,
"Files",
args,argcount);
5089 XtManageChild(rowcol);
5095 for(
i=0;
i<number;
i++)
5096 XmStringFree(str[
i]);
5133 #line 5120 "mapper.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)