1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 05:49:56 +00:00
openmw-tes3mp/apps/opencs/model/world/columnbase.cpp

44 lines
1,000 B
C++

#include "columnbase.hpp"
#include "columns.hpp"
#include <cassert>
CSMWorld::ColumnBase::ColumnBase (int columnId, Display displayType, int flags, bool canNest)
: mColumnId (columnId), mDisplayType (displayType), mFlags (flags), mCanNest(canNest)
{}
CSMWorld::ColumnBase::~ColumnBase() {}
bool CSMWorld::ColumnBase::isUserEditable() const
{
return isEditable();
}
std::string CSMWorld::ColumnBase::getTitle() const
{
return Columns::getName (static_cast<Columns::ColumnId> (mColumnId));
}
int CSMWorld::ColumnBase::getId() const
{
return mColumnId;
}
bool CSMWorld::ColumnBase::canHaveNestedColumns() const
{
return mCanNest;
}
std::string CSMWorld::ColumnBase::getNestedColumnTitle(int columnNumber) const
{
return Columns::getName (mDisplayType, columnNumber);
}
void CSMWorld::ColumnBase::addNestedColumnDisplay(CSMWorld::ColumnBase::Display displayDefinition)
{
assert (canHaveNestedColumns());
mNestedDisplayType.push_back(displayDefinition);
}