本文整理汇总了C++中cegui::MultiColumnList::autoSizeColumnHeader方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiColumnList::autoSizeColumnHeader方法的具体用法?C++ MultiColumnList::autoSizeColumnHeader怎么用?C++ MultiColumnList::autoSizeColumnHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::MultiColumnList
的用法示例。
在下文中一共展示了MultiColumnList::autoSizeColumnHeader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addPropertyArray
void PropertiesWindow::addPropertyArray(const Property& prop, const CeGuiString& key)
{
// Create the new MultiColumnList with two columns
// Type and Value and set tab text to key
int tabCount = mTabPane->getTabCount();
CEGUI::MultiColumnList* newTable = static_cast<CEGUI::MultiColumnList*>
(CEGUI::WindowManager::getSingleton().createWindow("RastullahLook/MultiColumnList",
"PropertiesWindow/PropertiesTabControl/" + key));
// Set table properties
newTable->setText(key);
newTable->setPosition(CEGUI::UVector2(
CEGUI::UDim(0,0),
CEGUI::UDim(0,0)));
newTable->setSize(CEGUI::UVector2(
CEGUI::UDim(1,0),
CEGUI::UDim(1,0)));
newTable->setUserSortControlEnabled(false);
newTable->setFont("Vera Serif-8");
newTable->addColumn("Type", 0, cegui_reldim(0.3));
newTable->addColumn("Value", 1, cegui_reldim(0.7));
// Add the MultiColumnList to the tab pane
mTabPane->addTab(newTable);
// Get access to the vector
PropertyArray vProp = prop.toArray();
// Iterate through the vector entries and add them
// to the table
for(PropertyArray::const_iterator it = vProp.begin(); it != vProp.end(); it++)
{
// Check for Int
if (it->isInt() )
{
addPropertyInt(*it, newTable);
}
// Check for IntPair
else if (it->isIntPair() )
{
addPropertyIntPair(*it, newTable);
int rowCount = newTable->getRowCount();
newTable->addRow(rowCount);
newTable->setItem(new ListboxTextItem(""), 0, rowCount);
}
// Check for IntTriple
else if (it->isIntTriple() )
{
addPropertyIntTriple(*it, newTable);
int rowCount = newTable->getRowCount();
newTable->addRow(rowCount);
newTable->setItem(new ListboxTextItem(""), 0, rowCount);
}
// Check for String
else if (it->isString() )
{
addPropertyString(*it, newTable);
}
// Check for Bool
else if (it->isBool() )
{
addPropertyBool(*it, newTable);
}
// Check for Real
else if (it->isReal() )
{
addPropertyReal(*it, newTable);
}
// Check for Vector3
else if (it->isVector3() )
{
addPropertyArray3(*it, newTable);
int rowCount = newTable->getRowCount();
newTable->addRow(rowCount);
newTable->setItem(new ListboxTextItem(""), 0, rowCount);
}
// Check for Quaternion
else if (it->isQuaternion() )
{
addPropertyQuaternion(*it, newTable);
int rowCount = newTable->getRowCount();
newTable->addRow(rowCount);
newTable->setItem(new ListboxTextItem(""), 0, rowCount);
}
}
newTable->autoSizeColumnHeader(0);
newTable->autoSizeColumnHeader(1);
}