2014-03-25 22:49:26 +01:00
|
|
|
// Copyright (c) 2014, Thomas Goyne <plorkyeran@aegisub.org>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice appear in all copies.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
//
|
|
|
|
// Aegisub Project http://www.aegisub.org/
|
|
|
|
|
|
|
|
#include "include/aegisub/context.h"
|
|
|
|
|
|
|
|
#include "ass_file.h"
|
|
|
|
#include "audio_controller.h"
|
|
|
|
#include "auto4_base.h"
|
|
|
|
#include "dialog_manager.h"
|
|
|
|
#include "initial_line_state.h"
|
2015-08-22 03:17:48 +02:00
|
|
|
#include "options.h"
|
2014-05-22 01:23:28 +02:00
|
|
|
#include "project.h"
|
2014-03-25 22:49:26 +01:00
|
|
|
#include "search_replace_engine.h"
|
|
|
|
#include "selection_controller.h"
|
|
|
|
#include "subs_controller.h"
|
2014-04-17 03:27:54 +02:00
|
|
|
#include "text_selection_controller.h"
|
2014-05-22 01:23:28 +02:00
|
|
|
#include "video_controller.h"
|
2014-03-25 22:49:26 +01:00
|
|
|
|
2014-04-23 22:53:24 +02:00
|
|
|
#include <libaegisub/make_unique.h>
|
2015-08-22 03:17:48 +02:00
|
|
|
#include <libaegisub/path.h>
|
2014-03-25 22:49:26 +01:00
|
|
|
|
|
|
|
namespace agi {
|
|
|
|
Context::Context()
|
2014-04-23 22:53:24 +02:00
|
|
|
: ass(make_unique<AssFile>())
|
|
|
|
, textSelectionController(make_unique<TextSelectionController>())
|
|
|
|
, subsController(make_unique<SubsController>(this))
|
2014-05-22 01:23:28 +02:00
|
|
|
, project(make_unique<Project>(this))
|
2014-04-23 22:53:24 +02:00
|
|
|
, local_scripts(make_unique<Automation4::LocalScriptManager>(this))
|
|
|
|
, selectionController(make_unique<SelectionController>(this))
|
2014-05-22 01:23:28 +02:00
|
|
|
, videoController(make_unique<VideoController>(this))
|
|
|
|
, audioController(make_unique<AudioController>(this))
|
2014-04-23 22:53:24 +02:00
|
|
|
, initialLineState(make_unique<InitialLineState>(this))
|
|
|
|
, search(make_unique<SearchReplaceEngine>(this))
|
2015-08-22 03:17:48 +02:00
|
|
|
, path(make_unique<Path>(*config::path))
|
2016-03-06 01:01:07 +01:00
|
|
|
, dialog(make_unique<DialogManager>())
|
2014-03-25 22:49:26 +01:00
|
|
|
{
|
|
|
|
subsController->SetSelectionController(selectionController.get());
|
|
|
|
}
|
|
|
|
|
2015-08-22 03:17:48 +02:00
|
|
|
Context::~Context() = default;
|
2014-03-25 22:49:26 +01:00
|
|
|
}
|