libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
libscratchcpp::TextBubble Class Reference

The TextBubble class represents a text bubble created using say or think block. More...

#include <scratchcpp/textbubble.h>

Inheritance diagram for libscratchcpp::TextBubble:
Collaboration diagram for libscratchcpp::TextBubble:

Public Types

enum class  Type { Say , Think }
 

Public Member Functions

 TextBubble ()
 
 TextBubble (const TextBubble &)=delete
 
bool isTextBubble () const override final
 
Type type () const
 
virtual void setType (Type type)
 
sigslot::signal< Type > & typeChanged () const
 
const std::string & text () const
 
virtual void setText (const std::string &text)
 
virtual void setText (const std::string &text, Thread *owner)
 
sigslot::signal< const std::string & > & textChanged () const
 
Threadowner () const
 
virtual bool isTarget () const
 
int layerOrder () const
 
virtual void setLayerOrder (int newLayerOrder)
 
sigslot::signal< int > & layerOrderChanged () const
 
IEngineengine () const
 
virtual void setEngine (IEngine *engine)
 

Detailed Description

The TextBubble class represents a text bubble created using say or think block.

Member Enumeration Documentation

◆ Type

Enumerator
Say 
Think 

Constructor & Destructor Documentation

◆ TextBubble() [1/2]

TextBubble::TextBubble ( )

◆ TextBubble() [2/2]

libscratchcpp::TextBubble::TextBubble ( const TextBubble & )
delete

Member Function Documentation

◆ engine()

IEngine * Drawable::engine ( ) const
inherited

Returns the engine.

◆ isTarget()

virtual bool libscratchcpp::Drawable::isTarget ( ) const
inlinevirtualinherited

Returns true if this Drawable is a Target.

Reimplemented in libscratchcpp::Target.

◆ isTextBubble()

bool TextBubble::isTextBubble ( ) const
finaloverridevirtual

Returns true.

Reimplemented from libscratchcpp::Drawable.

◆ layerOrder()

int Drawable::layerOrder ( ) const
inherited

Returns the layer number.

◆ layerOrderChanged()

sigslot::signal< int > & Drawable::layerOrderChanged ( ) const
inherited

Emits when the layer number changes.

◆ owner()

Thread * TextBubble::owner ( ) const

Returns the thread which currently owns the text bubble.

◆ setEngine()

void Drawable::setEngine ( IEngine * engine)
virtualinherited

Sets the engine.

Reimplemented in libscratchcpp::Target.

◆ setLayerOrder()

void Drawable::setLayerOrder ( int newLayerOrder)
virtualinherited

Sets the layer number.

Reimplemented in libscratchcpp::Sprite.

◆ setText() [1/2]

void TextBubble::setText ( const std::string & text)
virtual

Sets the text of the TextBubble.

Note
If the text is an empty string, the TextBubble is supposed to be hidden.

◆ setText() [2/2]

void TextBubble::setText ( const std::string & text,
Thread * owner )
virtual

◆ setType()

void TextBubble::setType ( Type type)
virtual

Sets the type of the TextBubble (say or think).

◆ text()

const std::string & TextBubble::text ( ) const

Returns the text of the TextBubble.

Note
If the text is an empty string, the TextBubble is supposed to be hidden.

◆ textChanged()

sigslot::signal< const std::string & > & TextBubble::textChanged ( ) const

Emits when the text changes.

◆ type()

TextBubble::Type TextBubble::type ( ) const

Returns the type of the TextBubble (say or think).

◆ typeChanged()

sigslot::signal< TextBubble::Type > & TextBubble::typeChanged ( ) const

Emits when the type changes.


The documentation for this class was generated from the following files: