Hi,
I have a GTKmm Windows application (built with MinGW) that receives UDP packets (no sending). The socket is native winsock and I use glibmm IOChannel to connect it to the application main loop. The socket is read with recvfrom.
My problem is: this setup eats 25% percent CPU time on a 3GHz workstation. Can somebody tell me why?
The...
I have a programming that is drawing realtime animations to a gtkmm window. I have my main thread gui thread and a worker threa that renders a frame of the animation to a image surface using cairo. The worker thread has is signaled by the main thread every 33mS. Right now I have my app creating a new rendering thread on every timeout ...
Here is a C application source code, which creates GUI using Glade3 and GTK2+:
// gcc -o simple simple.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
GtkBuilder *builder;
GtkWidget *window1;
G_MODULE_EXPORT void on_window1_destroy (GtkObject *obje...
Hello,
I am trying to build a GTK application (c++) using NetBeans. After including the gtkmm.h file I had to use the pkg-config tool to determine what it's dependencies where. I then added them to the included folders. Netbean complains that it cannot find 'giomm-2.4'. This package does not exist in /usr/lib and I cannot seem to find t...
I am attempting to use Gtk TextIter objects to lift three-character slices out of a TextBuffer, but am having trouble with the arithmetic. I set up an iterator p to point to the start of the range and want q to point to three characters further on.
I have tried...
q = p + 3; // Doesn't compile
q = p; q += 3; // Do...
I'm attempting to get the coordinates from an instance of Goocanvas::Points in goocanvasmm. I have this:
double x = 0, y = 0;
int i;
Goocanvas::Points points;
Glib::RefPtr<Goocanvas::Item> root = canvaswidget.get_root_item();
Glib::RefPtr<Goocanvas::Polyline> line = Goocanvas::Polyline::create(100, 100, 110, 120);
root->add_child(line);...
I'm writing an open GL demo that will run in a Gtkmm window object. I'd like to use the mouse for 'looking around'. I've overridden on_motion_notify_event to get motion notifications, but what I'd like to do is actually move the cursor back to the middle of the window at every notification so that mouse never reaches the edge of the sc...
I'm trying to get a Gtk::Spinner object to display while calculations are in progress but nothing appears to be happening. The snippet of code looks like...
{
Gtk::Spinner spinner;
spinner.start ();
// do some work...
spinner.stop ();
}
I'd have thought the spinner needed to know which dialogue it appears over but I c...
I guess I'm not understanding something about C++:
I have this code:
#include "window.h"
int main(int argc, char* argv[]) {
Gtk::Main kit(argc, argv);
window win();
Gtk::Main::run(win);
return EXIT_SUCCESS;
}
'window' is a class that inherits from Gtk::Window with an empty constructor. When I try to compile this co...
i just finished a little gtkmm/windows app.
my only problem is that if i use the redist-dll´s of gtkmm the button-images (used with add_pixlabel) are not shown.
there is a button with a red cross (missing).
when i install gtkmm on the computer and run the app without the redist-dll´s in the directory the buttons are shown.
any sugge...
Hello all,
In order to learn GTK programming, I am building a simple GTK application that reads files in a directory and displays them as icons. I am trying to build something like the Nautilus icon view file explorer. I know the right pane uses GTK IconView but what does the left pane use to display list of places?
Also I have looked at...
Hello,
i don´t have a clue why this code doesn´t work on windows. hidden folders are not shown!
Gtk::FileChooserDialog dialog("Please choose the ZUP-file directory",
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
dialog.set_show_hidden(true);
any ideas?
thanks
...
Hi,
I want my notebook tab labels to be rotated by 90°.
I tried the set_angle() function of Gtk::Label but it doesn't work:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window mainwindow;
Gtk::Notebook sidebar;
Gtk::Label tab;
mainwindow.add(sidebar);
sidebar.set_tab...
Hello,
I am writing a GTKmm window program; the main window creates two buttons, one for English and one for Chinese. The user can click on the button to bring up a different window in the appropriate language. Currently I am having trouble initializing the multiple-item container inside the main window. It is an object of type MainWindo...
Hi, I have to create a simple application that displays an icon in the systray and a menu from which you can do some operations.
the problem is that statusicon is closed immediately after creation. What's missing?
I put the sleep to make sure it was created. for 3 seconds something appears in systray, even if it is not the icon that I se...
I am creating a GTK Window which, for various reasons, I wish to make non-resizable by the user. But invoking the set_resizable method on the window causes it to display with a size of 1 pixel by 1 pixel. (jn the code below, the window displays the expected size if the set-resizable line is commented out. It makes no difference which ord...
I have created a little drawing area class and now need a pixmap to draw into during the expose event callback. But I can't get any parameter that I have tried to compile. Here are the relevant parts of the code...
The class definition...
class set_display_drawing_area : public Gtk::DrawingArea
{
public:
set_display_drawing...
I am drawing a little graphical display that is expensive to calculate. So I wish to draw the picture into a pixmap, retaining the pixmap and using that pixmap to refresh the drawing area when the drawing area gets expose events.
First of all, is that a reasonable procedure or pointless over-engineering?
If it is reasonable, then I nee...
Qt Creator has excellent intellisense support for anything you want! Does Anjuta have intellisense? Can I enable it for Gtkmm? I am building Gtkmm project but I do not get intellisense for Gtkmm!!
...
I'm still working on the example at this link: http://stackoverflow.com/questions/3547548/gtkmm-statusicon-quits-after-creation
I changed the function in this way to open the traybar different windows, but does not show anything.
void Tray::on_statusicon_popup(guint button, guint activate_time) {
printf("popup!\n");
Gtk::Window ...