예제 #1
0
    static void repaintAndResizeAllComps (Component::SafePointer<Component> c)
    {
        if (c->isVisible())
        {
            c->repaint();
            c->resized();

            for (int i = c->getNumChildComponents(); --i >= 0;)
                if (c != nullptr)
                    if (Component* child = c->getChildComponent(i))
                        repaintAndResizeAllComps (child);
        }
    }
예제 #2
0
    static void repaintAndResizeAllComps (Component::SafePointer<Component> c,
                                          Array<Component*>& alreadyDone)
    {
        if (c->isVisible() && ! alreadyDone.contains (c))
        {
            c->repaint();
            c->resized();

            for (int i = c->getNumChildComponents(); --i >= 0;)
            {
                if (Component* child = c->getChildComponent(i))
                {
                    repaintAndResizeAllComps (child, alreadyDone);
                    alreadyDone.add (child);
                }

                if (c == nullptr)
                    break;
            }
        }
    }