public ModelerCanvas() { this.ContentName = GettextCatalog.GetString ("DB Modeler"); this.IsViewOnly = true; //Create model view-controller environment View = new StandardDrawingView (this); _controller = new modelController (View,this); //Create database designer canvas environment widget = new ModelerCanvasWidget (this, _controller); widget.getScroller ().SetSizeRequest (200, 200); widget.getScroller ().BorderWidth = 1; widget.getScroller ().Add ((Widget)View); Tool = new SelectionTool (this); widget.getScroller ().ShowAll (); //Add drag and drop support TargetEntry[] te2 = new TargetEntry[] { new Gtk.TargetEntry ("table/relationship", 0, 7777) }; ScrolledWindow xscroller = widget.getScroller (); Gtk.Drag.DestSet (xscroller, DestDefaults.All, te2, Gdk.DragAction.Copy); xscroller.DragDataReceived += OnDragDataReceived; //todo: fix this undo manager _undoManager = new UndoManager (); UndoManager.StackChanged += delegate { UpdateUndoRedoSensitiveness (); }; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build (); View = new StandardDrawingView (this); scrolledwindow.Add((Widget) View); Tool = new SelectionTool(this); }
public SteticComponent() { this.Build(); View = new StandardDrawingView (this); this.scrolledwindow.Add ((Widget) View); Tool = new SelectionTool (this); UndoManager = new UndoManager(); UndoManager.StackChanged += delegate { OnUndoStackChanged(); }; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build (); _undoManager = new UndoManager (); View = new StandardDrawingView (this); _scrolledwindow.Add ((Widget) View); Tool = new SelectionTool (this); UndoManager.StackChanged += delegate { UpdateUndoRedoSensitiveness (); }; ShowAll (); }
public SteticComponent() { this.Build(); View = new StandardDrawingView(this); this.Add((Widget)View); m_selectionTool = new SelectionTool(this); SetSelectionTool(); UndoManager = new UndoManager(); UndoManager.StackChanged += delegate { OnUndoStackChanged(); }; }
protected AbstractDesigner(int undoBufferSize) { tool = new SelectionTool (this); View = new StandardDrawingView (this); UndoBufferSize = undoBufferSize; UndoManager = new UndoManager (UndoBufferSize); UndoManager.StackChanged += delegate { OnStackChanged (); }; CommandList = new List<ICommand> (); RebuildCommandList (); window = new ScrolledWindow (); window.Add ((Widget) View); window.ShowAll (); }