model_server/gala/src/view.cxx
// HandleButtonDown - Intercepts Mouse-Down events.
//    Tells the Viewer that this should become the current View.
//    Passes the event on to the container.
Intercepts Mouse-Down events.
Tells the Viewer that this should become the current View.
Passes the event on to the container.
Intercepts Mouse - Down events . Tells the Viewer that this should become the current View . Passes the event on to the container .
int Pane::HandleButtonDown(vevent *event) {
    if (myOwner && (childViewTree_ || !myOwner->ChildView) &&
        (!myOwner->Unsplitable_ && !myOwner->myOwnerPane)) {
        myOwner->MakeCurrent();
        if (event->GetBinding() == vname_Menu) {
            Viewer *vr = NULL;
            if (myOwner) vr = myOwner->GetViewer();
            if (vr) {
                Layer *layer = myOwner->GetLayer();
                if (layer) {
                    const char *menuName = layer->findPopupMenu (event->GetX(), event->GetY());
                    ViewerPopupMenu *menu = vr->findPopupMenu (menuName);
                    if (menu) {
                        menu->ExecutePopupCmd ();
                        vdialogItemList *itemList;
                        if (itemList = GetItemListIn()) {
                            itemList->TransformEvent (event);
                        }
                        menu->PlaceEvent (event);
                        menu->Popup (event);
                    }
                }
            }
        }
    }
    vcontainer::HandleButtonDown(event);
    return vTRUE;
}
int Pane :: HandleButtonDown ( vevent * event ) { if ( myOwner && ( childViewTree_ || ! myOwner -> ChildView ) && ( ! myOwner -> Unsplitable_ && ! myOwner -> myOwnerPane ) ) { myOwner -> MakeCurrent ( ) ; if ( event -> GetBinding ( ) == vname_Menu ) { Viewer * vr = NULL ; if ( myOwner ) vr = myOwner -> GetViewer ( ) ; if ( vr ) { Layer * layer = myOwner -> GetLayer ( ) ; if ( layer ) { const char * menuName = layer -> findPopupMenu ( event -> GetX ( ) , event -> GetY ( ) ) ; ViewerPopupMenu * menu = vr -> findPopupMenu ( menuName ) ; if ( menu ) { menu -> ExecutePopupCmd ( ) ; vdialogItemList * itemList ; if ( itemList = GetItemListIn ( ) ) { itemList -> TransformEvent ( event ) ; } menu -> PlaceEvent ( event ) ; menu -> Popup ( event ) ; } } } } } vcontainer :: HandleButtonDown ( event ) ; return vTRUE ; }
HandleButtonDown - Intercepts Mouse-Down events.
HandleButtonDown - Intercepts Mouse - Down events .
// Go down to the leaves of the view tree. // If the right mouse button was depressed, see if we need to display a popup menu. // find the popup menu in the viewer, and display it. // Ask the Layer what menu we should pop up.  Send the X and Y location of the pick // in case that has a bearing on which menu is choosen.