• Alan Third's avatar
    Implement horizontal scroll bars on NS · e683a257
    Alan Third authored
    * lisp/scroll-bar.el (horizontal-scroll-bars-available-p): Remove NS
    check.
    * lisp/term/ns-win.el: Remove custom NS scroll-bar handlers and bind
    scroll-bar mouse clicks to standard handlers.
    * src/nsterm.h (EmacsScroller): Add 'horizontal' property and rename
    pixel_height to pixel_length.
    * src/nsterm.m (x_set_window_size): Remove left-hand scroll-bar code. It
    caused scroll-bars to be over-drawn and the best working solution
    appears to be complete removal.
    (ns_set_horizontal_scroll_bar): Rewrite to handle horizontal scrollers
    correctly.
    (ns_set_vertical_scroll_bar): Set width to actual scroller width.
    (setFrame): Handle horizontal case.
    (dealloc): Handle horizontal case.
    (judge): Handle horizontal case.
    (setPosition): Rename pixel_height to pixel_length.
    (sendScrollEventAtLoc): Handle horizontal case.
    (mouseDown): Handle horizontal case and general tidy up of code.
    (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with
    absolute pixel size instead of ratio.
    * src/window.h: Remove NS check.
    e683a257
nsterm.m 255 KB