gtkmm is the official C++ interface for the popular GUI library GTK+. Use this tag for questions specifically targeted to version 3
Questions tagged [gtkmm3]
187 questions
16
votes
5 answers
How to get native windows decorations on GTK3 on Windows 7+ and MSYS2
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…

kracejic
- 723
- 1
- 6
- 17
15
votes
2 answers
gtk_widget_add_tick_callback() and gtk_main_iteration()
I have two GTK windows
Normal (main) window that runs animation, draws stuff in callback registered by gtk_widget_add_tick_callback().
At some point secondary window is created that runs modal loop:
void show_modal()
{
GtkWindow* gw =…

c-smile
- 26,734
- 7
- 59
- 86
9
votes
2 answers
GTK: get rid of the system theme/CSS altogether
GTK3 applications can be styled and themed with CSS. How can I force GTK to use solely the CSS shipped with my application, instead of combining / cascading it with the theme installed on the user's system?
Why would one want to do that? In theory,…

Ichthyo
- 8,038
- 2
- 26
- 32
7
votes
1 answer
Wrapping text in GTK3 treeview
I have trouble getting TreeView in GTK3 to wrap text correctly.
I set it up to wrap in this way:
Gtk::TreeViewColumn* pColumn = mTreeView.get_column(2);
static_cast(pColumn->get_first_cell())
…

kracejic
- 723
- 1
- 6
- 17
6
votes
1 answer
GtkOverlay not passing through input events
The GtkOverlay widget has a special set_overlay_pass_through method to pass inputs through to underlying overlays. I want to use this feature to overlay a GtkDrawingArea over the UI to add drawings. Unfortunately, it does not work for me, no input…

tly
- 1,202
- 14
- 17
5
votes
1 answer
gtkmm: Simple example fails to compile: gtkmm.h: No such file or directory
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
int main(int argc, char *argv[])
{
auto app =
…

FreelanceConsultant
- 13,167
- 27
- 115
- 225
4
votes
1 answer
Gtk widget minimum and maximum width/height with resizable to true
I am new to gtk and using gtkmm-3.0, what i am trying hard is to set the minimum width and height for the gtk widget. I used set_size_request method but the widget is still crossing its min/max size when i resize the parent container.
my code looks…

Swapnil
- 389
- 5
- 22
4
votes
2 answers
GTKMM/C++11: How to create a custom composite widget out of other widgets?
I want to derive my own widget class and add standard widgets to this class to create a composite widget. Does anybody have an examples or suggesions on how to do this? For example, Suppose I want to create custom composite widget of 4 buttons.…

Bimo
- 5,987
- 2
- 39
- 61
3
votes
1 answer
Move the position of a Gtk::Widget inside the Gtk::Grid
I want to move the location of two widgets inside a grid. How can I do it? What I have got so far:
pWidget1->unparent();
pWidget2->unparent();
pGrid->attach(*(pWidget1), 0, 5);
pGrid->attach(*(pWidget2), 0, 7);
…

Muh Mah
- 35
- 5
3
votes
2 answers
Where can I find good documentation for Gtkmm?
It seems to be very difficult to find quality documentation on the topic of Gtkmm.
Is there good documentation for Gtkmm? If so, where can I find it?

BobMorane
- 3,870
- 3
- 20
- 42
3
votes
1 answer
How can I get cursor position with Gtkmm?
Which Gtkmm functions can help me get the position(x,y) of the cursor. According to this, C# has
Gdk.Display.Default.WarpPointer(Gdk.Display.DefaultScreen, 20, 20);
Windows has
GetCursorPos
Qt has
QCursor::pos()
Gtkmm has what?

Devab LLC
- 115
- 1
- 8
3
votes
1 answer
Distribute a glade file inside an application
Before I start, I know of the existence of GResource, however I'm using gtkmm (C++), and I'm not sure if GResource works with C++. I can't find anything along the lines Glib::GResource, and I've been looking for a while.
Anyway, I'm writing a GUI…

Jacob Garby
- 773
- 7
- 22
3
votes
1 answer
Changing widget preoperties programmatically in gtkmm3 / gtk3
I've started porting some of my gtkmm2 applications to gtkmm3 and I am not clear on the correct mechanism for changing properties such as color on a widget from within the application in response to a change of state. Here is a short example that…

codeZonkey
- 51
- 5
3
votes
1 answer
How can I use gtk_window_set_transient_for ()?
I am using the library gtkmm. My code is almost perfect, I think because it compiles and I can execute it. But in the terminal when I clicked on open a file in my software that I made with gtkmm I can read this message :
Gtk-Message: GtkDialog…

Paul Hain
- 35
- 1
- 5
3
votes
1 answer
How to grey out a gtkmm menu item that cannot be clicked on
I am using the library gtkmm in C++. This is the part of the code where I define "Open":
Gtk::ImageMenuItem *menuOpen = Gtk::manage(new Gtk::ImageMenuItem(Gtk::Stock::OPEN));
menuFile->append(*menuOpen);
I want "Open" to be greyed out if I cannot…

user7375034
- 31
- 1