本文整理汇总了C++中basicgl::Graphic::container方法的典型用法代码示例。如果您正苦于以下问题:C++ Graphic::container方法的具体用法?C++ Graphic::container怎么用?C++ Graphic::container使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类basicgl::Graphic
的用法示例。
在下文中一共展示了Graphic::container方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: build
//------------------------------------------------------------------------------
// build() -- build the table in our components list
//------------------------------------------------------------------------------
void Table::build()
{
Basic::PairStream* newList = 0;
if (rows > 0 && columns != 0) {
newList = new Basic::PairStream();
// For each row: create a TableRow containing all the items in 'columns'
for (unsigned int i = 1; i <= rows; i++) {
// new row
TableRow* row = new TableRow();
row->container(this);
const Basic::List::Item* item = columns->getFirstItem();
while (item != 0) {
const Basic::Pair* pair = static_cast<const Basic::Pair*>(item->getValue());
const Basic::Object* obj = pair->object();
if (obj->isClassType(typeid(BasicGL::Graphic))) {
Basic::Pair* pp = pair->clone();
BasicGL::Graphic* gobj = static_cast<BasicGL::Graphic*>(pp->object());
gobj->container(row);
row->put(pp);
pp->unref();
}
item = item->getNext();
}
// put the row on our components list with a slotname equal to its row number
{
char cbuf[8];
sprintf(cbuf,"%d",i);
Basic::Pair* pp = new Basic::Pair(cbuf,row);
newList->put(pp);
pp->unref();
}
row->unref();
}
// Position our subcomponents
position();
}
// These are new our subcomponents ...
processComponents(newList,typeid(Basic::Component));
if (newList != 0) newList->unref();
}