Class: OpenHAB::DSL::Sitemaps::LinkableWidgetBuilder

Inherits:
WidgetBuilder
  • Object
show all
Defined in:
lib/openhab/dsl/sitemaps/builder.rb

Overview

Parent class for builders of widgets that can contain other widgets.

See Also:

  • orgorg.openhaborg.openhab.coreorg.openhab.core.modelorg.openhab.core.model.sitemaporg.openhab.core.model.sitemap.sitemaporg.openhab.core.model.sitemap.sitemap.LinkableWidget

Instance Attribute Summary

Attributes inherited from WidgetBuilder

#icon, #icon_colors, #item, #label, #label_colors, #static_icon, #value_colors, #visibilities

Instance Method Summary collapse

Methods inherited from WidgetBuilder

#icon_color, #label_color, #value_color, #visibility

Methods included from Core::EntityLookup

#items, #method_missing, #things

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenHAB::Core::EntityLookup

Instance Method Details

#buttongrid(item: nil, label: nil, icon: nil, static_icon: nil, buttons: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ ButtongridBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Buttongrid element.

Examples:

Create a buttongrid with buttons as an argument

# This creates a buttongrid to emulate a TV remote control
sitemaps.build do
  sitemap "remote", label: "TV Remote Control" do
    buttongrid item: LivingRoom_TV_RCButton, buttons: [
      [1, 1, "BACK", "Back", "f7:return"],
      [1, 2, "HOME", "Menu", "material:apps"],
      [1, 3, "YELLOW", "Search", "f7:search"],
      [2, 2, "UP", "Up", "f7:arrowtriangle_up"],
      [4, 2, "DOWN", "Down", "f7:arrowtriangle_down"],
      [3, 1, "LEFT", "Left", "f7:arrowtriangle_left"],
      [3, 3, "RIGHT", "Right", "f7:arrowtriangle_right"],

      # Using keyword arguments:
      {row: 3, column: 2, click: "ENTER", label: "Enter", icon: "material:adjust" }
    ]
  end
end

Create a buttongrid with button widgets

sitemaps.build do
  sitemap "remote", label: "TV Remote Control" do
    buttongrid item: LivingRoom_TV_RCButton do
      button 1, 1, click: "BACK", icon: "f7:return"
      button 1, 2, click: "HOME", icon: "material:apps"
      button 1, 3, click: "YELLOW", icon: "f7:search"
      button 2, 2, click: "UP", icon: "f7:arrowtriangle_up"
      button 4, 2, click: "DOWN", icon: "f7:arrowtriangle_down"
      button 3, 1, click: "LEFT", icon: "f7:arrowtriangle_left"
      button 3, 3, click: "RIGHT", icon: "f7:arrowtriangle_right"
      button 3, 2, click: "ENTER", icon: "material:adjust"
    end

    # The following buttons use widget features introduced in openHAB 4.2+
    buttongrid item: LivingRoom_Curtain do
      button 1, 1, click: "up", release: "stop", icon: "f7:arrowtriangle_up"
      button 2, 1, click: "down", release: "stop", icon: "f7:arrowtriangle_up"
    end
  end
end

Parameters:

Yields:

Returns:

See Also:

Since:

  • openHAB 4.1



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#chart(item: nil, label: nil, icon: nil, static_icon: nil, service: nil, refresh: nil, period: nil, legend: nil, group: nil, y_axis_pattern: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ ChartBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Chart element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#colorpicker(item: nil, label: nil, icon: nil, static_icon: nil, frequency: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ ColorpickerBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Colorpicker element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#colortemperaturepicker(item: nil, label: nil, icon: nil, static_icon: nil, range: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ ColortemperaturepickerBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Colortemperaturepicker element.

Parameters:

Yields:

Returns:

Since:

  • openHAB 4.3



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#default(item: nil, label: nil, icon: nil, static_icon: nil, height: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ DefaultBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Default element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#frame(item: nil, label: nil, icon: nil, static_icon: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ FrameBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Frame element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#group(item: nil, label: nil, icon: nil, static_icon: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ GroupBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Group element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#image(item: nil, label: nil, icon: nil, static_icon: nil, url: nil, refresh: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ ImageBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Image element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#input(item: nil, label: nil, icon: nil, static_icon: nil, hint: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ InputBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Input element.

Parameters:

Yields:

Returns:

Since:

  • openHAB 4.0



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#mapview(item: nil, label: nil, icon: nil, static_icon: nil, height: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ MapviewBuilder

Create a new Mapview element.

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#selection(item: nil, label: nil, icon: nil, static_icon: nil, mappings: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ SelectionBuilder

Create a new Selection element.

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#setpoint(item: nil, label: nil, icon: nil, static_icon: nil, range: nil, step: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ SetpointBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Setpoint element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#slider(item: nil, label: nil, icon: nil, static_icon: nil, range: nil, step: nil, switch: nil, frequency: nil, release_only: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ SliderBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Slider element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#switch(item: nil, label: nil, icon: nil, static_icon: nil, mappings: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ SwitchBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Switch element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#text(item: nil, label: nil, icon: nil, static_icon: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ TextBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Text element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#video(item: nil, label: nil, icon: nil, static_icon: nil, url: nil, encoding: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ VideoBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Video element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end

#webview(item: nil, label: nil, icon: nil, static_icon: nil, url: nil, height: nil, label_color: nil, value_color: nil, icon_color: nil, visibility: nil) { ... } ⇒ WebviewBuilder

One or more visibility rules (see WidgetBuilder#visibility) Create a new Webview element.

Parameters:

Yields:

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/openhab/dsl/sitemaps/builder.rb', line 1129

%i[frame
   text
   group
   image
   video
   chart
   webview
   switch
   mapview
   slider
   selection
   input
   buttongrid
   setpoint
   colorpicker
   colortemperaturepicker
   default].each do |method|
  class_eval <<~RUBY, __FILE__, __LINE__ + 1
    def #{method}(*args, **kwargs, &block)                         # def frame(*args, **kwargs, &block)
      widget = #{method.capitalize}Builder.new(#{method.inspect},  #   widget = FrameBuilder.new(:frame,
                                               @builder_proxy,     #                             @builder_proxy,
                                               *args,              #                             *args,
                                               **kwargs,           #                             **kwargs,
                                               &block)             #                             &block)
      children << widget                                           #   children << widget
      widget                                                       #   widget
    end                                                            # end
  RUBY
end