Class
Lscrollbar_scroller
Home
In: locana/l_scrollbar.rb
Parent: Lbutton_pixmap

This is the scroller button used inside the Lscrollbar for scrolling. This button can be clicked on and dragged to scroll the content of the scrollbars owner object. Every Lscrollbar creates one of these objects. It is based on the Lbutton_pixmap object.

Methods

allow_dragging, bg, move, on_mouse_ldn, on_mouse_lup, on_mouse_move_object, prepare_object, update_scroller, valid_attribute?,
Public Instance methods
valid_attribute?(attribute, lvalue=nil) src

Supports the :otype attributes of :vertical and :horizontal

allow_dragging() src

Returns true because the scroller button can always be dragged.

bg() src

Uses the owners foreground color (:fg attribute).

prepare_object(move_obj=nil) src

The scroller button always starts out with a fixed position that is dependant on the owners (Lscrollbar) position and a fixed size that is dependant on the owners (Lscrollbar) total_size and client_size. It prepares :horizontal scroller buttons slightly different from vertical ones.

move(x, y, w=nil, h=nil, remember_position=nil) src

Repaints the client area to make sure we can see the button when our owner (Lscrollbar) is moved.

update_scroller() src

Resizes the scroller button based on the owners (Lscrollbar) total_size and client_size. This is called by the Lscrollbar any time the owners (Lscrollbar) owner changes size or content.

on_mouse_move_object(levent=nil) src

Controls the dragging of the scroller button and triggers the appropriate :on_scroll event to the owner object (Lscrollbar).

on_mouse_ldn(levent=nil) src

Remembers the distance from the current mouse position to the top of the scroller button. This is used when dragging the scroller button to keep the movement consistent. Also starts the dragging process.

on_mouse_lup(levent=nil) src

Forgets the remembered distance.


Seva Software


Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.

http://www.arunadb.org http://www.locana.org http://www.ruby-lang.org http://www.coolwell.org http://www.sevasoftware.com