|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TGadgetList is a list of gadgets with management functions. More...
#include <owl/gadgetwi.h>
Public Types | |
| enum | TPlacement { Before , After } |
| Enumerates the placement of a gadget. More... | |
Public Member Functions | |
| TGadgetList () | |
| virtual | ~TGadgetList () |
| virtual TGadget * | Remove (TGadget &gadget) |
| Removes (unlinks) a gadget. | |
| virtual void | Inserted (TGadget &gadget) |
| A gadget has been inserted. | |
| virtual void | Removed (TGadget &gadget) |
| A gadget has been removed. | |
| uint | GadgetCount () const |
| Returns the number of gadgets in the list. | |
| TGadget * | FirstGadget () const |
| Returns the first gadget of the list. | |
| TGadget * | NextGadget (TGadget &gadget) const |
| Returns the next gadget in the list relative to a given gadget. | |
| 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. | |
| TGadget * | operator[] (uint index) |
| Returns gadget at a given index. | |
| 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. | |
TGadgetList is a list of gadgets with management functions.
Definition at line 35 of file gadgetwi.h.
Enumerates the placement of a gadget.
The new gadget is inserted either before or after another gadget. You can control the placement of the new gadget by specifying a sibling gadget that the new gadget is inserted before or after. If the sibling argument in TGadgetWindow::Insert is 0 then the new gadget is inserted at the beginning or the end of the existing gadgets. By default, the new gadget is inserted at the end of the existing gadgets.
| Enumerator | |
|---|---|
| Before | |
| After | |
Definition at line 47 of file gadgetwi.h.
| owl::TGadgetList::TGadgetList | ( | ) |
Definition at line 16 of file gadgetli.cpp.
|
virtual |
Definition at line 26 of file gadgetli.cpp.
|
inline |
Returns the first gadget of the list.
Definition at line 400 of file gadgetwi.h.
|
inline |
Returns the number of gadgets in the list.
Definition at line 393 of file gadgetwi.h.
Returns the gadget that a given window-relative point is in, or 0 if none is found.
Definition at line 42 of file gadgetli.cpp.
Returns the gadget with a given ID, or 0 if none is found.
Definition at line 56 of file gadgetli.cpp.
|
virtual |
Inserts a Gadget.
Caller also needs to call LayoutSession() after inserting gadgets if this window has already been created.
You can specify a sibling Gadget that the new Gadget is to be inserted before or after
If "sibling" is 0 then the new Gadget is inserted at the beginning or the end. The default is to insert the new Gadget at the end
Reimplemented in owl::TGadgetWindow, owl::TStatusBar, and owl::TToolBox.
Definition at line 89 of file gadgetli.cpp.
References After, CHECK, Inserted(), and PRECONDITION.
A gadget has been inserted.
Derived class can override this to update internals
Reimplemented in owl::TGadgetWindow.
Definition at line 208 of file gadgetli.cpp.
|
virtual |
Inserts a list of gadgets.
Caller also needs to call LayoutSession() after inserting gadgets if this window has already been created.
Gadgets are removed from the source list
Reimplemented in owl::TGadgetWindow.
Definition at line 125 of file gadgetli.cpp.
References After, CHECK, and Inserted().
Returns the next gadget in the list relative to a given gadget.
Definition at line 407 of file gadgetwi.h.
Returns gadget at a given index.
Definition at line 68 of file gadgetli.cpp.
References FirstGadget(), NextGadget(), and PRECONDITION.
Removes (unlinks) a gadget.
Remove (unlinks) a gadget from this gadget window.
The gadget is returned but not destroyed. Returns 0 if gadget is not in this window. Caller also needs to call LayoutSession() after inserting/removing gadgets if this gadget window has already been created.
Reimplemented in owl::TGadgetWindow.
Definition at line 172 of file gadgetli.cpp.
References Removed().
A gadget has been removed.
Derived class can override this to update internals
Reimplemented in owl::TGadgetWindow.
Definition at line 217 of file gadgetli.cpp.