Class: CTioga2::Graphics::Elements::RedirectingContainer

Inherits:
Container show all
Defined in:
lib/ctioga2/graphics/elements/redirecting-container.rb

Overview

A Container that redirect most of its trafic to the parents.

Direct Known Subclasses

GradientRegion, Region

Instance Attribute Summary

Attributes inherited from Container

#elements, #legend_area, #legend_storage, #root_object, #subframe

Attributes inherited from TiogaElement

#location, #parent

Instance Method Summary collapse

Methods inherited from Container

#actual_subframe, #add_element, #initialize, #size

Methods inherited from TiogaElement

#do, #inspect

Methods included from Log

debug, error, fatal, #format_exception, #identify, info, init_logger, logger, set_level, #spawn, warn

Constructor Details

This class inherits a constructor from CTioga2::Graphics::Elements::Container

Instance Method Details

#add_legend_item(item) ⇒ Object



41
42
43
# File 'lib/ctioga2/graphics/elements/redirecting-container.rb', line 41

def add_legend_item(item)
  return parent.add_legend_item(item)
end

#legend_area=(l) ⇒ Object



45
46
47
# File 'lib/ctioga2/graphics/elements/redirecting-container.rb', line 45

def legend_area=(l)
  return parent.legend_area = l
end

#style(*a) ⇒ Object

The following functions are plain redirections to the parent.

todo a scheme should probably be designed to allow simple redirection in the form of an accessor. Using forwardable should do



37
38
39
# File 'lib/ctioga2/graphics/elements/redirecting-container.rb', line 37

def style(*a)
  return parent.style(*a)
end