示例#1
0
Boolean GridCurrentMover::ListClick(ListItem item, Boolean inBullet, Boolean doubleClick)
{
	if (inBullet)
		switch (item.index) {
			case I_GRIDCURRENTNAME: bOpen = !bOpen; return TRUE;
			case I_GRIDCURRENTGRID: fVar.bShowGrid = !fVar.bShowGrid; 
				model->NewDirtNotification(DIRTY_MAPDRAWINGRECT); return TRUE;
			case I_GRIDCURRENTARROWS: fVar.bShowArrows = !fVar.bShowArrows; 
				model->NewDirtNotification(DIRTY_MAPDRAWINGRECT); return TRUE;
			case I_GRIDCURRENTUNCERTAINTY: fVar.bUncertaintyPointOpen = !fVar.bUncertaintyPointOpen; return TRUE;
			case I_GRIDCURRENTACTIVE:
				bActive = !bActive;
				model->NewDirtNotification(); 
				return TRUE;
		}
	
	if (ShiftKeyDown() && item.index == I_GRIDCURRENTNAME) {
		fColor = MyPickColor(fColor,mapWindow);
		model->NewDirtNotification(DIRTY_LIST|DIRTY_MAPDRAWINGRECT);
	}
	
	if (doubleClick && !inBullet)
	{
		Boolean userCanceledOrErr ;
		(void) this -> SettingsDialog();	// will need to add a dialog...
		return TRUE;
	}
	
	// do other click operations...
	
	return FALSE;
}
示例#2
0
Boolean GridWindMover::ListClick(ListItem item, Boolean inBullet, Boolean doubleClick)
{
	if (inBullet)
		switch (item.index) {
			case I_NETCDFWINDNAME: bOpen = !bOpen; return TRUE;
			case I_NETCDFWINDACTIVE: bActive = !bActive; 
				model->NewDirtNotification(); return TRUE;
			case I_NETCDFWINDSHOWGRID: bShowGrid = !bShowGrid; 
				model->NewDirtNotification(DIRTY_MAPDRAWINGRECT); return TRUE;
			case I_NETCDFWINDSHOWARROWS: bShowArrows = !bShowArrows; 
				model->NewDirtNotification(DIRTY_MAPDRAWINGRECT); return TRUE;
			case I_NETCDFWINDUNCERTAIN:bUncertaintyPointOpen = !bUncertaintyPointOpen;return TRUE;
		}
	
	if (ShiftKeyDown() && item.index == I_NETCDFWINDNAME) {
		fColor = MyPickColor(fColor,mapWindow);
		model->NewDirtNotification(DIRTY_LIST|DIRTY_MAPDRAWINGRECT);
	}
	
	if (doubleClick)
	{	
		switch(item.index)
		{
			case I_NETCDFWINDACTIVE:
			case I_NETCDFWINDUNCERTAIN:
			case I_NETCDFWINDSPEEDSCALE:
			case I_NETCDFWINDANGLESCALE:
			case I_NETCDFWINDSTARTTIME:
			case I_NETCDFWINDDURATION:
			case I_NETCDFWINDNAME:
				GridWindSettingsDialog(this, this -> moverMap,false,mapWindow);
				//WindSettingsDialog(this, this -> moverMap,false,mapWindow,false);
				break;
			default:	// why not call this for everything?
				GridWindSettingsDialog(this, this -> moverMap,false,mapWindow);
				break;
		}
	}
	
	// do other click operations...
	
	return FALSE;
}