コード例 #1
0
        public DebugVisualizer(StandaloneController standaloneController)
            : base("Developer.GUI.DebugVisualizer.DebugVisualizer.layout")
        {
            this.medicalController               = standaloneController.MedicalController;
            this.pluginManager                   = medicalController.PluginManager;
            standaloneController.SceneLoaded    += standaloneController_SceneLoaded;
            standaloneController.SceneUnloading += standaloneController_SceneUnloading;

            uiCallback = new GuiFrameworkUICallback();

            tree         = new Tree((ScrollView)window.findWidget("TreeScroller"));
            editTreeView = new EditInterfaceTreeView(tree, uiCallback);

            propertiesForm = new ScrollablePropertiesForm((ScrollView)window.findWidget("TableScroller"), uiCallback);

            objectEditor = new ObjectEditor(editTreeView, propertiesForm, uiCallback);

            this.Resized += DebugVisualizer_Resized;

            currentScene = standaloneController.MedicalController.CurrentScene;

            splitter = new Splitter(window.findWidget("Splitter"));
            splitter.Widget1Resized += a => tree.layout();
            splitter.Widget2Resized += a => propertiesForm.layout();
        }
コード例 #2
0
        public GenericPropertiesFormComponent(MyGUIViewHost viewHost, GenericPropertiesFormView genericEditorView)
            : base(genericEditorView.HorizontalAlignment ? "Medical.GUI.Editor.GenericEditor.GenericEditorComponent.layout" : "Medical.GUI.Editor.GenericEditor.GenericEditorVerticalComponent.layout", viewHost)
        {
            Widget window = this.widget;

            this.name             = genericEditorView.Name;
            this.editorController = genericEditorView.EditorController;

            tree         = new Tree((ScrollView)window.findWidget("TreeScroller"));
            editTreeView = new EditInterfaceTreeView(tree, genericEditorView.EditUICallback);

            //This class does not use the add / remove buttons from the layout, so hide them
            Widget addRemovePanel = widget.findWidget("AddRemovePanel");

            addRemovePanel.Visible = false;

            tableScroller    = (ScrollView)widget.findWidget("TableScroller");
            table            = new ResizingTable(tableScroller);
            addRemoveButtons = new AddRemoveButtons((Button)widget.findWidget("Add"), (Button)widget.findWidget("Remove"), widget.findWidget("AddRemovePanel"));
            addRemoveButtons.VisibilityChanged += addRemoveButtons_VisibilityChanged;
            addRemoveButtons_VisibilityChanged(addRemoveButtons, addRemoveButtons.Visible);
            propTable = new PropertiesTable(table, genericEditorView.EditUICallback, addRemoveButtons);

            propertiesForm = new ScrollablePropertiesForm(tableScroller, genericEditorView.EditUICallback);

            contextualProperties = new ContextualPropertiesEditor(propertiesForm, propTable);

            objectEditor = new ObjectEditor(editTreeView, contextualProperties, genericEditorView.EditUICallback);

            EditInterfaceHandler editInterfaceHandler = viewHost.Context.getModel <EditInterfaceHandler>(EditInterfaceHandler.DefaultName);

            if (editInterfaceHandler != null)
            {
                editInterfaceHandler.setEditInterfaceConsumer(this);
            }

            widget.RootKeyChangeFocus += new MyGUIEvent(widget_RootKeyChangeFocus);

            CurrentEditInterface = genericEditorView.EditInterface;

            gap = tableScroller.Bottom - addRemoveButtons.Top;

            splitter = new Splitter(widget.findWidget("Splitter"));
            splitter.Widget1Resized += split => tree.layout();
            splitter.Widget2Resized += split =>
            {
                if (contextualProperties.CurrentEditor == propertiesForm)
                {
                    propertiesForm.layout();
                }
                else
                {
                    table.layout();
                }
            };
        }
コード例 #3
0
        public DebugVisualizer(PluginManager pluginManager, SceneController sceneController)
            : base("Anomaly.GUI.DebugVisualizer.DebugVisualizer.layout")
        {
            this.pluginManager   = pluginManager;
            this.sceneController = sceneController;

            uiCallback = new GuiFrameworkUICallback();

            tree         = new Tree((ScrollView)window.findWidget("TreeScroller"));
            editTreeView = new EditInterfaceTreeView(tree, uiCallback);

            propertiesForm = new ScrollablePropertiesForm((ScrollView)window.findWidget("TableScroller"), uiCallback);

            objectEditor = new ObjectEditor(editTreeView, propertiesForm, uiCallback);

            this.Resized += DebugVisualizer_Resized;

            currentScene = sceneController.CurrentScene;

            splitter = new Splitter(window.findWidget("Splitter"));
            splitter.Widget1Resized += a => tree.layout();
            splitter.Widget2Resized += a => propertiesForm.layout();
        }