// Constructor private NoteBookLabel(DI.Diagram diagram) : base(1, 3, false) { _parent = null; _diagram = diagram; //this must change depending of the diagram's type string diagramType = ((DI.SimpleSemanticModelElement)diagram.SemanticModel).TypeInfo; _icon = GetIcon(diagramType); //_icon = new Gdk.Pixbuf (new Gdk.Colorspace(), false, 8, 15, 15); //_icon.Fill (0xffff0000); // Attach(new Gtk.Image(_icon), 0, 1, 0, 1); // _label = new Label(_diagram.Name); Attach(_label, 1, 2, 0, 1); // Image image = new Image(); image.Stock = Gtk.Stock.Close; _close_button = new Button(); _close_button.Add(image); _close_button.HeightRequest = 20; _close_button.WidthRequest = 20; _close_button.Relief = Gtk.ReliefStyle.None; _close_button.Clicked += OnCloseButtonClicked; Tooltips ttips = new Tooltips (); ttips.SetTip (_close_button, GettextCatalog.GetString ("Close diagram"), GettextCatalog.GetString ("Close diagram")); //_close_button. Attach(_close_button, 2, 3, 0, 1); ShowAll(); }
public CanvasArea() : base(false, 0) { _notebook = new NoteBook (this); PackEnd (_notebook); _toolbarWidget = null; ShowAll (); }
private Hub() { _currentNotebook = null; _draggedElement = null; _filename = String.Empty; ClearElementsList(); _broadcaster = new CentralBroadcaster(); _eventQueue = new EventQueue(_broadcaster); }
// Adds a view to the hub; the view will be notified when events arise. public void AddView(IView view) { _broadcaster.AddView (view); Tree tree = view as Tree; if (tree != null) { tree.DiagramNameChanged += DiagramNameChanged; } NoteBook nbook = view as NoteBook; if (nbook != null) { _currentNotebook = nbook; } view.SetBroadcaster(_eventQueue); }
public NoteBookLabel(NoteBook parent, DI.Diagram diagram) : this(diagram) { _parent = parent; }