gtkmm3

Create a signal with Gtkmm

别说谁变了你拦得住时间么 提交于 2019-12-25 04:24:11
问题 I am using the gtkmm library with C++, and I am trying to create a signal which allows to change current tab, but it does not work. Actually I think the problem comes from this line: menuit->signal_activate().connect([&bo]() {bo->next_page();}); Where: menuit = Gtk::MenuItem bo = Gtk::Notebook The code compiles well, but when executing I get this line : Segmentation fault (program exited with code: 139) Thank you a lot for your help ! 回答1: menuit->signal_activate().connect([&bo]() {bo->next

gtkmm: Simple example fails to compile: gtkmm.h: No such file or directory

丶灬走出姿态 提交于 2019-12-24 19:20:01
问题 I am working through the gtkmm documentation. I have started by trying to compile the "Simple Example". Here is the code. It can also be found here. /// SimpleExample.cpp #include <gtkmm.h> int main(int argc, char *argv[]) { auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base"); Gtk::Window window; window.set_default_size(200, 200); return app->run(window); } I have tried to compile this using g++ SimpleExample.cpp -o SimpleExample `pkg-config gtkmm-3.0 --cflags --libs`

Cannot embed gnuplot x11 window into Gtk3 socket

风格不统一 提交于 2019-12-24 02:59:06
问题 I'm creating Gtk::Socket in my Gtk3 (actually, gtkmm) application and trying to embed gnuplot's window into it. But it does not work: the socket remains to stay as a black rectangle, while gnuplot window appears standalone elsewhere. Meanwhile, Gtk::Plug plugs into this socket perfectly. In Gtk2 this trick with gnuplot works well too. Here is socket.cpp #include <iostream> #include <fstream> #include <gtkmm.h> #include <gtkmm/socket.h> using namespace std; void plug_added(){ cout << "A plug

catch mouse motion in gtkmm

怎甘沉沦 提交于 2019-12-12 03:54:41
问题 I am trying to catch the mouse motion when I hold the mouse middle button. The goal is to implement a rotation feature in an stl viewer. I found the event mask BUTTON2_MOTION_MASK . But I have a hard time figuring out which signal catches it. Here's the two line I use to create and hook the event. These two line are inside a GtkApplicationWindow Constructor. glWidget.add_events(Gdk::BUTTON2_MOTION_MASK); glWidget.signal_motion_notify_event().connect(sigc::mem_fun(*this,&mainWindow::rotate));

How to get native windows decorations on GTK3 on Windows 7+ and MSYS2

我与影子孤独终老i 提交于 2019-12-03 11:51:47
问题 I am trying to port my application from linux to windows and I have a problem with theming. In linux this works out of a box, just compile it and application is using good theme and looks native. I have installed gtkmm3 and gtk3 in MSYS2 and I am building it with CMake. This is OK, I had to copy all dlls to directory with binary to be able to execute it. I did not copy anything else. I am trying to create "unzip and execute" package. My problem is, that application looks out of place. It does

How to get native windows decorations on GTK3 on Windows 7+ and MSYS2

天大地大妈咪最大 提交于 2019-12-03 02:19:00
I am trying to port my application from linux to windows and I have a problem with theming. In linux this works out of a box, just compile it and application is using good theme and looks native. I have installed gtkmm3 and gtk3 in MSYS2 and I am building it with CMake. This is OK, I had to copy all dlls to directory with binary to be able to execute it. I did not copy anything else. I am trying to create "unzip and execute" package. My problem is, that application looks out of place. It does not look native at all. There are shadows around the window, which is fine in Windows10, but in