Class
Lspinner_button
Home
In: locana/l_spinner.rb
Parent: Lbutton_pixmap

This is the button used inside the Lspinner. It is based on the Lbutton_pixmap class. This button has two halves, a top half and a bottom half.

Methods

button_width, bwidth, on_mouse_ldbl, on_mouse_ldn, on_mouse_lup, paint_normal, prepare_object,
Public Class methods
button_width() src

Returns the width of the pixmap which is 16 pixels.

Public Instance methods
prepare_object(move_obj=nil) src

This button always has a fixed size. Returns with width of the pixmap.

paint_normal() src

This button is painted to look like two smaller buttons. It draws the pixmap and a border for the top button and a separate border for the bottom button.

bwidth() src

Returns 1. We want a smaller than normal border.

on_mouse_ldbl(levent=nil) src

Calls on_mouse_ldn && on_mouse_lup otherwise clicking multiple times can appear to skip on_mouse_ldn events.

on_mouse_ldn(levent=nil) src

Determines which button is pressed and makes it look like it was pressed.

on_mouse_lup(levent=nil) src

Triggers the on_increment or on_decrement event for the owner (Lspinner) depending on which button was clicked on.


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