966 questions
1
vote
0
answers
87
views
How to move Gtk::Window position after program is executed under gtkmm4
Glib::RefPtr< Gdk::Display > display = Gdk::Display::get_default() ;
if( nullptr == display )
{
return ;
}
Gdk::Rectangle geo ;
Glib::RefPtr< Gio::ListModel > monitors = display->...
1
vote
0
answers
43
views
Gtkmm Drag-and-Drop: Value Check Fail in Drop Phase
I am attempting to implement drag-and-drop following the example from the Gtkmm book here:
https://gnome.pages.gitlab.gnome.org/gtkmm-documentation/sec-dnd-example.html
In the DragSource's prepare ...
0
votes
1
answer
38
views
Gtkmm: Drag-n-Drop DropTarget with Bytes Type
I am trying to implement drag-n-drop with Gtkmm4. Inside DragSource's prepare signal callback I return a ContentProvider:
// ...
char* buffer;
gsize length;
file->load_contents(buffer, length);
...
1
vote
2
answers
91
views
How do I read floating point numbers from file when using gtkmm? [closed]
I'm trying to write a gtkmm frontend for a project; it's my first time working with GUI. It seems that reading floating point numbers from files is problematic: I either only get to read the integer ...
0
votes
0
answers
32
views
How do I make a GTK (gtkmm) widget look like another?
I am using gtkmm 4 and need to make a subclass of ToggleButton look just like a tab of a Notebook. I have found out that most themes use the selector notebook > header > tabs > tab for those, ...
1
vote
0
answers
120
views
NixOS 24.05 - CMake not finding gtkmm3
When I run cmake .. in ./build, I get the output:
`-- Checking for module 'gtkmm3'
-- Package 'gtkmm3', required by 'virtual:world', not found
CMake Error at /nix/store/...
0
votes
1
answer
127
views
In C++, using gtkmm-3.0, how to connect a widget created in an XML file to a function
I am learning C++, and how to use gtkmm (I am using gtkmm version 3.24). I have created a simple window, with few widgets, but I am not able to connect a simple event with a simple function.
The ...
-1
votes
1
answer
205
views
How to add widgets (e.g. a button) to a window in a C++ application using gtkmm and builder XML file
I am working on a simple example of a GUI application written in C++ using gtkmm (version 3.24) and an external XML file.
Thanks to the answer to this other question I managed to create an empty ...
1
vote
1
answer
68
views
using a canvas in gtkmm, now for gtkmm 4
More than 10 years ago I started an application with a canvas widget (goocanvas) in gtkmm3.
My last question about this topic was: using a canvas in gtkmm application
Now I have to learn that gtkmm3 ...
0
votes
1
answer
721
views
How to correctly create a simple GTK application in C++ with header, class definition and builder XML external file?
I have learned how to create a simple GTK application using C++ and gtkmm-3.0.
So far I have learned two possible approaches, and I would like a third approach, which would be the merging of those two....
1
vote
1
answer
82
views
Derived Gtk::DrawingArea widget is not loaded from Glade builder file correctly
I am working on an embedded Linux project using gtk/gtkmm 3. I use Glade builder files to define the UI and load them during program runtime. That works fine.
Now I need a custom circular progress ...
0
votes
2
answers
195
views
How to listen to scroll events in GTKMM 4?
I have the following example, where I create a simple window with a scrollbar and a scroll event controller that connects the onScroll member function to handle the events:
#include <iostream>
#...
1
vote
1
answer
158
views
Catching a click signal on a Gtk::DrawingArea
I'm working on a speed-optimized fractal generator using Glade and C++ and I'm having some trouble getting my head around some gtkmm subtleties.
I'm trying to catch a click event from a Gtk::...
0
votes
0
answers
174
views
How to only show icon in GTK4 button?
I'm using a column view in GTK4 (gtkmm4). One of the columns is a C++ class inheriting from a Gtk::Grid and packs a couple of buttons. The buttons are set to have some standard icons to make the UI ...
0
votes
1
answer
139
views
In gtkmm-3.0, how do you use the Gtk::Widget::add_tick_callback function to call the on_tick function for a widget?
I'm trying to learn how to use gtk3. Using C, the gtk_widget_add_tick_callback function is very straightforward, and the gtk documentation is very easy to understand. I cannot for the life of me ...
0
votes
1
answer
130
views
Embed gettext translation (po) data into binary
Is there a way to embed the contents of po files and bind the text domain (~ bindtextdomain(GETTEXT_PACKAGE,...)) to that embedded data?
The background is that I'm building a GTK application with ...
3
votes
0
answers
57
views
(gtkmm, sfml) My music stream is experiencing stuttering
I want to build a music player using gtkmm and sfml but i am encountering stuttering with my music stream.
I tried using a separate thread for the music but i couldn't understand how to use Glib::...
0
votes
1
answer
160
views
Calling a method from a binding is giving a "no match for call" error
I am trying to make a wrapper for a Gtk click signal to hook into my event system. The Gtk way to handle click events would be like this:
auto button = new Gtk::Button();
button->signal_clicked()....
1
vote
0
answers
83
views
gtkmm3 how to move a window inside a Gtk::ScrolledWindow
I have a simple main window which contains a scrolled window and a canvas widget inside. If the size of the canvas is bigger than the scrolled window, the scroll bar appears and the canvas can be ...
2
votes
0
answers
1k
views
GTKMM3 related error while installing Cadabra on Windows
I'm trying to install Cadabra on Windows. Following the instructions, I inevitably get stuck near the very end, after cloning the repository and whilst using cmake. The error I am met with is:
CMake ...
0
votes
1
answer
126
views
Include Library into C++ Project using Cmake
I want to use gtkmm-4.0 in a C++ project. I installed it using msys. Now the gtmm-4.0.h file is saved at "C:\msys64\mingw64\include\gtkmm-4.0". And i have the following CMakeLists.txt file.
...
1
vote
0
answers
197
views
Abstract factory design pattern : issue handling abstractions
In a project, I have decided to try to hide all the widget toolkit details behind an abstract factory pattern. The concrete widget toolkit is gtkmm. Here is simple diagram showing the architecture I ...
0
votes
1
answer
69
views
can't associate Gtk::DrawingArea with its form from the glade file on c++
I'm writing a test task on c++ for a team where everything is written in gtk. I used to write purely under Qt and never gtk/gtkmm.
The program has widgets whose operation I seem to have figured out, ...
0
votes
1
answer
259
views
GTKMM 4.10 - Scrolled window - set adjustments (horizontal + vertical) - not automatically scrolling
I am trying to programatically scroll to a particular row and column within a Gtk::ColumnView which is contained in a scrolled window. The below code does fetch and set the adjustments correctly (I ...
0
votes
0
answers
62
views
Gtk::ComboBoxText select item with mouse on dropdown macOS Ventura 13.2.1 Gtkmm4
I have added a simple ComboBoxText widget to my programm, but I am unable to select any of the drop-down options with my mouse by clicking on the drop-down. I can however use my keyboard arrows and ...
2
votes
0
answers
147
views
How to get number of rows and columns of Gtk::Grid?
I want to get number of rows and columns of Gtk::Grid. But Gtk::Grid has no member function for it so I can't it. How to get number of rows and columns?
1
vote
1
answer
117
views
How to hide an image in a Gtk::Button
I've inherited a code that does this:
if (ok){
m_Test_Button.set_image(m_Image_OK);
m_Test_Button.set_image_position(Gtk::POS_RIGHT);
m_Test_Button.set_always_show_image(true);
}else{
...
1
vote
0
answers
21
views
error: G_TEST_SUBPROCESS_DEFAULT undeclared when building gtkmm-4.0
I was trying to install gtkmm-4.0 and since my distro only ships gtkmm-3.0 I decided to build myself.
Installed all the dependencies from the official gtkmm installation website and gave it a go.
...
1
vote
1
answer
137
views
Why can I not declare a top-level GTKMM objects?
I am old to GTK+ (C) but new to GTKMM and adapted a very simple example app from some example code.
#include <gtkmm/button.h>
#include <gtkmm/window.h>
#include <gtkmm/application.h>
...
1
vote
1
answer
180
views
How can I programmatically add a tab to a GTKmm notebook in C++?
I'm working on a GTKmm application(a simple text editor, as an exercise), in which I have a notebook to which I want to add a tab. The notebook shows, but the newly added tab doesn't.
I'm doing it in ...
1
vote
1
answer
1k
views
Change font of Gtk::Label
Using gtkmm 3.0 with c++, in a Gtk::Window, I have a Gtk::Label named "bezeichnung" showing text.
How can I change the font of this label?
There seems to be no function to set the font for a ...
1
vote
0
answers
124
views
gtkmm drag and drop - How to pass a message from drag source to drop destination on drag motion event?
I would like a gtkmm drag and drop destination to make decisions based on data from the source before the drop occurs. Is it possible to request the data from the "drag motion" callback? I ...
1
vote
1
answer
187
views
Adding Gstreamermm to gtkmm c++
Currently tried adapting gtkmm and gstreamermm test code throws run time error to a video instead of a sound and my program is saying a linking failed between m_source and m_sink. My understanding is ...
1
vote
1
answer
1k
views
Why are the build folders empty after running cmake command?
I am trying to follow the tutorial but I can't figure out why my build_debug and build_release are empty and nothing is compiled when I run the cmake -DCMAKE_BUILD_TYPE=Debug ../ followed by make
and ...
1
vote
0
answers
175
views
gtkmm pass values into constructor
I am trying to set up a vector of a varying amount of Gtk::ToggleButtons in a Gtk::Box of the main Gtk::Window, the amount of which would be determined by a value at the beginning of the program. I ...
0
votes
1
answer
145
views
Gtkmm 3 ComboBoxText how to disable options?
I have been trying several ways to get this done, but I am stuck, I can access the model, but I cannot access the view part to set the option disabled with set_sensitive
I cannot find any example or ...
0
votes
0
answers
68
views
Gtkmm 3.0 draw blinking shapes and use of timeouts
In a Gtk::DrawingArea I have a pixbuf showing the layout of my house. I draw the measured room temperatures on it. I also would like to draw the state of my shutters on it with some lines. When and ...
0
votes
1
answer
58
views
Make compiler warn about Gtkmm deprecations
I starting to look into porting my application from Gtkmm 3.24 to Gtkmm 4.x (not sure which version yet). For now, I am only trying to understand what exactly is deprecated and how much work is needed ...
0
votes
1
answer
140
views
GTK3 application doesn't show window when run from gdb
I am trying to debug my GTK3 application with the gdb command, but I can't seem to get it to work. When I run the command gdb ./myapp, it loads all the debug symbols successfully. However, when I then ...
0
votes
1
answer
380
views
How to add a separator to Gio::Menu
I'm writing an application using GTK3 and gtkmm. I'm adding a menu button to the header bar. So far, I got items to show up, but I can't add a separator.
Here's where I create the menu:
auto main_menu ...
1
vote
1
answer
98
views
gtkmm catch widget destruction event
I would like to add a sigc callback to the destruction of a widget. How can I connect so that when the widget is destroyed, my callback is called? There is no such signal on Gtk::Widget. Can I do it ...
1
vote
1
answer
297
views
Reading multiple files from FileChooserDialog GTK 3
I am trying to open a Gtkmm::FileChooserDialog to choose multiple files and print their paths along with filenames to a label. I can open the dialog and choose the files but I am having a hard time ...
8
votes
1
answer
2k
views
How to build a tree in GTK4 (>= 4.10)
As the document said, TreeView in GTK4 has been deprecated since 4.10. The recommended replacement for it is ColumnView. However, I can't find clear documentation or example about how to build a ...
1
vote
0
answers
219
views
Bazel - gtkmm library - missing dependencies
I have created a Bazel project (C++) and have tried to include the gtkmm library in my project.
I get the below error, that header files are missing, e.g.:
Showing Recent Messages
../mediapipe/...
1
vote
1
answer
379
views
Alternative to manually adding -I..library paths for every folder to tasks.json for the rest of my life?
In VS Code trying to use gtkmm and finding myself in a never ending loop of compile, find location of header file that wasn't found, then adding the library path to task.json args.
Is this going to ...
1
vote
1
answer
474
views
Gtkmm add/Remove widget leaks Why?
When I add a widget to container, then I remove it. Widget is leaked, why ?
I used a "MyWidget" to spy widget deletion but I get same result from a classic Gtk::Label.
Code below have been ...
0
votes
1
answer
148
views
Gtk::Widget missing set_visual() method in gtkmm-3.0
As seen in the Gtk documentation here there is a method to set the visual of the Widget which seems to be missing from gtkmm (C++ wrapper).
While trying to port a Gtk application from C to C++ using ...
1
vote
0
answers
1k
views
Clang Diagnostic Error on file outside CPP project - "Error While processing"
Using gtkmm in a cpp project in vscode, everything can build normally even though I have this error.
[{
"resource": "/d:/Dossiers/Repos/Cpp/Motion/src/main.cpp",
"...
0
votes
0
answers
67
views
How to add a regex to a gtkmm3 combo-box/Best way to grep a regex into a gtkmm3/c++ combo box?
I am working on a project to list items of a file in a gtkmm combo box.
//I declared the signal handler as
void on_combo_changed();
//And the widget
Gtk::ComboBoxText m_Combo;
//All
void ABC::...
-1
votes
2
answers
1k
views
Gtk is licenced under GPL and Gtkmm is under LGPL, but Gtkmm links with Gtk,am I allowed to relese my app without opensourcing it when I use Gtkmm? [closed]
Gtk is licensed under GPL and Gtkmm is under LGPL, but Gtkmm links with
Gtk.
am I allowed to relese my app without opensourcing it when I use Gtkmm only?