Esempio n. 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();
        }
Esempio n. 2
0
 void addRemoveButtons_VisibilityChanged(AddRemoveButtons source, bool visible)
 {
     if (visible)
     {
         tableScroller.Height = splitter.Widget2Height - (addRemoveButtons.Height - gap);
     }
     else
     {
         tableScroller.Height = splitter.Widget2Height - tableScroller.Top;
     }
 }
Esempio n. 3
0
 public PropertiesTable(Table propertiesTable, EditUICallback uiCallback, AddRemoveButtons buttons)
 {
     this.uiCallback                   = uiCallback;
     this.propertiesTable              = propertiesTable;
     propertiesTable.CellValidating   += new EventHandler <TableCellValidationEventArgs>(propertiesTable_CellValidating);
     propertiesTable.CellValueChanged += new EventHandler(propertiesTable_CellValueChanged);
     addRemoveButtons                  = buttons;
     if (addRemoveButtons != null)
     {
         addRemoveButtons.AddButtonClicked    += addRemoveButtons_AddButtonClicked;
         addRemoveButtons.RemoveButtonClicked += addRemoveButtons_RemoveButtonClicked;
     }
 }