本文整理汇总了C++中WindowList::end方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowList::end方法的具体用法?C++ WindowList::end怎么用?C++ WindowList::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowList
的用法示例。
在下文中一共展示了WindowList::end方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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++;
}
}
示例2: DestroyAll
void DialogManager::DestroyAll()
{
WindowList::iterator iter;
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
delete (*iter);
dialogs.clear();
}
示例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: 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);
}
}
示例5: 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 );
}
示例6: 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;
}
示例7: getAbsoluteOrigin
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;
}
示例8: setFocused
// 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;
}
示例9: Update
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));
}
}
示例10: UpdateAll
void DialogManager::UpdateAll()
{
WindowList::iterator iter;
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
(*iter)->Update();
}
示例11: EnableAll
void DialogManager::EnableAll(BOOL enable)
{
WindowList::iterator iter;
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
EnableWindow((*iter)->GetDlgHandle(),enable);
}
示例12: update
void Window::update() {
WindowList wl;
getEmbeddedList(wl);
for(WindowList::iterator w = wl.begin(); w != wl.end(); w++) w->get()->update();
matrix_type x = _x;
matrix_type y = _y;
XYCoord xy = getAbsoluteOrigin();
// We only honor ANCHOR requests on topmost Windows, not embedded ones.
if((_vAnchor != VA_NONE || _hAnchor != HA_NONE) && !_parent && _wm) {
if(_vAnchor == VA_TOP) y = _wm->getHeight() - _height.current;
else if(_vAnchor == VA_CENTER) y = osg::round(_wm->getHeight() / 2.0f);
else if(_vAnchor == VA_BOTTOM) y = 0.0f;
if(_hAnchor == HA_LEFT) x = 0.0f;
else if(_hAnchor == HA_CENTER) x = osg::round(_wm->getWidth() / 2.0f);
else if(_hAnchor == HA_RIGHT) x = _wm->getWidth() - _width.current + _visibleArea[2];
xy.set(x, y);
}
matrix_type z = _z;
// We can't do proper scissoring until we have access to our parent WindowManager, and
// we need to determine the sorting method we want to use.
if(_wm) {
if(_wm->isUsingRenderBins()) {
getOrCreateStateSet()->setRenderBinDetails(
static_cast<int>((1.0f - fabs(_z)) * OSGWIDGET_RENDERBIN_MOD),
"RenderBin"
);
z = 0.0f;
}
int sx = static_cast<int>(xy.x());
int sy = static_cast<int>(xy.y());
int sw = static_cast<int>(_width.current);
int sh = static_cast<int>(_height.current);
// This sets the Scissor area to some offset defined by the user.
if(_vis == VM_PARTIAL) {
sw = static_cast<int>(_visibleArea[2]);
sh = static_cast<int>(_visibleArea[3]);
}
// Otherwise, use the size of the WindowManager itself.
else if(_vis == VM_ENTIRE) {
sx = 0;
sy = 0;
sw = static_cast<int>(_wm->getWidth());
sh = static_cast<int>(_wm->getHeight());
}
_scissor()->setScissor(sx, sy, sw, sh);
}
// Update the Window itself, setting it's matrix according to translate, rotate, and
// scale values.
osg::Matrix r = osg::Matrix::rotate(
osg::DegreesToRadians(_r),
osg::Vec3d(0.0f, 0.0f, 1.0f)
);
osg::Matrix s = osg::Matrix::scale(_s, _s, 1.0f);
osg::Matrix t = osg::Matrix::translate(x - _visibleArea[0], y - _visibleArea[1], z);
setMatrix(r * s * t);
}
示例13: stopRedraw
void LinearLayout::Layout()
{
if ( ! this->childWindows.size())
{
return;
}
RedrawLock stopRedraw(this);
bool isVertical = (this->orientation == VerticalLayout);
bool isHorizontal = ( ! isVertical);
WindowList wrappedChildren;
WindowList filledChildren;
ChildSizeMap finalSizes;
int wrappedSize = 0;
float totalWeight = 0.0f;
WindowList::iterator it, end;
Size layoutSize = this->ClientSize();
// PASS 1: figure out which windows are wrapped in direction of the
// orientation, and which are filled. Also, calculate the correct
// size of the child opposite to its orientation.
it = this->childWindows.begin();
end = this->childWindows.end();
for ( ; it != end; it++)
{
Window* child = (*it);
Size childSize = child->WindowSize();
// map the child to its fill type
if (((isVertical) && (child->LayoutHeight() == LayoutFillParent))
|| ((isHorizontal) && (child->LayoutWidth() == LayoutFillParent)))
{
filledChildren.push_back(child);
totalWeight += child->LayoutWeight();
}
else
{
wrappedChildren.push_back(child);
// figure out the space all of the wrapped children will occupy.
wrappedSize += (isVertical ? childSize.height : childSize.width);
}
// fill direction opposite the orientation
if ((isVertical) && (child->LayoutWidth() == LayoutFillParent))
{
childSize.width = layoutSize.width;
}
else if ((isHorizontal) && (child->LayoutHeight() == LayoutFillParent))
{
childSize.height = layoutSize.height;
}
//
finalSizes[child] = childSize;
}
//
wrappedSize += (this->spacing * ((int) this->childWindows.size() - 1));
// PASS 2: determine final child size for the filled children based on
// their specified LayoutWeight()'s.
if (filledChildren.size())
{
int remainingSize = (isVertical)
? layoutSize.height - wrappedSize
: layoutSize.width - wrappedSize;
//
int weightedSize = 0;
//
it = filledChildren.begin();
end = filledChildren.end();
for ( ; it != end; it++)
{
Window* child = (*it);
Size childSize = finalSizes[child];
float remainingRatio = (child->LayoutWeight() / totalWeight);
int newSize = (int) ((float) remainingSize * remainingRatio);
// using floating calculations may cause small rounding errors. give
// give the last filled child whatever space may be left over
weightedSize += newSize;
if ((it + 1) == end)
{
newSize += (remainingSize - weightedSize);
}
isVertical
? childSize.height = newSize
: childSize.width = newSize;
finalSizes[child] = childSize;
}
}
// PASS 3: layout everything out!
it = this->childWindows.begin();
end = this->childWindows.end();
//.........这里部分代码省略.........
示例14: showCycleMenu
void WindowlistMenu::showCycleMenu( WindowList theList ) {
bt::Menu::clear();
bt::Menu::setTitle(bt::toUnicode(_menu_title));
if (_menu_title.length() > 0)
bt::Menu::showTitle();
_windowList = theList;
WindowList::const_iterator it;
const WindowList::const_iterator end = theList.end();
// first, find out if we have any windows in our list for anything other
// than the current desktop
_desktop_nbr = _screen->getDesktopNumber();
bool onlyThisDesktop = true;
for (it = theList.begin(); it != end; it++) {
unsigned int dNbr = (*it)->desktop();
if ( (dNbr != _desktop_nbr) && (! (*it)->isSticky()) ) {
onlyThisDesktop = false;
break;
}
}
// now add the windows to our list
unsigned int i = 0;
for (it = theList.begin(); it != end; it++) {
XWindow *win = (*it);
bt::ustring title = win->title();
unsigned int dNbr = win->desktop();
bt::ustring newTitle = bt::ellideText(title, 100, bt::toUnicode(" ... "));
if (! onlyThisDesktop) {
bt::ustring suffix = _screen->getDesktopName(dNbr);
if (suffix.size() > 0) {
newTitle.append(bt::toUnicode(" ("));
newTitle.append(suffix);
newTitle.append(bt::toUnicode(")"));
}
}
if (win->iconic()) {
newTitle.insert(0, bt::toUnicode("("));
newTitle.append(bt::toUnicode(")"));
}
bt::Menu::insertItem( newTitle, i++ );
}
// this is our current window, before cycling. set it checked as a
// visual indicator
bt::Menu::setItemChecked(0, true);
int x = _config->getNumberValue("cyclemenux", 20);
int y = _config->getNumberValue("cyclemenuy", 20);
// now show the menu
bt::Menu::popup(x, y, false);
bt::Menu::move(x,y);
// reset our marker as we will increment it in selectNext...
_current_index = -1;
// we don't have anything selected initially, so we need to set the
// selection to the second one (the first one is the
// currently-selected window
selectNext();
selectNext();
}