Mercurial > emacs
comparison src/xterm.h @ 16252:41c962c84de5
(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).
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Sep 1996 00:59:54 +0000 |
parents | d7eb8b39a84b |
children | eed1157f0587 |
comparison
equal
deleted
inserted
replaced
16251:ec1b1ae37295 | 16252:41c962c84de5 |
---|---|
600 #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ | 600 #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ |
601 ((height) * (f)->output_data.x->line_height) | 601 ((height) * (f)->output_data.x->line_height) |
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, |
610 because the scroll bar handle has a minimum height. | 615 because the scroll bar handle has a minimum height. |
611 | 616 |
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 |
624 /* Border widths for scroll bars. | 629 /* Border widths for scroll bars. |
625 | 630 |
637 #define VERTICAL_SCROLL_BAR_TOP_BORDER (2) | 642 #define VERTICAL_SCROLL_BAR_TOP_BORDER (2) |
638 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (2) | 643 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (2) |
639 | 644 |
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) |
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) | |
642 | 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 |
646 be hidden in these macros, if that's possible. | 655 be hidden in these macros, if that's possible. |