Created
June 9, 2012 14:47
-
-
Save thiagojedi/2901251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$Id: main.cc 836 2007-05-09 03:02:38Z jjongsma $ -*- c++ -*- | |
/* gtkmm example Copyright (C) 2002 gtkmm development team | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License version 2 | |
* as published by the Free Software Foundation. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program; if not, write to the Free Software | |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
*/ | |
#include <gtkmm.h> | |
int main(int argc, char *argv[]) | |
{ | |
Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example"); | |
Gtk::Window *janela = new Gtk::Window(); | |
Glib::RefPtr<Gio::SimpleAction> acoes = Gio::SimpleAction::create("quit"); | |
Glib::RefPtr<Gio::Menu> menu = Gio::Menu::create(); | |
menu->append("Sair daqui", "quit"); | |
app->set_app_menu(menu); | |
//Shows the window and returns when it is closed. | |
return app->run(*janela); | |
} | |
/* Pra compilar: | |
* g++ arquivo.cc -o aplicacao `pkg-config --libs --cflags gtkmm-3.0` | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment