comparison man/internals/internals.texi @ 5090:0ca81354c4c7

Further frame-geometry cleanups -------------------- ChangeLog entries follow: -------------------- man/ChangeLog addition: 2010-03-03 Ben Wing <ben@xemacs.org> * internals/internals.texi (Intro to Window and Frame Geometry): * internals/internals.texi (The Paned Area): * internals/internals.texi (The Displayable Area): Update to make note of e.g. the fact that the bottom gutter is actually above the minibuffer. src/ChangeLog addition: 2010-03-03 Ben Wing <ben@xemacs.org> * emacs.c: * emacs.c (assert_equal_failed): * lisp.h: * lisp.h (assert_equal): New fun assert_equal, asserting that two values == each other, and printing out both values upon failure. * frame-gtk.c (gtk_initialize_frame_size): * frame-impl.h: * frame-impl.h (FRAME_TOP_INTERNAL_BORDER_START): * frame-impl.h (FRAME_BOTTOM_INTERNAL_BORDER_START): * frame-impl.h (FRAME_LEFT_INTERNAL_BORDER_START): * frame-impl.h (FRAME_PANED_TOP_EDGE): * frame-impl.h (FRAME_NONPANED_SIZE): * frame-x.c (x_initialize_frame_size): * frame.c: * gutter.c (get_gutter_coords): * gutter.c (calculate_gutter_size): * gutter.h: * gutter.h (WINDOW_REAL_TOP_GUTTER_BOUNDS): * gutter.h (FRAME_TOP_GUTTER_BOUNDS): * input-method-xlib.c: * input-method-xlib.c (XIM_SetGeometry): * redisplay-output.c (clear_left_border): * redisplay-output.c (clear_right_border): * redisplay-output.c (redisplay_output_pixmap): * redisplay-output.c (redisplay_clear_region): * redisplay-output.c (redisplay_clear_top_of_window): * redisplay-output.c (redisplay_clear_to_window_end): * redisplay-xlike-inc.c (XLIKE_clear_frame): * redisplay.c: * redisplay.c (UPDATE_CACHE_RETURN): * redisplay.c (pixel_to_glyph_translation): * toolbar.c (update_frame_toolbars_geometry): * window.c (Fwindow_pixel_edges): Get rid of some redundant macros. Consistently use the FRAME_TOP_*_START, FRAME_RIGHT_*_END, etc. format. Rename FRAME_*_BORDER_* to FRAME_*_INTERNAL_BORDER_*. Comment out FRAME_BOTTOM_* for gutters and the paned area due to the uncertainty over where the paned area actually begins. (Eventually we should probably move the gutters outside the minibuffer so that the paned area is contiguous.) Use FRAME_PANED_* more often in the code to make things clearer. Update the diagram to show that the bottom gutter is inside the minibuffer (!) and that there are "junk boxes" when you have left and/or right gutters (dead boxes that are mistakenly left uncleared, unlike the corresponding scrollbar dead boxes). Update the text appropriately to cover the bottom gutter position, etc. Rewrite gutter-geometry code to use the FRAME_*_GUTTER_* in place of equivalent expressions referencing other frame elements, to make the code more portable in case we move around the gutter location. Cleanup FRAME_*_GUTTER_BOUNDS() in gutter.h. Add some #### GEOM! comments where I think code is incorrect -- typically, it wasn't fixed up properly when the gutter was added. Some cosmetic changes.
author Ben Wing <ben@xemacs.org>
date Wed, 03 Mar 2010 05:07:47 -0600
parents d4f666cda5e6
children e0587c615e8b
comparison
equal deleted inserted replaced
5080:5502045ec510 5090:0ca81354c4c7
17888 | +--------------------------------------------------------------------+ | 17888 | +--------------------------------------------------------------------+ |
17889 | | menubar | | 17889 | | menubar | |
17890 | ###################################################################### | 17890 | ###################################################################### |
17891 | # toolbar # | 17891 | # toolbar # |
17892 | #--------------------------------------------------------------------# | 17892 | #--------------------------------------------------------------------# |
17893 | # | gutter | # | 17893 | # | internal border | # |
17894 | # |--------------------------------------------------------------| # | 17894 | # | +----------------------------------------------------------+ | # |
17895 | # | | internal border width | | # | 17895 | # | | gutter | | # |
17896 | # | | ******************************************************** | | # | 17896 | # | |-********************************************************-| | # |
17897 |w# | | * |s|v* |s* | | #w| 17897 |w# | | *@| scrollbar |v* |s* | | #w|
17898 |i# | | * |c|e* |c* | | #i| 17898 |i# | | *-+-------------------------|e* |c* | | #i|
17899 |n# | | * |r|r* |r* | | #n| 17899 |n# | | *s| |r* |r* | | #n|
17900 |d# | | * |o|t* |o* | | #d| 17900 |d# | | *c| |t* |o* | | #d|
17901 |o# | | * text area |l|.* text area |l* | | #o| 17901 |o# | | *r| |.* text area |l* | | #o|
17902 |w# | |i* |l| * |l*i| | #w| 17902 |w# |i| *o| | * |l* |i| #w|
17903 |-# | |n* |b|d* |b*n| | #-| 17903 |-# |n| *l| text area |d* |b* |n| #-|
17904 |m# | |t* |a|i* |a*t| | #m| 17904 |m# |t| *l| |i* |a* |t| #m|
17905 |a# | |.* |r|v* |r*.| | #a| 17905 |a# |e| *b| |v* |r* |e| #a|
17906 |n# t| | *-------------------------+-|i*----------------------+-* | |t #n| 17906 |n# t|r| *a| |i*----------------------+-* |r|t #n|
17907 |a# o|g|b* scrollbar | |d* scrollbar | *b|g|o #a| 17907 |a# o|n|g*r| |d* scrollbar |@*g|n|o #a|
17908 |g# o|u|o*-------------------------+-|e*----------------------+-*o|u|o #g| 17908 |g# o|a|u*-+-------------------------|e*----------------------+-*u|a|o #g|
17909 |e# l|t|r* modeline |r* modeline *r|t|l #e| 17909 |e# l|l|t* modeline |r* modeline *t|l|l #e|
17910 |r# b|t|d********************************************************d|t|b #r| 17910 |r# b| |t********************************************************t| |b #r|
17911 | # a|e|e* =..texttexttex....= |s|v* |s*e|e|a # | 17911 | # a|b|e* =..texttexttex....= |s|v* |s*e|b|a # |
17912 |d# r|r|r*o m=..texttexttextt..=o m|c|e* |c*r|r|r #d| 17912 |d# r|o|r*o m=..texttexttextt..=o m|c|e* |c*r|o|r #d|
17913 |e# | | *u a=.exttexttextte...=u a|r|r* |r* | | #e| 17913 |e# |r| *u a=.exttexttextte...=u a|r|r* |r* |r| #e|
17914 |c# | |w*t r=....texttexttex..=t r|o|t* |o*w| | #c| 17914 |c# |d| *t r=....texttexttex..=t r|o|t* |o* |d| #c|
17915 |o# | |i*s g= etc. =s g|l|.* text area |l*i| | #o| 17915 |o# |e| *s g= etc. =s g|l|.* text area |l* |e| #o|
17916 |r# | |d*i i= =i i|l| * |l*d| | #r| 17916 |r# |r| *i i= =i i|l| * |l* |r| #r|
17917 |a# | |t*d n= =d n|b|d* |b*t| | #a| 17917 |a# | | *d n= =d n|b|d* |b* | | #a|
17918 |t# | |h*e = inner text area =e |a|i* |a*h| | #t| 17918 |t# | | *e = inner text area =e |a|i* |a* | | #t|
17919 |i# | | * = = |r|v* |r* | | #i| 17919 |i# | | * = = |r|v* |r* | | #i|
17920 |o# | | *---===================---+-|i*----------------------+-* | | #o| 17920 |o# | | *---===================---+-|i*----------------------+-* | | #o|
17921 |n# | | * scrollbar | |d* scrollbar | * | | #n| 17921 |n# | | * scrollbar |@|d* scrollbar |@* | | #n|
17922 | # | | *-------------------------+-|e*----------------------+-* | | # | 17922 | # | | *-------------------------+-|e*----------------------+-* | | # |
17923 | # | | * modeline |r* modeline * | | # | 17923 | # | | * modeline |r* modeline * | | # |
17924 | # | | ******************************************************** | | # | 17924 | # | |-********************************************************-| | # |
17925 | # | | * minibuffer * | | # | 17925 | # | | gutter | | # |
17926 | # | | ******************************************************** | | # | 17926 | # | |-********************************************************-| | # |
17927 | # | | internal border width | | # | 17927 | # | |@* minibuffer *@| | # |
17928 | # |--------------------------------------------------------------| # | 17928 | # | +-********************************************************-+ | # |
17929 | # | gutter | # | 17929 | # | internal border | # |
17930 | #--------------------------------------------------------------------# | 17930 | #--------------------------------------------------------------------# |
17931 | # toolbar # | 17931 | # toolbar # |
17932 | ###################################################################### | 17932 | ###################################################################### |
17933 | window manager decoration | 17933 | window manager decoration |
17934 +------------------------------------------------------------------------+ 17934 +------------------------------------------------------------------------+
17935 17935
17936 # = boundary of client area; * = window boundaries, boundary of paned area 17936 # = boundary of client area; * = window boundaries, boundary of paned area
17937 = = boundary of inner text area; . = inside margin area 17937 = = boundary of inner text area; . = inside margin area; @ = dead boxes
17938 @end example 17938 @end example
17939 17939
17940 Note in particular what happens at the corners, where a "corner box" 17940 Note in particular what happens at the corners, where a ``corner box''
17941 occurs. Top and bottom toolbars take precedence over left and right 17941 occurs. Top and bottom toolbars take precedence over left and right
17942 toolbars, extending out horizontally into the corner boxes. Gutters 17942 toolbars, extending out horizontally into the corner boxes. Gutters
17943 work the same way. The corner box where the scrollbars meet, however, 17943 work the same way. The corner box where the scrollbars meet, however,
17944 is assigned to neither scrollbar, and is known as the "dead box"; it is 17944 is assigned to neither scrollbar, and is known as the ``dead box''; it is
17945 an area that must be cleared specially. 17945 an area that must be cleared specially. There are similar dead boxes at
17946 the bottom-right and bottom-left corners where the minibuffer and
17947 left/right gutters meet, but there is currently a bug in that these dead
17948 boxes are not explicitly cleared and may contain junk.
17946 17949
17947 @node The Frame, The Non-Client Area, Intro to Window and Frame Geometry, Window and Frame Geometry 17950 @node The Frame, The Non-Client Area, Intro to Window and Frame Geometry, Window and Frame Geometry
17948 @section The Frame 17951 @section The Frame
17949 17952
17950 The "top-level window area" is the entire area of a top-level window (or 17953 The "top-level window area" is the entire area of a top-level window (or
18042 18045
18043 18046
18044 @node The Paned Area, Text Areas, The Client Area, Window and Frame Geometry 18047 @node The Paned Area, Text Areas, The Client Area, Window and Frame Geometry
18045 @section The Paned Area 18048 @section The Paned Area
18046 18049
18047 The area occupied by the "windows" is called the paned area. Note that 18050 The area occupied by the "windows" is called the paned area.
18048 this includes the minibuffer, which is just another window but is 18051 Unfortunately, because of the presence of the gutter @strong{between} the
18049 special-cased in XEmacs. Each window can include a horizontal and/or 18052 minibuffer and other windows, the bottom of the paned area is not
18050 vertical scrollbar, a modeline and a vertical divider to its right, as 18053 well-defined -- does it include the minibuffer (in which case it also
18051 well as the text area. Only non-rightmost windows can include a 18054 includes the bottom gutter, but none others) or does it not include
18052 vertical divider. (The minibuffer normally does not include either 18055 the minibuffer? (In which case not all windows are included.) It would
18053 modeline or scrollbars.) 18056 be cleaner to put the bottom gutter @strong{below} the minibuffer instead of
18057 above it.
18058
18059 Each window can include a horizontal and/or vertical scrollbar, a
18060 modeline and a vertical divider to its right, as well as the text area.
18061 Only non-rightmost windows can include a vertical divider. (The
18062 minibuffer normally does not include either modeline or scrollbars.)
18054 18063
18055 Note that, because the toolbars and gutters are controlled by 18064 Note that, because the toolbars and gutters are controlled by
18056 specifiers, and specifiers can have window-specific and buffer-specific 18065 specifiers, and specifiers can have window-specific and buffer-specific
18057 values, the size of the paned area can change depending on which window 18066 values, the size of the paned area can change depending on which window
18058 is selected: In other words, if the selected window or buffer changes, 18067 is selected: In other words, if the selected window or buffer changes,
18110 Under X, this is based on the width of the lowercase 'n', or if this is 18119 Under X, this is based on the width of the lowercase 'n', or if this is
18111 zero then the width of the default character. [We prefer 'n' to the 18120 zero then the width of the default character. [We prefer 'n' to the
18112 specified default character because many X fonts have a default 18121 specified default character because many X fonts have a default
18113 character with a zero or otherwise non-representative width.]) 18122 character with a zero or otherwise non-representative width.])
18114 18123
18115 The displayable area is essentially the "theoretical" paned area of the 18124 The displayable area is essentially the "theoretical" gutter area of the
18116 frame excluding the rightmost and bottom-most scrollbars. In this 18125 frame, excluding the rightmost and bottom-most scrollbars. That is, it
18117 context, "theoretical" means that all calculations on based on 18126 starts from the client (or "total") area and then excludes the
18118 frame-level values for toolbar, gutter and scrollbar thicknesses. 18127 "theoretical" toolbars and bottom-most/rightmost scrollbars, and the
18119 Because these thicknesses are controlled by specifiers, and specifiers 18128 internal border width. In this context, "theoretical" means that all
18120 can have window-specific and buffer-specific values, these calculations 18129 calculations on based on frame-level values for toolbar and scrollbar
18121 may or may not reflect the actual size of the paned area or of the 18130 thicknesses. Because these thicknesses are controlled by specifiers,
18122 scrollbars when any particular window is selected. Note also that the 18131 and specifiers can have window-specific and buffer-specific values,
18123 "displayable area" may not even be contiguous! In particular, if the 18132 these calculations may or may not reflect the actual size of the paned
18124 frame-level value of the horizontal scrollbar height is non-zero, then 18133 area or of the scrollbars when any particular window is selected. Note
18125 the displayable area includes the paned area above and below the bottom 18134 also that the "displayable area" may not even be contiguous! In
18126 horizontal scrollbar but not the scrollbar itself. 18135 particular, the gutters are included, but the bottom-most and rightmost
18136 scrollbars are excluded even though they are inside of the gutters.
18137 Furthermore, if the frame-level value of the horizontal scrollbar height
18138 is non-zero, then the displayable area includes the paned area above and
18139 below the bottom horizontal scrollbar (i.e. the modeline and minibuffer)
18140 but not the scrollbar itself.
18127 18141
18128 As a further twist, the character-dimension calculations are adjusted so 18142 As a further twist, the character-dimension calculations are adjusted so
18129 that the truncation and continuation glyphs (see @code{truncation-glyph} and 18143 that the truncation and continuation glyphs (see @code{truncation-glyph} and
18130 @code{continuation-glyph}) count as a single character even if they are wider 18144 @code{continuation-glyph}) count as a single character even if they are wider
18131 than the default font width. (Technically, the character width is 18145 than the default font width. (Technically, the character width is