model_server/gala/src/sash.cxx
/*Used for dragging sashes, creates an instance of a sashdrag, which takes care
  of the rest of the drag*/
Used for dragging sashes, creates an instance of a sashdrag, which takes care
of the rest of the drag
Used for dragging sashes creates an instance of a sashdrag which takes care of the rest of the drag
int Sash::HandleButtonDown(vevent *event) 
{
    gInit (Sash::HandleButtonDown);
    if (event->GetBinding() != vname_Select)
	return vdialogItem::HandleButtonDown(event);
    if (hotSpotRect_.ContainsPoint(event->GetX(), event->GetY()))
      {
	const vrect *r = GetRect();
	SashDrag *drag;
	if (myType == Vertical)
	  drag = new SashDragVert;
	else drag = new SashDragHoriz;
	drag->SetSash(this);
	if (myType == Vertical) {
	  drag->SetMaxSize(r->GetWidth(), 5);
	  drag->SetOffset(event->GetX(),2);
	}
	else  {
	  drag->SetMaxSize(5, r->GetHeight());
	  drag->SetOffset(2, event->GetY());
	}
	drag->Start(event);
      }
      return vdialogItem::HandleButtonDown (event);
}
int Sash :: HandleButtonDown ( vevent * event ) { gInit ( Sash :: HandleButtonDown ) ; if ( event -> GetBinding ( ) != vname_Select ) return vdialogItem :: HandleButtonDown ( event ) ; if ( hotSpotRect_ . ContainsPoint ( event -> GetX ( ) , event -> GetY ( ) ) ) { const vrect * r = GetRect ( ) ; SashDrag * drag ; if ( myType == Vertical ) drag = new SashDragVert ; else drag = new SashDragHoriz ; drag -> SetSash ( this ) ; if ( myType == Vertical ) { drag -> SetMaxSize ( r -> GetWidth ( ) , 5 ) ; drag -> SetOffset ( event -> GetX ( ) , 2 ) ; } else { drag -> SetMaxSize ( 5 , r -> GetHeight ( ) ) ; drag -> SetOffset ( 2 , event -> GetY ( ) ) ; } drag -> Start ( event ) ; } return vdialogItem :: HandleButtonDown ( event ) ; }
Used for dragging sashes, creates an instance of a sashdrag, which takes care
of the rest of the drag
Used for dragging sashes creates an instance of a sashdrag which takes care of the rest of the drag
// If the event binding is not drag then let super class handle it // Get image to drag // Create drag and initialize /*Maxsize is the area that gets dragged around, in case you want to drag
	  an object and 10 pixels on each side or something*/ //return vTRUE because it handled whatever we needed it to