### Home Classes Methods

### In Files

- lib/rabbit/parser/wiki/output.rb

### Parent

Object

### Namespace

- CLASS Rabbit::Parser::Wiki::RabbitOutput::BlockPlugin
- CLASS Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin

### Methods

- ::new
- #block_plugin
- #block_preformatted
- #blockquote_close
- #blockquote_open
- #container
- #current_body
- #del
- #dlist_close
- #dlist_item
- #dlist_open
- #em
- #finish
- #headline
- #hrule
- #hyperlink
- #image_hyperlink
- #inline_plugin
- #list_begin
- #list_close
- #list_end
- #list_open
- #listitem
- #listitem_close
- #listitem_open
- #paragraph
- #preformatted
- #reset
- #strong
- #table_close
- #table_data
- #table_head
- #table_open
- #table_record_close
- #table_record_open
- #text

### Included Modules

- Rabbit::Element
- Rabbit::Parser::PauseSupport

### 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::Parser::Wiki::RabbitOutput

### Attributes

canvas[R]

### Public Class Methods

new(canvas) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 22
    def initialize(canvas)
      @canvas = canvas
    end

### Public Instance Methods

block_plugin(src) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 292
    def block_plugin(src)
      return unless @parent

      result = evaluate_block_plugin(src)
      return if result == :no_element
      @parent << (result || text("{{#{src}}}"))
    end

block_preformatted(contents, info) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 261
    def block_preformatted(contents, info)
      return unless @parent

      lang = info ? info.downcase : nil
      result = nil

      if lang
        result = Ext::CodeRay.highlight(lang, contents, @canvas.logger)
      end

      if result
        @parent << result
      else
        preformatted(text(contents))
      end
    end

blockquote_close() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 255
    def blockquote_close
      return unless @parent

      @parent = @parent.parent
    end

blockquote_open() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 247
    def blockquote_open
      return unless @parent

      block_quote = BlockQuote.new
      @parent << block_quote
      @parent = block_quote
    end

container(_for=nil) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 49
    def container(_for=nil)
      []
    end

current_body() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 53
    def current_body
      @slides.last.body
    end

del(item) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 324
    def del(item)
      DeletedText.new(item)
    end

dlist_close() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 169
    def dlist_close
      return unless @parent

      list = @parent
      @parent = list.parent
      @parent << list
    end

dlist_item(dt, dd) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 177
    def dlist_item(dt, dd)
      if @slide_property_mode and @target_slide
        name = dt.collect {|element| element.text}.join
        value = dd.collect {|element| element.text}.join
        @target_slide[Parser.normalize_property_name(name)] = value.strip
      else
        return unless @parent

        desc_term = DescriptionTerm.new(Paragraph.new(dt.flatten))
        desc_content = DescriptionContent.new(Paragraph.new(dd.flatten))
        @parent << DescriptionListItem.new(desc_term, desc_content)
      end
    end

dlist_open() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 161
    def dlist_open
      return unless @parent

      list = DescriptionList.new
      list.parent = @parent
      @parent = list
    end

em(item) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 320
    def em(item)
      Emphasis.new(item)
    end

finish() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 42
    def finish
      @slides.each do |slide|
        @canvas << slide
      end
      burn_out_pause_targets
    end

headline(level, title) click to toggle source

Procedures

    # File lib/rabbit/parser/wiki/output.rb, line 61
    def headline(level, title)
      @slide_property_mode = false
      case level
      when 1
        slide = nil
        if @slides.empty?
          @title_slide = true
          slide = TitleSlide.new(Title.new(title))
          @parent = slide
        else
          @title_slide = false
          slide = Slide.new(HeadLine.new(title))
          body = Body.new
          slide << body
          @parent = body
        end
        @foot_texts << []
        @slides << slide
      when 2
        @slide_property_mode = true
        @parent, @target_slide = nil, @slides.last
      else
        @parent = nil
      end
    end

hrule() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 87
    def hrule
      @canvas.logger.warn(_("horizontal rule is unsupported")) if @parent
    end

hyperlink(uri, title) click to toggle source

Functions

    # File lib/rabbit/parser/wiki/output.rb, line 305
    def hyperlink(uri, title)
      ref = ReferText.new(title)
      ref.to = uri
      ref
    end

image_hyperlink(uri, alt=nil) click to toggle source

inline image is not supported yet...

    # File lib/rabbit/parser/wiki/output.rb, line 312
    def image_hyperlink(uri, alt=nil)
      Ext::Image.make_image(@canvas, uri, "caption" => alt) || Text.new(uri)
    end

inline_plugin(src) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 332
    def inline_plugin(src)
      evaluate_inline_plugin(src) || text("{{#{src}}}")
    end

list_begin() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 91
    def list_begin
    end

list_close(type) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 119
    def list_close(type)
      @enum_order_stack.pop if type == "ol"
      @list_type_stack.pop
      return unless @parent

      @parent = @parent.parent
      @parent = @parent.parent unless @list_type_stack.empty?
    end

list_end() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 94
    def list_end
    end

list_open(type) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 97
    def list_open(type)
      @enum_order_stack << 1 if type == "ol"
      @list_type_stack << type
      return unless @parent

      case type
      when "ul"
        list = ItemList.new
      when "ol"
        list = EnumList.new
      else
        unsupported_list_type(type)
      end

      if @list_type_stack.size > 1
        @parent.elements.last << list
      else
        @parent << list
      end
      @parent = list
    end

listitem(item) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 134
    def listitem(item)
      return unless @parent

      list_item = nil
      item = item.flatten
      paragraph = Paragraph.new(item)
      type = @list_type_stack.last
      case type
      when "ul"
        list_item = ItemListItem.new(paragraph)
        @parent << list_item
      when "ol"
        list_item = EnumListItem.new(paragraph)
        list_item.order = @enum_order_stack.last
        @enum_order_stack[-1] += 1
        @parent << list_item
      else
        unsupported_list_type
      end

      return unless paragraph.have_wait_tag?

      paragraph.default_visible = true
      paragraph.clear_theme
      register_pause(list_item)
    end

listitem_close() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 131
    def listitem_close
    end

listitem_open() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 128
    def listitem_open
    end

paragraph(contents) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 284
    def paragraph(contents)
      return unless @parent

      paragraph = Paragraph.new(contents.flatten)
      register_pause(paragraph) if paragraph.have_wait_tag?
      @parent << paragraph
    end

preformatted(contents) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 278
    def preformatted(contents)
      return unless @parent

      @parent << PreformattedBlock.new(PreformattedText.new(contents))
    end

reset() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 26
    def reset
      @title_slide = false

      @slides = []
      @parent = nil
      @index = {}

      @slide_property_mode = false
      @target_slide = nil

      @enum_order_stack = []
      @list_type_stack = []

      @foot_texts = []
    end

strong(item) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 316
    def strong(item)
      Emphasis.new(Emphasis.new(item))
    end

table_close() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 205
    def table_close
      return unless @parent

      @table << @table_head if @have_table_header
      @table << @table_body if @have_table_body

      @parent = @table.parent
    end

table_data(item, rs, cs) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 239
    def table_data(item, rs, cs)
      return unless @parent

      @have_table_body = true
      @table_body << @parent if @parent.parent.nil?
      @parent << TableCell.new(item)
    end

table_head(item, rs, cs) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 227
    def table_head(item, rs, cs)
      return unless @parent

      @have_table_header = true
      @table_head << @parent if @parent.parent.nil?
      header = TableHeader.new(item)
      def header.default_align
        Pango::Layout::ALIGN_CENTER
      end
      @parent << header
    end

table_open() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 191
    def table_open
      return unless @parent

      @table = Table.new
      @parent << @table
      @parent = @table

      @table_head = TableHead.new
      @table_body = TableBody.new

      @have_table_header = false
      @have_table_body = false
    end

table_record_close() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 221
    def table_record_close
      return unless @parent

      @parent = @parent.parent
    end

table_record_open() click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 214
    def table_record_open
      return unless @parent

      @parent = TableRow.new
      @table_record_type = nil
    end

text(str) click to toggle source

    # File lib/rabbit/parser/wiki/output.rb, line 328
    def text(str)
      Text.new(Ext::Escape.escape_meta_character(str))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.