示例#1
0
        internal void SetFloatMode(Gdk.Rectangle rect)
        {
            if (floatingWindow == null)
            {
                ResetMode();
                SetRegionStyle(frame.GetRegionStyleForItem(this));

                floatingWindow = new DockFloatingWindow((Window)frame.Toplevel, GetTitle());

                VBox box = new VBox();
                box.Show();
                box.PackStart(TitleTab, false, false, 0);
                box.PackStart(Widget, true, true, 0);
                floatingWindow.Add(box);
                floatingWindow.DeleteEvent += delegate(object o, DeleteEventArgs a) {
                    if (behavior == DockItemBehavior.CantClose)
                    {
                        Status = DockItemStatus.Dockable;
                    }
                    else
                    {
                        Visible = false;
                    }
                    a.RetVal = true;
                };
            }
            floatingWindow.Move(rect.X, rect.Y);
            floatingWindow.Resize(rect.Width, rect.Height);
            floatingWindow.Show();
            if (titleTab != null)
            {
                titleTab.UpdateBehavior();
            }
            Widget.Show();
        }
        internal DockItem(DockFrame frame, string id, Component component = null)
        {
            this.frame = frame;
            this.id    = id;
            Content    = component;
            if (Content != null)
            {
                Icon = Content.ComponentInfo.Icon;
            }
            UpdateTitle();
            currentVisualStyle = regionStyle = frame.GetRegionStyleForItem(this);

            titleTab             = new DockItemTitleTab(this);
            titleTab.VisualStyle = currentVisualStyle;
            titleTab.SetTitle(Widget, Icon, Title);
            titleTab.ShowAll();
        }
示例#3
0
 internal DockItem(DockFrame frame, string id)
 {
     this.frame         = frame;
     this.id            = id;
     currentVisualStyle = regionStyle = frame.GetRegionStyleForItem(this);
 }
示例#4
0
 internal DockItem(DockFrame frame, string id)
 {
     this.frame = frame;
      this.id = id;
      currentVisualStyle = regionStyle = frame.GetRegionStyleForItem(this);
 }