The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Renard::Curie::App - A document viewing application

VERSION

version 0.002

EXTENDS

CONSUMES

FUNCTIONS

_get_version

  fun _get_version() :ReturnType(Str)

Returns the version of the application if there is one. Otherwise returns the Str 'dev' to indicate that this is a development version.

main

  fun main()

Application entry point.

ATTRIBUTES

window

A Gtk3::Window that contains the main window for the application.

page_document_component

A Renard::Curie::Component::PageDrawingArea that holds the currently displayed document.

  • Predicate: has_page_document_component

  • Clearer: clear_page_document_component

A Renard::Curie::Component::MenuBar for the application's menu-bar.

outline

A Renard::Curie::Component::Outline which makes up the outline sidebar for this window.

log_window

A Renard::Curie::Component::LogWindow for the application's logging.

content_box

A horizontal Gtk3::Box which is used to split the main application area into two different regions.

The left region contains "outline" and the right region contains "page_document_component".

CLASS METHODS

setup_gtk

  classmethod setup_gtk()

Sets up any of the Glib::Object::Introspection-based libraries needed for the application.

Currently loads nothing, but will load the Gnome Docking Library (libgdl) in the future.

METHODS

setup_window

  method setup_window()

Sets up components that make up the window shell for the application including:

setup_dnd

  method setup_dnd()

Setup drag and drop.

run

  method run()

Displays "window" and starts the Gtk3 event loop.

BUILD

  method BUILD

Initialises the application and sets up signals.

process_arguments

  method process_arguments()

Processes arguments given in @ARGV.

open_pdf_document

  method open_pdf_document( (Path->coercibles) $pdf_filename )

Opens a PDF file stored on the disk.

open_document

  method open_document( (DocumentModel) $doc )

Sets the document for the application's "page_document_component".

CALLBACKS

on_open_file_dialog_cb

  callback on_open_file_dialog_cb( $event, $self )

Callback that opens a Renard::Curie::Component::FileChooser component.

on_application_quit_cb

  callback on_application_quit_cb( $event, $self )

Callback that stops the Gtk3 main loop.

on_drag_data_received_cb

  on_drag_data_received_cb

Whenever the drag and drop data is received by the application.

AUTHOR

Project Renard

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Project Renard.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.