Class: Nuklear::UI::Base
Direct Known Subclasses
Button, Checkbox, Col, ColorPicker, ComboBox, EditString, Group, Label, Menu, MenuBar, MenuItem, OptionGroup, Progress, Property, Row, SelectList, Slider, Tree, Window
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Enableable
#disable, #disabled=, #disabled?, #enable, #enabled=, #enabled?
Methods included from Events
#event_listeners_for, #on, #trigger
Constructor Details
#initialize(enabled: true) ⇒ Base
7
8
9
|
# File 'lib/nuklear/ui/base.rb', line 7
def initialize(enabled: true)
self.enabled = enabled
end
|
Class Attribute Details
.dsl_method_name ⇒ Object
19
20
21
22
|
# File 'lib/nuklear/ui/base.rb', line 19
def dsl_method_name
@dsl_method_name ||= name.split('::').last.gsub(/([A-Z])/) { |a| "_#{a.downcase}" }.sub(/^_/, '')
end
|
Class Method Details
.descendants ⇒ Object
24
25
26
|
# File 'lib/nuklear/ui/base.rb', line 24
def descendants
@descendants ||= []
end
|
.inherited(child) ⇒ Object
28
29
30
|
# File 'lib/nuklear/ui/base.rb', line 28
def inherited(child)
descendants << child
end
|
Instance Method Details
#dsl(&block) ⇒ Object
11
12
13
14
|
# File 'lib/nuklear/ui/base.rb', line 11
def dsl(&block)
require 'nuklear/dsl'
Nuklear::DSL.new(self, &block)
end
|