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,8 @@ void OOFPosAbsLikeMgr::sizeAllocateChildren ()
int refWidth = container->getAvailWidth (true) - containerBoxDiffWidth ();
int refHeight = container->getAvailHeight (true) - containerBoxDiffHeight ();
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);
int x, y, width, ascent, descent;
calcPosAndSizeChildOfChild (child, refWidth, refHeight, &x, &y, &width,
@ -81,8 +81,8 @@ void OOFPosAbsLikeMgr::getSize (Requisition *containerReq, int *oofWidth,
int refWidth = container->getAvailWidth (true);
int refHeight = container->getAvailHeight (true);
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);
// Children whose position cannot be determined will be
// considered later in sizeAllocateEnd.
@ -110,8 +110,8 @@ void OOFPosAbsLikeMgr::getExtremes (Extremes *containerExtr, int *oofMinWidth,
*oofMinWidth = *oofMaxWidth = 0;
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);
// Children whose position cannot be determined will be
// considered later in sizeAllocateEnd.

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;
}

View File

@ -28,7 +28,7 @@ protected:
enum { NOT_ALLOCATED, IN_ALLOCATION, WAS_ALLOCATED }
containerAllocationState;
lout::container::typed::Vector<Child> *children;
std::vector< Child * > children;
lout::container::typed::HashTable<lout::object::TypedPointer
<dw::core::Widget>,
Child> *childrenByWidget;

View File

@ -42,7 +42,7 @@ OOFPosRelMgr::~OOFPosRelMgr ()
void OOFPosRelMgr::markSizeChange (int ref)
{
DBG_OBJ_ENTER ("resize.oofm", 0, "markSizeChange", "%d", ref);
Child *child = children->get(ref);
Child *child = children.at(ref);
DBG_OBJ_MSGF ("resize.oofm", 1, "generator = %p, externalIndex = %d",
child->generator, child->externalIndex);
child->generator->widgetRefSizeChanged (child->externalIndex);
@ -79,8 +79,8 @@ void OOFPosRelMgr::sizeAllocateChildren ()
{
DBG_OBJ_ENTER0 ("resize.oofm", 0, "sizeAllocateChildren");
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);
Requisition childReq;
child->widget->sizeRequest (&childReq);
@ -106,8 +106,8 @@ void OOFPosRelMgr::getSize (Requisition *containerReq, int *oofWidth,
*oofWidth = *oofHeight = 0;
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);
// Children whose position cannot be determined will be
// considered later in sizeAllocateEnd.
@ -132,8 +132,8 @@ void OOFPosRelMgr::getExtremes (Extremes *containerExtr, int *oofMinWidth,
{
*oofMinWidth = *oofMaxWidth = 0;
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);
// Children whose position cannot be determined will be
// considered later in sizeAllocateEnd.