Module: Shoes::Swt::Common::Visibility

Defined in:
shoes-swt/lib/shoes/swt/common/visibility.rb

Instance Method Summary collapse

Instance Method Details

#update_visibilityObject


7
8
9
10
11
12
13
14
15
# File 'shoes-swt/lib/shoes/swt/common/visibility.rb', line 7

def update_visibility
  return unless defined?(@real) && @real.respond_to?(:set_visible)

  # hidden_from_view? handles all visiblity conditions, including
  # being outside a slot. SWT as backend doesn't get that for free
  # because we can't use Composites as they lack transparency...
  visible = !@dsl.hidden_from_view?
  @real.set_visible(visible)
end