|
wavelength 1.0.0
|
Cursor that sweeps along one line of text, hiding the characters it has not reached. More...
#include <rndcursor.h>


Public Member Functions | |
| RndCursor (const char *pszName) | |
| Construct a cursor without a text or a blur, offset by -0.1 and resting 0.8 of a frame. | |
| ~RndCursor () override | |
| Drop the references and delete the mask and the internal blur. | |
| void * | operator new (size_t nSize) |
| Allocate a cursor, billed to the class name. | |
| void | operator delete (void *pBlock) |
| Release a cursor. | |
| float | EndFrame () override |
| Report the last frame, the length of the text plus the rest at the end. | |
| void | ListDrawObjects (std::list< RndObject * > &objects) override |
| Add the objects of the blur and of the text to a list. | |
| void | ListDrawables (std::list< RndDrawable * > &drawables) override |
| Add the drawables of the text, then the children, to a list. | |
| int | DrawShowing () override |
| Move the mask and the internal blur to the cursor position and draw them with the text. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the cursor and its bases. | |
| void | Save (BinStream &stream) override |
| Write the cursor and its bases. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a referenced text or blur with another, and rebuild what depends on it. | |
| const char * | ClassName () const override |
| Report the class name. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy another cursor and its bases. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote. | |
| void | SetText (RndText *pText) |
| Set the text the cursor sweeps, then rebuild the mask. | |
| void | AcquireRefs () |
| Take the references on the text and the blur, then build the mask and the internal blur. | |
| void | ReleaseRefs () |
| Drop the references on the text and the blur, and delete the mask and the internal blur. | |
| void | BuildCursor () |
| Replace the internal blur with a copy of mBlur, whose mesh is not drawn by itself. | |
| void | BuildMask () |
| Replace the mask with a quad over the line of the text, and measure the line. | |
| float | CursorPos () |
| Report the character the cursor has reached, resting on each for mStutter of a frame. | |
| Public Member Functions inherited from RndAnimatable | |
| RndAnimatable () | |
| Construct an animatable at frame 0 without children or filters. | |
| ~RndAnimatable () override | |
| Drop the references on the children and delete the filters. | |
| virtual void | ListAnimObjects (std::list< RndObject * > &objects) |
| Add the objects the animation uses to a list. | |
| virtual int | SetFrameSelf (float fFrame) |
| Apply a filtered frame to this object alone. | |
| RndAnimatable * | Parent () |
| Find the animatable whose children include this one. | |
| void | SetFrame (float fFrame) |
| Filter a frame, apply it, and pass the result on to the children. | |
| float | FilterFrame (float fValue) |
| Run a frame through the filters. | |
| float | UnfilterFrame (float fValue) |
| Run a filtered frame back through the filters, last first. | |
| float | ChildrenEndFrame () |
| Report the latest end frame of the children, unfiltered through this animatable. | |
| bool | AddAnim (RndAnimatable *pAnim) |
| Append a child. | |
| void | RemoveAnim (RndAnimatable *pAnim) |
| Remove a child. | |
| void | RemoveAllAnims () |
| Remove every child. | |
| const std::list< Filter * > & | GetFilters () const |
| float | GetFrame () const |
| float | GetFilteredFrame () const |
| const std::list< RndAnimatable * > & | GetAnims () const |
| std::list< Filter * > & | GetFilters () |
| Public Member Functions inherited from RndObject | |
| RndObject (const char *pszName) | |
| Construct an object and register it under a name. | |
| virtual | ~RndObject () |
| Notify every referrer, then erase the registration. | |
| void | SetName (const char *pszName) |
| Register the object under a different name. | |
| void | AddRef (RndObject *pReferrer) |
| Register an object as a store of a pointer to this one. | |
| void | RemoveRef (RndObject *pReferrer) |
| Drop the first registration AddRef() made for a referrer. | |
| const char * | GetName () const |
| const std::list< RndObject * > & | GetRefs () const |
| int | GetInternal () const |
| void | SetInternal (int nInternal) |
| Public Member Functions inherited from RndDrawable | |
| RndDrawable () | |
| Construct a showing drawable without a highlight or children. | |
| ~RndDrawable () override | |
| Drop the references on the children. | |
| virtual void | SetShowing (int nShowing) |
| Set whether the drawable draws at all. | |
| virtual void | SetHighlight (int nHighlight) |
| Set whether the drawable draws with its highlight treatment. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the drawable. | |
| void | Save (BinStream &stream) override |
| Write the showing flag and the names of the children. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a child with another object. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy the showing flag, and the children when the flags request them. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote. | |
| RndDrawable * | Parent () |
| Find the drawable whose children include this one. | |
| void | Draw () |
| Draw the drawable and then its children, when it is showing. | |
| bool | AddDraw (RndDrawable *pDraw, RndDrawable *pBefore) |
| Add a child before another. | |
| void | RemoveDraw (RndDrawable *pDraw) |
| Remove a child. | |
| void | ClearDraws () |
| Remove every child. | |
| int | GetShowing () const |
| const std::list< RndDrawable * > & | GetDraws () const |
Static Public Member Functions | |
| static RndObject * | New (const char *pszName) |
| Create a cursor. | |
| Static Public Member Functions inherited from RndAnimatable | |
| static Filter * | NewFilter (int nType) |
| Create a filter stage of a type, with its parameters unset. | |
| static void | CollectChildren (std::list< RndObject * > &objects, RndAnimatable *pAnimatable) |
| Append every animation descendant of an animatable, depth first, each before its descendants. | |
| Static Public Member Functions inherited from RndDrawable | |
| static void | CollectChildren (std::list< RndObject * > &objects, RndDrawable *pDrawable) |
| Append every draw descendant of a drawable, depth first, each before its descendants. | |
Static Public Attributes | |
| static const char * | sClassName |
| The class name a .rnd file writes, Cursor. | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| static int | sLoadRev |
| The version Load() read last. | |
| Static Public Attributes inherited from RndAnimatable | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| Static Public Attributes inherited from RndObject | |
| static constexpr int | kCopyChildLists = 0x200 |
| The bit of the Copy() flags that copies the child lists of the mix-ins. | |
| Static Public Attributes inherited from RndDrawable | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
Additional Inherited Members | |
| Public Types inherited from RndAnimatable | |
| enum | FilterType { kFilterScaleOffset = 0 , kFilterMinMaxLoop = 1 , kFilterZeroOrder = 2 , kFilterFirstOrder = 3 , kFilterSecondOrder = 4 } |
| The type tags of the filters, as Save() writes them. More... | |
| Protected Member Functions inherited from RndAnimatable | |
| void | ReleaseObjects () |
| Drop the references on the children without emptying the list, and delete the filters. | |
| void | AcquireAnimRefs () |
| Take a reference on every child. | |
| Protected Member Functions inherited from RndDrawable | |
| void | ReleaseDrawRefs () |
| Drop the reference on every child without emptying the list. | |
| void | AcquireDrawRefs () |
| Take a reference on every child. | |
| Protected Attributes inherited from RndAnimatable | |
| std::list< RndAnimatable * > | mAnims |
| std::list< Filter * > | mFilters |
| float | mFrame |
| float | mFilteredFrame |
| Protected Attributes inherited from RndObject | |
| std::list< RndObject * > | mRefs |
| String | mName |
| Protected Attributes inherited from RndDrawable | |
| int | mShowing |
Cursor that sweeps along one line of text, hiding the characters it has not reached.
The RTTI includes the class name and records RndAnimatable and RndDrawable as bases. The frame counts characters. A mask mesh in front of the text hides the characters past the cursor, and an internal copy of mBlur marks the cursor position. The cursor rests on each character for mStutter of a frame before it moves on.
|
explicit |
Construct a cursor without a text or a blur, offset by -0.1 and resting 0.8 of a frame.
| pszName | The registry key. |
|
override |
Drop the references and delete the mask and the internal blur.
|
inline |
Allocate a cursor, billed to the class name.
| nSize | The object size the compiler supplies. |
|
inline |
Release a cursor.
| pBlock | The block. |
|
overridevirtual |
Report the last frame, the length of the text plus the rest at the end.
Reimplemented from RndAnimatable.
|
overridevirtual |
Add the objects of the blur and of the text to a list.
| objects | The list to add to. |
Reimplemented from RndDrawable.
|
overridevirtual |
Add the drawables of the text, then the children, to a list.
| drawables | The list to add to. |
Reimplemented from RndDrawable.
|
overridevirtual |
Move the mask and the internal blur to the cursor position and draw them with the text.
Nothing is drawn while the text is missing or hidden. The internal blur is collapsed before the first character and after the last.
Reimplemented from RndDrawable.
|
overridevirtual |
Write a description of the cursor and its bases.
The mask and the internal blur are listed at a dump level of 2 and above.
| stream | The stream to write to. |
Reimplemented from RndAnimatable.
|
overridevirtual |
Write the cursor and its bases.
| stream | The stream to write to. |
Reimplemented from RndAnimatable.
Replace a referenced text or blur with another, and rebuild what depends on it.
| pFrom | The object being replaced. |
| pTo | The replacement, or null. |
Reimplemented from RndAnimatable.
|
inlineoverridevirtual |
Report the class name.
Implements RndObject.
|
overridevirtual |
Copy another cursor and its bases.
| pSource | The cursor to copy from. |
| nFlags | The set of fields to copy. |
Reimplemented from RndAnimatable.
|
overridevirtual |
Read what Save() wrote.
| stream | The stream to read from. |
Reimplemented from RndAnimatable.
| void RndCursor::SetText | ( | RndText * | pText | ) |
Set the text the cursor sweeps, then rebuild the mask.
| pText | The text, or null. |
| void RndCursor::AcquireRefs | ( | ) |
Take the references on the text and the blur, then build the mask and the internal blur.
The name is inferred.
| void RndCursor::ReleaseRefs | ( | ) |
Drop the references on the text and the blur, and delete the mask and the internal blur.
The name is inferred.
| void RndCursor::BuildCursor | ( | ) |
Replace the internal blur with a copy of mBlur, whose mesh is not drawn by itself.
A blur without a mesh gives no internal blur. The name is inferred.
| void RndCursor::BuildMask | ( | ) |
Replace the mask with a quad over the line of the text, and measure the line.
Text without a font gives no mask, and text of more than one line is refused with a notice. The name is inferred.
| float RndCursor::CursorPos | ( | ) |
Report the character the cursor has reached, resting on each for mStutter of a frame.
The name is inferred.
|
inlinestatic |
Create a cursor.
| pszName | The registry key. |
|
static |
The class name a .rnd file writes, Cursor.
|
static |
|
static |
The version Load() read last.