I set background image for a button by:
bg_pixmap[NORMAL] = "img.png"
but most of the times the image is offset with certain x, y when:
there is padding around
there is adjacent widgets at left/top
align the button 0.5, 0.5 of an alignment container of larger size
...
how can I specify the background image to alway start from 0,...
According to GObject reference
g_signal_connect_swapped(instance, detailed_signal, c_handler, data); connects a GCallback function to a signal for a particular object. The instance on which the signal is emitted and data will be swapped when calling the handler.
I don't quite get what this means. Does this mean that the data will ...
Hi - How can I install GTKMM on a Red Hat enterprise Linux 3?
...
In the following code, I want the background colour of the main GTK_WINDOW_TOPLEVEL to be 0xc0deed. But when I run it is appearing black. I even tried gtk_drawing_area_new and adding it to the main window. But still it is appearing black although I could get other colours like red, blue, white etc
#include <gtk/gtk.h>
int main( int arg...
I have two png images First one with Width1 2247 Height1 190 and second one with Width2 155 Height2 36. I wan't the second image(src) to be placed in the center of first image(dest). I created pixel buf of both and used gdk_pixbuf_composite as follows.
gdk_pixbuf_composite( srcpixbuf, dstpixbuf, 1000, 100, width2, height2, 0, 0, 1, 1, G...
Hello,
While programming in C and GTK+, Why is it "better" to use g_strdup_printf, g_free, g_strcmp0 etc... and fellow glib functions?
Merci!
...
I'm making an app using GTKMM and I want to know how to catch the right click signal from a Gtk::Table ?
And also how to catch if the Mouse is over a Gtk::Table ?
...
I am running Gnome on OpenSuse. As a result, my system look and feel is GTK+, which has numerous ugly problems (see some of them here).
During development of my swing app, I can run the client from command line or IDE and specify VM parameter
-Dswing.systemlaf=com.sun.javax.swing.plaf.metal.CrossPlatformLookAndFeel
to make it loo...
How can I determine idle time in Python on Linux, meaning no keyboard or mouse activity for the past few seconds or minutes? All present links tell how to do it on windows but not on Linux.
...
i have this makefile below and in it my includes are
gtk/gtk.h
and
webkit/webkit.h
but when i try to build the project using the make command i have the errors
error: gtk/gtk.h: No such file or directory
error: webkit/webkit.h: No such file or directory
in case the gtk+-2.0.pc and webkit...pc are in the usr/lib/pkgconfig
Make Fil...
Hi, I'm just starting to play around with GTK+ and I wanted to stop bad habits before they happen. I see that GTK+ seems to be a little based in HTML/CSS and I was wondering if there are any reasons to avoid using tables for layout.
...
I need to retrieve the position of a Gtk::Widget relative to its parent, a Gtk::Table. Most sources (e.g. http://library.gnome.org/devel/gtk-faq/stable/x642.html) say that one needs to call Gtk::Widget::get_allocation(). However, the returned Gtk::Allocation object always contains x = -1, y = -1, width = 1, height = 1.
I have to note th...
I had some problems when trying to compile a GTK+ program with Portable C Compiler (pcc) using Code::Blocks in Windows. When I tried to build the default GTK+ project in Code::Blocks, I get these errors:
-------------- Build: Debug in cb-temp2 ---------------
Compiling: main.c
C:\CMPITG\gtk\include\glib-2.0/glib/gutils.h, line 423: par...
I am having one Gtk+ and C application in which i want to set the font to some XYZ font type and font color to blue, for all the labels and text in the application how can i do this in one go, I have developed all the screen using Glade RAD tool, and currently i am doing this by calling following function for each label.
gtk_label_set_m...
Hello!!
First of all... this is my message #1 in this place, so... please be nice with me ;)
I just started recently to study Gnome apps/libraries and I found that debuggers are an excellent way to learn, because seeing the code running helps a lot in understanding the structure of the program.
But I have a problem. For example, debug...
Can we have alternate Row color to GtkMenu items?
and how to increase menu item spacing size? using Gtk+ and C.
...
How to set gtk "Style Properties" listed in gtk documentation?
like for GtkWidget there are Style Properties:
"separator-height" gint : Read
"separator-width" gint : Read
So how to get and set them? using GTK+ and C.
Thanks,
PP.
...
I'm getting this error when starting anything that uses the Pango library. I'm using Kubuntu 9.10. I've done 'sudo apt-get --reinstall install' on libgtk* libcairo* libpango* and fontconfig, with no luck.
Could someone point me in the right direction? Thanks.
...
Are there any high-level, cross-platform, and abstracted (simple to use) widget toolkits for C that are either very lightweight and fast or can be compiled for other toolkits, such as Qt and GTK+?
EDIT:
Most C++ libraries lack C bindings, so they will be of little (or no) help.
...
I trying to set separate style for particular widgets, like for one button with different style and another one with other style. this style will be specified in gtkrc file. I tried following stuff but it did not work.
In gtkrc file:
style "my-style"
{
engine "pixmap"
{
...
}
.....