Example #1
0
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();
}
Example #2
0
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);
}
Example #3
0
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();
}