Mercurial > emacs
changeset 16254:3e8b16badf3d
(Fx_create_frame): Default Qvertical_scroll_bars to `left'.
Add the symbol `right'; this symbol is used to indicate
that a right-side scroll bar is wanted.
(x_set_vertical_scroll_bars): Check for left<->right<->none
scroll bar changes, and modify the vertical scroll bar type as appropriate.
(x_figure_window_size): Use new SET_FRAME_WIDTH macro.
(Fx_create_frame): Likewise.
(Fx_horizontal_line): Use new macro WINDOW_LEFT_MARGIN.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Sep 1996 01:14:57 +0000 |
parents | 3ea02d461499 |
children | dcde843403a3 |
files | src/xfns.c |
diffstat | 1 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Sat Sep 21 01:11:31 1996 +0000 +++ b/src/xfns.c Sat Sep 21 01:14:57 1996 +0000 @@ -179,6 +179,7 @@ Lisp_Object Qicon_name; Lisp_Object Qinternal_border_width; Lisp_Object Qleft; +Lisp_Object Qright; Lisp_Object Qmouse_color; Lisp_Object Qnone; Lisp_Object Qparent_id; @@ -1939,9 +1940,17 @@ struct frame *f; Lisp_Object arg, oldval; { - if (NILP (arg) != ! FRAME_HAS_VERTICAL_SCROLL_BARS (f)) + if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)) + || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) + || (NILP (arg) && FRAME_HAS_VERTICAL_SCROLL_BARS (f)) + || (!NILP (arg) && ! FRAME_HAS_VERTICAL_SCROLL_BARS (f))) { - FRAME_HAS_VERTICAL_SCROLL_BARS (f) = ! NILP (arg); + FRAME_VERTICAL_SCROLL_BAR_TYPE (f) + = (NILP (arg) + ? vertical_scroll_bar_none + : EQ (Qright, arg) + ? vertical_scroll_bar_right + : vertical_scroll_bar_left); /* We set this parameter before creating the X window for the frame, so we can get the geometry right from the start. @@ -2354,7 +2363,7 @@ /* Default values if we fall through. Actually, if that happens we should get window manager prompting. */ - f->width = DEFAULT_COLS; + SET_FRAME_WIDTH (f, DEFAULT_COLS); f->height = DEFAULT_ROWS; /* Window managers expect that if program-specified positions are not (0,0), they're intentional, not defaults. */ @@ -2374,7 +2383,7 @@ if (!EQ (tem1, Qunbound)) { CHECK_NUMBER (tem1, 0); - f->width = XINT (tem1); + SET_FRAME_WIDTH (f, XINT (tem1)); } if (!NILP (tem2) && !EQ (tem2, Qunbound)) window_prompting |= USSize; @@ -3195,7 +3204,7 @@ } x_default_parameter (f, parms, Qinternal_border_width, make_number (2), "internalBorderWidth", "BorderWidth", number); - x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, + x_default_parameter (f, parms, Qvertical_scroll_bars, Qleft, "verticalScrollBars", "ScrollBars", boolean); /* Also do the stuff which must be set before the window exists. */ @@ -3265,7 +3274,8 @@ f->height. */ width = f->width; height = f->height; - f->height = f->width = 0; + f->height = 0; + SET_FRAME_WIDTH (f, 0); change_frame_size (f, height, width, 1, 0); /* Tell the server what size and position, etc, we want, @@ -4374,7 +4384,7 @@ register int line = (x_mouse_y + 1) * f->output_data.x->line_height + f->output_data.x->internal_border_width; register int left = f->output_data.x->internal_border_width - + (w->left + + (WINDOW_LEFT_MARGIN (w) * FONT_WIDTH (f->output_data.x->font)); register int right = left + (w->width * FONT_WIDTH (f->output_data.x->font)) @@ -5074,6 +5084,8 @@ staticpro (&Qinternal_border_width); Qleft = intern ("left"); staticpro (&Qleft); + Qright = intern ("right"); + staticpro (&Qright); Qmouse_color = intern ("mouse-color"); staticpro (&Qmouse_color); Qnone = intern ("none");