本文整理汇总了C++中WindowList类的典型用法代码示例。如果您正苦于以下问题:C++ WindowList类的具体用法?C++ WindowList怎么用?C++ WindowList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WindowList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DestroyAll
void DialogManager::DestroyAll()
{
WindowList::iterator iter;
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
delete (*iter);
dialogs.clear();
}
开发者ID:716Girl,项目名称:ppsspp,代码行数:7,代码来源:DialogManager.cpp
示例2: _getTopmostParent
Window* Window::_getTopmostParent() const {
WindowList windowList;
getParentList(windowList);
return windowList.back().get();
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:7,代码来源:Window.cpp
示例3: IsDialogMessage
bool DialogManager::IsDialogMessage(LPMSG message)
{
WindowList::iterator iter;
for (iter = dialogs.begin(); iter != dialogs.end(); iter++) {
if (::IsDialogMessage((*iter)->GetDlgHandle(), message))
return true;
}
return false;
}
开发者ID:716Girl,项目名称:ppsspp,代码行数:9,代码来源:DialogManager.cpp
示例4: afterTrussVisibilityChange
void ProjectToolBoxPage::afterTrussVisibilityChange ()
{
TrussUnitWindowManager& mng = pageProject.getTrussUnitWindowManager();
int numb = 0;
WindowList trussWindows = mng.getTrussUnitWindowList();
WindowListIter iter = trussWindows.begin();
for ( ; iter != trussWindows.end(); ++iter )
if ( ! (*iter)->isVisible() )
++numb;
setHiddenTrussNumber( numb );
}
开发者ID:rouming,项目名称:FermaNext,代码行数:12,代码来源:ProjectToolBox.cpp
示例5: GetWoWHWND
HWND GetWoWHWND(){
EnumWindows(&EnumerateWindowsCallback, 0);
//_tprintf(_T("Printing %d titles\n"), windowTitles.size());
for(WindowList::iterator iter = windowTitles.begin(); iter != windowTitles.end(); ++iter){
WindowObject windowObject = *iter;
LPTSTR windowTitle = windowObject.winTitle;
if(_tcscmp(windowTitle, _T("World of Warcraft")) == 0){
return windowObject.hwnd;
}
}
return 0;
}
开发者ID:WesleyLuk90,项目名称:memory-search-and-read,代码行数:13,代码来源:ConsoleApplication1.cpp
示例6: ClearWindowDataList
// Clears window data list
void ClearWindowDataList( WindowList& wlWindowList )
{
// Clear data
POSITION pstPos = wlWindowList.GetHeadPosition();
while( pstPos )
{
PWindow pWindow = wlWindowList.GetNext( pstPos );
delete pWindow;
}
// Remove all items from list
wlWindowList.RemoveAll();
}
开发者ID:caidongyun,项目名称:libs,代码行数:14,代码来源:Window.cpp
示例7: findCommonWindowRoot
void GuiManager::findCommonWindowRoot(WindowList *out, WindowList const &first, WindowList const &second)
{
auto it_first = first.begin();
auto it_second = second.begin();
while ( (it_first != first.end())
&& (it_second != second.end())
&& (*it_first == *it_second) )
{
out->push_back(*it_first);
it_first++;
it_second++;
}
}
开发者ID:ghbenjamin,项目名称:NotPathfinder,代码行数:14,代码来源:GuiManager.cpp
示例8: getAncestors
void GuiWindow::getAncestors(WindowList *captured)
{
WindowList backward;
for ( GuiWindow* curr = this; curr != NULL; curr = curr->getParent() )
{
backward.push_back(curr);
}
for ( auto it = backward.rbegin(); it != backward.rend(); it++ )
{
captured->push_back(*it);
}
}
开发者ID:ghbenjamin,项目名称:NotPathfinder,代码行数:14,代码来源:GuiWindow.cpp
示例9: getEmbeddedList
bool Window::getEmbeddedList(WindowList& wl) const {
for(ConstIterator i = begin(); i != end(); i++) if(i->valid()) {
EmbeddedWindow* ew = dynamic_cast<EmbeddedWindow*>(i->get());
if(!ew || !ew->getWindow()) continue;
else {
wl.push_back(ew->getWindow());
ew->getWindow()->getEmbeddedList(wl);
}
}
return wl.size() != 0;
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:15,代码来源:Window.cpp
示例10: windows
WId QxtWindowSystem::windowAt(const QPoint& pos)
{
Window result = 0;
WindowList list = windows();
for (int i = list.size() - 1; i >= 0; --i)
{
WId wid = list.at(i);
if (windowGeometry(wid).contains(pos))
{
result = wid;
break;
}
}
return result;
}
开发者ID:kissthink,项目名称:vokoscreen,代码行数:15,代码来源:qxtwindowsystem_x11.cpp
示例11: err
WId QxtWindowSystem::activeWindow()
{
ProcessSerialNumber psn;
OSErr err(noErr);
err = ::GetFrontProcess(&psn);
if (err != noErr) return WINDOW_NOT_FOUND;
// in Mac OS X, first window for given PSN is always the active one
WindowList wlist = qxt_getWindowsForPSN(&psn);
if (wlist.count() > 0)
return wlist.at(0);
return WINDOW_NOT_FOUND;
}
开发者ID:jirislaby,项目名称:plugins,代码行数:15,代码来源:qxtwindowsystem_mac.cpp
示例12: xy
XYCoord Window::getAbsoluteOrigin() const {
XYCoord xy(0, 0);
WindowList windowList;
getParentList(windowList);
for(WindowList::iterator i = windowList.begin(); i != windowList.end(); i++) {
if(!i->valid()) continue;
xy.x() += static_cast<int>(i->get()->getX());
xy.y() += static_cast<int>(i->get()->getY());
}
return xy;
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:16,代码来源:Window.cpp
示例13: windows
WindowList QxtWindowSystem::windows()
{
qxt_Windows.clear();
HDESK hdesk = ::OpenInputDesktop(0, false, DESKTOP_READOBJECTS);
::EnumDesktopWindows(hdesk, qxt_EnumWindowsProc, 0);
::CloseDesktop(hdesk);
return qxt_Windows;
}
开发者ID:Caleydo,项目名称:visuallinks,代码行数:8,代码来源:qxtwindowsystem_win.cpp
示例14: warn
// The topmost Window always has this method called, instead of the embedded window directly.
bool Window::setFocused(const Widget* widget) {
// TODO: I've turned on the warn() here, but perhaps I shouldn't? I need to define
// the conditions under which it's okay to call setFocus() with a NULL widget.
if(!widget) {
warn() << "Window [" << _name << "] can't focus a NULL Widget." << std::endl;
return false;
}
ConstIterator i = std::find(begin(), end(), widget);
bool found = false;
if(i == end()) {
// We couldn't find the widget in the toplevel, so lets see if one of our
// EmbeddedWindow objects has it.
WindowList wl;
getEmbeddedList(wl);
for(WindowList::iterator w = wl.begin(); w != wl.end(); w++) {
ConstIterator ii = std::find(w->get()->begin(), w->get()->end(), widget);
if(ii != w->get()->end()) {
found = true;
i = ii;
}
}
}
else found = true;
if(!found) {
warn()
<< "Window [" << _name
<< "] couldn't find the Widget [" << widget->getName()
<< "] in it's object list." << std::endl
;
return false;
}
_setFocused(i->get());
return true;
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:47,代码来源:Window.cpp
示例15: windowListCompliment
void GuiManager::windowListCompliment(WindowList *out, WindowList const &first, WindowList const &second)
{
auto it_first = first.begin();
auto it_second = second.begin();
while ( (it_first != first.end())
&& (it_second != second.end())
&& (*it_first == *it_second) )
{
it_first++;
it_second++;
}
for (; it_first != first.end(); it_first++)
{
out->push_back(*it_first);
}
}
开发者ID:ghbenjamin,项目名称:NotPathfinder,代码行数:18,代码来源:GuiManager.cpp
示例16: getParentList
void Window::getParentList(WindowList& wl) const {
const Window* current = this;
while(current) {
wl.push_back(const_cast<Window*>(current));
if(current->_parent) current = current->_parent;
else current = 0;
}
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:11,代码来源:Window.cpp
示例17: return
//----------------------------------------------------------------
bool ProjectItemFile::Load()
/**
* \brief Loads this project item. Because this is a file,
* it will load the project item via the load method of the
* registered window class. If the project item is already open
* then the load method will reload the information from the file.
* \return True on success; false otherwise.
**/
{
// No window type then abort
if (m_windowtype.IsEmpty()) {
return (false);
}
// Find window type in windowlist
WindowList* list = Environment::Get()->GetWindowList();
if (!list->IsRegistered(m_windowtype)) {
wxLogError(_T("[penv::ProjectItemFile::Load] The window class id '%s' in project item file '%s' is not registered in the environment."), m_windowtype.c_str(), m_name.c_str());
return (false);
}
// Check if window must be created
if (m_windowid.IsEmpty() || !list->ExistsWindow(m_windowid)) {
// Create the window
Window* window = list->CreateWindow(m_windowtype, this);
list->Add(window, true);
m_windowid = window->GetId();
if (!window->Load(m_filename.GetPath())) {
wxLogError(_T("[penv::ProjectItemFile::Load] Error occured while loading file '%s'."), m_filename.GetPath().c_str());
return (false);
}
} else {
// Bring the window to the front
list->ShowWindow(m_windowid, true);
}
return (true);
}
开发者ID:Sneedd,项目名称:penv,代码行数:36,代码来源:projectitemfile.cpp
示例18: getByName
bool Window::setFocused(const std::string& name) {
Widget* w1 = getByName(name);
bool found = false;
if(!w1) {
// Just like above, we couldn't find the widget in the toplevel, so lets see if
// one of our EmbeddedWindow objects has it. The difference here is that we
// search by name.
WindowList wl;
getEmbeddedList(wl);
for(WindowList::iterator w = wl.begin(); w != wl.end(); w++) {
Widget* w2 = w->get()->getByName(name);
if(w2) {
found = true;
w1 = w2;
}
}
}
else found = true;
if(!found) {
warn()
<< "Window [" << _name
<< "] couldn't find a Widget named [" << name
<< "] to set as it's focus." << std::endl
;
return false;
}
_setFocused(w1);
return true;
}
开发者ID:dev2dev,项目名称:OpenSceneGraph-port-to-IOS,代码行数:39,代码来源:Window.cpp
示例19: OnUpdate
void Window::Update(float elapsed)
{
if (IsDone())
{
return;
}
OnUpdate(elapsed);
WindowList doneChildren;
for (WindowList::iterator iter = m_children.begin(); iter != m_children.end(); ++iter)
{
const boost::shared_ptr<Window> child(*iter);
if (child->IsDone())
{
doneChildren.push_back(child);
}
}
for (WindowList::iterator iter = doneChildren.begin(); iter != doneChildren.end(); ++iter)
{
m_children.erase(find(m_children.begin(), m_children.end(), *iter));
}
}
开发者ID:FooSoft,项目名称:moonfall,代码行数:24,代码来源:Window.cpp
示例20: MessageReceived
void FastTraxApp:: MessageReceived( BMessage * msg )
{
switch( msg->what )
{
case Messages::WindowClosed:
{
BWindow * win ;
msg->FindPointer( "Window", reinterpret_cast<void**>(&win) ) ;
fWindows.RemoveWindow( win ) ;
if( !fbQuiting && fWindows.CountWindows() == 0 )
Quit() ;
msg->SendReply( B_REPLY ) ;
break ;
}
case Messages::WindowOpened:
{
BWindow * win ;
msg->FindPointer( "Window", reinterpret_cast<void**>(&win) ) ;
fWindows.AddWindow( win ) ;
msg->SendReply( B_REPLY ) ;
break ;
}
case Messages::LibInUse:
case Messages::LibNotInUse:
{
fWindows.Broadcast( msg ) ;
break ;
}
default:
BApplication::MessageReceived( msg ) ;
}
}
开发者ID:HaikuArchives,项目名称:TraX,代码行数:35,代码来源:FastTrax.cpp
注:本文中的WindowList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论