Example #1
0
        public MDIObjectEditor(String caption, String persistName, bool horizontal = true)
            : base(horizontal ? HorizontalLayoutName : VerticalLayoutName, persistName)
        {
            window.Caption = caption;

            uiCallback = new GuiFrameworkUICallback();

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

            addRemoveButtons = new AddRemoveButtons((Button)window.findWidget("Add"), (Button)window.findWidget("Remove"), window.findWidget("AddRemovePanel"));
            addRemoveButtons.VisibilityChanged += addRemoveButtons_VisibilityChanged;

            tableScroller = (ScrollView)window.findWidget("TableScroller");
            table         = new ResizingTable(tableScroller);
            propTable     = new PropertiesTable(table, uiCallback, addRemoveButtons);

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

            this.Resized += DebugVisualizer_Resized;

            gap = tableScroller.Bottom - addRemoveButtons.Top;

            splitter = new Splitter(window.findWidget("Splitter"));
            splitter.Widget1Resized += split => tree.layout();
            splitter.Widget2Resized += split => table.layout();
        }
Example #2
0
 public ObjectEditor(EditInterfaceTreeView treeView, PropertyEditor propEditor, GuiFrameworkUICallback uiCallback)
 {
     this.treeView = treeView;
     treeView.EditInterfaceSelectionChanging += treeView_EditInterfaceSelectionChanging;
     treeView.EditInterfaceSelectionChanged  += treeView_EditInterfaceSelectionChanged;
     this.propEditor = propEditor;
     this.uiCallback = uiCallback;
 }
Example #3
0
 public PropertiesFormButton(EditInterface editInterface, EditInterfaceCommand command, GuiFrameworkUICallback uiCallback, Widget parent)
 {
     this.editInterface = editInterface;
     this.uiCallback    = uiCallback;
     this.command       = command;
     button             = (Button)parent.createWidgetT("Button", "Button", 0, 0, ButtonWidth, ButtonHeight, Align.Default, "");
     button.Caption     = command.Name;
     button.ForwardMouseWheelToParent = true;
     layoutContainer          = new MyGUILayoutContainer(button);
     button.MouseButtonClick += new MyGUIEvent(button_MouseButtonClick);
 }
        /// <summary>
        /// Open a text editor that disposes when it is closed.
        /// </summary>
        /// <returns></returns>
        public static PopupGenericEditor openEditor(EditInterface editInterface, GuiFrameworkUICallback uiCallback, int left, int top, int width, int height)
        {
            PopupGenericEditor editor = new PopupGenericEditor(editInterface, uiCallback, width, height);

            editor.show(left, top);
            editor.Hidden += (source, e) =>
            {
                ((PopupGenericEditor)source).Dispose();
            };
            return(editor);
        }
        public PopupGenericEditor(EditInterface editInterface, GuiFrameworkUICallback uiCallback, int width, int height)
            : base("Anomalous.GuiFramework.Editor.GUI.PopupGenericEditor.PopupGenericEditor.layout")
        {
            widget.setSize(width, height);

            propertiesScroll             = (ScrollView)widget.findWidget("PropertiesScroll");
            propertiesForm               = new ScrollingExpandingEditInterfaceViewer(propertiesScroll, uiCallback);
            propertiesForm.EditInterface = editInterface;
            propertiesForm.layout();
            propertiesForm.RootNode.expandChildren();

            Button close = (Button)widget.findWidget("Close");

            close.MouseButtonClick += close_MouseButtonClick;
        }
Example #6
0
        public ExpandingNode(EditInterface editInterface, Widget parentWidget, GuiFrameworkUICallback uiCallback, ExpandingNode parent = null)
            : base("Anomalous.GuiFramework.Editor.GUI.ExpandingEditInterfaceViewer.ExpandingNode.layout")
        {
            this.uiCallback = uiCallback;
            this.parent     = parent;

            widget.attachToWidget(parentWidget);
            defaultHeight = widget.Height;

            caption         = (TextBox)widget.findWidget("Caption");
            caption.Caption = editInterface.getName();

            expandButton = new CheckButton((Button)widget.findWidget("ExpandButton"));
            expandButton.CheckedChanged += new MyGUIEvent(expandButton_CheckedChanged);

            childArea      = widget.findWidget("ChildArea");
            propertiesForm = new PropertiesForm(childArea, uiCallback);
            propertiesForm.LayoutChanged += propertiesForm_LayoutChanged;

            this.editInterface = editInterface;
            editInterface.OnSubInterfaceAdded   += editInterface_OnSubInterfaceAdded;
            editInterface.OnSubInterfaceRemoved += editInterface_OnSubInterfaceRemoved;
        }
 public ScrollablePropertiesForm(ScrollView scrollView, GuiFrameworkUICallback uiCallback)
     : base(scrollView, uiCallback)
 {
     this.scrollView = scrollView;
 }
Example #8
0
 public ScrollingExpandingEditInterfaceViewer(ScrollView scrollView, GuiFrameworkUICallback uiCallback)
     : base(scrollView, uiCallback)
 {
     this.scrollView = scrollView;
 }
Example #9
0
 public ExpandingEditInterfaceViewer(Widget parentWidget, GuiFrameworkUICallback uiCallback)
 {
     this.parentWidget = parentWidget;
     this.uiCallback   = uiCallback;
 }
Example #10
0
 public PropertiesForm(Widget widget, GuiFrameworkUICallback uiCallback)
 {
     this.uiCallback = uiCallback;
     this.widget     = widget;
 }