src/relpipe-out-gui.cpp
author František Kučera <franta-hg@frantovo.cz>
Tue, 22 Oct 2019 21:55:37 +0200
branchv_0
changeset 2 bca03092cdb6
parent 0 f28025ce355d
child 4 b2c40d783699
permissions -rw-r--r--
fix license version: GNU GPLv3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
2
bca03092cdb6 fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
0
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#include <cstdlib>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
#include <unistd.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <memory>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
#include <gtkmm.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
#include <relpipe/cli/CLI.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
#include <relpipe/cli/RelpipeCLIException.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
#include <relpipe/reader/Factory.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
#include <relpipe/reader/RelationalReader.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
#include <relpipe/reader/RelpipeReaderException.h>
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
using namespace relpipe::cli;
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
using namespace relpipe::reader;
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
int main(int argc, char** argv) {
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	setlocale(LC_ALL, "");
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	CLI::untieStdIO();
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	CLI cli(argc, argv);
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
	auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	Gtk::Window window;
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	window.set_default_size(640, 480);
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	window.set_title("relpipe-out-gui.gtk");
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
	return app->run(window);
f28025ce355d empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
}