Another one's gone, another one's gone...

Another one bites the dust!  Hey hey!
This commit is contained in:
2025-08-09 12:13:06 -04:00
parent 04232a17c1
commit e9baf4e167
4 changed files with 35 additions and 37 deletions

View File

@ -49,8 +49,7 @@ OOFPositionedMgr::OOFPositionedMgr (OOFAwareWidget *container)
{
DBG_OBJ_CREATE ("dw::oof::OOFPositionedMgr");
this->container = (OOFAwareWidget*)container;
children = new Vector<Child> (1, false);
this->container = container;
childrenByWidget = new HashTable<TypedPointer<Widget>, Child> (true, true);
if(container->wasAllocated()) {
@ -70,7 +69,6 @@ OOFPositionedMgr::OOFPositionedMgr (OOFAwareWidget *container)
OOFPositionedMgr::~OOFPositionedMgr ()
{
delete children;
delete childrenByWidget;
DBG_OBJ_DELETE ();
@ -128,8 +126,8 @@ bool OOFPositionedMgr::doChildrenExceedContainer ()
DBG_OBJ_MSG_START ();
for (int i = 0; i < children->size () && !exceeds; i++) {
Child *child = children->get (i);
for (int i = 0; i < children.size () && !exceeds; i++) {
Child *child = children.at (i);
Allocation *childAlloc = child->widget->getAllocation ();
DBG_OBJ_MSGF ("resize.oofm", 2,
"Does childAlloc = (%d, %d, %d * %d) exceed container "
@ -162,8 +160,8 @@ void OOFPositionedMgr::containerSizeChangedForChildren ()
{
DBG_OBJ_ENTER0 ("resize", 0, "containerSizeChangedForChildren");
for (int i = 0; i < children->size(); i++)
children->get(i)->widget->containerSizeChanged ();
for (int i = 0; i < children.size(); i++)
children.at(i)->widget->containerSizeChanged ();
DBG_OBJ_LEAVE ();
}
@ -174,8 +172,8 @@ void OOFPositionedMgr::draw (View *view, Rectangle *area,
DBG_OBJ_ENTER ("draw", 0, "draw", "%d, %d, %d * %d",
area->x, area->y, area->width, area->height);
for (int i = 0; i < children->size(); i++) {
Child *child = children->get(i);
for (int i = 0; i < children.size(); i++) {
Child *child = children.at(i);
Rectangle childArea;
if (!context->hasWidgetBeenProcessedAsInterruption (child->widget) &&
@ -200,12 +198,12 @@ int OOFPositionedMgr::addWidgetOOF (Widget *widget, OOFAwareWidget *generator,
widget, generator, externalIndex);
Child *child = new Child (widget, generator, externalIndex);
children->put (child);
children.push_back( child );
childrenByWidget->put (new TypedPointer<Widget> (widget), child);
int subRef = children->size() - 1;
DBG_OBJ_SET_NUM ("children.size", children->size());
DBG_OBJ_ARRSET_PTR ("children", children->size() - 1, widget);
int subRef = children.size() - 1;
DBG_OBJ_SET_NUM ("children.size", children.size());
DBG_OBJ_ARRSET_PTR ("children", children.size() - 1, widget);
DBG_OBJ_SET_PTR_O (widget, "<Positioned>.generator", generator);
DBG_OBJ_SET_NUM_O (widget, "<Positioned>.externalIndex", externalIndex);
@ -218,8 +216,8 @@ int OOFPositionedMgr::addWidgetOOF (Widget *widget, OOFAwareWidget *generator,
void OOFPositionedMgr::moveExternalIndices (OOFAwareWidget *generator,
int oldStartIndex, int diff)
{
for (int i = 0; i < children->size (); i++) {
Child *child = children->get (i);
for (int i = 0; i < children.size (); i++) {
Child *child = children.at (i);
if (child->externalIndex >= oldStartIndex) {
child->externalIndex += diff;
DBG_OBJ_SET_NUM_O (child->widget, "<Positioned>.externalIndex",
@ -245,8 +243,8 @@ Widget *OOFPositionedMgr::getWidgetAtPoint (int x, int y,
Widget *widgetAtPoint = NULL;
for (int i = children->size() - 1; widgetAtPoint == NULL && i >= 0; i--) {
Widget *childWidget = children->get(i)->widget;
for (int i = children.size() - 1; widgetAtPoint == NULL && i >= 0; i--) {
Widget *childWidget = children.at(i)->widget;
if (!context->hasWidgetBeenProcessedAsInterruption (childWidget) &&
!StackingContextMgr::handledByStackingContextMgr (childWidget))
widgetAtPoint = childWidget->getWidgetAtPoint (x, y, context);
@ -362,12 +360,12 @@ bool OOFPositionedMgr::dealingWithSizeOfChild (Widget *child)
int OOFPositionedMgr::getNumWidgets ()
{
return children->size();
return children.size();
}
Widget *OOFPositionedMgr::getWidget (int i)
{
return children->get(i)->widget;
return children.at(i)->widget;
}
bool OOFPositionedMgr::getPosBorder (style::Length cssValue, int refLength,
@ -386,16 +384,16 @@ bool OOFPositionedMgr::getPosBorder (style::Length cssValue, int refLength,
bool OOFPositionedMgr::allChildrenConsideredForSize ()
{
for (int i = 0; i < children->size(); i++)
if (!children->get(i)->consideredForSize)
for (int i = 0; i < children.size(); i++)
if (!children.at(i)->consideredForSize)
return false;
return true;
}
bool OOFPositionedMgr::allChildrenConsideredForExtremes ()
{
for (int i = 0; i < children->size(); i++)
if (!children->get(i)->consideredForExtremes)
for (int i = 0; i < children.size(); i++)
if (!children.at(i)->consideredForExtremes)
return false;
return true;
}