Function: scroll-bar-columns

scroll-bar-columns is a byte-compiled function defined in scroll-bar.el.gz.

Signature

(scroll-bar-columns SIDE)

Documentation

Return the width, measured in columns, of the vertical scrollbar on SIDE.

SIDE must be the symbol left or right.

Source Code

;; Defined in /usr/src/emacs/lisp/scroll-bar.el.gz
(defun scroll-bar-columns (side)
  "Return the width, measured in columns, of the vertical scrollbar on SIDE.
SIDE must be the symbol `left' or `right'."
  (let* ((wsb   (window-scroll-bars))
         (vtype (nth 2 wsb))
         (cols  (nth 1 wsb)))
    (cond
     ((not (memq side '(left right)))
      (error "`left' or `right' expected instead of %S" side))
     ((and (eq vtype side) cols))
     ((eq (frame-parameter nil 'vertical-scroll-bars) side)
      ;; nil means it's a non-toolkit scroll bar, and its width in
      ;; columns is 14 pixels rounded up.
      (ceiling (or (frame-parameter nil 'scroll-bar-width) 14)
               (frame-char-width)))
     (0))))