public static void NextPlayer(string name) { var but = new Gtk.Button( ); but.TooltipMarkup = "Po kliknutí bude hrát další hráč"; HBox hbox = new HBox(); global::Gtk.Image im = new global::Gtk.Image(); Label l = new Label(); l.Markup = "Na tahu je hráč:\n <b>" + name + "</b>\n\nOK"; hbox.PackStart(im); hbox.PackEnd(l); but.Add(hbox); var win = new Gtk.Window(Gtk.WindowType.Toplevel); but.Clicked += delegate { win.HideAll(); win.Dispose(); win.Destroy(); }; win.Add(but); win.Fullscreen(); win.ShowAll(); }
private void FullscreenHandler(bool fullscreen) { // Note: Since the video window is override-redirect, we // need to fullscreen the main window, so the window manager // actually knows we are actually doing stuff in fullscreen // here. The original primary window fullscreen state is // stored, so when we can restore it appropriately is_fullscreen = fullscreen; if (fullscreen) { primary_window.Fullscreen(); MoveVideoExternal(true); video_window.Show(); fullscreen_adapter.Fullscreen(video_window, true); screensaver.Inhibit(); } else { video_window.Hide(); screensaver.UnInhibit(); fullscreen_adapter.Fullscreen(video_window, false); video_window.Hide(); if (!primary_window_is_fullscreen) { primary_window.Unfullscreen(); } } }
void OnFullscreen(object sender, EventArgs args) { if (full_screen == false) { app_window.Fullscreen(); } else { app_window.Unfullscreen(); } full_screen = !full_screen; }
private void OnFullScreen(object o, EventArgs args) { Gtk.ToggleAction action = this["FullScreenAction"] as Gtk.ToggleAction; if (action == null) { return; } if (Fullscreen != null) { Fullscreen(action.Active); return; } GtkElementsService service = ServiceManager.Get <GtkElementsService> (); if (service == null || action == null) { return; } Gtk.Window window = service.PrimaryWindow; if (window == null) { return; } else if (action.Active) { window.Fullscreen(); } else { window.Unfullscreen(); } }
public static void NextPlayer(string name) { var but = new Gtk.Button( ); but.TooltipMarkup = "Po kliknutí bude hrát další hráč"; HBox hbox = new HBox(); global::Gtk.Image im = new global::Gtk.Image (); Label l = new Label(); l.Markup = "Na tahu je hráč:\n <b>" + name + "</b>\n\nOK"; hbox.PackStart( im ); hbox.PackEnd( l ); but.Add( hbox ); var win = new Gtk.Window( Gtk.WindowType.Toplevel ); but.Clicked += delegate { win.HideAll(); win.Dispose(); win.Destroy(); }; win.Add( but ); win.Fullscreen(); win.ShowAll(); }
private void DefaultFullscreen (Window window, bool fullscreen) { if (fullscreen) { window.Fullscreen (); } else { window.Unfullscreen (); } }
public void Fullscreen (Window window, bool fullscreen) { is_fullscreen = fullscreen; // Create the Bacon X11 Resizer if we haven't before or the window changes if (resize == null || resize.Window != window) { if (resize != null) { resize.Dispose (); } resize = new BaconResize (window); Log.DebugFormat ("X11 Fullscreen Window Set (HaveXVidMode = {0})", resize.HaveXVidMode); } // Do the default GTK fullscreen operation if (fullscreen) { window.Fullscreen (); } else { window.Unfullscreen (); } // Skip if we don't support xvidmode, otherwise do the good resizing if (!resize.HaveXVidMode) { return; } if (fullscreen) { resize.Resize (); } else { resize.Restore (); } }
// functions public static Gtk.Window AppInit() { // starting init of the window Gtk.Window MyWin = new Gtk.Window(MainWindowTitle); MyWin.Fullscreen(); /************************************************** * testing boxes ***************************************************/ //defining elements Alignment Align = new Alignment(1, 0, 0, 0); Align.SetPadding(100, 0, 10, 10); VBox main_menu = new VBox(false, 10); HBox menu1 = new HBox(false, 0); Label menu1_label = new Label("Menu 1"); Button add = new Button(); add.Label = " add"; Button delete = new Button(); delete.Label = "delete"; HBox menu2 = new HBox(false, 0); Label menu2_label = new Label("Menu2"); Button view = new Button("view"); Button hide = new Button("hide"); VBox menu3 = new VBox(false, 0); Label menu3_title = new Label("Menu3"); Notebook content = new Notebook(); menu1.Add(menu1_label); menu1.Add(add); menu1.Add(delete); menu2.Add(menu2_label); menu2.Add(view); menu2.Add(hide); menu3.Add(menu3_title); menu3.Add(content); main_menu.Add(menu1); main_menu.Add(menu2); main_menu.Add(menu3); // piling elements ... Align.Add(main_menu); // launch MyWin.Add(Align); /* * HBox hbox = new HBox(false, 3); * * Alignment halign = new Alignment(0, 0, 0, 0); * * Button cutton1 = new Button("Button1"); * Button cutton2 = new Button("Button2"); * cutton1.SetSizeRequest(70,30); * cutton2.SetSizeRequest(70,30); * * * hbox.Add(cutton1); * hbox.Add(cutton2); * * halign.Add(hbox); * MyWin.Add(halign); */ // keypress Handle MyWin.KeyPressEvent += KeyEvents; // ending the init of the window MyWin.ShowAll(); return(MyWin); }