diff options
| author | Martin Rudalics | 2014-10-04 10:20:24 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2014-10-04 10:20:24 +0200 |
| commit | 3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d (patch) | |
| tree | a47c285b071a0821573b19970cb80e1ea7150cc3 /doc/lispref | |
| parent | cebc89eea10104af6a871b8ee78fb60d6c597898 (diff) | |
| download | emacs-3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d.tar.gz emacs-3c6ba8b49bb87ada8a8cca6566ad0b6e3fc4e57d.zip | |
Add documentation for horizontal scroll bars and fix some minor issues.
* buffer.c (scroll_bar_width, scroll_bar_height): Fix
doc-strings.
* window.c (Fset_window_scroll_bars): Fix doc-string.
(Fwindow_scroll_bars): Have it return what the doc-string says.
* window.el (window-full-height-p): Make it behave correctly for
minibuffer window.
(window-current-scroll-bars): Fix code.
(fit-frame-to-buffer): Use window-scroll-bar-height instead of
window-scroll-bars.
* frame.el (frame-current-scroll-bars): Fix doc-string.
* scroll-bar.el (toggle-horizontal-scroll-bar): New command.
* frames.texi (Scroll Bars): Describe use of horizontal scroll
bars.
* display.texi (Scroll Bars): Add description of horizontal scroll
bars and associated functions.
* frames.texi (Layout Parameters): Add horizontal scroll bar
entries. Remove paragraph on "combined fringe widths".
* windows.texi (Window Sizes): Describe affects of horizontal
scroll bars on window layout and sizes. Fix description of
window-full-height-p.
(Resizing Windows): Mention horizontal scroll bar.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 11 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 194 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 20 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 79 |
5 files changed, 188 insertions, 118 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index f3fce93dd53..510f9e983c3 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-10-04 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * display.texi (Scroll Bars): Add description of horizontal scroll | ||
| 4 | bars and associated functions. | ||
| 5 | * frames.texi (Layout Parameters): Add horizontal scroll bar | ||
| 6 | entries. Remove paragraph on "combined fringe widths". | ||
| 7 | * windows.texi (Window Sizes): Describe affects of horizontal | ||
| 8 | scroll bars on window layout and sizes. Fix description of | ||
| 9 | window-full-height-p. | ||
| 10 | (Resizing Windows): Mention horizontal scroll bar. | ||
| 11 | |||
| 1 | 2014-10-04 Glenn Morris <rgm@gnu.org> | 12 | 2014-10-04 Glenn Morris <rgm@gnu.org> |
| 2 | 13 | ||
| 3 | * commands.texi (Generic Commands): Copyedits. | 14 | * commands.texi (Generic Commands): Copyedits. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 46be5ecf3f0..7248aa32a30 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -23,7 +23,7 @@ that Emacs presents to the user. | |||
| 23 | * Faces:: A face defines a graphics style for text characters: | 23 | * Faces:: A face defines a graphics style for text characters: |
| 24 | font, colors, etc. | 24 | font, colors, etc. |
| 25 | * Fringes:: Controlling window fringes. | 25 | * Fringes:: Controlling window fringes. |
| 26 | * Scroll Bars:: Controlling vertical scroll bars. | 26 | * Scroll Bars:: Controlling scroll bars. |
| 27 | * Window Dividers:: Separating windows visually. | 27 | * Window Dividers:: Separating windows visually. |
| 28 | * Display Property:: Enabling special display features. | 28 | * Display Property:: Enabling special display features. |
| 29 | * Images:: Displaying images in Emacs buffers. | 29 | * Images:: Displaying images in Emacs buffers. |
| @@ -3866,102 +3866,164 @@ arrow position. If either property is not set, the default | |||
| 3866 | @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator | 3866 | @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator |
| 3867 | is used. | 3867 | is used. |
| 3868 | 3868 | ||
| 3869 | |||
| 3869 | @node Scroll Bars | 3870 | @node Scroll Bars |
| 3870 | @section Scroll Bars | 3871 | @section Scroll Bars |
| 3871 | @cindex scroll bars | 3872 | @cindex scroll bars |
| 3872 | 3873 | ||
| 3873 | Normally the frame parameter @code{vertical-scroll-bars} controls | 3874 | Normally the frame parameter @code{vertical-scroll-bars} controls |
| 3874 | whether the windows in the frame have vertical scroll bars, and | 3875 | whether the windows in the frame have vertical scroll bars, and whether |
| 3875 | whether they are on the left or right. The frame parameter | 3876 | they are on the left or right. The frame parameter |
| 3876 | @code{scroll-bar-width} specifies how wide they are (@code{nil} | 3877 | @code{scroll-bar-width} specifies how wide they are (@code{nil} meaning |
| 3877 | meaning the default). @xref{Layout Parameters}. | 3878 | the default). |
| 3879 | |||
| 3880 | The frame parameter @code{horizontal-scroll-bars} controls whether | ||
| 3881 | the windows in the frame have horizontal scroll bars. The frame | ||
| 3882 | parameter @code{scroll-bar-height} specifies how high they are | ||
| 3883 | (@code{nil} meaning the default). @xref{Layout Parameters}. | ||
| 3884 | |||
| 3885 | @vindex horizontal-scroll-bars-available-p | ||
| 3886 | Horizontal scroll bars are not available on all platforms. The | ||
| 3887 | function @code{horizontal-scroll-bars-available-p} which takes no | ||
| 3888 | argument returns non-@code{nil} if they are available on your system. | ||
| 3889 | |||
| 3890 | The following three functions take as argument a live frame which | ||
| 3891 | defaults to the selected one. | ||
| 3878 | 3892 | ||
| 3879 | @defun frame-current-scroll-bars &optional frame | 3893 | @defun frame-current-scroll-bars &optional frame |
| 3880 | This function reports the scroll bar type settings for frame | 3894 | This function reports the scroll bar types for frame @var{frame}. The |
| 3881 | @var{frame}. The value is a cons cell | 3895 | value is a cons cell @code{(@var{vertical-type} .@: |
| 3882 | @code{(@var{vertical-type} .@: @var{horizontal-type})}, where | 3896 | @var{horizontal-type})}, where @var{vertical-type} is either |
| 3883 | @var{vertical-type} is either @code{left}, @code{right}, or @code{nil} | 3897 | @code{left}, @code{right}, or @code{nil} (which means no vertical scroll |
| 3884 | (which means no scroll bar.) @var{horizontal-type} is meant to | 3898 | bar.) @var{horizontal-type} is either @code{bottom} or @code{nil} |
| 3885 | specify the horizontal scroll bar type, but since they are not | 3899 | (which means no horizontal scroll bar). |
| 3886 | implemented, it is always @code{nil}. | 3900 | @end defun |
| 3887 | @end defun | ||
| 3888 | |||
| 3889 | @vindex vertical-scroll-bar | ||
| 3890 | You can enable or disable scroll bars for a particular buffer, | ||
| 3891 | by setting the variable @code{vertical-scroll-bar}. This variable | ||
| 3892 | automatically becomes buffer-local when set. The possible values are | ||
| 3893 | @code{left}, @code{right}, @code{t}, which means to use the | ||
| 3894 | frame's default, and @code{nil} for no scroll bar. | ||
| 3895 | 3901 | ||
| 3896 | You can also control this for individual windows. Call the function | 3902 | @defun frame-scroll-bar-width &optional Lisp_Object &optional frame |
| 3897 | @code{set-window-scroll-bars} to specify what to do for a specific window: | 3903 | This function returns the width of vertical scroll bars of @var{frame} |
| 3904 | in pixels. | ||
| 3905 | @end defun | ||
| 3898 | 3906 | ||
| 3899 | @defun set-window-scroll-bars window width &optional vertical-type horizontal-type | 3907 | @defun frame-scroll-bar-height &optional Lisp_Object &optional frame |
| 3900 | This function sets the width and type of scroll bars for window | 3908 | This function returns the height of horizontal scroll bars of |
| 3901 | @var{window}. | 3909 | @var{frame} in pixels. |
| 3910 | @end defun | ||
| 3902 | 3911 | ||
| 3903 | @var{width} specifies the scroll bar width in pixels (@code{nil} means | 3912 | You can override the frame specific settings for individual windows by |
| 3904 | use the width specified for the frame). @var{vertical-type} specifies | 3913 | using the following function: |
| 3905 | whether to have a vertical scroll bar and, if so, where. The possible | ||
| 3906 | values are @code{left}, @code{right} and @code{nil}, just like the | ||
| 3907 | values of the @code{vertical-scroll-bars} frame parameter. | ||
| 3908 | 3914 | ||
| 3909 | The argument @var{horizontal-type} is meant to specify whether and | 3915 | @defun set-window-scroll-bars window &optional width vertical-type height horizontal-type |
| 3910 | where to have horizontal scroll bars, but since they are not | 3916 | This function sets the width and/or height and the types of scroll bars |
| 3911 | implemented, it has no effect. If @var{window} is @code{nil}, the | 3917 | for window @var{window}. |
| 3912 | selected window is used. | 3918 | |
| 3919 | @var{width} specifies the width of the vertical scroll bar in pixels | ||
| 3920 | (@code{nil} means use the width specified for the frame). | ||
| 3921 | @var{vertical-type} specifies whether to have a vertical scroll bar and, | ||
| 3922 | if so, where. The possible values are @code{left}, @code{right}, | ||
| 3923 | @code{t}, which means to use the frame's default, and @code{nil} for no | ||
| 3924 | vertical scroll bar. | ||
| 3925 | |||
| 3926 | @var{height} specifies the height of the horizontal scroll bar in pixels | ||
| 3927 | (@code{nil} means use the height specified for the frame). | ||
| 3928 | @var{horizontal-type} specifies whether to have a horizontal scroll bar. | ||
| 3929 | The possible values are @code{bottom}, @code{t}, which means to use the | ||
| 3930 | frame's default, and @code{nil} for no horizontal scroll bar. | ||
| 3931 | |||
| 3932 | If @var{window} is @code{nil}, the selected window is used. | ||
| 3913 | @end defun | 3933 | @end defun |
| 3914 | 3934 | ||
| 3935 | The following four functions take as argument a live window which | ||
| 3936 | defaults to the selected one. | ||
| 3937 | |||
| 3915 | @defun window-scroll-bars &optional window | 3938 | @defun window-scroll-bars &optional window |
| 3916 | Report the width and type of scroll bars specified for @var{window}. | 3939 | This function returns a list of the form @code{(@var{width} |
| 3917 | If @var{window} is omitted or @code{nil}, the selected window is used. | 3940 | @var{columns} @var{vertical-type} @var{height} @var{lines} |
| 3918 | The value is a list of the form @code{(@var{width} | 3941 | @var{horizontal-type})}. |
| 3919 | @var{cols} @var{vertical-type} @var{horizontal-type})}. The value | ||
| 3920 | @var{width} is the value that was specified for the width (which may | ||
| 3921 | be @code{nil}); @var{cols} is the number of columns that the scroll | ||
| 3922 | bar actually occupies. | ||
| 3923 | 3942 | ||
| 3924 | @var{horizontal-type} is not actually meaningful. | 3943 | The value @var{width} is the value that was specified for the width of |
| 3944 | the vertical scroll bar (which may be @code{nil}); @var{columns} is the | ||
| 3945 | (possibly rounded) number of columns that the vertical scroll bar | ||
| 3946 | actually occupies. | ||
| 3947 | |||
| 3948 | The value @var{height} is the value that was specified for the height of | ||
| 3949 | the horizontal scroll bar (which may be @code{nil}); @var{lines} is the | ||
| 3950 | (possibly rounded) number of lines that the horizontally scroll bar | ||
| 3951 | actually occupies. | ||
| 3952 | @end defun | ||
| 3953 | |||
| 3954 | @defun window-current-scroll-bars &optional window | ||
| 3955 | This function reports the scroll bar type for window @var{window}. The | ||
| 3956 | value is a cons cell @code{(@var{vertical-type} .@: | ||
| 3957 | @var{horizontal-type})}. Unlike @code{window-scroll-bars}, this reports | ||
| 3958 | the scroll bar type actually used, once frame defaults and | ||
| 3959 | @code{scroll-bar-mode} are taken into account. | ||
| 3925 | @end defun | 3960 | @end defun |
| 3926 | 3961 | ||
| 3927 | @defun window-scroll-bar-width &optional window | 3962 | @defun window-scroll-bar-width &optional window |
| 3928 | This function returns the width in pixels of @var{window}'s vertical | 3963 | This function returns the width in pixels of @var{window}'s vertical |
| 3929 | scrollbar. @var{window} must be a live window, and defaults to the | 3964 | scrollbar. |
| 3930 | selected window. | 3965 | @end defun |
| 3966 | |||
| 3967 | @defun window-scroll-bar-height &optional window | ||
| 3968 | This function returns the height in pixels of @var{window}'s horizontal | ||
| 3969 | scrollbar. | ||
| 3931 | @end defun | 3970 | @end defun |
| 3932 | 3971 | ||
| 3933 | If you don't specify these values for a window with | 3972 | If you don't specify these values for a window with |
| 3934 | @code{set-window-scroll-bars}, the buffer-local variables | 3973 | @code{set-window-scroll-bars}, the buffer-local variables |
| 3935 | @code{scroll-bar-mode} and @code{scroll-bar-width} in the buffer being | 3974 | @code{vertical-scroll-bar}, @code{horizontal-scroll-bar}, |
| 3936 | displayed control the window's vertical scroll bars. The function | 3975 | @code{scroll-bar-width} and @code{scroll-bar-height} in the buffer being |
| 3976 | displayed control the window's scroll bars. The function | ||
| 3937 | @code{set-window-buffer} examines these variables. If you change them | 3977 | @code{set-window-buffer} examines these variables. If you change them |
| 3938 | in a buffer that is already visible in a window, you can make the | 3978 | in a buffer that is already visible in a window, you can make the window |
| 3939 | window take note of the new values by calling @code{set-window-buffer} | 3979 | take note of the new values by calling @code{set-window-buffer} |
| 3940 | specifying the same buffer that is already displayed. | 3980 | specifying the same buffer that is already displayed. |
| 3941 | 3981 | ||
| 3942 | @defopt scroll-bar-mode | 3982 | You can control the appearance of scroll bars for a particular buffer by |
| 3943 | This variable, always local in all buffers, controls whether and where | 3983 | setting the following variables which automatically become buffer-local |
| 3944 | to put scroll bars in windows displaying the buffer. The possible values | 3984 | when set. |
| 3945 | are @code{nil} for no scroll bar, @code{left} to put a scroll bar on | ||
| 3946 | the left, and @code{right} to put a scroll bar on the right. | ||
| 3947 | @end defopt | ||
| 3948 | 3985 | ||
| 3949 | @defun window-current-scroll-bars &optional window | 3986 | @defvar vertical-scroll-bar |
| 3950 | This function reports the scroll bar type for window @var{window}. | 3987 | This variable specifies the location of the vertical scroll bar. The |
| 3951 | If @var{window} is omitted or @code{nil}, the selected window is used. | 3988 | possible values are @code{left}, @code{right}, @code{t}, which means to |
| 3952 | The value is a cons cell | 3989 | use the frame's default, and @code{nil} for no scroll bar. |
| 3953 | @code{(@var{vertical-type} .@: @var{horizontal-type})}. Unlike | 3990 | @end defvar |
| 3954 | @code{window-scroll-bars}, this reports the scroll bar type actually | 3991 | |
| 3955 | used, once frame defaults and @code{scroll-bar-mode} are taken into | 3992 | @defvar horizontal-scroll-bar |
| 3956 | account. | 3993 | This variable specifies the location of the horizontal scroll bar. The |
| 3957 | @end defun | 3994 | possible values are @code{bottom}, @code{t}, which means to use the |
| 3995 | frame's default, and @code{nil} for no scroll bar. | ||
| 3996 | @end defvar | ||
| 3958 | 3997 | ||
| 3959 | @defvar scroll-bar-width | 3998 | @defvar scroll-bar-width |
| 3960 | This variable, always local in all buffers, specifies the width of the | 3999 | This variable specifies the width of the buffer's vertical scroll bars, |
| 3961 | buffer's scroll bars, measured in pixels. A value of @code{nil} means | 4000 | measured in pixels. A value of @code{nil} means to use the value |
| 3962 | to use the value specified by the frame. | 4001 | specified by the frame. |
| 3963 | @end defvar | 4002 | @end defvar |
| 3964 | 4003 | ||
| 4004 | @defvar scroll-bar-height | ||
| 4005 | This variable specifies the height of the buffer's horizontal scroll | ||
| 4006 | bar, measured in pixels. A value of @code{nil} means to use the value | ||
| 4007 | specified by the frame. | ||
| 4008 | @end defvar | ||
| 4009 | |||
| 4010 | Finally you can toggle the display of scroll bars on all frames by | ||
| 4011 | customizing the variables @code{scroll-bar-mode} and | ||
| 4012 | @code{horizontal-scroll-bar-mode}. | ||
| 4013 | |||
| 4014 | @defopt scroll-bar-mode | ||
| 4015 | This variable controls whether and where to put vertical scroll bars in | ||
| 4016 | all frames. The possible values are @code{nil} for no scroll bars, | ||
| 4017 | @code{left} to put scroll bars on the left and @code{right} to put | ||
| 4018 | scroll bars on the right. | ||
| 4019 | @end defopt | ||
| 4020 | |||
| 4021 | @defopt horizontal-scroll-bar-mode | ||
| 4022 | This variable controls whether to display horizontal scroll bars on all | ||
| 4023 | frames. | ||
| 4024 | @end defopt | ||
| 4025 | |||
| 4026 | |||
| 3965 | @node Window Dividers | 4027 | @node Window Dividers |
| 3966 | @section Window Dividers | 4028 | @section Window Dividers |
| 3967 | @cindex window dividers | 4029 | @cindex window dividers |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index bb2e4638396..937345f21e4 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1343,7 +1343,7 @@ Emacs Display | |||
| 1343 | * Faces:: A face defines a graphics style | 1343 | * Faces:: A face defines a graphics style |
| 1344 | for text characters: font, colors, etc. | 1344 | for text characters: font, colors, etc. |
| 1345 | * Fringes:: Controlling window fringes. | 1345 | * Fringes:: Controlling window fringes. |
| 1346 | * Scroll Bars:: Controlling vertical scroll bars. | 1346 | * Scroll Bars:: Controlling scroll bars. |
| 1347 | * Window Dividers:: Separating windows visually. | 1347 | * Window Dividers:: Separating windows visually. |
| 1348 | * Display Property:: Enabling special display features. | 1348 | * Display Property:: Enabling special display features. |
| 1349 | * Images:: Displaying images in Emacs buffers. | 1349 | * Images:: Displaying images in Emacs buffers. |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index c8e0fff6cd0..464c5fccc4f 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -709,19 +709,21 @@ Whether the frame has scroll bars for vertical scrolling, and which side | |||
| 709 | of the frame they should be on. The possible values are @code{left}, | 709 | of the frame they should be on. The possible values are @code{left}, |
| 710 | @code{right}, and @code{nil} for no scroll bars. | 710 | @code{right}, and @code{nil} for no scroll bars. |
| 711 | 711 | ||
| 712 | @ignore | ||
| 713 | @vindex horizontal-scroll-bars, a frame parameter | 712 | @vindex horizontal-scroll-bars, a frame parameter |
| 714 | @item horizontal-scroll-bars | 713 | @item horizontal-scroll-bars |
| 715 | Whether the frame has scroll bars for horizontal scrolling | 714 | Whether the frame has scroll bars for horizontal scrolling (@code{t} and |
| 716 | (non-@code{nil} means yes). Horizontal scroll bars are not currently | 715 | @code{bottom} mean yes, @code{nil} means no). |
| 717 | implemented. | ||
| 718 | @end ignore | ||
| 719 | 716 | ||
| 720 | @vindex scroll-bar-width, a frame parameter | 717 | @vindex scroll-bar-width, a frame parameter |
| 721 | @item scroll-bar-width | 718 | @item scroll-bar-width |
| 722 | The width of vertical scroll bars, in pixels, or @code{nil} meaning to | 719 | The width of vertical scroll bars, in pixels, or @code{nil} meaning to |
| 723 | use the default width. | 720 | use the default width. |
| 724 | 721 | ||
| 722 | @vindex scroll-bar-height, a frame parameter | ||
| 723 | @item scroll-bar-height | ||
| 724 | The height of horizontal scroll bars, in pixels, or @code{nil} meaning | ||
| 725 | to use the default height. | ||
| 726 | |||
| 725 | @vindex left-fringe, a frame parameter | 727 | @vindex left-fringe, a frame parameter |
| 726 | @vindex right-fringe, a frame parameter | 728 | @vindex right-fringe, a frame parameter |
| 727 | @item left-fringe | 729 | @item left-fringe |
| @@ -735,14 +737,6 @@ these two frame parameters, the return value is always an integer. | |||
| 735 | When using @code{set-frame-parameter}, passing a @code{nil} value | 737 | When using @code{set-frame-parameter}, passing a @code{nil} value |
| 736 | imposes an actual default value of 8 pixels. | 738 | imposes an actual default value of 8 pixels. |
| 737 | 739 | ||
| 738 | The combined fringe widths must add up to an integral number of | ||
| 739 | columns, so the actual default fringe widths for the frame, as | ||
| 740 | reported by @code{frame-parameter}, may be larger than what you | ||
| 741 | specify. Any extra width is distributed evenly between the left and | ||
| 742 | right fringe. However, you can force one fringe or the other to a | ||
| 743 | precise width by specifying that width as a negative integer. If both | ||
| 744 | widths are negative, only the left fringe gets the specified width. | ||
| 745 | |||
| 746 | @vindex right-divider-width, a frame parameter | 740 | @vindex right-divider-width, a frame parameter |
| 747 | @item right-divider-width | 741 | @item right-divider-width |
| 748 | The width (thickness) reserved for the right divider (@pxref{Window | 742 | The width (thickness) reserved for the right divider (@pxref{Window |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index f5122a39f8c..5060fef804f 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -394,13 +394,14 @@ internal window). The @var{edges} element is a list @code{(@var{left} | |||
| 394 | @group | 394 | @group |
| 395 | ____________________________________________ | 395 | ____________________________________________ |
| 396 | |______________ Header Line ______________|RD| ^ | 396 | |______________ Header Line ______________|RD| ^ |
| 397 | ^ |LS|LF|LM| |RM|RF|RS| | | | 397 | ^ |LS|LM|LF| |RF|RM|RS| | | |
| 398 | | | | | | | | | | | | | 398 | | | | | | | | | | | | |
| 399 | Window | | | | Text Area | | | | | Window | 399 | Window | | | | Text Area | | | | | Window |
| 400 | Body | | | | | (Window Body) | | | | | Total | 400 | Body | | | | | (Window Body) | | | | | Total |
| 401 | Height | | | | | | | | | Height | 401 | Height | | | | | | | | | Height |
| 402 | | | | | |<- Window Body Width ->| | | | | | | 402 | | | | | |<- Window Body Width ->| | | | | | |
| 403 | v |__|__|__|_______________________|__|__|__| | | | 403 | v |__|__|__|_______________________|__|__|__| | | |
| 404 | |_________ Horizontal Scroll Bar _________| | | | ||
| 404 | |_______________ Mode Line _______________|__| | | 405 | |_______________ Mode Line _______________|__| | |
| 405 | |_____________ Bottom Divider _______________| v | 406 | |_____________ Bottom Divider _______________| v |
| 406 | <---------- Window Total Width ------------> | 407 | <---------- Window Total Width ------------> |
| @@ -414,15 +415,15 @@ Height | | | | | | | | | Height | |||
| 414 | At the center of the window is the @dfn{text area}, or @dfn{body}, | 415 | At the center of the window is the @dfn{text area}, or @dfn{body}, |
| 415 | where the buffer text is displayed. The text area can be surrounded by | 416 | where the buffer text is displayed. The text area can be surrounded by |
| 416 | a series of optional areas. On the left and right, from innermost to | 417 | a series of optional areas. On the left and right, from innermost to |
| 417 | outermost, these are the left and right margins, denoted by LM and RM in | 418 | outermost, these are the left and right fringes, denoted by LF and RF |
| 418 | the schematic (@pxref{Display Margins}); the left and right fringes, | 419 | (@pxref{Fringes}); the left and right margins, denoted by LM and RM in |
| 419 | denoted by LF and RF (@pxref{Fringes}); the left or right scroll bar, | 420 | the schematic (@pxref{Display Margins}); the left or right vertical |
| 420 | only one of which is present at any time, denoted by LS and RS | 421 | scroll bar, only one of which is present at any time, denoted by LS and |
| 421 | (@pxref{Scroll Bars}); and the right divider, denoted by RD | 422 | RS (@pxref{Scroll Bars}); and the right divider, denoted by RD |
| 422 | (@pxref{Window Dividers}). At the top of the window is the header line | 423 | (@pxref{Window Dividers}). At the top of the window is the header line |
| 423 | (@pxref{Header Lines}); at the bottom of the window is the mode line | 424 | (@pxref{Header Lines}). At the bottom of the window are the horizontal |
| 424 | (@pxref{Mode Line Format}) followed by the bottom divider (@pxref{Window | 425 | scroll bar (@pxref{Scroll Bars}); the mode line (@pxref{Mode Line |
| 425 | Dividers}). | 426 | Format}); and the bottom divider (@pxref{Window Dividers}). |
| 426 | 427 | ||
| 427 | Emacs provides miscellaneous functions for finding the height and | 428 | Emacs provides miscellaneous functions for finding the height and |
| 428 | width of a window. The return value of many of these functions can be | 429 | width of a window. The return value of many of these functions can be |
| @@ -439,11 +440,8 @@ displayed within it. | |||
| 439 | @cindex height of a window | 440 | @cindex height of a window |
| 440 | @cindex total height of a window | 441 | @cindex total height of a window |
| 441 | The @dfn{total height} of a window is the number of lines comprising | 442 | The @dfn{total height} of a window is the number of lines comprising |
| 442 | the window's body, the header line, the mode line and the bottom divider | 443 | the window's body, the header line, the horizontal scroll bar, the mode |
| 443 | (if any). Note that the height of a frame is not the same as the height | 444 | line and the bottom divider (if any). |
| 444 | of its root window (@pxref{Windows and Frames}), since a frame may also | ||
| 445 | contain an echo area, a menu bar, and a tool bar (@pxref{Size and | ||
| 446 | Position}). | ||
| 447 | 445 | ||
| 448 | @defun window-total-height &optional window round | 446 | @defun window-total-height &optional window round |
| 449 | This function returns the total height, in lines, of the window | 447 | This function returns the total height, in lines, of the window |
| @@ -457,8 +455,8 @@ rounded internally. This is done in a way such that, if the window is a | |||
| 457 | parent window, the sum of the total heights of all its child windows | 455 | parent window, the sum of the total heights of all its child windows |
| 458 | internally equals the total height of their parent. This means that | 456 | internally equals the total height of their parent. This means that |
| 459 | although two windows have the same pixel height, their internal total | 457 | although two windows have the same pixel height, their internal total |
| 460 | heights may differ by one line. This means also, that if this window is | 458 | heights may differ by one line. This means also, that if window is |
| 461 | vertically combined and has a right sibling, the topmost row of that | 459 | vertically combined and has a next sibling, the topmost row of that |
| 462 | sibling can be calculated as the sum of this window's topmost row and | 460 | sibling can be calculated as the sum of this window's topmost row and |
| 463 | total height (@pxref{Coordinates and Windows}) | 461 | total height (@pxref{Coordinates and Windows}) |
| 464 | 462 | ||
| @@ -490,11 +488,10 @@ window, the sum of the total widths of all its children internally | |||
| 490 | equals the total width of their parent. This means that although two | 488 | equals the total width of their parent. This means that although two |
| 491 | windows have the same pixel width, their internal total widths may | 489 | windows have the same pixel width, their internal total widths may |
| 492 | differ by one column. This means also, that if this window is | 490 | differ by one column. This means also, that if this window is |
| 493 | horizontally combined and has a right sibling, the leftmost column of | 491 | horizontally combined and has a next sibling, the leftmost column of |
| 494 | that sibling can be calculated as the sum of this window's leftmost | 492 | that sibling can be calculated as the sum of this window's leftmost |
| 495 | column and total width (@pxref{Coordinates and Windows}). The | 493 | column and total width (@pxref{Coordinates and Windows}). The optional |
| 496 | optional argument @var{round} behaves as it does for | 494 | argument @var{round} behaves as it does for @code{window-total-height}. |
| 497 | @code{window-total-height}. | ||
| 498 | @end defun | 495 | @end defun |
| 499 | 496 | ||
| 500 | @defun window-total-size &optional window horizontal round | 497 | @defun window-total-size &optional window horizontal round |
| @@ -517,9 +514,10 @@ window in units of pixels. | |||
| 517 | This function returns the total height of window @var{window} in pixels. | 514 | This function returns the total height of window @var{window} in pixels. |
| 518 | @var{window} must be a valid window and defaults to the selected one. | 515 | @var{window} must be a valid window and defaults to the selected one. |
| 519 | 516 | ||
| 520 | The return value includes mode and header line and a bottom divider, if | 517 | The return value includes mode and header line, a horizontal scroll bar |
| 521 | any. If @var{window} is an internal window, its pixel height is the | 518 | and a bottom divider, if any. If @var{window} is an internal window, |
| 522 | pixel height of the screen areas spanned by its children. | 519 | its pixel height is the pixel height of the screen areas spanned by its |
| 520 | children. | ||
| 523 | @end defun | 521 | @end defun |
| 524 | 522 | ||
| 525 | @cindex window pixel height | 523 | @cindex window pixel height |
| @@ -542,10 +540,12 @@ the screen areas spanned by its children. | |||
| 542 | window has any adjacent windows. | 540 | window has any adjacent windows. |
| 543 | 541 | ||
| 544 | @defun window-full-height-p &optional window | 542 | @defun window-full-height-p &optional window |
| 545 | This function returns non-@code{nil} if @var{window} has no other | 543 | This function returns non-@code{nil} if @var{window} has no other window |
| 546 | window above or below it in its frame, i.e., its total height equals | 544 | above or below it in its frame. More precisely, this means that the |
| 547 | the total height of the root window on that frame. If @var{window} is | 545 | total height of @var{window} equals the total height of the root window |
| 548 | omitted or @code{nil}, it defaults to the selected window. | 546 | on that frame. The minibuffer window does not count in this regard. If |
| 547 | @var{window} is omitted or @code{nil}, it defaults to the selected | ||
| 548 | window. | ||
| 549 | @end defun | 549 | @end defun |
| 550 | 550 | ||
| 551 | @defun window-full-width-p &optional window | 551 | @defun window-full-width-p &optional window |
| @@ -559,7 +559,8 @@ that of the root window on that frame. If @var{window} is omitted or | |||
| 559 | @cindex body height of a window | 559 | @cindex body height of a window |
| 560 | @cindex window body width | 560 | @cindex window body width |
| 561 | The @dfn{body height} of a window is the height of its text area, which | 561 | The @dfn{body height} of a window is the height of its text area, which |
| 562 | does not include a mode or header line or a bottom divider. | 562 | does not include a mode or header line, a horizontal scroll bar, or a |
| 563 | bottom divider. | ||
| 563 | 564 | ||
| 564 | @defun window-body-height &optional window pixelwise | 565 | @defun window-body-height &optional window pixelwise |
| 565 | This function returns the height, in lines, of the body of window | 566 | This function returns the height, in lines, of the body of window |
| @@ -646,7 +647,8 @@ size: | |||
| 646 | @defopt window-min-height | 647 | @defopt window-min-height |
| 647 | This option specifies the minimum total height, in lines, of any window. | 648 | This option specifies the minimum total height, in lines, of any window. |
| 648 | Its value has to accommodate at least one text line as well as a mode | 649 | Its value has to accommodate at least one text line as well as a mode |
| 649 | and header line and a bottom divider, if present. | 650 | and header line, a horizontal scroll bar and a bottom divider, if |
| 651 | present. | ||
| 650 | @end defopt | 652 | @end defopt |
| 651 | 653 | ||
| 652 | @defopt window-min-width | 654 | @defopt window-min-width |
| @@ -685,10 +687,11 @@ of @var{window}'s lines. | |||
| 685 | 687 | ||
| 686 | The return value makes sure that all components of @var{window} remain | 688 | The return value makes sure that all components of @var{window} remain |
| 687 | fully visible if @var{window}'s size were actually set to it. With | 689 | fully visible if @var{window}'s size were actually set to it. With |
| 688 | @var{horizontal} @code{nil} it includes the mode and header line and the | 690 | @var{horizontal} @code{nil} it includes the mode and header line, the |
| 689 | bottom divider. With @var{horizontal} non-@code{nil} it includes the | 691 | horizontal scroll bar and the bottom divider. With @var{horizontal} |
| 690 | fringes, a scroll bar, and a right divider, if present. It does not, | 692 | non-@code{nil} it includes the fringes, a scroll bar, and a right |
| 691 | however, include the space reserved for the margins. | 693 | divider, if present. It does not, however, include the space reserved |
| 694 | for the margins. | ||
| 692 | 695 | ||
| 693 | The optional argument @var{ignore}, if non-@code{nil}, means ignore | 696 | The optional argument @var{ignore}, if non-@code{nil}, means ignore |
| 694 | restrictions imposed by fixed size windows, @code{window-min-height} or | 697 | restrictions imposed by fixed size windows, @code{window-min-height} or |
| @@ -740,11 +743,11 @@ Normally, the variables @code{window-min-height} and | |||
| 740 | (@pxref{Window Sizes}). However, if the optional argument @var{ignore} | 743 | (@pxref{Window Sizes}). However, if the optional argument @var{ignore} |
| 741 | is non-@code{nil}, this function ignores @code{window-min-height} and | 744 | is non-@code{nil}, this function ignores @code{window-min-height} and |
| 742 | @code{window-min-width}, as well as @code{window-size-fixed}. Instead, | 745 | @code{window-min-width}, as well as @code{window-size-fixed}. Instead, |
| 743 | it considers the minimum-height window to be one consisting of a header, | 746 | it considers the minimum-height window to be one consisting of a header |
| 744 | a mode line and a bottom divider (if any), plus a text area one line | 747 | and a mode line, a horizontal scrollbar and a bottom divider (if any), |
| 745 | tall; and a minimum-width window as one consisting of fringes, margins, | 748 | plus a text area one line tall; and a minimum-width window as one |
| 746 | a scroll bar and a right divider (if any), plus a text area two columns | 749 | consisting of fringes, margins, a scroll bar and a right divider (if |
| 747 | wide. | 750 | any), plus a text area two columns wide. |
| 748 | 751 | ||
| 749 | If the optional argument @var{pixelwise} is non-@code{nil}, | 752 | If the optional argument @var{pixelwise} is non-@code{nil}, |
| 750 | @var{delta} is interpreted as pixels. | 753 | @var{delta} is interpreted as pixels. |