本文整理汇总了C++中WindowList类的典型用法代码示例。如果您正苦于以下问题:C++ WindowList类的具体用法?C++ WindowList怎么用?C++ WindowList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WindowList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DestroyAll
void DialogManager::DestroyAll()
{
WindowList::iterator iter;
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
delete (*iter);
dialogs.clear();
}
示例2: _getTopmostParent
Window* Window::_getTopmostParent() const {
WindowList windowList;
getParentList(windowList);
return windowList.back().get();
}
示例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;
}
示例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 );
}
示例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;
}
示例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();
}
示例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++;
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}