2012-12-11 13:22:43 +01:00
|
|
|
#include "subviews.hpp"
|
|
|
|
|
|
|
|
#include "../doc/subviewfactoryimp.hpp"
|
|
|
|
|
|
|
|
#include "tablesubview.hpp"
|
2012-12-13 13:35:08 +01:00
|
|
|
#include "dialoguesubview.hpp"
|
2013-04-10 20:14:10 +02:00
|
|
|
#include "scriptsubview.hpp"
|
2013-07-08 13:12:50 +02:00
|
|
|
#include "regionmapsubview.hpp"
|
2013-07-26 12:34:30 +02:00
|
|
|
#include "genericcreator.hpp"
|
2016-08-09 00:17:41 -04:00
|
|
|
#include "globalcreator.hpp"
|
2013-07-28 18:08:57 +02:00
|
|
|
#include "cellcreator.hpp"
|
2013-07-30 10:27:17 +02:00
|
|
|
#include "referenceablecreator.hpp"
|
2013-07-30 12:53:03 +02:00
|
|
|
#include "referencecreator.hpp"
|
2015-09-29 23:52:35 +10:00
|
|
|
#include "startscriptcreator.hpp"
|
2013-09-28 09:25:54 +02:00
|
|
|
#include "scenesubview.hpp"
|
2013-10-21 13:39:13 +02:00
|
|
|
#include "dialoguecreator.hpp"
|
2013-11-08 11:51:59 +01:00
|
|
|
#include "infocreator.hpp"
|
2016-05-03 07:24:33 -04:00
|
|
|
#include "pathgridcreator.hpp"
|
2014-03-16 12:44:01 +01:00
|
|
|
#include "previewsubview.hpp"
|
2012-12-11 13:22:43 +01:00
|
|
|
|
|
|
|
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
|
|
|
{
|
2013-07-30 12:53:03 +02:00
|
|
|
// Regular record tables (including references which are actually sub-records, but are promoted
|
|
|
|
// to top-level records within the editor)
|
2013-02-08 09:58:19 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Gmsts,
|
2013-07-26 12:34:30 +02:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
2013-02-08 09:58:19 +01:00
|
|
|
|
2013-03-21 14:31:32 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Skills,
|
2013-07-26 12:34:30 +02:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
2013-03-21 14:31:32 +01:00
|
|
|
|
2014-09-26 13:12:17 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_MagicEffects,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
|
2013-04-02 15:33:28 +02:00
|
|
|
static const CSMWorld::UniversalId::Type sTableTypes[] =
|
|
|
|
{
|
|
|
|
CSMWorld::UniversalId::Type_Classes,
|
|
|
|
CSMWorld::UniversalId::Type_Factions,
|
2013-04-04 14:34:39 +02:00
|
|
|
CSMWorld::UniversalId::Type_Races,
|
2013-04-06 21:21:10 +02:00
|
|
|
CSMWorld::UniversalId::Type_Sounds,
|
2013-04-07 16:32:06 +02:00
|
|
|
CSMWorld::UniversalId::Type_Regions,
|
2013-04-07 20:26:39 +02:00
|
|
|
CSMWorld::UniversalId::Type_Birthsigns,
|
2013-04-09 11:40:36 +02:00
|
|
|
CSMWorld::UniversalId::Type_Spells,
|
2014-06-30 20:40:34 +02:00
|
|
|
CSMWorld::UniversalId::Type_Enchantments,
|
2014-07-01 12:37:22 +02:00
|
|
|
CSMWorld::UniversalId::Type_BodyParts,
|
2014-09-23 13:21:54 +02:00
|
|
|
CSMWorld::UniversalId::Type_SoundGens,
|
2013-04-02 15:33:28 +02:00
|
|
|
|
|
|
|
CSMWorld::UniversalId::Type_None // end marker
|
|
|
|
};
|
|
|
|
|
|
|
|
for (int i=0; sTableTypes[i]!=CSMWorld::UniversalId::Type_None; ++i)
|
2013-07-26 12:34:30 +02:00
|
|
|
manager.add (sTableTypes[i],
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GenericCreator> >);
|
2013-03-25 13:22:06 +01:00
|
|
|
|
2015-09-29 23:52:35 +10:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_StartScripts,
|
2016-01-24 11:54:53 -05:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, StartScriptCreatorFactory>);
|
2015-09-29 23:52:35 +10:00
|
|
|
|
2013-07-28 18:08:57 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Cells,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<CellCreator> >);
|
|
|
|
|
2013-07-30 10:27:17 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Referenceables,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<ReferenceableCreator> >);
|
|
|
|
|
2013-07-30 12:53:03 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_References,
|
2015-06-19 11:50:02 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, ReferenceCreatorFactory>);
|
2013-07-30 12:53:03 +02:00
|
|
|
|
2013-10-21 13:39:13 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Topics,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, TopicCreatorFactory>);
|
|
|
|
|
2013-12-02 16:25:26 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Journals,
|
2013-10-21 13:39:13 +02:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, JournalCreatorFactory>);
|
|
|
|
|
2013-10-31 13:40:14 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_TopicInfos,
|
2015-06-19 12:51:50 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, InfoCreatorFactory>);
|
2013-10-31 13:40:14 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_JournalInfos,
|
2015-06-19 12:51:50 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, InfoCreatorFactory>);
|
2013-10-31 13:40:14 +01:00
|
|
|
|
2016-05-03 07:24:33 -04:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Pathgrids,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<PathgridCreator> >);
|
|
|
|
|
2016-08-09 00:17:41 -04:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Globals,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GlobalCreator> >);
|
|
|
|
|
2014-07-05 15:51:17 +02:00
|
|
|
// Subviews for resources tables
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Meshes,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Icons,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Musics,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_SoundsRes,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Textures,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Videos,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
|
|
|
|
|
|
|
|
2013-07-30 12:53:03 +02:00
|
|
|
// Subviews for editing/viewing individual records
|
2013-04-10 20:14:10 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Script, new CSVDoc::SubViewFactory<ScriptSubView>);
|
2013-04-02 12:00:45 +02:00
|
|
|
|
2013-07-30 12:53:03 +02:00
|
|
|
// Other stuff (combined record tables)
|
2013-07-08 13:12:50 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_RegionMap, new CSVDoc::SubViewFactory<RegionMapSubView>);
|
2013-08-08 15:55:23 +02:00
|
|
|
|
2014-09-14 11:41:28 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Scene, new CSVDoc::SubViewFactory<SceneSubView>);
|
|
|
|
|
|
|
|
// More other stuff
|
2013-08-08 15:55:23 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Filters,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView,
|
2014-08-10 18:46:32 +02:00
|
|
|
CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> >);
|
2013-08-08 15:55:23 +02:00
|
|
|
|
2014-08-04 13:36:01 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_DebugProfiles,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView,
|
2014-08-15 12:03:07 +02:00
|
|
|
CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> >);
|
2014-08-04 13:36:01 +02:00
|
|
|
|
2014-09-14 11:41:28 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Scripts,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GenericCreator,
|
|
|
|
CSMWorld::Scope_Project | CSMWorld::Scope_Content> >);
|
2014-03-06 20:10:13 +01:00
|
|
|
|
2014-06-06 13:09:17 +02:00
|
|
|
// Dialogue subviews
|
|
|
|
static const CSMWorld::UniversalId::Type sTableTypes2[] =
|
|
|
|
{
|
|
|
|
CSMWorld::UniversalId::Type_Region,
|
|
|
|
CSMWorld::UniversalId::Type_Spell,
|
|
|
|
CSMWorld::UniversalId::Type_Birthsign,
|
|
|
|
CSMWorld::UniversalId::Type_Global,
|
|
|
|
CSMWorld::UniversalId::Type_Race,
|
|
|
|
CSMWorld::UniversalId::Type_Class,
|
|
|
|
CSMWorld::UniversalId::Type_Sound,
|
|
|
|
CSMWorld::UniversalId::Type_Faction,
|
2014-07-01 09:50:43 +02:00
|
|
|
CSMWorld::UniversalId::Type_Enchantment,
|
2014-07-01 12:37:22 +02:00
|
|
|
CSMWorld::UniversalId::Type_BodyPart,
|
2014-09-23 13:21:54 +02:00
|
|
|
CSMWorld::UniversalId::Type_SoundGen,
|
2014-03-18 09:36:22 +01:00
|
|
|
|
2014-06-06 13:09:17 +02:00
|
|
|
CSMWorld::UniversalId::Type_None // end marker
|
|
|
|
};
|
2014-03-18 09:36:22 +01:00
|
|
|
|
2014-06-06 13:09:17 +02:00
|
|
|
for (int i=0; sTableTypes2[i]!=CSMWorld::UniversalId::Type_None; ++i)
|
|
|
|
manager.add (sTableTypes2[i],
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView,
|
|
|
|
CreatorFactory<GenericCreator> > (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
2015-09-29 23:52:35 +10:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_StartScript,
|
2016-01-24 11:54:53 -05:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, StartScriptCreatorFactory>(false));
|
2015-09-29 23:52:35 +10:00
|
|
|
|
2014-06-06 13:09:17 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Skill,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, NullCreatorFactory > (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
2014-09-26 13:12:17 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_MagicEffect,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, NullCreatorFactory > (false));
|
|
|
|
|
2014-03-18 09:36:22 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Gmst,
|
2014-06-06 13:09:17 +02:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, NullCreatorFactory > (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
2014-06-06 13:09:17 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Referenceable,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, CreatorFactory<ReferenceableCreator> > (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Reference,
|
2015-06-19 11:50:02 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, ReferenceCreatorFactory> (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Cell,
|
2014-03-18 20:53:21 +01:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, CreatorFactory<CellCreator> > (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_JournalInfo,
|
2015-06-19 12:51:50 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, InfoCreatorFactory> (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_TopicInfo,
|
2015-06-19 12:51:50 +03:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, InfoCreatorFactory>(false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Topic,
|
2014-03-18 20:56:55 +01:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, TopicCreatorFactory> (false));
|
2014-03-18 09:36:22 +01:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Journal,
|
2014-03-18 20:53:21 +01:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, JournalCreatorFactory> (false));
|
2014-03-19 10:21:44 +01:00
|
|
|
|
2016-05-03 07:24:33 -04:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Pathgrid,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, CreatorFactory<PathgridCreator> > (false));
|
|
|
|
|
2014-08-15 13:35:53 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_DebugProfile,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> > (false));
|
|
|
|
|
2014-08-15 13:37:37 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Filter,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<DialogueSubView, CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> > (false));
|
|
|
|
|
2015-06-26 16:11:00 +02:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_MetaData,
|
|
|
|
new CSVDoc::SubViewFactory<SimpleDialogueSubView >);
|
2016-01-24 11:54:53 -05:00
|
|
|
|
2014-03-19 10:21:44 +01:00
|
|
|
//preview
|
2014-03-16 12:44:01 +01:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Preview, new CSVDoc::SubViewFactory<PreviewSubView>);
|
2015-03-11 10:54:45 -04:00
|
|
|
}
|