Class
Lradiobox
Home
In: locana/l_radiobox.rb
Parent: Lobject

The Lradiobox class allows you click one option and all other options in the Lcontainer are cleared. Basically, allows you to select one of many options. Based on the Lobject class. Supports the following attributes:

Methods

box_border, box_bwidth, box_color, box_pos, box_pos=, checkbox_spacing, checkbox_width, on_click, on_key_release, on_mouse_lup, paint_check, paint_checkbox, paint_normal, pixel_height, pixel_width, text=, valid_attribute?, value=,
Public Instance methods
box_border() src

Returns border (circle) used to contain the radiobox indicator. The default is nil. This is really not supported and is added only for consistency with the Lcheckbox object. It could be supported in the future. Currently, returns nil, which draws a plain circle with a thickness of 1.

box_bwidth() src

Returns the width of the circle that contains the radiobox indicator. The default is 1.

box_color() src

Returns color of the circle that contains the radiobox indicator. Returns fg() by default to match the foreground color of the text.

box_pos() src

Returns the position of the circle that contains the radiobox indicator. Supported values are :left or :right.

box_pos=(new_value) src

Sets the position of the circle that contains the radiobox indicator.

valid_attribute?(attribute, lvalue=nil) src

Supports the :box_pos attribute.

paint_normal() src

Paints background color, the text, the radiobox circle (the outer circle) by calling paint_checkbox, and the on indicator (the inner circle) by calling paint_check.

paint_checkbox() src

Paints the radiobox. This is the outer circle that contains the radiobox indicator. Called by paint_normal and calls paint_check() to paint the indicator (inner circle).

paint_check(left, top, right, bottom) src

Paints the on indicator or the inner circle of the radiobox when :value = true.

value=(new_value) src

Turns off all other Lradiobox objects in the same parent as us when new_value is true, this triggers the :on_change event for any Lradiobox being cleared.

on_click(levent=nil, &block) src

This is triggered by the :on_key_release of the space bar or the :on_mouse_lup event and triggers the on_change event. This paints or removes the inner circle (the indicator) depending on the new state of the radiobox.

on_key_release(levent=nil, &block) src

We need to act on the spacebar

on_mouse_lup(levent=nil, &block) src

Pressing the spacebar triggers the :on_click event.

checkbox_spacing() src

Returns the distance between the text and the radiobox. The default is 4.

checkbox_width() src

The width of the radiobox. By default this is the same as the height which is the height of the text in the text box.

pixel_width() src

Returns the pixel width of the text in the object plus the checkbox_width plus the checkbox_spacing. This should take into consideration the font, size, and style of the object and its parents. This is used to calculate width of the object when needed.

pixel_height() src

Returns the pixel height of the text in the object. This should take into consideration the font, size, and style of the object and its parents. This is used to calculate height of the object when needed.

text=(new_value) src

Converts ’&’ (except ’& ’) to an accelerator


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