2012-12-11 12:22:43 +00:00
|
|
|
|
|
|
|
#include "subviews.hpp"
|
|
|
|
|
|
|
|
#include "../doc/subviewfactoryimp.hpp"
|
|
|
|
|
2013-08-08 13:55:23 +00:00
|
|
|
#include "../filter/filtercreator.hpp"
|
|
|
|
|
2012-12-11 12:22:43 +00:00
|
|
|
#include "tablesubview.hpp"
|
2012-12-13 12:35:08 +00:00
|
|
|
#include "dialoguesubview.hpp"
|
2013-04-10 18:14:10 +00:00
|
|
|
#include "scriptsubview.hpp"
|
2013-07-08 11:12:50 +00:00
|
|
|
#include "regionmapsubview.hpp"
|
2013-07-26 10:34:30 +00:00
|
|
|
#include "genericcreator.hpp"
|
2013-07-28 16:08:57 +00:00
|
|
|
#include "cellcreator.hpp"
|
2013-07-30 08:27:17 +00:00
|
|
|
#include "referenceablecreator.hpp"
|
2013-07-30 10:53:03 +00:00
|
|
|
#include "referencecreator.hpp"
|
2013-09-28 07:25:54 +00:00
|
|
|
#include "scenesubview.hpp"
|
2013-10-21 11:39:13 +00:00
|
|
|
#include "dialoguecreator.hpp"
|
2013-11-08 10:51:59 +00:00
|
|
|
#include "infocreator.hpp"
|
2012-12-11 12:22:43 +00:00
|
|
|
|
|
|
|
void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
|
|
|
{
|
2013-07-30 10:53:03 +00:00
|
|
|
// Regular record tables (including references which are actually sub-records, but are promoted
|
|
|
|
// to top-level records within the editor)
|
2013-02-08 08:58:19 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Gmsts,
|
2013-07-26 10:34:30 +00:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
2013-02-08 08:58:19 +00:00
|
|
|
|
2013-03-21 13:31:32 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Skills,
|
2013-07-26 10:34:30 +00:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, NullCreatorFactory>);
|
2013-03-21 13:31:32 +00:00
|
|
|
|
2013-04-02 13:33:28 +00:00
|
|
|
static const CSMWorld::UniversalId::Type sTableTypes[] =
|
|
|
|
{
|
|
|
|
CSMWorld::UniversalId::Type_Globals,
|
|
|
|
CSMWorld::UniversalId::Type_Classes,
|
|
|
|
CSMWorld::UniversalId::Type_Factions,
|
2013-04-04 12:34:39 +00:00
|
|
|
CSMWorld::UniversalId::Type_Races,
|
2013-04-06 19:21:10 +00:00
|
|
|
CSMWorld::UniversalId::Type_Sounds,
|
2013-04-07 13:17:35 +00:00
|
|
|
CSMWorld::UniversalId::Type_Scripts,
|
2013-04-07 14:32:06 +00:00
|
|
|
CSMWorld::UniversalId::Type_Regions,
|
2013-04-07 18:26:39 +00:00
|
|
|
CSMWorld::UniversalId::Type_Birthsigns,
|
2013-04-09 09:40:36 +00:00
|
|
|
CSMWorld::UniversalId::Type_Spells,
|
2013-04-02 13:33:28 +00:00
|
|
|
|
|
|
|
CSMWorld::UniversalId::Type_None // end marker
|
|
|
|
};
|
|
|
|
|
|
|
|
for (int i=0; sTableTypes[i]!=CSMWorld::UniversalId::Type_None; ++i)
|
2013-07-26 10:34:30 +00:00
|
|
|
manager.add (sTableTypes[i],
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GenericCreator> >);
|
2013-03-25 12:22:06 +00:00
|
|
|
|
2013-07-28 16:08:57 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Cells,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<CellCreator> >);
|
|
|
|
|
2013-07-30 08:27:17 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Referenceables,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<ReferenceableCreator> >);
|
|
|
|
|
2013-07-30 10:53:03 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_References,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<ReferenceCreator> >);
|
|
|
|
|
2013-10-21 11:39:13 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Topics,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, TopicCreatorFactory>);
|
|
|
|
|
2013-12-02 15:25:26 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Journals,
|
2013-10-21 11:39:13 +00:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, JournalCreatorFactory>);
|
|
|
|
|
2013-10-31 12:40:14 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_TopicInfos,
|
2013-11-08 10:51:59 +00:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> > (false));
|
2013-10-31 12:40:14 +00:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_JournalInfos,
|
2013-11-08 10:51:59 +00:00
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> > (false));
|
2013-10-31 12:40:14 +00:00
|
|
|
|
2013-07-30 10:53:03 +00:00
|
|
|
// Subviews for editing/viewing individual records
|
2013-04-10 18:14:10 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Script, new CSVDoc::SubViewFactory<ScriptSubView>);
|
2013-04-02 10:00:45 +00:00
|
|
|
|
2013-07-30 10:53:03 +00:00
|
|
|
// Other stuff (combined record tables)
|
2013-07-08 11:12:50 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_RegionMap, new CSVDoc::SubViewFactory<RegionMapSubView>);
|
2013-08-08 13:55:23 +00:00
|
|
|
|
|
|
|
manager.add (CSMWorld::UniversalId::Type_Filters,
|
|
|
|
new CSVDoc::SubViewFactoryWithCreator<TableSubView,
|
|
|
|
CreatorFactory<CSVFilter::FilterCreator> >);
|
|
|
|
|
2013-09-28 07:25:54 +00:00
|
|
|
manager.add (CSMWorld::UniversalId::Type_Scene, new CSVDoc::SubViewFactory<SceneSubView>);
|
2012-12-11 12:22:43 +00:00
|
|
|
}
|