diff options
| author | Alan Third | 2016-05-01 13:04:07 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2016-05-01 13:04:07 +0200 |
| commit | e683a2570be6f2e4f8defa4e7ee35a7d87f18918 (patch) | |
| tree | 0b749572bb70a6222d333d932bda7a29b18e5729 /src/nsterm.h | |
| parent | 80a1e3b9b58aaeb71913737e07bb305d9eb54437 (diff) | |
| download | emacs-e683a2570be6f2e4f8defa4e7ee35a7d87f18918.tar.gz emacs-e683a2570be6f2e4f8defa4e7ee35a7d87f18918.zip | |
Implement horizontal scroll bars on NS
* 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.
Diffstat (limited to 'src/nsterm.h')
| -rw-r--r-- | src/nsterm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nsterm.h b/src/nsterm.h index 0aea9cca112..6cad337f3f8 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -676,11 +676,13 @@ char const * nstrace_fullscreen_type_name (int); | |||
| 676 | /* offset to the bottom of knob of last mouse down */ | 676 | /* offset to the bottom of knob of last mouse down */ |
| 677 | CGFloat last_mouse_offset; | 677 | CGFloat last_mouse_offset; |
| 678 | float min_portion; | 678 | float min_portion; |
| 679 | int pixel_height; | 679 | int pixel_length; |
| 680 | enum scroll_bar_part last_hit_part; | 680 | enum scroll_bar_part last_hit_part; |
| 681 | 681 | ||
| 682 | BOOL condemned; | 682 | BOOL condemned; |
| 683 | 683 | ||
| 684 | BOOL horizontal; | ||
| 685 | |||
| 684 | /* optimize against excessive positioning calls generated by emacs */ | 686 | /* optimize against excessive positioning calls generated by emacs */ |
| 685 | int em_position; | 687 | int em_position; |
| 686 | int em_portion; | 688 | int em_portion; |