How can I chance this c-code(gtk+) to c++-code(gtkmm)?
- From: Kathrin Hauptvogel <hauptvogel k rheinmetall-de com>
- To: "Gtkmm-Mailinglist" <gtkmm-list gnome org>
- Subject: How can I chance this c-code(gtk+) to c++-code(gtkmm)?
- Date: Tue, 15 Nov 2005 16:22:38 +0100
Hello
How can I chance this c-code(gtk+) to c++-code(gtkmm)?
The most important thing is to convert the function of colouring the widget.
int main(int argc, char *argv[])
{
GtkWidget *event_box;
GtkWidget *window;
GdkColor red;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(delete_event), NULL);
g_signal_connect(G_OBJECT(window), "destroy",
G_CALLBACK(destroy), NULL);
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
event_box = gtk_event_box_new();
red.red = 65535;
red.green = 0;
red.blue = 0;
gtk_widget_modify_bg(event_box, GTK_STATE_NORMAL, &red);
gtk_container_add(GTK_CONTAINER(window), event_box);
gtk_widget_show(event_box);
gtk_widget_show(window);
gtk_main();
}
Kathrin Hauptvogel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]