Commit e1a2cb1c authored by Martin Rudalics's avatar Martin Rudalics

Various window code related fixes and documentation changes.

* dispnew.c (change_frame_size_1): Add new_lines instead of
new_height, the latter may be still zero if passed as such.
* window.c (Fwindow_pixel_height): Mention bottom divider in
doc-string.
* window.el (window-min-height, window-min-width): Rewrite
doc-strings.
(window-body-size): Add PIXELWISE argument to make it consistent
with its callees.
* display.texi (Window Dividers): New section.
* frames.texi (Layout Parameters): Add right-divider-width and
bottom-divider-width.
* windows.texi (Window Sizes): Redraw schematic and rewrite its
description.  Rewrite descriptions of `window-total-height',
`window-total-width', `window-total-size', `window-body-height',
`window-body-width' and `window-size-fixed'.  Add descriptions
for `window-pixel-height', `window-pixel-width',
`window-min-height' and `window-min-width'.  Remove description
of `window-size-fixed-p' moving part of it to that of
`window-size-fixed'.
(Resizing Windows): Mention dividers when talking about minimum
sizes.
parent 6bf67038
2014-03-05 Martin Rudalics <rudalics@gmx.at>
* display.texi (Window Dividers): New section.
* frames.texi (Layout Parameters): Add right-divider-width and
bottom-divider-width.
* windows.texi (Window Sizes): Redraw schematic and rewrite its
description. Rewrite descriptions of `window-total-height',
`window-total-width', `window-total-size', `window-body-height',
`window-body-width' and `window-size-fixed'. Add descriptions
for `window-pixel-height', `window-pixel-width',
`window-min-height' and `window-min-width'. Remove description
of `window-size-fixed-p' moving part of it to that of
`window-size-fixed'.
(Resizing Windows): Mention dividers when talking about minimum
sizes.
2014-03-05 Glenn Morris <rgm@gnu.org> 2014-03-05 Glenn Morris <rgm@gnu.org>
* modes.texi (SMIE Customization): New section. * modes.texi (SMIE Customization): New section.
......
...@@ -24,6 +24,7 @@ that Emacs presents to the user. ...@@ -24,6 +24,7 @@ that Emacs presents to the user.
font, colors, etc. font, colors, etc.
* Fringes:: Controlling window fringes. * Fringes:: Controlling window fringes.
* Scroll Bars:: Controlling vertical scroll bars. * Scroll Bars:: Controlling vertical scroll bars.
* Window Dividers:: Separating windows visually.
* Display Property:: Enabling special display features. * Display Property:: Enabling special display features.
* Images:: Displaying images in Emacs buffers. * Images:: Displaying images in Emacs buffers.
* Buttons:: Adding clickable buttons to Emacs buffers. * Buttons:: Adding clickable buttons to Emacs buffers.
...@@ -3896,6 +3897,53 @@ buffer's scroll bars, measured in pixels. A value of @code{nil} means ...@@ -3896,6 +3897,53 @@ buffer's scroll bars, measured in pixels. A value of @code{nil} means
to use the value specified by the frame. to use the value specified by the frame.
@end defvar @end defvar
@node Window Dividers
@section Window Dividers
@cindex window dividers
@cindex right dividers
@cindex bottom dividers
Window dividers are bars drawn between a frame's windows. A ``right''
divider is drawn between a window and its sibling(s) on the right. Its
width is specified by the frame parameter @code{right-divider-width}. A
``bottom'' divider is drawn between a window and its sibling(s) on the
bottom or the echo area. Its width is specified by the frame parameter
@code{bottom-divider-width}. In either case, specifying a width of zero
means to not draw such dividers. @xref{Layout Parameters}.
Technically, a right divider ``belongs'' to the window on its left,
which means that its width is part of the total width of that window. A
bottom divider ``belongs'' to the window above it, which means that its
height is part of the total height of that window. @xref{Window Sizes}.
When a window has both, a right and a bottom divider, the bottom divider
``prevails''. This means that the width of the bottom divider equals
the total width of the window while the height of the right divider
equals the total height of the window minus the height of the bottom
divider.
Dividers can be dragged with the mouse and are therefore useful for
adjusting the sizes of adjacent windows with the mouse. They also serve
to set windows visually apart from their siblings when no scroll bars or
mode lines are present. The following three faces allow to customize
the appearance of dividers:
@table @code
@item window-divider
When a divider is less than three pixels wide, it is drawn solidly with
the foreground of this face. For larger dividers this face is used for
the inner part only, exluding the first and last pixel.
@item window-divider-first-pixel
This is the face used for drawing the first pixel of a divider that is
at least three pixels wide. To obtain a solid appearance, set this to
the same value used for the @code{window-divider} face.
@item window-divider-last-pixel
This is the face used for drawing the last pixel of a divider that is at
least three pixels wide. To obtain a solid appearance, set this to the
same value used for the @code{window-divider} face.
@end table
@node Display Property @node Display Property
@section The @code{display} Property @section The @code{display} Property
@cindex display specification @cindex display specification
......
...@@ -745,6 +745,18 @@ right fringe. However, you can force one fringe or the other to a ...@@ -745,6 +745,18 @@ right fringe. However, you can force one fringe or the other to a
precise width by specifying that width as a negative integer. If both precise width by specifying that width as a negative integer. If both
widths are negative, only the left fringe gets the specified width. widths are negative, only the left fringe gets the specified width.
@vindex right-divider-width, a frame parameter
@item right-divider-width
The width of the right divider (@pxref{Window Dividers}) of any window
on the frame, in pixels. A value of zero means to not draw right
dividers.
@vindex bottom-divider-width, a frame parameter
@item bottom-divider-width
The width of the bottom divider (@pxref{Window Dividers}) of any window
on the frame, in pixels. A value of zero means to not draw bottom
dividers.
@vindex menu-bar-lines frame parameter @vindex menu-bar-lines frame parameter
@item menu-bar-lines @item menu-bar-lines
The number of lines to allocate at the top of the frame for a menu The number of lines to allocate at the top of the frame for a menu
......
This diff is collapsed.
2014-03-05 Martin Rudalics <rudalics@gmx.at>
* window.el (window-min-height, window-min-width): Rewrite
doc-strings.
(window-body-size): Add PIXELWISE argument to make it consistent
with its callees.
2014-03-05 Juanma Barranquero <lekktu@gmail.com> 2014-03-05 Juanma Barranquero <lekktu@gmail.com>
* finder.el (finder-mode-map, finder-mode-syntax-table): * finder.el (finder-mode-map, finder-mode-syntax-table):
......
...@@ -319,10 +319,11 @@ Anything less might crash Emacs.") ...@@ -319,10 +319,11 @@ Anything less might crash Emacs.")
(frame-char-size (window-normalize-window window)))) (frame-char-size (window-normalize-window window))))
(defcustom window-min-height 4 (defcustom window-min-height 4
"The minimum number of lines of any window. "The minimum total height, in lines, of any window.
The value has to accommodate a mode- or header-line if present. The value has to accommodate one text line, a mode and header
A value less than `window-safe-min-height' is ignored. The value line, and a bottom divider, if present. A value less than
of this variable is honored when windows are resized or split. `window-safe-min-height' is ignored. The value of this variable
is honored when windows are resized or split.
Applications should never rebind this variable. To resize a Applications should never rebind this variable. To resize a
window to a height less than the one specified here, an window to a height less than the one specified here, an
...@@ -349,11 +350,11 @@ Anything less might crash Emacs.") ...@@ -349,11 +350,11 @@ Anything less might crash Emacs.")
(frame-char-size (window-normalize-window window) t))) (frame-char-size (window-normalize-window window) t)))
(defcustom window-min-width 10 (defcustom window-min-width 10
"The minimum number of columns of any window. "The minimum total width, in columns, of any window.
The value has to accommodate margins, fringes, or scrollbars if The value has to accommodate two text columns as well as margins,
present. A value less than `window-safe-min-width' is ignored. fringes, a scroll bar and a right divider, if present. A value
The value of this variable is honored when windows are resized or less than `window-safe-min-width' is ignored. The value of this
split. variable is honored when windows are resized or split.
Applications should never rebind this variable. To resize a Applications should never rebind this variable. To resize a
window to a width less than the one specified here, an window to a width less than the one specified here, an
...@@ -1671,16 +1672,17 @@ WINDOW must be a valid window and defaults to the selected one." ...@@ -1671,16 +1672,17 @@ WINDOW must be a valid window and defaults to the selected one."
(= (window-pixel-width window) (= (window-pixel-width window)
(window-pixel-width (frame-root-window window)))) (window-pixel-width (frame-root-window window))))
(defun window-body-size (&optional window horizontal) (defun window-body-size (&optional window horizontal pixelwise)
"Return the height or width of WINDOW's text area. "Return the height or width of WINDOW's text area.
WINDOW must be a live window and defaults to the selected one. WINDOW must be a live window and defaults to the selected one.
If HORIZONTAL is omitted or nil, return the height of the text If HORIZONTAL is omitted or nil, return the height of the text
area, like `window-body-height'. Otherwise, return the width of area, like `window-body-height'. Otherwise, return the width of
the text area, like `window-body-width'." the text area, like `window-body-width'. In either case, the
optional argument PIXELWISE is passed to the functions."
(if horizontal (if horizontal
(window-body-width window) (window-body-width window pixelwise)
(window-body-height window))) (window-body-height window pixelwise)))
(defun window-current-scroll-bars (&optional window) (defun window-current-scroll-bars (&optional window)
"Return the current scroll bar settings for WINDOW. "Return the current scroll bar settings for WINDOW.
......
2014-03-05 Martin Rudalics <rudalics@gmx.at>
* dispnew.c (change_frame_size_1): Add new_lines instead of
new_height, the latter may be still zero if passed as such.
* window.c (Fwindow_pixel_height): Mention bottom divider in
doc-string.
2014-03-05 Paul Eggert <eggert@cs.ucla.edu> 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
Fix "resource temporarily unavailable" with xgselect (Bug#16925). Fix "resource temporarily unavailable" with xgselect
(Bug#16925).
* xgselect.c: Include <stdbool.h>. * xgselect.c: Include <stdbool.h>.
(xg_select) [!USE_GTK]: Don't lose track of errno. (xg_select) [!USE_GTK]: Don't lose track of errno.
......
...@@ -5539,7 +5539,7 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, ...@@ -5539,7 +5539,7 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height,
/* MSDOS frames cannot PRETEND, as they change frame size by /* MSDOS frames cannot PRETEND, as they change frame size by
manipulating video hardware. */ manipulating video hardware. */
if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
FrameRows (FRAME_TTY (f)) = new_height; FrameRows (FRAME_TTY (f)) = new_lines;
} }
if (new_text_width != FRAME_TEXT_WIDTH (f) if (new_text_width != FRAME_TEXT_WIDTH (f)
......
...@@ -699,9 +699,9 @@ DEFUN ("window-pixel-height", Fwindow_pixel_height, Swindow_pixel_height, 0, 1, ...@@ -699,9 +699,9 @@ DEFUN ("window-pixel-height", Fwindow_pixel_height, Swindow_pixel_height, 0, 1,
doc: /* Return the height of window WINDOW in pixels. doc: /* Return the height of window WINDOW in pixels.
WINDOW must be a valid window and defaults to the selected one. WINDOW must be a valid window and defaults to the selected one.
The return value includes the mode line and header line, if any. If The return value includes the mode line and header line and the bottom
WINDOW is an internal window, its pixel height is the height of the divider, if any. If WINDOW is an internal window, its pixel height is
screen areas spanned by its children. */) the height of the screen areas spanned by its children. */)
(Lisp_Object window) (Lisp_Object window)
{ {
return make_number (decode_valid_window (window)->pixel_height); return make_number (decode_valid_window (window)->pixel_height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment