Mercurial > hg > xemacs-beta
comparison src/glyphs-widget.c @ 400:a86b2b5e0111 r21-2-30
Import from CVS: tag r21-2-30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:14:34 +0200 |
parents | 74fd4e045ea6 |
children | 2f8bb876ab1d |
comparison
equal
deleted
inserted
replaced
399:376370fb5946 | 400:a86b2b5e0111 |
---|---|
333 update_widget (Lisp_Object widget) | 333 update_widget (Lisp_Object widget) |
334 { | 334 { |
335 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (widget); | 335 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (widget); |
336 struct image_instantiator_methods* meths; | 336 struct image_instantiator_methods* meths; |
337 | 337 |
338 if (!IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET) | 338 if (IMAGE_INSTANCE_TYPE (ii) != IMAGE_WIDGET) |
339 return; | 339 return; |
340 | 340 |
341 /* Device generic methods. We must update the widget's size as it | 341 /* Device generic methods. We must update the widget's size as it |
342 may have been changed by the the layout routines. We also do this | 342 may have been changed by the the layout routines. We also do this |
343 here so that explicit resizing from lisp does not result in | 343 here so that explicit resizing from lisp does not result in |
713 tab_control_query_geometry (Lisp_Object image_instance, | 713 tab_control_query_geometry (Lisp_Object image_instance, |
714 unsigned int* width, unsigned int* height, | 714 unsigned int* width, unsigned int* height, |
715 enum image_instance_geometry disp, Lisp_Object domain) | 715 enum image_instance_geometry disp, Lisp_Object domain) |
716 { | 716 { |
717 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 717 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
718 Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii); | 718 Lisp_Object items = XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)); |
719 Lisp_Object rest; | 719 Lisp_Object rest; |
720 unsigned int tw = 0, th = 0; | 720 unsigned int tw = 0, th = 0; |
721 | 721 |
722 LIST_LOOP (rest, items) | 722 LIST_LOOP (rest, items) |
723 { | 723 { |
724 unsigned int h, w; | 724 unsigned int h, w; |
725 | 725 |
726 query_string_geometry (XGUI_ITEM (XCAR (rest))->name, | 726 query_string_geometry (XGUI_ITEM (XCAR (rest))->name, |
727 IMAGE_INSTANCE_WIDGET_FACE (ii), | 727 IMAGE_INSTANCE_WIDGET_FACE (ii), |
728 &w, &h, 0, domain); | 728 &w, &h, 0, domain); |
729 tw += 2 * WIDGET_BORDER_WIDTH; /* some bias */ | 729 tw += 5 * WIDGET_BORDER_WIDTH; /* some bias */ |
730 tw += w; | 730 tw += w; |
731 th = max (th, h + 2 * WIDGET_BORDER_HEIGHT); | 731 th = max (th, h + 2 * WIDGET_BORDER_HEIGHT); |
732 } | 732 } |
733 | 733 |
734 /* Fixup returned values depending on orientation. */ | 734 /* Fixup returned values depending on orientation. */ |