32 gadget = gadget->Next;
45 for (; gadget; gadget = gadget->Next)
46 if (gadget->
PtIn(point - *
reinterpret_cast<TSize*
>(&gadget->Bounds.
TopLeft())))
97 if (sibling || placement ==
After) {
98 while (*g && *g != sibling)
101 CHECK(*g == sibling);
103 if (placement ==
After && *g)
134 if (sibling || placement ==
After) {
135 while (*g && *g != sibling)
138 CHECK(*g == sibling);
140 if (placement ==
After && *g)
147 for (
TGadget* gd = list.Gadgets; gd; gd = gd->Next) {
160 NumGadgets += list.NumGadgets;
161 list.Gadgets =
nullptr;
179 if (&gadget == Gadgets) {
180 Gadgets = Gadgets->Next;
187 while (g->Next && g->Next != &gadget)
193 g->Next = g->Next->Next;
#define PRECONDITION(condition)
TGadget is the base class for the following derived gadget classes:
virtual bool PtIn(const TPoint &point)
Default behavior returns true if the point is within the receiver's bounding rect.
TGadget * NextGadget()
Returns the next gadget in the list of gadgets.
TGadget * operator[](uint index)
Returns gadget at a given index.
TGadget * NextGadget(TGadget &gadget) const
Returns the next gadget in the list relative to a given gadget.
virtual void Inserted(TGadget &gadget)
A gadget has been inserted.
TPlacement
Enumerates the placement of a gadget.
virtual void Removed(TGadget &gadget)
A gadget has been removed.
TGadget * GadgetFromPoint(const TPoint &point) const
Returns the gadget that a given window-relative point is in, or 0 if none is found.
TGadget * GadgetWithId(int id) const
Returns the gadget with a given ID, or 0 if none is found.
virtual void Insert(TGadget &gadget, TPlacement=After, TGadget *sibling=nullptr)
Inserts a Gadget.
virtual void InsertFrom(TGadgetList &list, TPlacement=After, TGadget *sibling=nullptr)
Inserts a list of gadgets.
virtual TGadget * Remove(TGadget &gadget)
Removes (unlinks) a gadget.
TGadget * FirstGadget() const
Returns the first gadget of the list.
TPoint is a support class, derived from tagPOINT.
const TPoint & TopLeft() const
Returns the upperleft point.
The tagSIZE struct is defined as.
Base class TGadget and simple derived TSeparatorGadget.
Definition of TGadgetList, TGadgetWindow & TGadgetWindowFont A list holding gadgets,...
Object Windows Library (OWLNext Core).