Exemple #1
0
        void OnTabPress(object s, Gtk.ButtonPressEventArgs args)
        {
            CurrentTab = Array.IndexOf(box.Children, s);
            Tab t = (Tab)s;

            DockItem.SetFocus(t.Page);
            QueueDraw();
        }
Exemple #2
0
 public void Present(bool giveFocus)
 {
     AutoShow();
     if (giveFocus)
     {
         GLib.Timeout.Add(200, delegate {
             // Using a small delay because AutoShow uses an animation and setting focus may
             // not work until the item is visible
             it.SetFocus();
             ScheduleAutoHide(false);
             return(false);
         });
     }
 }
Exemple #3
0
 internal void Present(DockItem it, bool giveFocus)
 {
     if (type == DockGroupType.Tabbed)
     {
         for (int n = 0; n < VisibleObjects.Count; n++)
         {
             DockGroupItem dit = VisibleObjects[n] as DockGroupItem;
             if (dit.Item == it)
             {
                 currentTabPage = n;
                 if (boundTabStrip != null)
                 {
                     boundTabStrip.CurrentPage = it.Widget;
                 }
                 break;
             }
         }
     }
     if (giveFocus && it.Visible)
     {
         it.SetFocus();
     }
 }
Exemple #4
0
 internal void Present(DockItem it, bool giveFocus)
 {
     if (type == DockGroupType.Tabbed) {
         for (int n=0; n<VisibleObjects.Count; n++) {
             DockGroupItem dit = VisibleObjects[n] as DockGroupItem;
             if (dit.Item == it) {
                 currentTabPage = n;
                 if (boundTabStrip != null)
                     boundTabStrip.CurrentPage = it.Widget;
                 break;
             }
         }
     }
     if (giveFocus && it.Visible)
         it.SetFocus ();
 }