Class: XRC2Ruby::ObjectTypes::CollapsiblePane

Inherits:
Container show all
Defined in:
lib/wx_sugar/xrc/xrc2ruby_types/containers.rb

Constant Summary

Constants inherited from Window

Window::BASE_NAME

Instance Attribute Summary collapse

Attributes included from Parent

#children, #main_sizer, #sizer_items

Attributes inherited from Window

#bg, #enabled, #exstyle, #fg, #help, #hidden, #tooltip

Attributes inherited from Object

#centered, #name, #parent, #sub_class, #win_class

Instance Method Summary collapse

Methods included from Parent

#add_child, #child_output, #named_windows, #output, #size_child

Methods inherited from Window

#args, #output

Methods included from InitArgs

#inherited, #init_arg, #init_args, #translatable_string_init_arg

Methods inherited from Object

#initialize, #inspect, next_id, #output, #var_name

Constructor Details

This class inherits a constructor from XRC2Ruby::ObjectTypes::Object

Instance Attribute Details

#collapsedObject

Returns the value of attribute collapsed.



61
62
63
# File 'lib/wx_sugar/xrc/xrc2ruby_types/containers.rb', line 61

def collapsed
  @collapsed
end

Instance Method Details

#pane=(pane) ⇒ Object



70
71
72
# File 'lib/wx_sugar/xrc/xrc2ruby_types/containers.rb', line 70

def pane=(pane)
  @children = [pane]
end

#setupObject



62
63
64
65
66
67
68
# File 'lib/wx_sugar/xrc/xrc2ruby_types/containers.rb', line 62

def setup
  if collapsed.to_i.zero?
    "#{var_name}.expand"
  else
    "#{var_name}.collapse"
  end
end