Ejemplo n.º 1
0
        public override void doPress(MEvent eventArg)
        {
            // Begin marquee drawing (using OpenGL)
            // Get the start position of the marquee

            // Figure out which modifier keys were pressed, and set up the
            // listAdjustment parameter to reflect what to do with the selected points.
            if (eventArg.isModifierShift || eventArg.isModifierControl)
            {
                if (eventArg.isModifierShift)
                {
                    if (eventArg.isModifierControl)
                    {
                        // both shift and control pressed, merge new selections
                        listAdjustment = MGlobal.ListAdjustment.kAddToList;
                    }
                    else
                    {
                        // shift only, xor new selections with previous ones
                        listAdjustment = MGlobal.ListAdjustment.kXORWithList;
                    }
                }
                else if (eventArg.isModifierControl)
                {
                    // control only, remove new selections from the previous list
                    listAdjustment = MGlobal.ListAdjustment.kRemoveFromList;
                }
            }
            else
            {
                listAdjustment = MGlobal.ListAdjustment.kReplaceList;
            }

            // Extract the eventArg information
            eventArg.getPosition(ref start_x, ref start_y);
            view    = M3dView.active3dView;
            fsDrawn = false;
        }
Ejemplo n.º 2
0
        public override void doPress(MEvent eventArg)
        {
            // Begin marquee drawing (using OpenGL)
            // Get the start position of the marquee

            // Figure out which modifier keys were pressed, and set up the
            // listAdjustment parameter to reflect what to do with the selected points.
            if (eventArg.isModifierShift || eventArg.isModifierControl ) {
                if ( eventArg.isModifierShift ) {
                    if ( eventArg.isModifierControl ) {
                        // both shift and control pressed, merge new selections
                        listAdjustment = MGlobal.ListAdjustment.kAddToList;
                    } else {
                        // shift only, xor new selections with previous ones
                        listAdjustment = MGlobal.ListAdjustment.kXORWithList;
                    }
                } else if ( eventArg.isModifierControl ) {
                    // control only, remove new selections from the previous list
                    listAdjustment = MGlobal.ListAdjustment.kRemoveFromList;
                }
            } else {
                listAdjustment = MGlobal.ListAdjustment.kReplaceList;
            }

            // Extract the eventArg information
            eventArg.getPosition (ref start_x, ref start_y) ;
            view = M3dView.active3dView;
            fsDrawn = false;
        }