203 if (pDrawable ==
nullptr) {
207 objects.push_back(pChild);
254 std::list<RndDrawable *> mDraws;
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Text output stream.
Definition prnstream.h:16
void Copy(const RndObject *pSource, int nFlags) override
Copy the showing flag, and the children when the flags request them.
void AcquireDrawRefs()
Take a reference on every child.
void ClearDraws()
Remove every child.
virtual void ListDrawables(std::list< RndDrawable * > &drawables)
Add the drawables to draw this frame to a list.
const std::list< RndDrawable * > & GetDraws() const
Definition rnddrawable.h:225
int mShowing
Definition rnddrawable.h:250
virtual void SetShowing(int nShowing)
Set whether the drawable draws at all.
Definition rnddrawable.h:63
virtual void SetHighlight(int nHighlight)
Set whether the drawable draws with its highlight treatment.
int GetShowing() const
Definition rnddrawable.h:220
virtual void ListDrawObjects(std::list< RndObject * > &objects)
Add the objects the drawable uses to a list.
static void CollectChildren(std::list< RndObject * > &objects, RndDrawable *pDrawable)
Append every draw descendant of a drawable, depth first, each before its descendants.
Definition rnddrawable.h:202
void DumpText(PrnStream &stream) override
Write a description of the drawable.
RndDrawable * Parent()
Find the drawable whose children include this one.
void RemoveDraw(RndDrawable *pDraw)
Remove a child.
void ReleaseDrawRefs()
Drop the reference on every child without emptying the list.
void Save(BinStream &stream) override
Write the showing flag and the names of the children.
~RndDrawable() override
Drop the references on the children.
void Replace(RndObject *pFrom, RndObject *pTo) override
Replace a child with another object.
void Load(BinStream &stream) override
Read what Save() wrote.
bool AddDraw(RndDrawable *pDraw, RndDrawable *pBefore)
Add a child before another.
void Draw()
Draw the drawable and then its children, when it is showing.
static int sRev
The format version Save() writes and Load() accepts.
Definition rnddrawable.h:217
RndDrawable()
Construct a showing drawable without a highlight or children.
Definition rnddrawable.h:23
virtual int DrawShowing()
Draw the drawable alone.
Definition rnddrawable.h:85
RndObject(const char *pszName)
Construct an object and register it under a name.