123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::ShadowInfoObserver Abstract

Relationships
Inherits: Object

Overview

This class is abstract.

To implement this observer, create a Ruby class of this type, override the desired methods, and add an instance of the observer to the ShadowInfo object.

This observer interface is implemented to react to changes to the shadow settings.

Examples:

# This is an example of an observer that watches the selection for
# changes.
class MyShadowInfoObserver < Sketchup::ShadowInfoObserver
  def onShadowInfoChanged(shadow_info, type)
    puts "onShadowInfoChanged: #{type}"
  end
end

# Attach the observer.
Sketchup.active_model.shadow_info.add_observer(MyShadowInfoObserver.new)

Version:

  • SketchUp 6.0

Instance Method Summary

Instance Method Details

#onShadowInfoChanged(shadow_info, type) ⇒ nil

The #onShadowInfoChanged method is invoked whenever the user alters a setting inside the Shadows and Model Info dialogs. The type parameter contains a number identifying which option was altered. Here are the types to expect:

  • 0 = Time/Date sliders

  • 1 = Display Shadows checkbox

  • 2 = Light/Dark sliders

  • 3 = Geographic Location (in Model Info > Location)

  • 4 = Solar Orientation (in Model Info > Location)

  • 7 = Use Sun for Shading checkbox

  • 8 = Display from Edges checkbox

  • 9 = Display on Ground checkbox

  • 10 = Display on Faces checkbox

Examples:

def onShadowInfoChanged(shadow_info, type)
  puts "onShadowInfoChanged: #{type}"
end

Parameters:

  • shadow_info (Sketchup::ShadowInfo)
  • type (Integer)

    A number identifying which setting was changed.

Version:

  • SketchUp 6.0