| 1 | /* app.vala |
|---|
| 2 | * |
|---|
| 3 | * Copyright (C) 2010 Matias De la Puente |
|---|
| 4 | * |
|---|
| 5 | * This program is free software: you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation, either version 3 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * This program is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | * GNU General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public License |
|---|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | * |
|---|
| 18 | * Author: |
|---|
| 19 | * Matias De la Puente <mfpuente.ar@gmail.com> |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | public class I4uc.GtkFrontend.App : GLib.Object, I4uc.Core.App |
|---|
| 23 | { |
|---|
| 24 | private ViewFactory _view_factory = new ViewFactory (); |
|---|
| 25 | |
|---|
| 26 | private DocumentsView _documents_view; |
|---|
| 27 | private MainWindowView _main_window_view = new MainWindowView (); |
|---|
| 28 | private ProgrammersView _programmers_view; |
|---|
| 29 | private ProjectsView _projects_view; |
|---|
| 30 | |
|---|
| 31 | private I4uc.Core.DocumentsLogic _documents_logic; |
|---|
| 32 | private I4uc.Core.MainWindowLogic _main_window_logic; |
|---|
| 33 | private I4uc.Core.ProgrammersLogic _programmers_logic; |
|---|
| 34 | private I4uc.Core.ProjectsLogic _projects_logic; |
|---|
| 35 | |
|---|
| 36 | private I4uc.Core.Settings _settings = new I4uc.Core.Settings (); |
|---|
| 37 | |
|---|
| 38 | public I4uc.Core.ViewFactory view_factory { get { return _view_factory; } } |
|---|
| 39 | |
|---|
| 40 | public I4uc.Core.DocumentsView documents_view { get { return _documents_view; } } |
|---|
| 41 | public I4uc.Core.MainWindowView main_window_view { get { return _main_window_view; } } |
|---|
| 42 | public I4uc.Core.ProgrammersView programmers_view { get { return _programmers_view; } } |
|---|
| 43 | public I4uc.Core.ProjectsView projects_view { get { return _projects_view; } } |
|---|
| 44 | |
|---|
| 45 | public I4uc.Core.DocumentsLogic documents_logic { get { return _documents_logic; } } |
|---|
| 46 | public I4uc.Core.MainWindowLogic main_window_logic { get { return _main_window_logic; } } |
|---|
| 47 | public I4uc.Core.ProgrammersLogic programmers_logic { get { return _programmers_logic; } } |
|---|
| 48 | public I4uc.Core.ProjectsLogic projects_logic { get { return _projects_logic; } } |
|---|
| 49 | |
|---|
| 50 | public I4uc.Core.Settings settings { get { return _settings; } } |
|---|
| 51 | |
|---|
| 52 | public void load_all () |
|---|
| 53 | { |
|---|
| 54 | _main_window_view.show_all (); |
|---|
| 55 | |
|---|
| 56 | var ui_manager = _main_window_view.ui_manager; |
|---|
| 57 | var pages_panel = _main_window_view.pages_panel; |
|---|
| 58 | var side_panel = _main_window_view.side_panel; |
|---|
| 59 | var bottom_panel = _main_window_view.bottom_panel; |
|---|
| 60 | |
|---|
| 61 | _documents_view = new DocumentsView (ui_manager, pages_panel, side_panel); |
|---|
| 62 | _projects_view = new ProjectsView (ui_manager, side_panel, bottom_panel); |
|---|
| 63 | _programmers_view = new ProgrammersView (ui_manager, pages_panel, side_panel, bottom_panel); |
|---|
| 64 | |
|---|
| 65 | _main_window_logic = new I4uc.Core.MainWindowLogic (this); |
|---|
| 66 | _documents_logic = new I4uc.Core.DocumentsLogic (this); |
|---|
| 67 | _programmers_logic = new I4uc.Core.ProgrammersLogic (this); |
|---|
| 68 | _projects_logic = new I4uc.Core.ProjectsLogic (this); |
|---|
| 69 | } |
|---|
| 70 | } |
|---|