Example #1
0
bool VRGuiBits::toggleFullscreen(GdkEventKey* k) {
    if (k->keyval != 65480) return false;
    static bool fs = false;
    fs = !fs;

    Gtk::Window* win; VRGuiBuilder()->get_widget("window1", win);
    Gtk::Separator* hs1; VRGuiBuilder()->get_widget("hseparator1", hs1);
    Gtk::Table* tab; VRGuiBuilder()->get_widget("table20", tab);
    Gtk::Notebook* nb1; VRGuiBuilder()->get_widget("notebook1", nb1);
    Gtk::Box* hb1; VRGuiBuilder()->get_widget("hbox1", hb1);

    if (fs) {
        win->fullscreen();
        nb1->hide();
        hb1->hide();
        tab->hide();
        hs1->hide();
        gtk_widget_hide(term_box);
    } else {
        win->unfullscreen();
        win->show_all();
    }

    return true;
}
Example #2
0
void ResolutionDialog::applyResolution( Gtk::Widget * widget, const int width, const int height )
{
	Gtk::Window * top = dynamic_cast< Gtk::Window * >( widget->get_toplevel() );
	
	widget->set_size_request( width, height );
	top->unmaximize();
	top->unfullscreen();
	top->resize( width, height );
}