
// ---------------------------- subdlg.cxx --------------------------------

#include "subdlg.h"
SubDialog::SubDialog (UI_CompositeVObject* parent, UI_ViewDescriptor desc[],
                      UI_Point topLeft)
: _parent (parent), _desc (desc), _topLeft (topLeft)
{
    for (short i = 0; desc[i].id != 0; i++) {
        UI_ViewDescriptor d = desc[i];
        d.shape.x += _topLeft.XCoord();
        d.shape.y += _topLeft.YCoord();
        parent->CreateChild (d);
    }
}

void SubDialog::MakeVisible ()
{
    for (short i = 0; _desc[i].id != 0; i++)
        (*_parent)[_desc[i].id]->MakeVisible();
}

void SubDialog::MakeInvisible ()
{
    for (short i = 0; _desc[i].id != 0; i++)
        (*_parent)[_desc[i].id]->MakeInvisible();
}
