Class: Shoes::CheckButton

Inherits:
Shoes::Common::UIElement show all
Includes:
Shoes::Common::Clickable, Shoes::Common::Focus, Shoes::Common::State
Defined in:
shoes-core/lib/shoes/check_button.rb

Direct Known Subclasses

Check, Radio, Swt::Check, Swt::Radio

Constant Summary

Constants included from Shoes::Common::State

Shoes::Common::State::DISABLED_STATE

Constants included from Shoes::Common::Style

Shoes::Common::Style::DEFAULT_STYLES, Shoes::Common::Style::STYLE_GROUPS

Instance Attribute Summary

Attributes included from Shoes::Common::Clickable

#pass_coordinates

Attributes inherited from Shoes::Common::UIElement

#app, #dimensions, #gui, #parent

Instance Method Summary collapse

Methods included from Shoes::Common::State

#after_initialize, #enabled?, #state=, #update_from_state

Methods included from Shoes::Common::Focus

#focus, #focused?

Methods included from Shoes::Common::Clickable

#click, #pass_coordinates?, #register_click, #release

Methods inherited from Shoes::Common::UIElement

#add_to_parent, #after_initialize, #before_initialize, #create_backend, #create_dimensions, #handle_block, #initialize, #needs_rotate?, #painted?, #redraw_height, #redraw_left, #redraw_top, #redraw_width, #update_fill, #update_stroke

Methods included from Shoes::Common::Style

#applicable_app_styles, #create_style_hash, included, #style, #style_init

Methods included from Shoes::Common::SafelyEvaluate

#safely_evaluate

Methods included from Shoes::Common::Remove

#remove

Methods included from Shoes::Common::Positioning

#_position, #displace, #move

Methods included from Shoes::Common::Visibility

#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?

Methods included from Shoes::Common::Inspect

#inspect, #to_s

Methods included from Shoes::Common::Attachable

#attached_to

Constructor Details

This class inherits a constructor from Shoes::Common::UIElement

Instance Method Details

#checked=(value) ⇒ Object



13
14
15
16
# File 'shoes-core/lib/shoes/check_button.rb', line 13

def checked=(value)
  style(checked: value)
  @gui.checked = value
end

#checked?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'shoes-core/lib/shoes/check_button.rb', line 9

def checked?
  @gui.checked?
end