class Roby::GUI::ModelViews::Task

Handler class to display information about a task model

Constants

TEMPLATE
TEMPLATE_PATH

Attributes

page[R]

Public Class Methods

new(page) click to toggle source
Calls superclass method
# File lib/roby/gui/model_views/task.rb, line 10
def initialize(page)
    @page = page
    super()
end

Public Instance Methods

clear() click to toggle source
# File lib/roby/gui/model_views/task.rb, line 18
def clear
end
disable() click to toggle source
# File lib/roby/gui/model_views/task.rb, line 16
def disable
end
enable() click to toggle source
# File lib/roby/gui/model_views/task.rb, line 14
def enable
end
render(task_model, options = Hash.new) click to toggle source
# File lib/roby/gui/model_views/task.rb, line 25
def render(task_model, options = Hash.new)
    html = TEMPLATE.result(binding)
    svg  = RelationsCanvasTask.to_svg(task_model.new(plan: DRoby::RebuiltPlan.new))

    options, push_options = Kernel.filter_options options,
        external_objects: false, doc: true
    if external_objects = options[:external_objects]
        file = external_objects % 'roby_task' + ".svg"
        File.open(file, 'w') { |io| io.write(svg) }
        svg = "<object data=\"#{file}\" type=\"image/svg+xml\"></object>"
    end

    if options[:doc] && task_model.doc
        page.push nil, page.main_doc(task_model.doc)
    end
    page.push('Roby Task Model', TEMPLATE.result(binding), push_options)
end