本文整理汇总了C++中cegui::Window::isAutoWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::isAutoWindow方法的具体用法?C++ Window::isAutoWindow怎么用?C++ Window::isAutoWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::isAutoWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRButtonDown
void CUIEditorView::OnRButtonDown(UINT nFlags, CPoint point)
{
g_CoreSystem.getCEGUISystem()->injectMousePosition(point.x, point.y);
g_CoreSystem.getCEGUISystem()->injectMouseButtonDown(CEGUI::RightButton);
if( getShowMode() == false ) return;
CMenu menu;
menu.CreatePopupMenu();
CEGUI::Window* mouseWindow = g_CoreSystem.getCEGUISystem()->getWindowContainingMouse();
bool showMenu = false;
INT menuId = ID_RIGHT_WINDOW_SELECT;
for ( ; mouseWindow ; mouseWindow = mouseWindow->getParent(),++menuId )
{
if (mouseWindow != CEGUI::System::getSingleton().getGUISheet() && !mouseWindow->isAutoWindow())
{
menu.AppendMenu(MF_STRING, menuId,mouseWindow->getName().c_str());
showMenu = true;
}
}
if (showMenu)
{
POINT pos;
GetCursorPos(&pos);
menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON,pos.x, pos.y, this);
g_DataPool.OnSelectWindowChanged(NULL, m_pSelectedWindow);
}
CView::OnRButtonDown(nFlags, point);
}
示例2: setWindowSelected
void CUIEditorView::setWindowSelected(const CEGUI::String& name,bool addEvent /*= true*/)
{
try
{
if( name.length()> 0 && name != m_nSelectWindowName)
{
if(name == "___Shower_Window____") return;
CEGUI::Window* pWindow = CEGUI::WindowManager::getSingleton().getWindow(name);
CEGUI::Window* pOldSel = NULL;
if (pWindow && !pWindow->isAutoWindow())
{
if(m_nSelectWindowName.length() > 0)
{
pOldSel = CEGUI::WindowManager::getSingleton().getWindow(m_nSelectWindowName);
if (pOldSel)
{
for(;pOldSel && pOldSel != CEGUI::System::getSingleton().getGUISheet(); pOldSel = pOldSel->getParent())
{
pOldSel->unsubscribeEvent(CEGUI::Window::EventMoved, CEGUI::Event::Subscriber(&CUIEditorView::handleSelectedWindowMoved, this));
}
}
}
//pWindow->moveToFront();
m_nSelectWindowName = pWindow->getName();
CEGUI::Window* pSet = pWindow;
for (; pSet&& pSet !=CEGUI::System::getSingleton().getGUISheet(); pSet = pSet->getParent() )
{
pSet->subscribeEvent(CEGUI::Window::EventMoved, CEGUI::Event::Subscriber(&CUIEditorView::handleSelectedWindowMoved, this));
}
CEGUI::Rect rect = pWindow->getPixelRect();
setSelectWindowPos(CRect(rect.d_left, rect.d_top, rect.getWidth(), rect.getHeight()));
m_ptMouseMovePos = CPoint(0,0);
}
m_pSelectedWindow = pWindow;
updateCurrentWindowStatusText();
if (addEvent)
{
g_DataPool.OnSelectWindowChanged(pOldSel,pWindow);
}
}
else if (name.length() == 0)
{
if (addEvent)
{
g_DataPool.OnSelectWindowChanged(m_pSelectedWindow,NULL);
}
m_nSelectWindowName = "";
setSelectWindowPos(CRect(), true);
m_pSelectedWindow = NULL;
}
}
catch(CEGUI::UnknownObjectException& e)
{
}
}