separating out the file for header
This commit is contained in:
+4
-16
@@ -2,22 +2,15 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class MyWindow : public Gtk::Window {
|
#include "main.h"
|
||||||
public:
|
|
||||||
MyWindow();
|
|
||||||
virtual ~MyWindow();
|
|
||||||
|
|
||||||
public:
|
|
||||||
Gtk::Button button;
|
|
||||||
void startCapture();
|
|
||||||
};
|
|
||||||
|
|
||||||
MyWindow::MyWindow() {
|
MyWindow::MyWindow() {
|
||||||
set_title("Basic application");
|
set_title("Basic application");
|
||||||
|
|
||||||
Gtk::Button button("start capture");
|
Gtk::Button button("start capture");
|
||||||
|
|
||||||
button.signal_clicked().connect(sigc::mem_fun(*this, &MyWindow::startCapture));
|
button.signal_clicked().connect(
|
||||||
|
sigc::mem_fun(*this, &MyWindow::startCapture));
|
||||||
|
|
||||||
set_default_size(800, 450);
|
set_default_size(800, 450);
|
||||||
|
|
||||||
@@ -26,12 +19,7 @@ MyWindow::MyWindow() {
|
|||||||
|
|
||||||
MyWindow::~MyWindow() {}
|
MyWindow::~MyWindow() {}
|
||||||
|
|
||||||
void MyWindow::startCapture() {
|
void MyWindow::startCapture() { std::cout << "start capture" << std::endl; }
|
||||||
std::cout << "start capture" << std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
auto app = Gtk::Application::create("org.gtkmm.examples.base");
|
auto app = Gtk::Application::create("org.gtkmm.examples.base");
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#include <gtkmm.h>
|
||||||
|
|
||||||
|
class MyWindow : public Gtk::Window {
|
||||||
|
public:
|
||||||
|
MyWindow();
|
||||||
|
virtual ~MyWindow();
|
||||||
|
|
||||||
|
public:
|
||||||
|
Gtk::Button button;
|
||||||
|
void startCapture();
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user