本文整理汇总了C++中View::AttachedToWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ View::AttachedToWindow方法的具体用法?C++ View::AttachedToWindow怎么用?C++ View::AttachedToWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::AttachedToWindow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AttachedToWindow
void Container::AttachedToWindow()
{
View::AttachedToWindow();
::Window* window = Window();
uint count = CountChildren();
for (int i = 0; i < count; ++i)
{
View* view = m_childList[i];
view->SetWindow(window);
view->AttachedToWindow();
}
AllAttached();
}
示例2:
void
View::AttachedToWindow(::Window* window)
{
fWindow = window;
// an ugly hack to detect the desktop background
if (window->Feel() == kDesktopWindowFeel && Parent() == TopView())
fIsDesktopBackground = true;
// insert view into local token space
if (fWindow != NULL) {
fWindow->ServerWindow()->App()->ViewTokens().SetToken(fToken,
B_HANDLER_TOKEN, this);
}
// attach child views as well
for (View* child = FirstChild(); child; child = child->NextSibling())
child->AttachedToWindow(window);
}
示例3: AttachedToWindow
void View::AttachedToWindow()
{
lock();
// First, add to the Window's pulse list if this view needs it.
if ( (getFlags() & PULSE_NEEDED) != 0 )
if ( GetWindow() != NULL ) GetWindow()->AddPulseChild( this );
// ...
for ( int i = 0; i < CountChildren(); i++ )
{
View *view = ChildAt(i);
view->_window = GetWindow();
view->AttachedToWindow();
}
unlock();
}