Module: Ruflet::UI::PlatformControlMethods

Included in:
ControlMethods
Defined in:
lib/ruflet_ui/ruflet/ui/platform_control_methods.rb

Overview

Canonical DSL entry points for controls whose renderer is selected by the Flet client. There is no design-system choice in this API.

Instance Method Summary collapse

Instance Method Details

#action_sheet(**props) ⇒ Object



15
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 15

def action_sheet(**props) = build_widget(:actionsheet, **props)

#action_sheet_action(content = nil, **props) ⇒ Object



18
19
20
21
22
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 18

def action_sheet_action(content = nil, **props)
  mapped = props.dup
  mapped[:content] = content unless content.nil?
  build_widget(:actionsheetaction, **mapped)
end

#actionsheet(**props) ⇒ Object



16
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 16

def actionsheet(**props) = action_sheet(**props)

#actionsheetaction(content = nil, **props) ⇒ Object



23
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 23

def actionsheetaction(content = nil, **props) = action_sheet_action(content, **props)

#context_menu_action(content = nil, **props) ⇒ Object



8
9
10
11
12
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 8

def context_menu_action(content = nil, **props)
  mapped = props.dup
  mapped[:content] = content unless content.nil?
  build_widget(:contextmenuaction, **mapped)
end

#contextmenuaction(content = nil, **props) ⇒ Object



13
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 13

def contextmenuaction(content = nil, **props) = context_menu_action(content, **props)

#picker(children = nil, **props) ⇒ Object



25
26
27
28
29
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 25

def picker(children = nil, **props)
  mapped = props.dup
  mapped[:controls] = children unless children.nil?
  build_widget(:picker, **mapped)
end

#timer_picker(**props) ⇒ Object



31
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 31

def timer_picker(**props) = build_widget(:timerpicker, **props)

#timerpicker(**props) ⇒ Object



32
# File 'lib/ruflet_ui/ruflet/ui/platform_control_methods.rb', line 32

def timerpicker(**props) = timer_picker(**props)