Class: Tgui::BoxLayout
- Defined in:
- lib/white_gold/dsl/box_layout.rb,
lib/white_gold/generated/tgui-abi-loader.gf.rb
Direct Known Subclasses
Constant Summary
Constants included from ApiChild
Instance Attribute Summary
Attributes inherited from Widget
Attributes inherited from ExternObject
Instance Method Summary collapse
- #_abi_get_by_index(*a) ⇒ Object
- #_abi_insert(*a) ⇒ Object
- #_abi_remove_by_index(*a) ⇒ Object
- #get(*keys) ⇒ Object
- #remove(widget) ⇒ Object
-
#self_get_widget_name(a) ⇒ Object
internal.
Methods inherited from Group
Methods inherited from Container
#_abi_add, #_abi_focus_next_widget, #_abi_focus_previous_widget, #_abi_get, #_abi_get_child_widgets_offset, #_abi_get_focused_child, #_abi_get_focused_leaf, #_abi_get_inner_size, #_abi_get_widget_at_position, #_abi_get_widget_index, #_abi_get_widgets, #_abi_move_widget_backward, #_abi_move_widget_forward, #_abi_move_widget_to_back, #_abi_move_widget_to_front, #_abi_remove, #_abi_remove_all_widgets, #_abi_set_widget_index, #abi_pack_widget, #abi_unpack_widget, #common_widget_post_initialize, #move_at, #move_back, #move_front, #widgets
Methods included from WidgetOwner
#child_methods, #common_widget_nest, #equip_child_widget
Methods included from BangDef
Methods inherited from Widget
#_abi_ask_tool_tip, #_abi_can_gain_focus, _abi_finalizer, #_abi_finish_all_animations, #_abi_get_absolute_position, #_abi_get_boolean_renderer_property, #_abi_get_color_renderer_property, #_abi_get_float_renderer_property, #_abi_get_font_renderer_property, #_abi_get_full_size, #_abi_get_mouse_cursor, #_abi_get_name, #_abi_get_outline_renderer_property, #_abi_get_position, #_abi_get_size, #_abi_get_string_renderer_property, #_abi_get_text_size, #_abi_get_text_styles_renderer_property, #_abi_get_texture_renderer_property, #_abi_get_tool_tip, _abi_get_type, _abi_get_unshared, #_abi_get_widget_name, #_abi_hide_with_effect, #_abi_is_animation_playing, #_abi_is_container, #_abi_is_enabled, #_abi_is_focusable, #_abi_is_focused, #_abi_is_mouse_down, #_abi_is_visible, #_abi_key_pressed, #_abi_left_mouse_pressed, #_abi_left_mouse_released, #_abi_mouse_moved, #_abi_move_to_back, #_abi_move_to_front, #_abi_move_with_animation, #_abi_on_animation_finish, #_abi_on_focus, #_abi_on_mouse_enter, #_abi_on_mouse_leave, #_abi_on_position_change, #_abi_on_show_effect_finish, #_abi_on_size_change, #_abi_on_unfocus, #_abi_resize_with_animation, #_abi_right_mouse_pressed, #_abi_right_mouse_released, #_abi_scrolled, #_abi_set_boolean_renderer_property, #_abi_set_color_renderer_property, #_abi_set_enabled, #_abi_set_float_renderer_property, #_abi_set_focusable, #_abi_set_focused, #_abi_set_font_renderer_property, #_abi_set_height, #_abi_set_mouse_cursor, #_abi_set_outline_renderer_property, #_abi_set_position, #_abi_set_renderer, #_abi_set_size, #_abi_set_string_renderer_property, #_abi_set_text_size, #_abi_set_text_styles_renderer_property, #_abi_set_texture_renderer_property, #_abi_set_tool_tip, #_abi_set_visible, #_abi_set_widget_name, #_abi_set_width, #_abi_show_with_effect, #_abi_text_entered, api_attr, finalizer, #flags=, #height, #hide, #method_missing, #pack_animation_time, #renderer=, #respond_to?, #self_cast_up, self_renderer, #show, #theme_comp, #visible=, #width, #window
Methods included from ApiChild
Methods included from BangNestedCaller
#bang_method_missing, #bang_object_stack, #bang_respond_to?, #self!, #upon!
Methods inherited from ExternObject
abi_attr, abi_bit_enum, abi_def, abi_enum, #abi_pack, abi_signal, abi_static, #abi_unpack, callback_storage, callback_storage=, data_storage=, finalizer, global_callback_storage, global_callback_storage=, #initialize, #initialized, self_abi_def, self_abi_def_setter
Methods included from Packer
#abi_pack, #abi_packer, #abi_packer_method_name
Methods included from Unpacker
#abi_unpack, #abi_unpacker, #abi_unpacker_method_name
Constructor Details
This class inherits a constructor from Tgui::Group
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tgui::Widget
Instance Method Details
#_abi_get_by_index(*a) ⇒ Object
1229 |
# File 'lib/white_gold/generated/tgui-abi-loader.gf.rb', line 1229 def _abi_get_by_index(*a); Abi.call_arg_map! a; Abi.ABI_BoxLayout_getByIndex(@pointer, *a); end |
#_abi_insert(*a) ⇒ Object
1230 |
# File 'lib/white_gold/generated/tgui-abi-loader.gf.rb', line 1230 def _abi_insert(*a); Abi.call_arg_map! a; Abi.ABI_BoxLayout_insert(@pointer, *a); end |
#_abi_remove_by_index(*a) ⇒ Object
1231 |
# File 'lib/white_gold/generated/tgui-abi-loader.gf.rb', line 1231 def _abi_remove_by_index(*a); Abi.call_arg_map! a; Abi.ABI_BoxLayout_removeByIndex(@pointer, *a); end |
#get(*keys) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/white_gold/dsl/box_layout.rb', line 13 def get(*keys) case keys in [Symbol] id = page.clubs[keys.first]&.members&.first id && self_cast_up(_abi_get(abi_pack_string(id))) in [Integer] self_cast_up(_abi_get_by_index abi_pack_integer(keys.first)) else Enumerator.new do |e| Array( keys).flatten.compact.uniq.each do |id| w = _abi_get(abi_pack_string(id)) e << self_cast_up(w) if w && !w.null? end end end end |
#remove(widget) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/white_gold/dsl/box_layout.rb', line 6 def remove if .is_a? Integer return _abi_remove_by_index abi_pack_integer() end super end |
#self_get_widget_name(a) ⇒ Object
internal
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/white_gold/dsl/box_layout.rb', line 32 def a case a when Widget a.name when Integer w = _abi_get_by_index abi_pack_integer(a) return nil if w.null? self_cast_up(w, equip: false).name when Enumerable a.map{ _1 }.flatten else page.clubs[a]&.members end end |