### Home Classes Methods

### In Files

- lib/rabbit/element/base.rb
- lib/rabbit/element/base/draw-hook.rb

### Namespace

- MODULE Rabbit::Element::Base::DrawHook

### Methods

- ::new
- #[]
- #[]=
- #__prop_delete__
- #__prop_get__
- #__prop_set__
- #add_default_prop
- #adjust_x_centering
- #adjust_y_margin
- #adjust_y_padding
- #available_w
- #centering_adjusted_height
- #centering_adjusted_width
- #clear_margin
- #clear_padding
- #clear_theme
- #clone
- #compile
- #compile_element
- #compile_for_horizontal_centering
- #compile_horizontal
- #default_prop
- #dirty!
- #dirty?
- #do_horizontal_centering
- #do_horizontal_centering?
- #do_vertical_centering?
- #draw
- #font
- #have_tag?
- #have_wait_tag?
- #height
- #hide
- #horizontal_centering=
- #if_dirty
- #init_default_margin
- #init_default_padding
- #init_default_visible
- #inline_element?
- #inspect
- #margin_set
- #margin_with
- #match?
- #next_element
- #padding_set
- #padding_with
- #parent=
- #previous_element
- #prop=
- #prop_delete
- #prop_get
- #prop_set
- #prop_value
- #reset_horizontal_centering
- #restore_x_margin
- #restore_x_padding
- #setup_margin
- #setup_padding
- #show
- #slide
- #substitute_newline
- #substitute_text
- #text_renderer?
- #user_property=
- #vertical_centering=
- #visible?
- #wait
- #width

### Included Modules

- Rabbit::GetText
- Rabbit::Utils
- Rabbit::Element::Base::DrawHook

### Class/Module Index

Quicksearch

- Rabbit
- Rabbit::AAFigureCanNotHandleError
- Rabbit::Action
- Rabbit::ApplyFinish
- Rabbit::AuthorConfiguration
- Rabbit::BlockDiagCanNotHandleError
- Rabbit::CantAllocateColorError
- Rabbit::CantFindHTMLTemplate
- Rabbit::CantFindThemeRDTemplate
- Rabbit::Canvas
- Rabbit::Command
- Rabbit::Command::Rabbit
- Rabbit::Command::RabbitSlide
- Rabbit::Command::RabbitTheme
- Rabbit::Config
- Rabbit::Console
- Rabbit::Converter
- Rabbit::CursorManager
- Rabbit::DependencyCanvas
- Rabbit::DiaCanNotHandleError
- Rabbit::DirtyCount
- Rabbit::EPSCanNotHandleError
- Rabbit::Element
- Rabbit::Element::Author
- Rabbit::Element::Base
- Rabbit::Element::Base::DrawHook
- Rabbit::Element::BlockElement
- Rabbit::Element::BlockHorizontalCentering
- Rabbit::Element::BlockQuote
- Rabbit::Element::Body
- Rabbit::Element::ClassName
- Rabbit::Element::Code
- Rabbit::Element::Comment
- Rabbit::Element::Container
- Rabbit::Element::ContainerElement
- Rabbit::Element::ContentSource
- Rabbit::Element::CustomTag
- Rabbit::Element::Date
- Rabbit::Element::DeletedText
- Rabbit::Element::DescriptionContent
- Rabbit::Element::DescriptionList
- Rabbit::Element::DescriptionListItem
- Rabbit::Element::DescriptionTerm
- Rabbit::Element::Emphasis
- Rabbit::Element::EnumList
- Rabbit::Element::EnumListItem
- Rabbit::Element::FootText
- Rabbit::Element::FootTextBlock
- Rabbit::Element::Footnote
- Rabbit::Element::HeadLine
- Rabbit::Element::Image
- Rabbit::Element::ImageTitleSlide
- Rabbit::Element::Index
- Rabbit::Element::IndexSlide
- Rabbit::Element::IndexThumbnail
- Rabbit::Element::IndexThumbnailRow
- Rabbit::Element::Institution
- Rabbit::Element::ItemList
- Rabbit::Element::ItemListItem
- Rabbit::Element::Keyboard
- Rabbit::Element::Keyword
- Rabbit::Element::MethodDescription
- Rabbit::Element::MethodKind
- Rabbit::Element::MethodList
- Rabbit::Element::MethodListItem
- Rabbit::Element::MethodName
- Rabbit::Element::MethodTerm
- Rabbit::Element::Note
- Rabbit::Element::Paragraph
- Rabbit::Element::Place
- Rabbit::Element::PopplerPage
- Rabbit::Element::PopplerSlide
- Rabbit::Element::PopplerTitleSlide
- Rabbit::Element::PreformattedBlock
- Rabbit::Element::PreformattedText
- Rabbit::Element::ReferText
- Rabbit::Element::Slide
- Rabbit::Element::SlideElement
- Rabbit::Element::Subscript
- Rabbit::Element::Subtitle
- Rabbit::Element::Superscript
- Rabbit::Element::SyntaxHighlightingBlock
- Rabbit::Element::SyntaxHighlightingText
- Rabbit::Element::Table
- Rabbit::Element::TableBody
- Rabbit::Element::TableCell
- Rabbit::Element::TableHead
- Rabbit::Element::TableHeader
- Rabbit::Element::TableRow
- Rabbit::Element::Text
- Rabbit::Element::TextBlock
- Rabbit::Element::TextBlockElement
- Rabbit::Element::TextContainer
- Rabbit::Element::TextContainerElement
- Rabbit::Element::TextElement
- Rabbit::Element::TextRenderer
- Rabbit::Element::Title
- Rabbit::Element::TitleSlide
- Rabbit::Element::Variable
- Rabbit::Element::Verbatim
- Rabbit::Element::Video
- Rabbit::Element::WaitBlock
- Rabbit::Element::WaitTag
- Rabbit::Element::When
- Rabbit::Element::Where
- Rabbit::EmbedFrame
- Rabbit::Error
- Rabbit::Format
- Rabbit::Format::ConvenienceTextFormatter
- Rabbit::Format::Foreground
- Rabbit::Format::Formatter
- Rabbit::Format::Size
- Rabbit::Format::SpanTextFormatter
- Rabbit::Format::ValueContainerFormatter
- Rabbit::Frame
- Rabbit::Front
- Rabbit::Front::PublicLevel
- Rabbit::GIMPCanNotHandleError
- Rabbit::GemBuilder
- Rabbit::GemFinder
- Rabbit::Gesture
- Rabbit::Gesture::Handler
- Rabbit::Gesture::Processor
- Rabbit::GetText
- Rabbit::Graffiti
- Rabbit::Graffiti::ConfigDialog
- Rabbit::Graffiti::Processor
- Rabbit::HTML
- Rabbit::HTML::Generator
- Rabbit::ImageFileDoesNotExistError
- Rabbit::ImageLoadError
- Rabbit::ImageLoadWithExternalCommandError
- Rabbit::ImageLoader
- Rabbit::ImageManipulable
- Rabbit::ImageManipulable::Base
- Rabbit::ImageManipulable::Default
- Rabbit::ImageManipulable::Dia
- Rabbit::ImageManipulable::EPS
- Rabbit::ImageManipulable::GIMP
- Rabbit::ImageManipulable::PDF
- Rabbit::ImageManipulable::SVG
- Rabbit::ImmutableSourceTypeError
- Rabbit::InfoWindow
- Rabbit::InvalidImageSizeError
- Rabbit::InvalidMotionError
- Rabbit::Keys
- Rabbit::Keys::Alt
- Rabbit::Keys::Control
- Rabbit::Keys::Shift
- Rabbit::Logger
- Rabbit::Logger::Base
- Rabbit::Logger::GUI
- Rabbit::Logger::STDERR
- Rabbit::Logger::Severity
- Rabbit::Menu
- Rabbit::ModuleLoader
- Rabbit::NoPrintSupportError
- Rabbit::NotAvailableInterfaceError
- Rabbit::NotExistError
- Rabbit::NotFileError
- Rabbit::NotReadableError
- Rabbit::NullFrame
- Rabbit::ParseError
- Rabbit::ParseFinish
- Rabbit::Parser
- Rabbit::Parser::Base
- Rabbit::Parser::Ext
- Rabbit::Parser::Ext::AAFigure
- Rabbit::Parser::Ext::BlockDiag
- Rabbit::Parser::Ext::CodeRay
- Rabbit::Parser::Ext::CodeRay::RabbitEncoder
- Rabbit::Parser::Ext::Emacs
- Rabbit::Parser::Ext::Enscript
- Rabbit::Parser::Ext::Entity
- Rabbit::Parser::Ext::Escape
- Rabbit::Parser::Ext::Image
- Rabbit::Parser::Ext::Image::Private
- Rabbit::Parser::Ext::Inline
- Rabbit::Parser::Ext::TeX
- Rabbit::Parser::Ext::Video
- Rabbit::Parser::Image
- Rabbit::Parser::Markdown
- Rabbit::Parser::Markdown::Converter
- Rabbit::Parser::NoteSetter
- Rabbit::Parser::PDF
- Rabbit::Parser::PauseSupport
- Rabbit::Parser::RD
- Rabbit::Parser::RD::Ext
- Rabbit::Parser::RD::Ext::Base
- Rabbit::Parser::RD::Ext::BlockVerbatim
- Rabbit::Parser::RD::Ext::CharacterReference
- Rabbit::Parser::RD::Ext::Image
- Rabbit::Parser::RD::Ext::InlineVerbatim
- Rabbit::Parser::RD::Ext::Refer
- Rabbit::Parser::RD::Ext::Video
- Rabbit::Parser::RD::RD2RabbitVisitor
- Rabbit::Parser::RD::Visitor
- Rabbit::Parser::SlidePropertySetter
- Rabbit::Parser::Wiki
- Rabbit::Parser::Wiki::RabbitOutput
- Rabbit::Parser::Wiki::RabbitOutput::BlockPlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin::Private
- Rabbit::PathManipulatable
- Rabbit::Progress
- Rabbit::READMEParser
- Rabbit::RT2RabbitVisitor
- Rabbit::Renderer
- Rabbit::Renderer::Base
- Rabbit::Renderer::Color
- Rabbit::Renderer::Display
- Rabbit::Renderer::Display::Base
- Rabbit::Renderer::Display::ButtonHandler
- Rabbit::Renderer::Display::ClutterEmbed
- Rabbit::Renderer::Display::Cursor
- Rabbit::Renderer::Display::DrawingArea
- Rabbit::Renderer::Display::DrawingAreaBase
- Rabbit::Renderer::Display::DrawingAreaPrimitive
- Rabbit::Renderer::Display::DrawingAreaViewOnly
- Rabbit::Renderer::Display::GL
- Rabbit::Renderer::Display::Gesture
- Rabbit::Renderer::Display::Graffiti
- Rabbit::Renderer::Display::HookHandler
- Rabbit::Renderer::Display::Info
- Rabbit::Renderer::Display::KeyHandler
- Rabbit::Renderer::Display::Magnifier
- Rabbit::Renderer::Display::Mask
- Rabbit::Renderer::Display::Menu
- Rabbit::Renderer::Display::Progress
- Rabbit::Renderer::Display::ScrollHandler
- Rabbit::Renderer::Display::Search
- Rabbit::Renderer::Display::Spotlight
- Rabbit::Renderer::Engine
- Rabbit::Renderer::Engine::Cairo
- Rabbit::Renderer::Engine::GDK
- Rabbit::Renderer::GL
- Rabbit::Renderer::Kernel
- Rabbit::Renderer::Pixmap
- Rabbit::Renderer::Pixmap::Base
- Rabbit::Renderer::Pixmap::Cairo
- Rabbit::Renderer::Pixmap::GDK
- Rabbit::Renderer::Pixmap::GL
- Rabbit::Renderer::Print
- Rabbit::Renderer::Print::Base
- Rabbit::Renderer::Print::Cairo
- Rabbit::Renderer::Print::Layout2
- Rabbit::Renderer::Print::LayoutBase
- Rabbit::Renderer::Print::LayoutMore
- Rabbit::Renderer::Print::Multiple
- Rabbit::SOAP
- Rabbit::SOAP::Driver
- Rabbit::SOAP::Server
- Rabbit::ScreenInfo
- Rabbit::SearchWindow
- Rabbit::Searcher
- Rabbit::SlideConfiguration
- Rabbit::Source
- Rabbit::Source::ARGF
- Rabbit::Source::Base
- Rabbit::Source::File
- Rabbit::Source::Hiki
- Rabbit::Source::LimitAccessInterval
- Rabbit::Source::Memory
- Rabbit::Source::SlideShare
- Rabbit::Source::URI
- Rabbit::SourceGenerator
- Rabbit::SourceGenerator::Hiki
- Rabbit::SourceGenerator::Markdown
- Rabbit::SourceGenerator::RD
- Rabbit::SourceUnreadableError
- Rabbit::Stock
- Rabbit::SystemRunner
- Rabbit::Task
- Rabbit::Task::Slide
- Rabbit::Task::SlideShare
- Rabbit::Task::SlideShare::Error
- Rabbit::Task::Theme
- Rabbit::TeXCanNotHandleError
- Rabbit::TemporaryFile
- Rabbit::Theme
- Rabbit::Theme::Applier
- Rabbit::Theme::DirectoryEntry
- Rabbit::Theme::ElementContainer
- Rabbit::Theme::Entry
- Rabbit::Theme::FileEntry
- Rabbit::Theme::GemEntry
- Rabbit::Theme::ImageDirectoryEntry
- Rabbit::Theme::ImageFileEntry
- Rabbit::Theme::ImageGemEntry
- Rabbit::Theme::Manager
- Rabbit::Theme::Searcher
- Rabbit::ThemeConfiguration
- Rabbit::ThemeExit
- Rabbit::TrackBall
- Rabbit::TrackBall::Vector
- Rabbit::UnknownCursorTypeError
- Rabbit::UnknownPropertyError
- Rabbit::UnsupportedFormatError
- Rabbit::Utils
- Rabbit::VideoWindow
- Rabbit::VideoWindow::VideoWidget
- Rabbit::XMLRPC
- Rabbit::XMLRPC::Client
- Rabbit::XMLRPC::Server
- Rabbit::XMLRPC::Servlet
- OptionParser
- OptionParser::Category
- OptionParser::List
- OptionParser::Switch
- Cairo
- Cairo::Context
- Gtk
- Gtk::Action
- Pango
- Pango::Context
- Object

No matching classes.

# Rabbit::Element::Base

### Attributes

base_h[R]
base_w[R]
base_x[R]
base_y[R]
default_margin_bottom[RW]
default_margin_left[RW]
default_margin_right[RW]
default_margin_top[RW]
default_padding_bottom[RW]
default_padding_left[RW]
default_padding_right[RW]
default_padding_top[RW]
default_visible[RW]
h[R]
horizontal_centering[R]
margin_bottom[RW]
margin_left[RW]
margin_right[RW]
margin_top[RW]
padding_bottom[RW]
padding_left[RW]
padding_right[RW]
padding_top[RW]
parent[R]
ph[R]
pw[R]
px[R]
py[R]
real_simulation[R]
user_property[R]
vertical_centering[R]
w[R]
x[R]
y[R]

### Public Class Methods

new() click to toggle source

    # File lib/rabbit/element/base.rb, line 40
    def initialize
      @x = @y = @w = @h = nil
      @parent = nil
      @user_property = {}
      @default_prop = {}
      init_default_padding
      init_default_margin
      init_default_visible
      clear_theme
    end

### Public Instance Methods

[](name) click to toggle source

    # File lib/rabbit/element/base.rb, line 393
    def [](name)
      @user_property[name]
    end

[]=(name, value) click to toggle source

    # File lib/rabbit/element/base.rb, line 397
    def []=(name, value)
      @user_property[name] = value
    end

__prop_delete__(name) click to toggle source
Alias for: prop_delete
__prop_get__(name) click to toggle source
Alias for: prop_get
__prop_set__(name, *values) click to toggle source
Alias for: prop_set
add_default_prop(name, value) click to toggle source

    # File lib/rabbit/element/base.rb, line 148
    def add_default_prop(name, value)
      name = normalize_property_name(name)
      @default_prop[name] = make_prop_value(name, value)
    end

adjust_x_centering(x, w) click to toggle source

    # File lib/rabbit/element/base.rb, line 217
    def adjust_x_centering(x, w)
      x -= centering_adjusted_width
      w += centering_adjusted_width
      [x, w]
    end

adjust_y_margin(y, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 237
    def adjust_y_margin(y, h)
      y += @margin_bottom
      h -= @margin_bottom
      [y, h]
    end

adjust_y_padding(y, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 223
    def adjust_y_padding(y, h)
      y -= @padding_top
      h += @padding_top + @padding_bottom
      [y, h]
    end

available_w() click to toggle source

    # File lib/rabbit/element/base.rb, line 318
    def available_w
      @w - @padding_left - @padding_right
    end

centering_adjusted_height() click to toggle source

    # File lib/rabbit/element/base.rb, line 334
    def centering_adjusted_height
      @centering_adjusted_height || 0
    end

centering_adjusted_width() click to toggle source

    # File lib/rabbit/element/base.rb, line 330
    def centering_adjusted_width
      @centering_adjusted_width || 0
    end

clear_margin() click to toggle source

    # File lib/rabbit/element/base.rb, line 268
    def clear_margin
      @margin_left = @default_margin_left
      @margin_right = @default_margin_right
      @margin_top = @default_margin_top
      @margin_bottom = @default_margin_bottom
    end

clear_padding() click to toggle source

    # File lib/rabbit/element/base.rb, line 261
    def clear_padding
      @padding_left = @default_padding_left
      @padding_right = @default_padding_right
      @padding_top = @default_padding_top
      @padding_bottom = @default_padding_bottom
    end

clear_theme() click to toggle source

    # File lib/rabbit/element/base.rb, line 182
    def clear_theme
      @slide = nil
      @visible = @default_visible
      @real_simulation = true
      @width = @height = nil
      @centering_adjusted_width = nil
      @centering_adjusted_height = nil
      @horizontal_centering = @vertical_centering = false
      @prop = default_prop
      clear_margin
      clear_padding
      clear_draw_procs
      dirty!
    end

clone() click to toggle source

    # File lib/rabbit/element/base.rb, line 346
    def clone
      obj = super
      obj.user_property = @user_property.clone
      obj.prop = @prop.clone
      obj
    end

compile(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 95
    def compile(canvas, x, y, w, h)
      compile_element(canvas, x, y, w, h)
    end

compile_element(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 99
    def compile_element(canvas, x, y, w, h)
      @base_x, @base_y, @base_w, @base_h = x, y, w, h
      @px, @py, @pw, @ph = @x, @y, @w, @h
      x, y, w, h = setup_margin(x, y, w, h)
      @canvas, @x, @y, @w, @h = canvas, x, y, w, h
      if [@px, @py, @pw, @ph] != [@x, @y, @w, @h]
        dirty!
      end
    end

compile_for_horizontal_centering(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 109
    def compile_for_horizontal_centering(canvas, x, y, w, h)
      compile(canvas, x, y, w, h)
    end

compile_horizontal(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 113
    def compile_horizontal(canvas, x, y, w, h)
      if do_horizontal_centering?
        do_horizontal_centering(canvas, x, y, w, h)
      else
        reset_horizontal_centering(canvas, x, y, w, h)
      end
    end

default_prop() click to toggle source

    # File lib/rabbit/element/base.rb, line 353
    def default_prop
      @default_prop.dup
    end

dirty!() click to toggle source

    # File lib/rabbit/element/base.rb, line 75
    def dirty!
      @dirty = true
    end

dirty?() click to toggle source

    # File lib/rabbit/element/base.rb, line 79
    def dirty?
      @dirty
    end

do_horizontal_centering(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 304
    def do_horizontal_centering(canvas, x, y, w, h)
    end

do_horizontal_centering?() click to toggle source

    # File lib/rabbit/element/base.rb, line 282
    def do_horizontal_centering?
      @horizontal_centering or
        (parent and parent.do_horizontal_centering?)
    end

do_vertical_centering?() click to toggle source

    # File lib/rabbit/element/base.rb, line 287
    def do_vertical_centering?
      @vertical_centering or
        (parent and parent.do_horizontal_centering?)
    end

draw(simulation=false) click to toggle source

    # File lib/rabbit/element/base.rb, line 64
    def draw(simulation=false)
      x, y, w, h = setup_padding(@x, @y, @w, @h)
      x, y, w, h = _draw(@canvas, x, y, w, h, simulation)
      x, w = restore_x_padding(x, w)
      x, w = restore_x_margin(x, w)
      x, w = adjust_x_centering(x, w)
      y, h = adjust_y_padding(y, h)
      y, h = adjust_y_margin(y, h)
      [x, y, w, h]
    end

font(props) click to toggle source

    # File lib/rabbit/element/base.rb, line 153
    def font(props)
      props.each do |key, value|
        key, value = normalize_font_property(key, value)
        if value
          prop_set(key, value)
        else
          prop_delete(key)
        end
      end
    end

have_tag?(name) click to toggle source

    # File lib/rabbit/element/base.rb, line 87
    def have_tag?(name)
      false
    end

have_wait_tag?() click to toggle source

    # File lib/rabbit/element/base.rb, line 91
    def have_wait_tag?
      false
    end

height() click to toggle source

    # File lib/rabbit/element/base.rb, line 326
    def height
      @height + @padding_top + @padding_bottom
    end

hide(&block) click to toggle source

    # File lib/rabbit/element/base.rb, line 389
    def hide(&block)
      change_visible(false, &block)
    end

horizontal_centering=(new_value) click to toggle source

    # File lib/rabbit/element/base.rb, line 292
    def horizontal_centering=(new_value)
      if @horizontal_centering != new_value
        dirty!
      end
      @horizontal_centering = new_value
    end

if_dirty() click to toggle source

    # File lib/rabbit/element/base.rb, line 275
    def if_dirty
      if dirty?
        yield
        @dirty = false
      end
    end

init_default_margin() click to toggle source

    # File lib/rabbit/element/base.rb, line 250
    def init_default_margin
      @default_margin_left = 0
      @default_margin_right = 0
      @default_margin_top = 0
      @default_margin_bottom = 0
    end

init_default_padding() click to toggle source

    # File lib/rabbit/element/base.rb, line 243
    def init_default_padding
      @default_padding_left = 0
      @default_padding_right = 0
      @default_padding_top = 0
      @default_padding_bottom = 0
    end

init_default_visible() click to toggle source

    # File lib/rabbit/element/base.rb, line 257
    def init_default_visible
      @default_visible = !have_wait_tag?
    end

inline_element?() click to toggle source

    # File lib/rabbit/element/base.rb, line 164
    def inline_element?
      true
    end

inspect(verbose=false) click to toggle source

    # File lib/rabbit/element/base.rb, line 338
    def inspect(verbose=false)
      if verbose
        super()
      else
        "<#{self.class.name}>"
      end
    end

margin_set(*values) click to toggle source

    # File lib/rabbit/element/base.rb, line 361
    def margin_set(*values)
      top, right, bottom, left = parse_four_way(*values)
      @margin_top = top if top
      @margin_right = right if right
      @margin_bottom = bottom if bottom
      @margin_left = left if left
    end

margin_with(params) click to toggle source

    # File lib/rabbit/element/base.rb, line 369
    def margin_with(params)
      margin_set(params)
    end

match?(pattern) click to toggle source

    # File lib/rabbit/element/base.rb, line 357
    def match?(pattern)
      pattern === text
    end

next_element() click to toggle source

    # File lib/rabbit/element/base.rb, line 314
    def next_element
      sibling_element(1)
    end

padding_set(*values) click to toggle source

    # File lib/rabbit/element/base.rb, line 373
    def padding_set(*values)
      top, right, bottom, left = parse_four_way(*values)
      @padding_top = top if top
      @padding_right = right if right
      @padding_bottom = bottom if bottom
      @padding_left = left if left
    end

padding_with(params) click to toggle source

    # File lib/rabbit/element/base.rb, line 381
    def padding_with(params)
      padding_set(params)
    end

parent=(parent) click to toggle source

    # File lib/rabbit/element/base.rb, line 51
    def parent=(parent)
      @slide = nil
      @parent = parent
    end

previous_element() click to toggle source

    # File lib/rabbit/element/base.rb, line 310
    def previous_element
      sibling_element(-1)
    end

prop_delete(name) click to toggle source

    # File lib/rabbit/element/base.rb, line 141
    def prop_delete(name)
      name = normalize_property_name(name)
      @prop.delete(name)
      dirty!
    end

Also aliased as: __prop_delete__
prop_get(name) click to toggle source

    # File lib/rabbit/element/base.rb, line 128
    def prop_get(name)
      name = normalize_property_name(name)
      @prop[name]
    end

Also aliased as: __prop_get__
prop_set(name, *values) click to toggle source

    # File lib/rabbit/element/base.rb, line 121
    def prop_set(name, *values)
      name = normalize_property_name(name)
      @prop[name] = make_prop_value(name, *values)
      dirty!
    end

Also aliased as: __prop_set__
prop_value(name) click to toggle source

    # File lib/rabbit/element/base.rb, line 134
    def prop_value(name)
      name = normalize_property_name(name)
      value = @prop[name]
      value = value.value if value.respond_to?(:value)
      value
    end

reset_horizontal_centering(canvas, x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 307
    def reset_horizontal_centering(canvas, x, y, w, h)
    end

restore_x_margin(x, w) click to toggle source

    # File lib/rabbit/element/base.rb, line 211
    def restore_x_margin(x, w)
      x -= @margin_left
      w += @margin_left + @margin_right
      [x, w]
    end

restore_x_padding(x, w) click to toggle source

    # File lib/rabbit/element/base.rb, line 205
    def restore_x_padding(x, w)
      x -= @padding_left
      w += @padding_left + @padding_right
      [x, w]
    end

setup_margin(x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 229
    def setup_margin(x, y, w, h)
      x += @margin_left
      y += @margin_top
      w -= @margin_left + @margin_right
      h -= @margin_top + @margin_bottom
      [x, y, w, h]
    end

setup_padding(x, y, w, h) click to toggle source

    # File lib/rabbit/element/base.rb, line 197
    def setup_padding(x, y, w, h)
      x += @padding_left
      y += @padding_top
      w -= @padding_left + @padding_right
      h -= @padding_top + @padding_bottom
      [x, y, w, h]
    end

show(&block) click to toggle source

    # File lib/rabbit/element/base.rb, line 385
    def show(&block)
      change_visible(true, &block)
    end

slide() click to toggle source

    # File lib/rabbit/element/base.rb, line 60
    def slide
      @slide ||= _slide
    end

substitute_newline() click to toggle source

    # File lib/rabbit/element/base.rb, line 176
    def substitute_newline
      substitute_text do |text|
        text.gsub(/(\\)?\\n/) {$1 ? "\\n" : "\n"}
      end
    end

substitute_text() click to toggle source

    # File lib/rabbit/element/base.rb, line 172
    def substitute_text
      false
    end

text_renderer?() click to toggle source

    # File lib/rabbit/element/base.rb, line 168
    def text_renderer?
      false
    end

vertical_centering=(new_value) click to toggle source

    # File lib/rabbit/element/base.rb, line 299
    def vertical_centering=(new_value)
      dirty! if @vertical_centering != new_value
      @vertical_centering = new_value
    end

visible?() click to toggle source

    # File lib/rabbit/element/base.rb, line 56
    def visible?
      @visible
    end

wait(*args, &block) click to toggle source

    # File lib/rabbit/element/base.rb, line 83
    def wait(*args, &block)
      slide.register_wait_proc(self, *args, &block) if slide
    end

width() click to toggle source

    # File lib/rabbit/element/base.rb, line 322
    def width
      @width + @padding_left + @padding_right
    end

### Protected Instance Methods

prop=(prop) click to toggle source

    # File lib/rabbit/element/base.rb, line 406
    def prop=(prop)
      @prop = prop
    end

user_property=(prop) click to toggle source

    # File lib/rabbit/element/base.rb, line 402
    def user_property=(prop)
      @user_property = prop
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.