| 1 | use Renard::Incunabula::Common::Setup; | ||
| 2 | package Renard::Curie::Container::App; | ||
| 3 | # ABSTRACT: A Bread::Board container for the application | ||
| 4 | $Renard::Curie::Container::App::VERSION = '0.005'; | ||
| 5 | use Moose; | ||
| 6 | use Bread::Board::Declare; | ||
| 7 | |||
| 8 | # Subcomponents | ||
| 9 | has menu_bar => ( | ||
| 10 | is => 'ro', | ||
| 11 | isa => 'Renard::Curie::Component::MenuBar', | ||
| 12 | infer => 1, | ||
| 13 | lifecycle => 'Singleton', | ||
| 14 | ); | ||
| 15 | |||
| 16 | has outline => ( | ||
| 17 | is => 'ro', | ||
| 18 | isa => 'Renard::Curie::Component::Outline', | ||
| 19 | infer => 1, | ||
| 20 | lifecycle => 'Singleton', | ||
| 21 | ); | ||
| 22 | |||
| 23 | has log_window => ( | ||
| 24 | is => 'ro', | ||
| 25 | isa => 'Renard::Curie::Component::LogWindow', | ||
| 26 | infer => 1, | ||
| 27 | lifecycle => 'Singleton', | ||
| 28 | ); | ||
| 29 | |||
| 30 | has tts_window => ( | ||
| 31 | is => 'ro', | ||
| 32 | isa => 'Renard::Curie::Component::TTSWindow', | ||
| 33 | infer => 1, | ||
| 34 | lifecycle => 'Singleton', | ||
| 35 | ); | ||
| 36 | |||
| 37 | # Main component | ||
| 38 | has main_window => ( | ||
| 39 | is => 'ro', | ||
| 40 | isa => 'Renard::Curie::Component::MainWindow', | ||
| 41 | dependencies => [qw(log_window outline menu_bar view_manager tts_window)], | ||
| 42 | lifecycle => 'Singleton', | ||
| 43 | ); | ||
| 44 | |||
| 45 | has view_manager => ( | ||
| 46 | is => 'ro', | ||
| 47 | isa => 'Renard::Curie::ViewModel::ViewManager', | ||
| 48 | infer => 1, | ||
| 49 | lifecycle => 'Singleton', | ||
| 50 | ); | ||
| 51 | |||
| 52 | # App | ||
| 53 | has app => ( | ||
| 54 | is => 'ro', | ||
| 55 | isa => 'Renard::Curie::App', | ||
| 56 | infer => 1, | ||
| 57 | lifecycle => 'Singleton', | ||
| 58 | ); | ||
| 59 | |||
| 60 | method _test_current_view() { | ||
| 61 | $self->view_manager->current_view; | ||
| 62 | } | ||
| 63 | |||
| 64 | 1; | ||
| 65 | |||
| 66 | __END__ |