void ok_cb (GtkWidget *w, void *v)
{  
   gboolean edit=TRUE;
   GtkWidget *widget;
   GtkType type;
   GSList *current = widgets;
   
   while (current) {
      edit=TRUE;
      widget = (GtkWidget *)current->data;
      current = current->next;
      
      type = GTK_OBJECT_TYPE(widget);
      if (type == gtk_entry_get_type())
	output_entry(widget);
      if (type == gtk_text_get_type())
	output_text(widget,&edit);
      if (type == gtk_combo_get_type())
	output_combo(widget);
      if (type == gtk_check_button_get_type())
	output_check_button(widget);
      if (type == gtk_option_menu_get_type())
	output_option_menu(widget);
      
      /* if there are more widgets with output values, separate them */
      if (current && edit) {
	putchar ('\v');
      }
   }
   quit(RETURN_OK);
}
Exemple #2
0
/*
 * Initializes the GbWidget structure.
 * I've placed this at the end of the file so we don't have to include
 * declarations of all the functions.
 */
GbWidget *
gb_combo_init ()
{
  /* Initialise the GTK type */
  gtk_combo_get_type ();

  /* Initialize the GbWidget structure */
  gb_widget_init_struct (&gbwidget);

  /* Fill in the pixmap struct & tooltip */
  gbwidget.pixmap_struct = combo_xpm;
  gbwidget.tooltip = _("Combo Box");

  /* Fill in any functions that this GbWidget has */
  gbwidget.gb_widget_new               = gb_combo_new;
  gbwidget.gb_widget_create_properties = gb_combo_create_properties;
  gbwidget.gb_widget_get_properties = gb_combo_get_properties;
  gbwidget.gb_widget_set_properties = gb_combo_set_properties;
  gbwidget.gb_widget_get_child = gb_combo_get_child;
  gbwidget.gb_widget_write_source = gb_combo_write_source;
/*
   gbwidget.gb_widget_create_popup_menu = gb_combo_create_popup_menu;
 */

  return &gbwidget;
}
Exemple #3
0
/* Register combo box in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_combo()
{
   return gtk_combo_get_type();
}