Пример #1
0
        IVViewMenu createMenu()
        {
            CustomModeSettings settings = setup();

            SelectorDataContainer container = (SelectorDataContainer)settings.dataInstance;

            IVVSimpleMenuItem[] INTItems =
            {
                new VViewSimpleMenuItem("Part selector (tree-traversal)", container.selectorTree),
                new VViewSimpleMenuItem("Part selector (global list)",    container.selectorGlobal),
                new VViewSimpleCustomMenuItem("Zoom on selection:",       container.getZoom,        container.setZoom),
                new VViewSimpleCustomMenuItem("Affect symmetry:",         container.getSymm,        container.setSymm)
            };
            VViewSimpleMenu rootMenu = new VViewSimpleMenu(INTItems, "Part selector");

            container.selectorTree.setRoot((IVViewMenu)rootMenu);
            container.selectorGlobal.setRoot((IVViewMenu)rootMenu);
            container.CustomSettings = settings;
            rootMenu.setCustomSettings(settings);

            return(rootMenu);
        }
Пример #2
0
        IVViewMenu createMenu()
        {
            CustomModeSettings settings = setup();
            DiscoData          data     = (DiscoData)settings.dataInstance;

            //we dont need to, but if we want interaction in RPM we can create a menu
            //two options: either use a combination of VViewSimpleMenus, VViewSimpleMenuItems
            //and VViewSimpleCustomMenuItem, or...
            //Implement the IVViewMenu interface.

            IVVSimpleMenuItem[] INTItems =
            {
                new VViewSimpleCustomMenuItem("STROBE:", data.getStrobe, data.setStrobe)
            };
            VViewSimpleMenu rootMenu = new VViewSimpleMenu(INTItems, "DISCO MODE");

            //either way, all menus associated with a custom display mode must have that mode set
            rootMenu.setCustomSettings(settings);

            //finally, return the menu so that it can be hooked up to the list
            return(rootMenu);
        }