[Glade-users] Newbie Q
- From: rjshaw iprimus com au (Russell Shaw)
- Subject: [Glade-users] Newbie Q
- Date: Sat, 05 Apr 2003 15:35:34 +1000
Hi,
In the below code, glade has declared: GtkWidget *drawingarea1;
Because it says not to modify the file, how do i get access
to drawingarea1 to draw a line on it from another file?
Am i supposed to use lookup_widget() on "drawingarea1" ?
interface.c:
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
GtkWidget*
create_window1 (void)
{
GtkWidget *window1;
GtkWidget *fixed1;
GtkWidget *drawingarea1;
window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (window1), "window1", window1);
gtk_window_set_title (GTK_WINDOW (window1), "window1");
fixed1 = gtk_fixed_new ();
gtk_widget_ref (fixed1);
gtk_object_set_data_full (GTK_OBJECT (window1), "fixed1", fixed1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fixed1);
gtk_container_add (GTK_CONTAINER (window1), fixed1);
drawingarea1 = gtk_drawing_area_new ();
gtk_widget_ref (drawingarea1);
gtk_object_set_data_full (GTK_OBJECT (window1), "drawingarea1", drawingarea1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (drawingarea1);
gtk_fixed_put (GTK_FIXED (fixed1), drawingarea1, 0, 0);
gtk_widget_set_uposition (drawingarea1, 0, 0);
gtk_widget_set_usize (drawingarea1, 256, 256);
button1 = gtk_button_new_with_label ("");
gtk_widget_ref (button1);
gtk_object_set_data_full (GTK_OBJECT (window1), "button1", button1,
(GtkDestroyNotify) gtk_widget_unref);
return window1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]