Mercurial > hg > xemacs-beta
comparison src/scrollbar.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | c42ec1d1cded |
children | 70ad99077275 |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
466 /* Scrollbars are always the farthest from the text area. */ | 466 /* Scrollbars are always the farthest from the text area. */ |
467 if (vertical) | 467 if (vertical) |
468 { | 468 { |
469 x_offset = (!NILP (w->scrollbar_on_left_p) | 469 x_offset = (!NILP (w->scrollbar_on_left_p) |
470 ? WINDOW_LEFT (w) | 470 ? WINDOW_LEFT (w) |
471 : WINDOW_RIGHT (w) - scrollbar_width); | 471 : (WINDOW_RIGHT (w) - scrollbar_width |
472 - (window_needs_vertical_divider (w) | |
473 ? window_divider_width (w) : 0))); | |
472 y_offset = WINDOW_TEXT_TOP (w) + f->scrollbar_y_offset; | 474 y_offset = WINDOW_TEXT_TOP (w) + f->scrollbar_y_offset; |
473 } | 475 } |
474 else | 476 else |
475 { | 477 { |
476 x_offset = WINDOW_TEXT_LEFT (w); | 478 x_offset = WINDOW_TEXT_LEFT (w); |
583 call_critical_lisp_code (d, | 585 call_critical_lisp_code (d, |
584 Qinit_scrollbar_from_resources, | 586 Qinit_scrollbar_from_resources, |
585 Qglobal); | 587 Qglobal); |
586 unbind_to (depth, Qnil); | 588 unbind_to (depth, Qnil); |
587 } | 589 } |
590 } | |
591 | |
592 static void | |
593 vertical_scrollbar_changed_in_window (Lisp_Object specifier, | |
594 struct window *w, | |
595 Lisp_Object oldval) | |
596 { | |
597 /* Hold on your cerebella guys. If we always show the dividers, | |
598 changing scrollbar affects only how the text and scrollbar are | |
599 laid out in the window. If we do not want the dividers to show up | |
600 always, then we mark more drastic change, because changing | |
601 divider appearane changes lotta things. Although we actually need | |
602 to do this only if the scrollbar has appeared or disappeared | |
603 completely at either window edge, we do this always, as users | |
604 usually do not reposition scrollbars 200 times a second or so. Do | |
605 you? */ | |
606 if (NILP (w->vertical_divider_draggable_p)) | |
607 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (XFRAME (WINDOW_FRAME (w))); | |
608 else | |
609 MARK_WINDOWS_CHANGED (w); | |
588 } | 610 } |
589 | 611 |
590 /* This function is called as a result of a change to the | 612 /* This function is called as a result of a change to the |
591 `scrollbar-pointer' glyph. */ | 613 `scrollbar-pointer' glyph. */ |
592 static void | 614 static void |
926 (Vscrollbar_width, | 948 (Vscrollbar_width, |
927 list1 (Fcons (Qnil, make_int (DEFAULT_SCROLLBAR_WIDTH)))); | 949 list1 (Fcons (Qnil, make_int (DEFAULT_SCROLLBAR_WIDTH)))); |
928 set_specifier_caching (Vscrollbar_width, | 950 set_specifier_caching (Vscrollbar_width, |
929 slot_offset (struct window, | 951 slot_offset (struct window, |
930 scrollbar_width), | 952 scrollbar_width), |
931 some_window_value_changed, | 953 vertical_scrollbar_changed_in_window, |
932 slot_offset (struct frame, | 954 slot_offset (struct frame, |
933 scrollbar_width), | 955 scrollbar_width), |
934 frame_size_slipped); | 956 frame_size_slipped); |
935 | 957 |
936 DEFVAR_SPECIFIER ("scrollbar-height", &Vscrollbar_height /* | 958 DEFVAR_SPECIFIER ("scrollbar-height", &Vscrollbar_height /* |
972 set_specifier_fallback (Vvertical_scrollbar_visible_p, | 994 set_specifier_fallback (Vvertical_scrollbar_visible_p, |
973 list1 (Fcons (Qnil, Qt))); | 995 list1 (Fcons (Qnil, Qt))); |
974 set_specifier_caching (Vvertical_scrollbar_visible_p, | 996 set_specifier_caching (Vvertical_scrollbar_visible_p, |
975 slot_offset (struct window, | 997 slot_offset (struct window, |
976 vertical_scrollbar_visible_p), | 998 vertical_scrollbar_visible_p), |
977 some_window_value_changed, | 999 vertical_scrollbar_changed_in_window, |
978 slot_offset (struct frame, | 1000 slot_offset (struct frame, |
979 vertical_scrollbar_visible_p), | 1001 vertical_scrollbar_visible_p), |
980 frame_size_slipped); | 1002 frame_size_slipped); |
981 | 1003 |
982 DEFVAR_SPECIFIER ("scrollbar-on-left-p", &Vscrollbar_on_left_p /* | 1004 DEFVAR_SPECIFIER ("scrollbar-on-left-p", &Vscrollbar_on_left_p /* |
1000 } | 1022 } |
1001 | 1023 |
1002 set_specifier_caching (Vscrollbar_on_left_p, | 1024 set_specifier_caching (Vscrollbar_on_left_p, |
1003 slot_offset (struct window, | 1025 slot_offset (struct window, |
1004 scrollbar_on_left_p), | 1026 scrollbar_on_left_p), |
1005 some_window_value_changed, | 1027 vertical_scrollbar_changed_in_window, |
1006 slot_offset (struct frame, | 1028 slot_offset (struct frame, |
1007 scrollbar_on_left_p), | 1029 scrollbar_on_left_p), |
1008 frame_size_slipped); | 1030 frame_size_slipped); |
1009 | 1031 |
1010 DEFVAR_SPECIFIER ("scrollbar-on-top-p", &Vscrollbar_on_top_p /* | 1032 DEFVAR_SPECIFIER ("scrollbar-on-top-p", &Vscrollbar_on_top_p /* |