Questions tagged [gtkmm3]

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

187 questions
1
vote
1 answer

Direct scrolling using Gtk::Viewport (gtkmm3)

I have a custom container which provides scrolling functionality by embedding a Gtk::Grid inside a Gtk::Viewport. The scrolling part works perfectly except for one glitch. Whenever an on_size_allocate event occurs it causes the property_value of the…
Mohith
  • 75
  • 7
1
vote
1 answer

Using button mnemonic doesn't update second spinbutton value

I made a sample Gtk::Spinbutton dialog program where the user can modify Width/Height values and see the changes (text) outputted on the main Gtk::Window I added two buttons; Cancel and OK, with mnemonics turned on set_use_underline() For testing…
1
vote
1 answer

Adjustment object not a widget type GtkBuilder

I can't use Gtk::Adjustment widget from my glade file. The program builds and runs with the following error: (test-glade-spinbutton:227780): gtkmm-CRITICAL **: 13:38:45.769: gtkmm: object `adjustment_width' (type=`gtkmm__GtkAdjustment') (in…
1
vote
1 answer

Gtk::Window add grid is not showing my child widgets

I attached two widgets to a grid; a label and a spinbutton, then added the grid to Gtk::Window I get blank output like this: #include class SpinButtonExample : public Gtk::Window { public: …
1
vote
1 answer

GTKmm entry to console output lags 1 character

So I am trying to make a program, which copies the input of an Gtk::Entry and outputs it to the console. However, currently when I enter the first character, nothing happens. Once I enter a second character, the first character gets printed, once I…
1
vote
1 answer

Is it OK to create Gtk::Builder from resource without implementing try/catch block?

Gtk::Builder::create_from_resource() throws the following exceptions when something goes wrong, for instance, the resource file wasn't found or there's a markup error in the Glade/UI file, etc BuilderError Glib::MarkupError Gio::ResourceError But…
1
vote
1 answer

What does GLib-GIO-CRITICAL **: g_application_run: assertion 'acquired_context' failed mean

I'm upgrading a very large flight simulation project to GTKMM 3 from 2.4. When running the Gtk::Application with a Gtk::ApplicationWindow on a separate thread from the main simulation thread, we receive multiple warnings: GLib-GIO-CRITICAL **:…
Jim Barnes
  • 11
  • 3
1
vote
0 answers

How to make GTK focus_out event fire based on child widgets recursively or how to check if none of children has focus

I have the following widget structure, I want to do some task when none of the child widgets of Gtk::Box has the keyboard focus. A user can type in search entry and Listbox contains suggestions. Gtk::Box | |-- SearchBar | |--SearchEntry |--…
1
vote
1 answer

Gtk::Window icon set with set_icon_name doesn't work on wayland

I'm trying to solve a synfig issue by testing out this sample program: #include #include class HelloWindow : public Gtk::Window { public: HelloWindow(); …
1
vote
0 answers

gtkmm3.0 and Css :active state selector for GtkButton state not applying changes

So I'm new with GUI development and I'm just implementing a user interface with C++ on a Raspbian OS using Gtkmm3.0 (GTK wrapper for c++). I'm trying to apply custom design to a button with CSS through a Gtk::CssProvider which works perfectly. css =…
zegeek
  • 11
  • 2
1
vote
1 answer

Programmatically select text in Gtk::TextView using Gtkmm

How can I select text in Gtk::TextView: starting from where the cursor is n number of characters backwards The documentation from developer.gnome.org doesn't seem to help.
Leone
  • 3,258
  • 3
  • 22
  • 28
1
vote
1 answer

Problem styling Gtk::Box with CSS in gtkmm 3.10.1

I have to write a program with gtkmm that runs on a legacy system that has GTK 3.10.1. So I have to steer clear of any features added after that. I am having some trouble styling Gtk::Box instances using CSS. It works correctly on a Ubuntu 16.04 box…
Weston
  • 1,845
  • 13
  • 12
1
vote
3 answers

Is normal to list all the cpp/cc files when compiling with g++?

I'm doing the "Hello World" in the GTKMM tutorial, the "app" uses three files, the main.cc, helloworld.h and helloworld.cc. At the beginning I thought that compiling the main.cc : g++ -o HW main.cc $(pkg-config ... ) would be enough, but gives an…
GNSYS
  • 11
  • 1
1
vote
1 answer

gtkmm not found in MinGW despite being installed

I am trying to compile following simple file (demo code from one of the tutorial sites) but gtkmm.h is not being found despite being installed. $ cat rngtk1.cpp #include #include int main( int argc, char* argv[] ){ try { …
rnso
  • 23,686
  • 25
  • 112
  • 234
1
vote
1 answer

Creating a cursor by name doesn't compile?

The doc says "The recommended way to create cursors is to use gdk_cursor_new_from_name()", but when i try : #include ... Gdk::Cursor m_hand_cursor = Gdk::Cursor::new_from_name("pointer"); ... I get this error: error:…
eole77
  • 35
  • 1
  • 5