bar_line Files

only for RuBoard - do not distribute or recompile

bar_line Files

Below are the interface.c file and barline .glade files for the bar_line executable. Listing C.7 is interface.c and Listing C.8 is barline.glade .

interface.c for the bar_line Executable

Listing C.7 is the interface generation file for the bar_line executable. It is generated by Glade and creates frm_barline, the main form for the bar/line graph example.

Listing C.7 interface.c for the bar_line executable
  /* 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_frm_barline (void)  {   GtkWidget *frm_barline;    GtkWidget *vbox1;    GtkWidget *drawingarea1;    GtkWidget *statusbar1;    frm_barline = gtk_window_new (GTK_WINDOW_TOPLEVEL);    gtk_object_set_data (GTK_OBJECT (frm_barline), "frm_barline", frm_barline);    gtk_window_set_title (GTK_WINDOW (frm_barline), "YTD Sales Trend vs. Quota");    gtk_window_set_default_size (GTK_WINDOW (frm_barline), 600, 400);    vbox1 = gtk_vbox_new (FALSE, 0);    gtk_widget_ref (vbox1);    gtk_object_set_data_full (GTK_OBJECT (frm_barline), "vbox1", vbox1,                              (GtkDestroyNotify) gtk_widget_unref);    gtk_widget_show (vbox1);    gtk_container_add (GTK_CONTAINER (frm_barline), vbox1);    drawingarea1 = gtk_drawing_area_new ();    gtk_widget_ref (drawingarea1);    gtk_object_set_data_full (GTK_OBJECT (frm_barline), "drawingarea1",    drawingarea1,                              (GtkDestroyNotify) gtk_widget_unref);    gtk_widget_show (drawingarea1);    gtk_box_pack_start (GTK_BOX (vbox1), drawingarea1, TRUE, TRUE, 0);    statusbar1 = gtk_statusbar_new ();    gtk_widget_ref (statusbar1);    gtk_object_set_data_full (GTK_OBJECT (frm_barline), "statusbar1", statusbar1,                              (GtkDestroyNotify) gtk_widget_unref);    gtk_widget_show (statusbar1);    gtk_box_pack_start (GTK_BOX (vbox1), statusbar1, FALSE, FALSE, 0);    gtk_signal_connect (GTK_OBJECT (frm_barline), "show",                        GTK_SIGNAL_FUNC (on_frm_barline_show),                        NULL);    gtk_signal_connect (GTK_OBJECT (frm_barline), "delete_event",                        GTK_SIGNAL_FUNC (on_frm_barline_delete_event),                        NULL);    gtk_signal_connect (GTK_OBJECT (drawingarea1), "event",                        GTK_SIGNAL_FUNC (on_drawingarea1_event),                        NULL);    return frm_barline;  } 

barline.glade

Listing C.8 is the Glade project file for the bar_line executable, in XML format.

Listing C.8 Glade XML file for the bar_line executable
 <?xml version="1.0"?>  <GTK-Interface>  <project>    <name>barline</name>    <program_name>barline</program_name>    <directory></directory>    <source_directory>src</source_directory>    <pixmaps_directory>pixmaps</pixmaps_directory>    <language>C</language>    <gnome_support>False</gnome_support>    <gettext_support>False</gettext_support>    <use_widget_names>False</use_widget_names>    <output_main_file>True</output_main_file>    <output_support_files>True</output_support_files>    <output_build_files>True</output_build_files>    <backup_source_files>True</backup_source_files>    <main_source_file>interface.c</main_source_file>    <main_header_file>interface.h</main_header_file>    <handler_source_file>callbacks.c</handler_source_file>    <handler_header_file>callbacks.h</handler_header_file>    <support_source_file>support.c</support_source_file>    <support_header_file>support.h</support_header_file>    <translatable_strings_file></translatable_strings_file>  </project>  <widget>    <class>GtkWindow</class>    <name>frm_barline</name>    <signal>      <name>show</name>      <handler>on_frm_barline_show</handler>      <last_modification_time>Fri, 23 Feb 2001 12:25:31 GMT</last_modification_time>    </signal>    <signal>      <name>delete_event</name>      <handler>on_frm_barline_delete_event</handler>      <last_modification_time>Fri, 23 Feb 2001 12:25:37 GMT</last_modification_time>    </signal>    <title>YTD Sales Trend vs. Quota</title>    <type>GTK_WINDOW_TOPLEVEL</type>    <position>GTK_WIN_POS_NONE</position>    <modal>False</modal>    <default_width>600</default_width>    <default_height>400</default_height>    <allow_shrink>False</allow_shrink>    <allow_grow>True</allow_grow>    <auto_shrink>False</auto_shrink>    <widget>      <class>GtkVBox</class>      <name>vbox1</name>      <homogeneous>False</homogeneous>      <spacing>0</spacing>      <widget>        <class>GtkDrawingArea</class>        <name>drawingarea1</name>        <signal>        <name>event</name>        <handler>on_drawingarea1_event</handler>        <last_modification_time>Fri, 23 Feb 2001 12:25:48        GMT</last_modification_time>        </signal>        child>        <padding>0</padding>        <expand>True</expand>        <fill>True</fill>        </child>      </widget>      <widget>        <class>GtkStatusbar</class>        <name>statusbar1</name>        <child>        <padding>0</padding>        <expand>False</expand>        <fill>False</fill>        </child>      </widget>    </widget>  </widget>  </GTK-Interface> 
only for RuBoard - do not distribute or recompile


MySQL Building User Interfaces
MySQL: Building User Interfaces (Landmark)
ISBN: 073571049X
EAN: 2147483647
Year: 2001
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net