model_server/gala/src/controlObjects.cxx
// parent window drawing function. If you use the correct resource
// paths, the bitmaps from the resources will be displayed.
// if the resources paths is incorrect, red or green rectangle will 
// be displayed.
// the resource path must be in a form tag/tag/tag....
parent window drawing function. If you use the correct resource
paths, the bitmaps from the resources will be displayed.
if the resources paths is incorrect, red or green rectangle will
be displayed.
the resource path must be in a form tag/tag/tag
parent window drawing function . If you use the correct resource paths the bitmaps from the resources will be displayed . if the resources paths is incorrect red or green rectangle will be displayed . the resource path must be in a form tag / tag / tag
void gdListCheck::ParentDraw(void) {
    vdraw::GSave ();
    parentWindow->DrawDevice();
    vdraw::RectClip(parentWindow->GetListRect()->x,parentWindow->GetListRect()->y,parentWindow->GetListRect()->w,parentWindow->GetListRect()->h);
    vdraw::RectClip(windowRect.x,windowRect.y,windowRect.w,windowRect.h);
    vdraw::SetColor(vcolor::GetBlack());
	vimage* imageOn = parentWindow->GetImageFromResource(&onImagePath);
	vimage* imageOff= parentWindow->GetImageFromResource(&offImagePath);
	if(value==vTRUE) {
		if(imageOn!=NULL) {
			vrect sr;
			sr.Set(0,0,imageOn->GetWidth(),imageOn->GetHeight());
			vdraw::RectImageComposite(imageOn,&sr,&indicator);
		} else {
			vdraw::SetColor(vcolor::GetBlack());
			vdraw::RectFill(indicator.x+1,indicator.y+1,indicator.w-2,indicator.h-2);
		}
		if(title.length()!=0) {
			vdraw::MoveTo(3+indicator.x+indicator.w+x_shift,
				indicator.y+1);
			vdraw::SetColor(vcolor::GetBlack());
			vdraw::Show(title);
		}
    } else {
		if(imageOff!=NULL) {
			vrect sr;
			sr.Set(0,0,imageOff->GetWidth(),imageOff->GetHeight());
			vdraw::RectImageComposite(imageOff,&sr,&indicator);
		} else {
			vdraw::SetColor(vcolor::GetWhite());
			vdraw::RectFill(indicator.x+1,indicator.y+1,indicator.w-2,indicator.h-2);
		}
		if(title.length()!=0) {
			vdraw::MoveTo(3+indicator.x+indicator.w+x_shift,
				indicator.y+1);
			vdraw::SetColor(vcolor::GetBlack());
			if(alternate.length()!=0)   vdraw::Show(alternate);
			else                vdraw::Show(title);
		}
    }
    vdraw::GRestore();
}
void gdListCheck :: ParentDraw ( void ) { vdraw :: GSave ( ) ; parentWindow -> DrawDevice ( ) ; vdraw :: RectClip ( parentWindow -> GetListRect ( ) -> x , parentWindow -> GetListRect ( ) -> y , parentWindow -> GetListRect ( ) -> w , parentWindow -> GetListRect ( ) -> h ) ; vdraw :: RectClip ( windowRect . x , windowRect . y , windowRect . w , windowRect . h ) ; vdraw :: SetColor ( vcolor :: GetBlack ( ) ) ; vimage * imageOn = parentWindow -> GetImageFromResource ( & onImagePath ) ; vimage * imageOff = parentWindow -> GetImageFromResource ( & offImagePath ) ; if ( value == vTRUE ) { if ( imageOn != NULL ) { vrect sr ; sr . Set ( 0 , 0 , imageOn -> GetWidth ( ) , imageOn -> GetHeight ( ) ) ; vdraw :: RectImageComposite ( imageOn , & sr , & indicator ) ; } else { vdraw :: SetColor ( vcolor :: GetBlack ( ) ) ; vdraw :: RectFill ( indicator . x + 1 , indicator . y + 1 , indicator . w - 2 , indicator . h - 2 ) ; } if ( title . length ( ) != 0 ) { vdraw :: MoveTo ( 3 + indicator . x + indicator . w + x_shift , indicator . y + 1 ) ; vdraw :: SetColor ( vcolor :: GetBlack ( ) ) ; vdraw :: Show ( title ) ; } } else { if ( imageOff != NULL ) { vrect sr ; sr . Set ( 0 , 0 , imageOff -> GetWidth ( ) , imageOff -> GetHeight ( ) ) ; vdraw :: RectImageComposite ( imageOff , & sr , & indicator ) ; } else { vdraw :: SetColor ( vcolor :: GetWhite ( ) ) ; vdraw :: RectFill ( indicator . x + 1 , indicator . y + 1 , indicator . w - 2 , indicator . h - 2 ) ; } if ( title . length ( ) != 0 ) { vdraw :: MoveTo ( 3 + indicator . x + indicator . w + x_shift , indicator . y + 1 ) ; vdraw :: SetColor ( vcolor :: GetBlack ( ) ) ; if ( alternate . length ( ) != 0 ) vdraw :: Show ( alternate ) ; else vdraw :: Show ( title ) ; } } vdraw :: GRestore ( ) ; }
parent window drawing function.
parent window drawing function .