2012-12-16 11:52:23 +00:00
|
|
|
|
|
|
|
#include "columnbase.hpp"
|
|
|
|
|
2013-08-07 07:36:05 +00:00
|
|
|
#include "columns.hpp"
|
|
|
|
|
|
|
|
CSMWorld::ColumnBase::ColumnBase (int columnId, Display displayType, int flags)
|
|
|
|
: mColumnId (columnId), mDisplayType (displayType), mFlags (flags)
|
2012-12-16 11:52:23 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
CSMWorld::ColumnBase::~ColumnBase() {}
|
|
|
|
|
|
|
|
bool CSMWorld::ColumnBase::isUserEditable() const
|
|
|
|
{
|
|
|
|
return isEditable();
|
2013-08-07 07:36:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string CSMWorld::ColumnBase::getTitle() const
|
|
|
|
{
|
|
|
|
return Columns::getName (static_cast<Columns::ColumnId> (mColumnId));
|
2014-03-08 14:27:43 +00:00
|
|
|
}
|
|
|
|
|
2015-03-25 10:56:14 +00:00
|
|
|
int CSMWorld::ColumnBase::getId() const
|
2014-03-08 14:27:43 +00:00
|
|
|
{
|
|
|
|
return mColumnId;
|
2015-03-11 14:54:45 +00:00
|
|
|
}
|
2015-03-25 10:56:14 +00:00
|
|
|
|
|
|
|
bool CSMWorld::ColumnBase::isId (Display display)
|
|
|
|
{
|
|
|
|
static const Display ids[] =
|
|
|
|
{
|
|
|
|
Display_Skill,
|
|
|
|
Display_Class,
|
|
|
|
Display_Faction,
|
|
|
|
Display_Race,
|
|
|
|
Display_Sound,
|
|
|
|
Display_Region,
|
|
|
|
Display_Birthsign,
|
|
|
|
Display_Spell,
|
|
|
|
Display_Cell,
|
|
|
|
Display_Referenceable,
|
|
|
|
Display_Activator,
|
|
|
|
Display_Potion,
|
|
|
|
Display_Apparatus,
|
|
|
|
Display_Armor,
|
|
|
|
Display_Book,
|
|
|
|
Display_Clothing,
|
|
|
|
Display_Container,
|
|
|
|
Display_Creature,
|
|
|
|
Display_Door,
|
|
|
|
Display_Ingredient,
|
|
|
|
Display_CreatureLevelledList,
|
|
|
|
Display_ItemLevelledList,
|
|
|
|
Display_Light,
|
|
|
|
Display_Lockpick,
|
|
|
|
Display_Miscellaneous,
|
|
|
|
Display_Npc,
|
|
|
|
Display_Probe,
|
|
|
|
Display_Repair,
|
|
|
|
Display_Static,
|
|
|
|
Display_Weapon,
|
|
|
|
Display_Reference,
|
|
|
|
Display_Filter,
|
|
|
|
Display_Topic,
|
|
|
|
Display_Journal,
|
|
|
|
Display_TopicInfo,
|
|
|
|
Display_JournalInfo,
|
|
|
|
Display_Scene,
|
|
|
|
Display_GlobalVariable,
|
|
|
|
|
|
|
|
Display_Mesh,
|
|
|
|
Display_Icon,
|
|
|
|
Display_Music,
|
|
|
|
Display_SoundRes,
|
|
|
|
Display_Texture,
|
|
|
|
Display_Video,
|
2015-03-28 13:48:06 +00:00
|
|
|
|
|
|
|
Display_Id,
|
2015-03-25 10:56:14 +00:00
|
|
|
|
|
|
|
Display_None
|
|
|
|
};
|
|
|
|
|
|
|
|
for (int i=0; ids[i]!=Display_None; ++i)
|
|
|
|
if (ids[i]==display)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CSMWorld::ColumnBase::isText (Display display)
|
|
|
|
{
|
|
|
|
return display==Display_String || display==Display_LongString;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CSMWorld::ColumnBase::isScript (Display display)
|
|
|
|
{
|
|
|
|
return display==Display_Script || display==Display_ScriptLines;
|
|
|
|
}
|