Mercurial > hg > xemacs-beta
comparison src/toolbar-x.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 5a88923fcbfe |
children | 1f0dabaa0855 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
167 struct face_cachel *cachel = | 167 struct face_cachel *cachel = |
168 WINDOW_FACE_CACHEL (w, DEFAULT_INDEX); | 168 WINDOW_FACE_CACHEL (w, DEFAULT_INDEX); |
169 struct display_line dl; | 169 struct display_line dl; |
170 Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p); | 170 Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p); |
171 unsigned char charsets[NUM_LEADING_BYTES]; | 171 unsigned char charsets[NUM_LEADING_BYTES]; |
172 emchar_dynarr *buf; | 172 Emchar_dynarr *buf; |
173 struct font_metric_info fm; | 173 struct font_metric_info fm; |
174 | 174 |
175 /* This could be true if we were called via the Expose event | 175 /* This could be true if we were called via the Expose event |
176 handler. Mark the button as dirty and return | 176 handler. Mark the button as dirty and return |
177 immediately. */ | 177 immediately. */ |
186 (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); | 186 (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); |
187 find_charsets_in_emchar_string (charsets, Dynarr_atp (buf, 0), | 187 find_charsets_in_emchar_string (charsets, Dynarr_atp (buf, 0), |
188 Dynarr_length (buf)); | 188 Dynarr_length (buf)); |
189 ensure_face_cachel_complete (cachel, window, charsets); | 189 ensure_face_cachel_complete (cachel, window, charsets); |
190 face_cachel_charset_font_metric_info (cachel, charsets, &fm); | 190 face_cachel_charset_font_metric_info (cachel, charsets, &fm); |
191 | 191 |
192 dl.ascent = fm.ascent; | 192 dl.ascent = fm.ascent; |
193 dl.descent = fm.descent; | 193 dl.descent = fm.descent; |
194 dl.ypos = tb->y + y_offset + fm.ascent; | 194 dl.ypos = tb->y + y_offset + fm.ascent; |
195 | 195 |
196 if (fm.ascent + fm.descent <= height) | 196 if (fm.ascent + fm.descent <= height) |
455 { | 455 { |
456 y = y + height + thickness_change; | 456 y = y + height + thickness_change; |
457 height = -thickness_change; | 457 height = -thickness_change; |
458 } | 458 } |
459 } | 459 } |
460 | 460 |
461 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0); | 461 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0); |
462 | 462 |
463 DEVMETH (d, clear_region, (frame, DEFAULT_INDEX, x, y, width, height)); | 463 DEVMETH (d, clear_region, (frame, DEFAULT_INDEX, x, y, width, height)); |
464 XFlush (DEVICE_X_DISPLAY (d)); | 464 XFlush (DEVICE_X_DISPLAY (d)); |
465 } | 465 } |
630 f->toolbar_visible_p[pos] = old_visibility; | 630 f->toolbar_visible_p[pos] = old_visibility; |
631 XtQueryGeometry (FRAME_X_CONTAINER_WIDGET (f), &req, &repl); | 631 XtQueryGeometry (FRAME_X_CONTAINER_WIDGET (f), &req, &repl); |
632 f->toolbar_size[pos] = make_int (newval); | 632 f->toolbar_size[pos] = make_int (newval); |
633 if (!EQ (old_visibility, Qzero)) | 633 if (!EQ (old_visibility, Qzero)) |
634 f->toolbar_visible_p[pos] = new_visibility; | 634 f->toolbar_visible_p[pos] = new_visibility; |
635 | 635 |
636 if (change < 0) | 636 if (change < 0) |
637 x_clear_toolbar (f, pos, change); | 637 x_clear_toolbar (f, pos, change); |
638 if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR) | 638 if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR) |
639 repl.width += change; | 639 repl.width += change; |
640 else | 640 else |