Inheritance: MonoHotDraw.ContainerCanvas, IDrawingView
        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 (); };
        }
Exemple #2
0
        public MainWindow()
            : base(Gtk.WindowType.Toplevel)
        {
            Build ();

            View = new StandardDrawingView (this);
            scrolledwindow.Add((Widget) View);
            Tool = new SelectionTool(this);
        }
Exemple #3
0
        public SteticComponent()
        {
            this.Build();

            View = new StandardDrawingView (this);
            this.scrolledwindow.Add ((Widget) View);
            Tool = new SelectionTool (this);
            UndoManager = new UndoManager();
            UndoManager.StackChanged += delegate {
                OnUndoStackChanged();
            };
        }
Exemple #4
0
 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 ();
 }
Exemple #5
0
        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 ();
        }