Class: Odf::Element::DrawTextBox

Inherits:
Abstract
  • Object
show all
Defined in:
lib/odf/element/draw_text_box.rb

Constant Summary collapse

VALID_OPTIONS =
{
  next_name:     'draw:chain-next-name',
  corner_radius: 'draw:corner-radius',
  max_height:    'fo:max-height',
  max_width:     'fo:max-width',
  min_height:    'fo:min-height',
  min_width:     'fo:min-width',
  text_id:       'text:id',
  xml_id:        'xml:id'
}
XML_TAG =
'draw:text-box'.freeze

Instance Attribute Summary

Attributes inherited from Abstract

#parent, #root

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#document, #initialize, #valid_options, #xml_tag

Constructor Details

This class inherits a constructor from Odf::Element::Abstract

Class Method Details

.build(parent, options = {}) ⇒ Object



17
18
19
# File 'lib/odf/element/draw_text_box.rb', line 17

def self.build(parent, options = {})
  new(parent, options)
end

Instance Method Details

#add_frame(options = {}) ⇒ Object



21
22
23
# File 'lib/odf/element/draw_text_box.rb', line 21

def add_frame(options = {}) 
  Odf::Element::DrawFrame.build(self, options)
end

#add_heading(text, options = {}) ⇒ Object



25
26
27
# File 'lib/odf/element/draw_text_box.rb', line 25

def add_heading(text, options = {})
  Odf::Element::Heading.build(self, text, options)
end

#add_paragraph(text, options = {}) ⇒ Object



29
30
31
# File 'lib/odf/element/draw_text_box.rb', line 29

def add_paragraph(text, options = {})
  Odf::Element::Paragraph.build(self, text, options)
end

#add_text_list(options = {}) ⇒ Object



33
34
35
# File 'lib/odf/element/draw_text_box.rb', line 33

def add_text_list(options = {})
  Odf::Element::TextList.build(self, options)
end