SetFocus() private méthode

private SetFocus ( ) : void
Résultat void
Exemple #1
0
        void OnTabPress(object s, EventArgs args)
        {
            CurrentTab = Array.IndexOf(box.Children, s);
            DockItemTitleTab t = (DockItemTitleTab)s;

            DockItem.SetFocus(t.Page);
            QueueDraw();
        }
Exemple #2
0
        void OnTabPress(object s, Gtk.ButtonPressEventArgs args)
        {
            CurrentTab = Array.IndexOf(box.Children, s);
            Tab t = (Tab)s;

            DockItem.SetFocus(t.Page);
            QueueDraw();
        }
Exemple #3
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 #4
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
             if (autoShowFrame != null && autoShowFrame.ContainerWindow != null && autoShowFrame.ContainerWindow != (Gtk.Window)Toplevel)
             {
                 autoShowFrame.ContainerWindow.Present();
             }
             it.SetFocus();
             ScheduleAutoHide(false);
             return(false);
         });
     }
 }
Exemple #5
0
        bool LoadLayout(string layoutName)
        {
            DockLayout dl;

            if (!layouts.TryGetValue(layoutName, out dl))
            {
                return(false);
            }

            var focus = GetActiveWidget();

            container.LoadLayout(dl);

            // Keep the currently focused widget when switching layouts
            if (focus != null && focus.IsRealized && focus.Visible)
            {
                DockItem.SetFocus(focus);
            }

            return(true);
        }
 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();
     }
 }
		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 ();
		}