Questions tagged [gtkmm4]

gtkmm is the official C++ interface for the popular GUI library GTK+. Use this tag for questions specifically targeted to version 4

gtkmm is the official C++ interface for the popular GUI library GTK+. Use this tag for questions specifically targeted to version 4

43 questions
3
votes
1 answer

Trouble getting gtkmm-4.0 to work on macOS Monterey

I'm having trouble getting gtkmm-4.0 to work on Mac OS Monterey. Here is a simple C++ application that uses gtkmm4. // helloworld.cpp #include class MyWindow : public Gtk::Window { public: MyWindow(); }; MyWindow::MyWindow() { …
ktm5124
  • 11,861
  • 21
  • 74
  • 119
3
votes
1 answer

Example of gtkmm 4 FileChooserNative code

I can't find code examples using Gtk::FileChooserNative to help me understand how to work with this class. Documentation from here isn't that helpful. My goal is to create a function which opens a native file chooser dialog and after the user…
2
votes
0 answers

Global Locale Warning using C++ and gtkmm

I'm working on a gui using gtkmm and everything is working, but I get a warning that I can't figure out: ** (process:28120): WARNING **: 13:08:38.752: Can't set the global locale to the user's preferred locale. locale::facet::_S_create_c_locale…
Zico
  • 127
  • 16
2
votes
0 answers

Integration of gtkmm4 app with MacOS menubar

Do gktmm4 has macOS menubar integration? ​While googling, I found out that for GTK2/3 there is gtk-mac-integration, but what about gtkmm4? I want my app to react on cmd+q and have working basic macOS menubar ( I mean item "App name" with about and…
1
vote
0 answers

How to fix invalid use of incomplete type when create a child class from Gtk::Menu?

when trying to create a custom menu class that is inherited from Gtk::Menu the following output containing invalid use of incomplete type is thrown main.cc:5:28: error: invalid use of incomplete type ‘class Gtk::Menu’ 5 | class AppMenu: public…
misha
  • 31
  • 5
1
vote
0 answers

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 don't know how to pass it all the way through…
Cheetaiean
  • 901
  • 1
  • 12
  • 26
1
vote
1 answer

How to use Gtk::CssProvider with gtkmm-4.0?

I'm trying to use Gtk::CssProvider with gtkmm-4.0 but it don't work. I would like to change background color button. //CSS style Glib::ustring data = "GtkButton {color: #00ffea;}"; auto provider = Gtk::CssProvider::create(); …
kramer
  • 177
  • 1
  • 4
  • 15
1
vote
1 answer

gtkmm: How do I use a custom widget in a GtkBuilder XML file?

I'm writing a gtkmm-4 application, and want to use a custom widget with GtkBuilder XML. If the widget is constructed from C++, it works fine. However, it doesn't render when constructed from XML. NOTE: This question might be considered a duplicate…
itzjackyscode
  • 970
  • 9
  • 27
1
vote
1 answer

How to move the Gtk::Entry cursor?

I'm trying to make a custom Gtk::Entry widget (gtkmm4) that accepts only numbers and shows text as currency. Decimal and thousand separators are automatically added to the text. So I derived from Gtk::Entry and connected the signal_changed() with a…
Xiconaldo
  • 45
  • 1
  • 2
  • 7
1
vote
0 answers

gtkmm-4.0 will not link on macOS Monterey

I'm having issues getting gtkmm-4.0 to link on macOS Monterey. I'm trying to compile this example program. #include class MyWindow : public Gtk::Window { public: MyWindow(); }; MyWindow::MyWindow() { set_title("Basic application"); …
dpc
  • 41
  • 1
  • 4
1
vote
2 answers

gtkmm4: hide Gtk::Video's Gtk::MediaControls

I'm not exactly a fan of how Gtk::Video's controls look and I want to expand on them with my own custom controls, but I'm not sure how to hide the default media controls. Is there any way that I can do this?
NintendoZaedus
  • 653
  • 3
  • 8
  • 22
1
vote
0 answers

gtkmm 4: Make widget to vertically fill the Gtk::HeaderBar

Is it possible for a Gtk::Widget, say a Gtk::Button to fill the Gtk::HeaderBar completely vertically? If it is indeed possible, how is this achieved? As seen in the above picture, there seems to be a small space between the top and bottom end of…
Andy Ef
  • 155
  • 1
  • 8
1
vote
2 answers

gtkmm 4: How to get X window ID from inside widget?

In gtkmm 4, how can one get the X Window ID of type XID as defined in X11/X.h, from inside a class, that inherits from Gtk::Widget?
Andy Ef
  • 155
  • 1
  • 8
1
vote
1 answer

How to get the XId of a Gtk::Window in Gtkmm4

I am using Gtkmm4, and lots of API has been removed. In Gtk3 one could use Gtk::Window::get_xid (inherited from Gdk::Window), but thats not possible anymore, because Gdk::Window has been renamed to Gdk::Surface, and Gtk::Window seems to not inherit…
TheEagle
  • 5,808
  • 3
  • 11
  • 39
0
votes
1 answer

gtkmm 4 - New filedialog class - handler not called until calling routine exits

I have been converting from gtkmm 4.8 to 4.10 and trying to replace the filechooserdialog with the new filedialog. My test code (below) finds that the routine that invokes, for example, dialog->save() will not wait until the handler is complete and…
SRB
  • 1
  • 2
1
2 3