+(defcustom modeline-scrolling-method nil
+ "*If non-nil, dragging the modeline with the mouse may also scroll its
+text horizontally (vertical motion controls window resizing and horizontal
+motion controls modeline scrolling).
+
+With a value of t, the modeline text is scrolled in the same direction as
+the mouse motion. With a value of 'scrollbar, the modeline is considered as
+a scrollbar for its own text, which then moves in the opposite direction."
+ :type '(choice (const :tag "none" nil)
+ (const :tag "text" t)
+ (const :tag "scrollbar" scrollbar))
+ :set (lambda (sym val)
+ (set-default sym val)
+ (when (featurep 'x)
+ (cond ((eq val t)
+ (set-glyph-image modeline-pointer-glyph "hand2" 'global 'x))
+ ((eq val 'scrollbar)
+ (set-glyph-image modeline-pointer-glyph "fleur" 'global 'x))
+ (t
+ (set-glyph-image modeline-pointer-glyph "sb_v_double_arrow"
+ 'global 'x))))
+ (when (featurep 'mswindows)
+ (cond ((eq val t)
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "SizeAll"]
+ 'global 'mswindows))
+ ((eq val 'scrollbar)
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "Normal"]
+ 'global 'mswindows))
+ (t
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "SizeNS"]
+ 'global 'mswindows)))))
+ :group 'modeline)
+