Class: HotCocoa::SegmentedControlSegment
- Defined in:
- lib/hotcocoa/mappings/appkit/segmented_control.rb
Instance Attribute Summary collapse
-
#control ⇒ Object
readonly
Returns the value of attribute control.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #enabled=(value) ⇒ Object
- #enabled? ⇒ Boolean
- #image ⇒ Object
- #image=(image) ⇒ Object
-
#initialize(control, number) ⇒ SegmentedControlSegment
constructor
A new instance of SegmentedControlSegment.
- #label ⇒ Object
- #label=(label) ⇒ Object
- #menu ⇒ Object
- #menu=(menu) ⇒ Object
- #selected=(value) ⇒ Object
- #selected? ⇒ Boolean
- #width ⇒ Object
- #width=(width) ⇒ Object
Constructor Details
#initialize(control, number) ⇒ SegmentedControlSegment
Returns a new instance of SegmentedControlSegment.
7 8 9 10 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 7 def initialize control, number @number = number @control = control end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
5 6 7 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 5 def control @control end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 4 def number @number end |
Instance Method Details
#enabled=(value) ⇒ Object
56 57 58 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 56 def enabled= value control.setEnabled value, forSegment: number end |
#enabled? ⇒ Boolean
52 53 54 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 52 def enabled? control.isEnabledForSegment number end |
#image ⇒ Object
28 29 30 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 28 def image control.imageForSegment number end |
#image=(image) ⇒ Object
32 33 34 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 32 def image= image control.setImage image, forSegment: number end |
#label ⇒ Object
20 21 22 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 20 def label control.labelForSegment number end |
#label=(label) ⇒ Object
24 25 26 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 24 def label= label control.setLabel label, forSegment: number end |
#menu ⇒ Object
36 37 38 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 36 def control. number end |
#menu=(menu) ⇒ Object
40 41 42 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 40 def control.setMenu , forSegment: number end |
#selected=(value) ⇒ Object
48 49 50 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 48 def selected= value control.setSelected value, forSegment: number end |
#selected? ⇒ Boolean
44 45 46 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 44 def selected? control.isSelectedForSegment number end |
#width ⇒ Object
12 13 14 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 12 def width control.widthForSegment number end |
#width=(width) ⇒ Object
16 17 18 |
# File 'lib/hotcocoa/mappings/appkit/segmented_control.rb', line 16 def width= width control.setWidth width, forSegment: number end |