separating out the file for header
This commit is contained in:
+4
-16
@@ -2,22 +2,15 @@
|
||||
#include <gtkmm.h>
|
||||
#include <iostream>
|
||||
|
||||
class MyWindow : public Gtk::Window {
|
||||
public:
|
||||
MyWindow();
|
||||
virtual ~MyWindow();
|
||||
|
||||
public:
|
||||
Gtk::Button button;
|
||||
void startCapture();
|
||||
};
|
||||
#include "main.h"
|
||||
|
||||
MyWindow::MyWindow() {
|
||||
set_title("Basic application");
|
||||
|
||||
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);
|
||||
|
||||
@@ -26,12 +19,7 @@ MyWindow::MyWindow() {
|
||||
|
||||
MyWindow::~MyWindow() {}
|
||||
|
||||
void MyWindow::startCapture() {
|
||||
std::cout << "start capture" << std::endl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MyWindow::startCapture() { std::cout << "start capture" << std::endl; }
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
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