Class: CTioga2::Graphics::Elements::TitleElement

Inherits:
TiogaElement
  • Object
show all
Defined in:
lib/ctioga2/graphics/elements/plot-elements.rb

Overview

Wrapper for the title

Constant Summary

Constants inherited from TiogaElement

CTioga2::Graphics::Elements::TiogaElement::StyleBaseOptions

Instance Attribute Summary collapse

Attributes inherited from TiogaElement

#clipped, #depth, #hidden, #location, #object_classes, #object_id, #object_parent, #parent

Instance Method Summary collapse

Methods inherited from TiogaElement

all_styles, base_style, #check_styled, define_style, #do, find_object, find_objects, #get_style, #has_style?, inherited, #inspect, register_object, register_style, #setup_style, #style_class, style_class, style_name, #style_name, styled_classes, #update_style

Methods included from Log

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

Constructor Details

#initialize(parent, opts) ⇒ TitleElement

Returns a new instance of TitleElement.



62
63
64
65
66
# File 'lib/ctioga2/graphics/elements/plot-elements.rb', line 62

def initialize(parent, opts)
  setup_style(parent, opts)
  @style = Styles::TextLabel.new(nil, Types::PlotLocation.new(:top))
  update_style(@style)
end

Instance Attribute Details

#styleObject

Returns the value of attribute style.



60
61
62
# File 'lib/ctioga2/graphics/elements/plot-elements.rb', line 60

def style
  @style
end