### Home Classes Methods

### In Files

- lib/rabbit/renderer/display/drawing-area-base.rb

### Methods

- ::new
- #attach_to
- #cache_all_slides
- #caching_all_slides
- #confirm
- #detach
- #index_mode_off
- #index_mode_on
- #post_apply_theme
- #post_cache_all_slides
- #post_fullscreen
- #post_iconify
- #post_init_gui
- #post_move
- #post_parse
- #post_print
- #post_to_pixbuf
- #post_toggle_index_mode
- #post_unfullscreen
- #pre_cache_all_slides
- #pre_parse
- #pre_print
- #pre_to_pixbuf
- #pre_toggle_index_mode
- #printing
- #reload_source
- #reload_theme
- #reset_adjustment
- #to_pixbufing
- #toggle_blackout
- #toggle_whiteout

### Included Modules

- Rabbit::Renderer::Display::DrawingAreaPrimitive
- Rabbit::Renderer::Display::Menu
- Rabbit::Graffiti
- Rabbit::Renderer::Display::Mask
- Rabbit::Renderer::Display::Progress
- Rabbit::Renderer::Display::Search
- Rabbit::Gesture
- Rabbit::Renderer::Display::KeyHandler
- Rabbit::Renderer::Display::ButtonHandler
- Rabbit::Renderer::Display::ScrollHandler
- Rabbit::Renderer::Display::Info
- Rabbit::Renderer::Display::Spotlight
- Rabbit::Renderer::Display::Magnifier

### 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::Renderer::Display::DrawingAreaBase

### Public Class Methods

new(canvas) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 35
    def initialize(canvas)
      @caching = nil
      @need_reload_theme = false
      super
    end

### Public Instance Methods

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

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 200
    def attach_to(window, container=nil, &block)
      super

      init_menu
      init_gesture_actions
      add_widgets_to_container(@container, &block)
      widget.show
      attach_menu(@window)
      attach_key(@window)
    end

cache_all_slides() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 142
    def cache_all_slides
      pre_cache_all_slides(@canvas.slide_size)
      canceled = false
      @canvas.slides.each_with_index do |slide, i|
        @canvas.change_current_index(i) do
          compile_slide(slide)
        end
        unless caching_all_slides(i)
          canceled = true
          break
        end
      end
      post_cache_all_slides(canceled)
    end

caching_all_slides(i) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 163
    def caching_all_slides(i)
      update_progress(i)
      continue = @caching_size == [width, height] &&
        !@canvas.quitted? && !@canvas.applying?
      continue
    end

confirm(message) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 181
    def confirm(message)
      confirm_dialog(message) == Gtk::MessageDialog::RESPONSE_OK
    end

detach() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 211
    def detach
      detach_key(@window)
      detach_menu(@window)
      widget.hide
      unless @window.destroyed?
        remove_widgets_from_container(@container)
      end

      super
    end

index_mode_off() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 94
    def index_mode_off
      super
    end

index_mode_on() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 90
    def index_mode_on
      super
    end

post_apply_theme() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 41
    def post_apply_theme
      if @need_reload_theme
        @need_reload_theme = false
        reload_theme
      else
        super
        update_menu
      end
    end

post_cache_all_slides(canceled) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 170
    def post_cache_all_slides(canceled)
      end_progress
      @caching = false
      return if @canvas.quitted?
      if canceled
        reload_theme
      else
        @area.queue_draw
      end
    end

post_fullscreen() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 59
    def post_fullscreen
      super
      update_menu
    end

post_iconify() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 69
    def post_iconify
      super
      update_menu
    end

post_init_gui() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 237
    def post_init_gui
    end

post_move(old_index, index) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 51
    def post_move(old_index, index)
      update_title
      reset_adjustment
      clear_graffiti
      # toggle_graffiti_mode if @graffiti_mode
      super
    end

post_parse() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 79
    def post_parse
      super
      clear_button_handler
      update_title
      update_menu
      if @need_reload_theme
        @need_reload_theme = false
        reload_theme
      end
    end

post_print(canceled) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 120
    def post_print(canceled)
      end_progress
    end

post_to_pixbuf(canceled) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 137
    def post_to_pixbuf(canceled)
      super
      end_progress
    end

post_toggle_index_mode() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 103
    def post_toggle_index_mode
      @canvas.activate("ClearGraffiti")
      update_menu
      update_title
      super
    end

post_unfullscreen() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 64
    def post_unfullscreen
      super
      update_menu
    end

pre_cache_all_slides(slide_size) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 157
    def pre_cache_all_slides(slide_size)
      @caching = true
      @caching_size = [width, height]
      start_progress(slide_size)
    end

pre_parse() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 74
    def pre_parse
      super
      update_menu
    end

pre_print(slide_size) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 110
    def pre_print(slide_size)
      start_progress(slide_size)
    end

pre_to_pixbuf(slide_size) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 124
    def pre_to_pixbuf(slide_size)
      super
      start_progress(slide_size)
      @pixbufing_size = [width, height]
    end

pre_toggle_index_mode() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 98
    def pre_toggle_index_mode
      super
      Utils.process_pending_events
    end

printing(i) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 114
    def printing(i)
      update_progress(i)
      continue = !@canvas.quitted?
      continue
    end

reload_source(&callback) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 193
    def reload_source(&callback)
      if @canvas.need_reload_source?
        callback ||= Utils.process_pending_events_proc
        super(callback)
      end
    end

reload_theme(&callback) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 185
    def reload_theme(&callback)
      if @canvas.applying?
        @need_reload_theme = true
      else
        super
      end
    end

reset_adjustment() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 232
    def reset_adjustment
      super
      @area.queue_draw
    end

to_pixbufing(i) click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 130
    def to_pixbufing(i)
      update_progress(i)
      continue = @pixbufing_size == [width, height] &&
        !@canvas.quitted? && !@canvas.applying?
      super or continue
    end

toggle_blackout() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 227
    def toggle_blackout
      super
      @area.queue_draw
    end

toggle_whiteout() click to toggle source

    # File lib/rabbit/renderer/display/drawing-area-base.rb, line 222
    def toggle_whiteout
      super
      @area.queue_draw
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.