Questions tagged [gtkmm]

gtkmm is the official C++ interface for the GUI library GTK+.

is a GUI library written in C, gtkmm is its official binding to C++.

External links:

958 questions
4
votes
2 answers

Multiple Producers Single Consumer Queue

I am new to multithreading and have designed a program that receives data from two microcontroller measuring various temperatures (Ambient and Water) and draws the data to the screen. Right now the program is singly threaded and its performance…
Talguy
  • 1,045
  • 2
  • 18
  • 27
4
votes
2 answers

Gtk::Button with standard Icons

if I use: Gtk::Button* button = Gtk::manage( new Gtk::Button(Gtk::Stock::DELETE)); it works perfect, but the documentation and the header says: Deprecated, use label _Delete But if I simply write Gtk::Button* button = Gtk::manage( new…
Klaus
  • 24,205
  • 7
  • 58
  • 113
4
votes
2 answers

How to downcast RefPtr

In Gtk I have a class hierarchy like this: Gtk::ListStore is derived from Gtk::TreeModel From a Gtk::TreeView I can get with get_model() a Glib::RefPtr If I use in my Gtk::Treeview a Gtk::ListStore as a Gtk::TreeModel and call…
Klaus
  • 24,205
  • 7
  • 58
  • 113
4
votes
0 answers

gtkmm and Gtk::Builder: Lifetime of objects after calling get_widget

I think I must be "doing something wrong" here. I have a program using gtkmm. The main window for the program is a subclass of Gtk::Window and I have the bare bones of the application drawn out in Glade. Here's an edited version of the main window's…
Rupert Swarbrick
  • 2,793
  • 16
  • 26
4
votes
2 answers

UTF-8 error in GtkTextView while decoding base64

I have been trying to figure this out for a few days now. All I am trying to do is decode a base64 string and add it to a Gtk::TextView. Below is the code: txtbuffer_ = Gtk::TextBuffer::create(); txtview_.set_buffer(txtbuffer_); const Glib::ustring…
vis.15
  • 751
  • 8
  • 18
4
votes
1 answer

GTK : How to set the Height of a VBox?

Hi I'm making an app using GTKMM. The screenshot is below: Screenshot The Problem is, I'm not able to position the "My Label" to align at the top, just below the Search box. I'm packing Name,Search box, Search Button into a HBox, which is packed…
ace
  • 2,141
  • 7
  • 29
  • 39
4
votes
1 answer

destroy gtkmm message dialog?

I am using gtkmm 3.0.1 and I do not see an option when creating a Gtk::MessageDialog object to destroy the dialog after the user has clicked a button. The only way I found out to destroy a message dialog is to call it in a secondary function, but I…
cellsheet
  • 476
  • 1
  • 4
  • 22
4
votes
1 answer

gtkmm manage/add vs smart pointers:

gtkmm provides lifetime management of widgets using this sort of construct: Gtk::Widget* aWidget = Gtk::manage(new Widget()); Gtk::Widget containerWidget; containerWidget.add(*aWidget); This delegates lifetime management of aWidget to…
Vector
  • 10,879
  • 12
  • 61
  • 101
4
votes
0 answers

Zoomable image viewer for GTKmm

I need a simple image viewer widget to display a Pixbuf, with a zoom factor that can be changed using the scroll wheel (integer factors only, nearest neighbor interpolation), zooming in should adjust the scroll position such that the current center…
pascal
  • 2,623
  • 2
  • 20
  • 30
4
votes
1 answer

Get pixel value on Gdk::Pixbuf, Set pixel value with Gdk::Cairo

I'm using a Gdk::Pixbuf to display an image with Gdk::Cairo in C++ : virtual bool on_draw(const Cairo::RefPtr& cr) { Glib::RefPtr image = Gdk::Pixbuf::create_from_file(filename); Gdk::Cairo::set_source_pixbuf(cr,…
Jav
  • 1,445
  • 1
  • 18
  • 47
4
votes
1 answer

How to transpose cairo context or change the orientation of an axis?

I need to visualize a playing field for a robot game. Unfortunately, the game uses a right handed coordinate system, with the y axis pointing up. Is there a way to adjust the cairo context of a drawing area so that it matches this coordinate…
Daniel
  • 140
  • 2
  • 8
4
votes
1 answer

GTKmm 3: Parse command line with Gtk::Application

I'm trying to use GTK's argv-handling, but there seem to be some issues with the main loop. My goal is to parse the command line after GTK removed its options (like --display), but before opening a window, because I want my app to be usable with a…
pascal
  • 2,623
  • 2
  • 20
  • 30
4
votes
1 answer

Suppress GTK signal when callback is triggered via code

Gist: handler_block is useful on a case-by-case basis, but I'd rather call something at the beginning of the program to suppress a signal for all calls to gtk_entry_set_text and gtk_toggle_button_set_active. Is there a way? Background Info: My…
nnnn
  • 149
  • 1
  • 10
4
votes
1 answer

swapping background colors in gtk text field (gtkmm C++)

Within my GUI (C++, GTKMM 3), i have a text field that is providing some status information. i'd like to change the background color of this field (along with the text, which i can easily do), based upon the status. there's not a lot out there on…
jasonmclose
  • 1,667
  • 4
  • 22
  • 38
4
votes
2 answers

Gtkmm : How to update UI from another thread? continuously

Thread A: a UI thread where the Gtkmm's message loop runs. Thread B: receives data over network and logs it to a file. Now I want that same data that's dumped into a file in thread B, also to be displayed in a Gtk::TextView on the UI at the same…
Ivarpoiss
  • 1,025
  • 1
  • 10
  • 18