comparison src/frame.c @ 215:1f0dabaa0855 r20-4b6

Import from CVS: tag r20-4b6
author cvs
date Mon, 13 Aug 2007 10:07:35 +0200
parents 78f53ef88e17
children d44af0c54775
comparison
equal deleted inserted replaced
214:c5d88c05e1e9 215:1f0dabaa0855
2167 default-toolbar, top-toolbar, bottom-toolbar, left-toolbar, right-toolbar, 2167 default-toolbar, top-toolbar, bottom-toolbar, left-toolbar, right-toolbar,
2168 default-toolbar-height, default-toolbar-width, top-toolbar-height, 2168 default-toolbar-height, default-toolbar-width, top-toolbar-height,
2169 bottom-toolbar-height, left-toolbar-width, right-toolbar-width, 2169 bottom-toolbar-height, left-toolbar-width, right-toolbar-width,
2170 default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p, 2170 default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p,
2171 left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p, 2171 left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
2172 top-toolbar-border-width, bottom-toolbar-border-width,
2173 left-toolbar-border-width, right-toolbar-border-width,
2172 modeline-shadow-thickness, has-modeline-p 2174 modeline-shadow-thickness, has-modeline-p
2173 [Giving the name of any built-in specifier variable is 2175 [Giving the name of any built-in specifier variable is
2174 equivalent to calling `set-specifier' on the specifier, 2176 equivalent to calling `set-specifier' on the specifier,
2175 with a locale of FRAME. Giving the name to `frame-property' 2177 with a locale of FRAME. Giving the name to `frame-property'
2176 calls `specifier-instance' on the specifier.] 2178 calls `specifier-instance' on the specifier.]
2546 egw = max (glyph_width (Vcontinuation_glyph, Vdefault_face, 0, window), 2548 egw = max (glyph_width (Vcontinuation_glyph, Vdefault_face, 0, window),
2547 glyph_width (Vtruncation_glyph, Vdefault_face, 0, window)); 2549 glyph_width (Vtruncation_glyph, Vdefault_face, 0, window));
2548 egw = max (egw, cpw); 2550 egw = max (egw, cpw);
2549 bdr = 2 * f->internal_border_width; 2551 bdr = 2 * f->internal_border_width;
2550 obw = FRAME_SCROLLBAR_WIDTH (f) + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) + 2552 obw = FRAME_SCROLLBAR_WIDTH (f) + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) +
2551 FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f); 2553 FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) +
2554 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f) +
2555 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
2552 obh = FRAME_SCROLLBAR_HEIGHT (f) + FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) + 2556 obh = FRAME_SCROLLBAR_HEIGHT (f) + FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) +
2553 FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f); 2557 FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) +
2558 2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f) +
2559 2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f);
2554 2560
2555 if (pixel_to_char) 2561 if (pixel_to_char)
2556 { 2562 {
2557 *char_width = 1 + ((*pixel_width - egw) - bdr - obw) / cpw; 2563 *char_width = 1 + ((*pixel_width - egw) - bdr - obw) / cpw;
2558 *char_height = (*pixel_height - bdr - obh) / cph; 2564 *char_height = (*pixel_height - bdr - obh) / cph;
2652 in the frame, the toolbar sizes were subtracted out. However, 2658 in the frame, the toolbar sizes were subtracted out. However,
2653 if the corresponding toolbar is not actually visible in the 2659 if the corresponding toolbar is not actually visible in the
2654 selected window, then the extra space needs to be filled in 2660 selected window, then the extra space needs to be filled in
2655 with rows/cols. */ 2661 with rows/cols. */
2656 if (!FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) 2662 if (!FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
2657 new_pixheight += FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f); 2663 new_pixheight += FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT (f) +
2664 2 * FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH (f);
2658 if (!FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) 2665 if (!FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
2659 new_pixheight += FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f); 2666 new_pixheight += FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT (f) +
2667 2 * FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f);
2660 if (!FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) 2668 if (!FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
2661 new_pixwidth += FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f); 2669 new_pixwidth += FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) +
2670 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f);
2662 if (!FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) 2671 if (!FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
2663 new_pixwidth += FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f); 2672 new_pixwidth += FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) +
2673 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
2664 2674
2665 /* Adjust the width for the end glyph which may be a different width 2675 /* Adjust the width for the end glyph which may be a different width
2666 than the default character width. */ 2676 than the default character width. */
2667 { 2677 {
2668 int adjustment, trunc_width, cont_width; 2678 int adjustment, trunc_width, cont_width;