(CEGUI)如何复制一个窗口
2010-10-12 11:07
225 查看
//------------------------------------------------------------------------
Window* CopyWindow( const CEGUI::Window* pSource )
{
// 创建相同类型的窗口,但名字不同
Window* copy = CEGUI::WindowManager::getSingleton().createWindow(pSource->getType(), pSource->getName() + "_copy");
// 复制窗口属性
CEGUI::PropertySet::Iterator propertyIt = pSource->getPropertyIterator();
while (!propertyIt.isAtEnd())
{
const CEGUI::String propertyName = propertyIt.getCurrentKey();
copy->setProperty(propertyName, pSource->getProperty(propertyName));
propertyIt++;
}
//返回窗口
return copy;
}
Window* CopyWindow( const CEGUI::Window* pSource )
{
// 创建相同类型的窗口,但名字不同
Window* copy = CEGUI::WindowManager::getSingleton().createWindow(pSource->getType(), pSource->getName() + "_copy");
// 复制窗口属性
CEGUI::PropertySet::Iterator propertyIt = pSource->getPropertyIterator();
while (!propertyIt.isAtEnd())
{
const CEGUI::String propertyName = propertyIt.getCurrentKey();
copy->setProperty(propertyName, pSource->getProperty(propertyName));
propertyIt++;
}
//返回窗口
return copy;
}
相关文章推荐
- 创建CEGUI窗口入门——讲述如何创建一个简单的CEGUI窗口
- cegui 4 创建CEGUI窗口入门——讲述如何创建一个简单的CEGUI窗口.
- windows.setparent可以将一个窗口显示到别的位置上,可是如果我只是想将这个窗口上的内容复制一份并显示在别的位置,该如何做呢?
- 引用 如何用C#写一个简单的Login窗口
- sql server中如何把一个表结构复制到另一个新表中
- ps如何重复复制一个相同的图层,以等距离、方向、角度复制?
- 窗口为w_gcde内,放入一个DW_1,如何得到dw_1内的yuonghu_id列的内容
- PB中如何动态打开一个窗口?
- C#.NET常见问题(FAQ)-程序如何把窗体文件从从一个项目中复制到另一个项目
- 如何复制一个目录里面的所有目录和文件
- 如何本窗口的COMMAND1中调用另外一个窗口中的某一控件的某一个事件
- 不是使用C/C++函数如何复制文件到另外一个目录
- java如何开启一个dos窗口?
- SQL中如何将一个表中的某一列的数据复制到另一个表中的某一列里
- 如何制作一个弹出式的调查窗口?
- vim中如何用鼠标跨窗口粘贴复制。
- 在fedora打开文件夹如何不另起一个窗口
- 如何防止任务栏上出现一个窗口
- 如何在mfc对话框中添加一个显示网页的窗口 .
- 触摸事件的重新分发(当弹出一个新窗口时,如何屏蔽掉下面层的触摸事件)