aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.h
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-21 00:59:54 +0000
committerRichard M. Stallman1996-09-21 00:59:54 +0000
commitaa5abbc013c2e9fdb2bec5c7ed7cf6f5b00352f5 (patch)
treef69617f91e4684e9f754cabb163bd9cfda71af73 /src/xterm.h
parentd9cdbb3d95e89d5334a21936d48a7ba18ba83940 (diff)
downloademacs-aa5abbc013c2e9fdb2bec5c7ed7cf6f5b00352f5.tar.gz
emacs-aa5abbc013c2e9fdb2bec5c7ed7cf6f5b00352f5.zip
(VERTICAL_SCROLL_BAR_INSIDE_WIDTH): Add frame as an
argument, and use it to decrease the width in the case of a left-side scroll bar; this prevents the bar and adjacent text from scrunching together. (LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM): Add constant. (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT): New arg F (not used). (VERTICAL_SCROLL_BAR_TOP_RANGE): New arg F (not used).
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 60643d8c1a8..ca5fc9e88c6 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -602,8 +602,13 @@ struct scroll_bar {
602 602
603/* Return the inside width of a vertical scroll bar, given the outside 603/* Return the inside width of a vertical scroll bar, given the outside
604 width. */ 604 width. */
605#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(width) \ 605#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \
606 ((width) - VERTICAL_SCROLL_BAR_LEFT_BORDER - VERTICAL_SCROLL_BAR_RIGHT_BORDER) 606 ((width) \
607 - VERTICAL_SCROLL_BAR_LEFT_BORDER \
608 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \
609 - (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
610 ? LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM \
611 : 0))
607 612
608/* Return the length of the rectangle within which the top of the 613/* Return the length of the rectangle within which the top of the
609 handle must stay. This isn't equivalent to the inside height, 614 handle must stay. This isn't equivalent to the inside height,
@@ -612,12 +617,12 @@ struct scroll_bar {
612 This is the real range of motion for the scroll bar, so when we're 617 This is the real range of motion for the scroll bar, so when we're
613 scaling buffer positions to scroll bar positions, we use this, not 618 scaling buffer positions to scroll bar positions, we use this, not
614 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ 619 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
615#define VERTICAL_SCROLL_BAR_TOP_RANGE(height) \ 620#define VERTICAL_SCROLL_BAR_TOP_RANGE(f, height) \
616 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (height) - VERTICAL_SCROLL_BAR_MIN_HANDLE) 621 (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE)
617 622
618/* Return the inside height of vertical scroll bar, given the outside 623/* Return the inside height of vertical scroll bar, given the outside
619 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */ 624 height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */
620#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(height) \ 625#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f, height) \
621 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER) 626 ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
622 627
623 628
@@ -640,6 +645,10 @@ struct scroll_bar {
640/* Minimum lengths for scroll bar handles, in pixels. */ 645/* Minimum lengths for scroll bar handles, in pixels. */
641#define VERTICAL_SCROLL_BAR_MIN_HANDLE (5) 646#define VERTICAL_SCROLL_BAR_MIN_HANDLE (5)
642 647
648/* For a left-side scroll bar, trimming off a few pixels prevents
649 text from glomming up against the scroll bar */
650#define LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM (2)
651
643 652
644/* Manipulating pixel sizes and character sizes. 653/* Manipulating pixel sizes and character sizes.
645 Knowledge of which factors affect the overall size of the window should 654 Knowledge of which factors affect the overall size of the window should