### Home Classes Methods

### In Files

- lib/rabbit/canvas.rb

### Parent

Object

### Methods

- ::new
- #<<
- #action
- #activate
- #allotted_time
- #append_comment
- #apply_theme
- #applying?
- #attach_to
- #cache_all_slides
- #change_current_index
- #current_index
- #current_slide
- #delete_on_comment_proc_by_name
- #detach
- #each
- #find_slide
- #first_slide?
- #font_resolution
- #front
- #full_path
- #fullscreened
- #have_next?
- #have_next_slide?
- #have_previous?
- #have_previous_slide?
- #iconified
- #index_mode?
- #last_slide?
- #merge_theme
- #move_to_first
- #move_to_if_can
- #move_to_last
- #move_to_next_if_can
- #move_to_next_slide_if_can
- #move_to_previous_if_can
- #move_to_previous_slide_if_can
- #need_reload_source?
- #next_slide
- #on_comment
- #parse
- #parsing?
- #print
- #processing?
- #quit
- #quitted?
- #reload_source
- #reload_theme
- #reset_timer
- #rest_time
- #save_as_image
- #saved_image_base_name
- #slide_index
- #slide_indexes
- #slide_size
- #slide_text
- #slide_title
- #slides
- #source
- #source_force_modified
- #start_auto_redraw_timer
- #start_timer
- #stop_auto_redraw_timer
- #theme_name
- #title
- #title_slide
- #tmp_dir_name
- #to_pixbuf
- #toggle_index_mode
- #unfullscreened
- #update_index_slides
- #use_gl?
- #with_index_mode

### Included Modules

- Enumerable
- Rabbit::GetText

### 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::Canvas

### Constants

INTERNAL_DPI

### Attributes

actions[R]
allotted_time[W]
comment_theme[RW]
comments[R]
font_resolution_ratio[RW]
last_modified[R]
logger[R]
max_n_comments[RW]
migemo_dictionary_name[RW]
migemo_dictionary_search_path[RW]
output_html[RW]
output_index_html[RW]
renderer[R]
rss_base_uri[RW]
saved_image_base_name[W]
saved_image_type[RW]
source_filename[RW]
use_gl[W]

### Public Class Methods

new(logger, renderer) click to toggle source

    # File lib/rabbit/canvas.rb, line 133
    def initialize(logger, renderer)
      @logger = logger
      @frame = NullFrame.new
      @theme_name = nil
      @saved_image_base_name = nil
      @saved_image_type = "png"
      @processing = false
      @quitted = false
      @parse_request_queue = []
      @apply_theme_request_queue = []
      @auto_redraw_timer = nil
      @output_html = false
      @rss_base_uri = nil
      @source_filename = nil
      @migemo_dictionary_search_path = []
      @migemo_dictionary_name = nil
      @limit_time = nil
      @use_gl = false
      @font_resolution_ratio = 1
      @max_n_comments = 100
      @allotted_time = nil
      @comment_theme = nil
      clear
      @renderer = renderer.new(self)
      @actions = Action.action_group(self)
    end

### Public Instance Methods

<<(slide) click to toggle source

    # File lib/rabbit/canvas.rb, line 299
    def <<(slide)
      slide.index = slides.size
      slides << slide
    end

action(name) click to toggle source

    # File lib/rabbit/canvas.rb, line 602
    def action(name)
      act = @actions.get_action(name)
      if act
        act
      else
        logger.warn(_("Unknown action: %s") % name)
        false
      end
    end

activate(name, &block) click to toggle source

    # File lib/rabbit/canvas.rb, line 592
    def activate(name, &block)
      act = action(name)
      if act and act.sensitive?
        act.activate(&block)
        true
      else
        false
      end
    end

allotted_time() click to toggle source

    # File lib/rabbit/canvas.rb, line 621
    def allotted_time
      time = @allotted_time
      time ||= title_slide.allotted_time if title_slide
      Utils.ensure_time(time)
    end

append_comment(comment) click to toggle source

    # File lib/rabbit/canvas.rb, line 575
    def append_comment(comment)
      @comments << comment
      @comments.shift if @comments.size > @max_n_comments
      @on_comment_callbacks.each do |name, callback|
        begin
          callback.call(comment)
        rescue
          logger.error($!)
        end
      end
      true
    end

apply_theme(name=nil, &block) click to toggle source

    # File lib/rabbit/canvas.rb, line 304
    def apply_theme(name=nil, &block)
      _apply_theme(name, Object.new.__id__, &block)
    end

applying?() click to toggle source

    # File lib/rabbit/canvas.rb, line 168
    def applying?
      not @apply_theme_request_queue.empty?
    end

attach_to(frame, window, container=nil, &block) click to toggle source

    # File lib/rabbit/canvas.rb, line 185
    def attach_to(frame, window, container=nil, &block)
      @frame = frame if frame
      @renderer.attach_to(window, container, &block) if window
    end

cache_all_slides() click to toggle source

    # File lib/rabbit/canvas.rb, line 531
    def cache_all_slides
      process do
        @renderer.cache_all_slides
      end
    end

change_current_index(new_index) click to toggle source

    # File lib/rabbit/canvas.rb, line 271
    def change_current_index(new_index)
      mode = @index_mode
      if mode
        index = @index_current_index
        @index_current_index = new_index
      else
        index = @current_index
        @current_index = new_index
      end
      if 0 <= current_index and current_index < slide_size
        yield
      end
    ensure
      if mode
        @index_current_index = index
      else
        @current_index = index
      end
    end

current_index() click to toggle source

    # File lib/rabbit/canvas.rb, line 263
    def current_index
      if @index_mode
        @index_current_index
      else
        @current_index
      end
    end

current_slide() click to toggle source

    # File lib/rabbit/canvas.rb, line 253
    def current_slide
      slide = slides[current_index]
      if slide
        slide
      else
        move_to_first
        slides.first
      end
    end

delete_on_comment_proc_by_name(name) click to toggle source

    # File lib/rabbit/canvas.rb, line 569
    def delete_on_comment_proc_by_name(name)
      @on_comment_callbacks.reject! do |callback_name, callback|
        callback_name == name
      end
    end

detach() click to toggle source

    # File lib/rabbit/canvas.rb, line 190
    def detach
      @frame = NullFrame.new
      @renderer.detach
    end

each(&block) click to toggle source

    # File lib/rabbit/canvas.rb, line 295
    def each(&block)
      slides.each(&block)
    end

find_slide(pattern) click to toggle source

    # File lib/rabbit/canvas.rb, line 230
    def find_slide(pattern)
      slides.find {|slide| slide.match?(pattern)}
    end

first_slide?() click to toggle source

    # File lib/rabbit/canvas.rb, line 507
    def first_slide?
      current_index.zero?
    end

font_resolution() click to toggle source

    # File lib/rabbit/canvas.rb, line 639
    def font_resolution
      INTERNAL_DPI * @font_resolution_ratio
    end

front(public_level=nil) click to toggle source

    # File lib/rabbit/canvas.rb, line 181
    def front(public_level=nil)
      Front.new(self, public_level)
    end

full_path(path) click to toggle source

    # File lib/rabbit/canvas.rb, line 367
    def full_path(path)
      @source and @source.full_path(path)
    end

fullscreened() click to toggle source

    # File lib/rabbit/canvas.rb, line 401
    def fullscreened
      @renderer.post_fullscreen
    end

have_next?() click to toggle source

    # File lib/rabbit/canvas.rb, line 527
    def have_next?
      have_next_slide? or (current_slide and !current_slide.last?)
    end

have_next_slide?() click to toggle source

    # File lib/rabbit/canvas.rb, line 523
    def have_next_slide?
      slide_size - 1 > current_index
    end

have_previous?() click to toggle source

    # File lib/rabbit/canvas.rb, line 519
    def have_previous?
      have_previous_slide? or (current_slide and !current_slide.first?)
    end

have_previous_slide?() click to toggle source

    # File lib/rabbit/canvas.rb, line 515
    def have_previous_slide?
      0 < current_index
    end

iconified() click to toggle source

    # File lib/rabbit/canvas.rb, line 409
    def iconified
      @renderer.post_iconify
    end

index_mode?() click to toggle source

    # File lib/rabbit/canvas.rb, line 470
    def index_mode?
      @index_mode
    end

last_slide?() click to toggle source

    # File lib/rabbit/canvas.rb, line 511
    def last_slide?
      slide_size.zero? or current_index == (slide_size - 1)
    end

merge_theme(name) click to toggle source

    # File lib/rabbit/canvas.rb, line 312
    def merge_theme(name)
      unless @slides.empty?
        manager = Theme::Manager.new(self)
        manager.apply(name)
        @renderer.post_apply_theme
      end
    end

move_to_first() click to toggle source

    # File lib/rabbit/canvas.rb, line 462
    def move_to_first
      move_to_if_can(0)
    end

move_to_if_can(index) click to toggle source

    # File lib/rabbit/canvas.rb, line 423
    def move_to_if_can(index)
      if index and 0 <= index and index < slide_size
        move_to(index)
      end
      current_index
    end

move_to_last() click to toggle source

    # File lib/rabbit/canvas.rb, line 466
    def move_to_last
      move_to(slide_size - 1)
    end

move_to_next_if_can() click to toggle source

    # File lib/rabbit/canvas.rb, line 430
    def move_to_next_if_can
      slide = current_slide
      if slide and !slide.last?
        old_index = slide.drawing_index
        slide.move_to_next
        Action.update_status(self)
        @renderer.post_move_in_slide(old_index, slide.drawing_index)
      else
        move_to_next_slide_if_can
      end
    end

move_to_next_slide_if_can() click to toggle source

    # File lib/rabbit/canvas.rb, line 442
    def move_to_next_slide_if_can
      move_to_if_can(current_index + 1)
    end

move_to_previous_if_can() click to toggle source

    # File lib/rabbit/canvas.rb, line 446
    def move_to_previous_if_can
      slide = current_slide
      if slide and !slide.first?
        old_index = slide.drawing_index
        slide.move_to_previous
        Action.update_status(self)
        @renderer.post_move_in_slide(old_index, slide.drawing_index)
      else
        move_to_previous_slide_if_can
      end
    end

move_to_previous_slide_if_can() click to toggle source

    # File lib/rabbit/canvas.rb, line 458
    def move_to_previous_slide_if_can
      move_to_if_can(current_index - 1)
    end

need_reload_source?() click to toggle source

    # File lib/rabbit/canvas.rb, line 363
    def need_reload_source?
      !@processing and @source and @source.modified?
    end

next_slide() click to toggle source

    # File lib/rabbit/canvas.rb, line 291
    def next_slide
      slides[current_index + 1]
    end

on_comment(name, &callback) click to toggle source

    # File lib/rabbit/canvas.rb, line 565
    def on_comment(name, &callback)
      @on_comment_callbacks << [name, callback]
    end

parse(source=nil, callback=nil, &block) click to toggle source

    # File lib/rabbit/canvas.rb, line 324
    def parse(source=nil, callback=nil, &block)
      id = Object.new.__id__
      @parse_request_queue.push(id)
      @source = source || @source
      begin
        index = current_index
        keep_index do
          @renderer.pre_parse
          clear
          Parser.parse(self, @source)
          set_current_index(index)
          reload_theme do
            if @parse_request_queue.last != id
              raise ParseFinish
            end
            callback.call if callback
          end
          @renderer.post_parse
          index = current_index
        end
        set_current_index(index)
      rescue ParseFinish
      rescue ParseError, UnsupportedFormatError
        if block_given?
          yield($!)
        else
          logger.warn($!.message)
        end
      ensure
        @parse_request_queue.delete_if {|x| x == id}
      end
    end

parsing?() click to toggle source

    # File lib/rabbit/canvas.rb, line 164
    def parsing?
      not @parse_request_queue.empty?
    end

print(&block) click to toggle source

    # File lib/rabbit/canvas.rb, line 395
    def print(&block)
      process do
        @renderer.print(&block)
      end
    end

processing?() click to toggle source

    # File lib/rabbit/canvas.rb, line 537
    def processing?
      @processing
    end

quit() click to toggle source

    # File lib/rabbit/canvas.rb, line 176
    def quit
      @quitted = true
      @frame.quit
    end

quitted?() click to toggle source

    # File lib/rabbit/canvas.rb, line 160
    def quitted?
      @quitted
    end

reload_source(callback=nil, &block) click to toggle source

    # File lib/rabbit/canvas.rb, line 357
    def reload_source(callback=nil, &block)
      if need_reload_source?
        parse(nil, callback, &block)
      end
    end

reload_theme(&block) click to toggle source

    # File lib/rabbit/canvas.rb, line 320
    def reload_theme(&block)
      apply_theme(@theme_name, &block)
    end

reset_timer() click to toggle source

    # File lib/rabbit/canvas.rb, line 635
    def reset_timer
      @limit_time = nil
    end

rest_time() click to toggle source

    # File lib/rabbit/canvas.rb, line 631
    def rest_time
      @limit_time ? @limit_time - Time.now : nil
    end

save_as_image() click to toggle source

    # File lib/rabbit/canvas.rb, line 381
    def save_as_image
      process do
        generator = HTML::Generator.new(self,
                                        saved_image_base_name,
                                        @saved_image_type,
                                        @output_html,
                                        @output_index_html,
                                        @rss_base_uri)
        generator.pdf_filename = filename if /\.pdf/ =~ filename.to_s
        generator.source_filename = @source_filename
        generator.save
      end
    end

saved_image_base_name() click to toggle source

    # File lib/rabbit/canvas.rb, line 413
    def saved_image_base_name
      if @saved_image_base_name
        base_name = GLib.filename_to_utf8(@saved_image_base_name)
      else
        base_name = title.dup
      end
      base_name << "-index" if index_mode?
      base_name
    end

slide_index(pattern) click to toggle source

    # File lib/rabbit/canvas.rb, line 234
    def slide_index(pattern)
      slides.each_with_index do |slide, i|
        return i if slide.match?(pattern)
      end
      nil
    end

slide_indexes(pattern) click to toggle source

    # File lib/rabbit/canvas.rb, line 241
    def slide_indexes(pattern)
      indexes = []
      slides.each_with_index do |slide, i|
        indexes << i if slide.match?(pattern)
      end
      indexes
    end

slide_size() click to toggle source

    # File lib/rabbit/canvas.rb, line 249
    def slide_size
      slides.size
    end

slide_text(index=current_index) click to toggle source

    # File lib/rabbit/canvas.rb, line 215
    def slide_text(index=current_index)
      return "" if slides.empty?
      slide = slides[index]
      return "" if slide.nil?
      slide.text.strip
    end

slide_title(index=current_index) click to toggle source

    # File lib/rabbit/canvas.rb, line 204
    def slide_title(index=current_index)
      return "" if slides.empty?
      slide = slides[index]
      return title if slide.nil?
      if slide.is_a?(Element::TitleSlide)
        slide.title
      else
        "#{title}: #{slide.title}"
      end
    end

slides() click to toggle source

    # File lib/rabbit/canvas.rb, line 222
    def slides
      if @index_mode
        @index_slides
      else
        @slides
      end
    end

source() click to toggle source

    # File lib/rabbit/canvas.rb, line 503
    def source
      @source.read
    end

source_force_modified(force_modified) click to toggle source

    # File lib/rabbit/canvas.rb, line 496
    def source_force_modified(force_modified)
      prev = @source.force_modified
      @source.force_modified = force_modified
      yield @source
      @source.force_modified = prev
    end

start_auto_redraw_timer(interval) click to toggle source

    # File lib/rabbit/canvas.rb, line 541
    def start_auto_redraw_timer(interval)
      stop_auto_redraw_timer
      timer = GLib::Timeout.add(interval * 1000) do
        if quitted?
          false
        else
          activate("Redraw")
          true
        end
      end
      @auto_redraw_timer = timer
    end

start_timer(limit) click to toggle source

    # File lib/rabbit/canvas.rb, line 627
    def start_timer(limit)
      @limit_time = Time.now + limit
    end

stop_auto_redraw_timer() click to toggle source

    # File lib/rabbit/canvas.rb, line 554
    def stop_auto_redraw_timer
      if @auto_redraw_timer
        if GLib::Source.respond_to?(:remove)
          GLib::Source.remove(@auto_redraw_timer)
        else
          Gtk.timeout_remove(@auto_redraw_timer)
        end
        @auto_redraw_timer = nil
      end
    end

theme_name() click to toggle source

    # File lib/rabbit/canvas.rb, line 308
    def theme_name
      @theme_name || default_theme || "default"
    end

title() click to toggle source

    # File lib/rabbit/canvas.rb, line 195
    def title
      ts = title_slide
      if ts
        ts.title
      else
        "Rabbit"
      end
    end

title_slide() click to toggle source

    # File lib/rabbit/canvas.rb, line 588
    def title_slide
      @slides.find{|x| x.is_a?(Element::TitleSlide)}
    end

tmp_dir_name() click to toggle source

    # File lib/rabbit/canvas.rb, line 371
    def tmp_dir_name
      @source and @source.tmp_dir_name
    end

to_pixbuf(i) click to toggle source

    # File lib/rabbit/canvas.rb, line 375
    def to_pixbuf(i)
      move_to_if_can(i)
      current_slide.flush
      @renderer.to_pixbuf(current_slide)
    end

toggle_index_mode() click to toggle source

    # File lib/rabbit/canvas.rb, line 474
    def toggle_index_mode
      @renderer.pre_toggle_index_mode
      process do
        if @index_mode
          @index_mode = false
          @renderer.index_mode_off
        else
          update_index_slides
          @index_mode = true
          @renderer.index_mode_on
        end
        modified
      end
      @renderer.post_toggle_index_mode
    end

unfullscreened() click to toggle source

    # File lib/rabbit/canvas.rb, line 405
    def unfullscreened
      @renderer.post_unfullscreen
    end

update_index_slides() click to toggle source

    # File lib/rabbit/canvas.rb, line 490
    def update_index_slides
      if @index_slides.empty?
        @index_slides = Element::IndexSlide.make_index_slides(self)
      end
    end

use_gl?() click to toggle source

    # File lib/rabbit/canvas.rb, line 172
    def use_gl?
      @use_gl
    end

with_index_mode(new_value) click to toggle source

    # File lib/rabbit/canvas.rb, line 612
    def with_index_mode(new_value)
      current_index_mode = @index_mode
      @index_mode = new_value
      update_index_slides if @index_mode
      yield
    ensure
      @index_mode = current_index_mode
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.