+/* Get the geometry of a tab control. This is based on the number of
+ items and text therin in the tab control. */
+static Lisp_Object
+tab_control_set_property (Lisp_Object image_instance,
+ Lisp_Object prop,
+ Lisp_Object val)
+{
+ /* Record new items for update. *_tab_control_update will do the
+ rest. */
+ if (EQ (prop, Q_items))
+ {
+ Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+
+ check_valid_item_list_1 (val);
+
+ /* Don't set the actual items since we might decide not to use
+ the new ones (because nothing has really changed). If we did
+ set them and didn't use them then we would get into whole
+ heaps of trouble when the old items get GC'd. */
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
+ Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
+ parse_gui_item_tree_children (val));
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+
+ return Qt;
+ }
+ return Qunbound;
+}
+
+/* set the properties of a progres guage */
+static Lisp_Object
+progress_gauge_set_property (Lisp_Object image_instance,
+ Lisp_Object prop,
+ Lisp_Object val)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
+ if (EQ (prop, Q_value))
+ {
+ CHECK_INT (val);
+#ifdef DEBUG_WIDGET_OUTPUT
+ printf ("progress gauge value set to %ld\n", XINT (val));
+#endif
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
+ copy_gui_item_tree (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+#ifdef ERROR_CHECK_GLYPHS
+ assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+#endif
+ if (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value = val;
+
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+
+ return Qt;
+ }
+ return Qunbound;
+}
+