|
libscratchcpp
A library for C++ based Scratch project players
|
The Stage class is the project stage. More...
#include <scratchcpp/stage.h>


Public Types | |
| enum class | VideoState { On , Off , OnFlipped } |
Public Member Functions | |
| Stage () | |
| Stage (const Stage &)=delete | |
| void | setInterface (IStageHandler *newInterface) |
| IStageHandler * | getInterface () const |
| bool | isStage () const override |
| void | setCostumeIndex (int newCostumeIndex) override |
| int | currentCostumeWidth () const override |
| int | currentCostumeHeight () const override |
| int | tempo () const |
| void | setTempo (int newTempo) |
| VideoState | videoState () const |
| std::string | videoStateStr () const |
| void | setVideoState (VideoState newVideoState) |
| void | setVideoState (const std::string &newVideoState) |
| void | setVideoState (const char *newVideoState) |
| int | videoTransparency () const |
| void | setVideoTransparency (int newVideoTransparency) |
| const std::string & | textToSpeechLanguage () const |
| void | setTextToSpeechLanguage (const std::string &newTextToSpeechLanguage) |
| Rect | boundingRect () const override |
| Rect | fastBoundingRect () const override |
| bool | touchingPoint (double x, double y) const override |
| bool | touchingColor (Rgb color) const override |
| bool | touchingColor (Rgb color, Rgb mask) const override |
| void | setGraphicsEffectValue (IGraphicsEffect *effect, double value) override |
| void | clearGraphicsEffects () override |
| bool | isTarget () const override final |
| const std::string & | name () const |
| void | setName (const std::string &name) |
| const std::vector< std::shared_ptr< Variable > > & | variables () const |
| int | addVariable (std::shared_ptr< Variable > variable) |
| std::shared_ptr< Variable > | variableAt (int index) const |
| int | findVariable (const std::string &variableName) const |
| int | findVariableById (const std::string &id) const |
| ValueData ** | variableData () |
| const std::vector< std::shared_ptr< List > > & | lists () const |
| int | addList (std::shared_ptr< List > list) |
| std::shared_ptr< List > | listAt (int index) const |
| int | findList (const std::string &listName) const |
| int | findListById (const std::string &id) const |
| List ** | listData () |
| const std::vector< std::shared_ptr< Block > > & | blocks () const |
| int | addBlock (std::shared_ptr< Block > block) |
| std::shared_ptr< Block > | blockAt (int index) const |
| int | findBlock (const std::string &id) const |
| std::vector< std::shared_ptr< Block > > | greenFlagBlocks () const |
| const std::vector< std::shared_ptr< Comment > > & | comments () const |
| int | addComment (std::shared_ptr< Comment > comment) |
| std::shared_ptr< Comment > | commentAt (int index) const |
| int | findComment (const std::string &id) const |
| int | costumeIndex () const |
| std::shared_ptr< Costume > | currentCostume () const |
| const std::vector< std::shared_ptr< Costume > > & | costumes () const |
| int | addCostume (std::shared_ptr< Costume > costume) |
| std::shared_ptr< Costume > | costumeAt (int index) const |
| int | findCostume (const std::string &costumeName) const |
| const std::vector< std::shared_ptr< Sound > > & | sounds () const |
| int | addSound (std::shared_ptr< Sound > sound) |
| std::shared_ptr< Sound > | soundAt (int index) const |
| int | findSound (const std::string &soundName) const |
| double | volume () const |
| void | setVolume (double newVolume) |
| virtual double | soundEffectValue (Sound::Effect effect) const |
| virtual void | setSoundEffectValue (Sound::Effect effect, double value) |
| virtual void | clearSoundEffects () |
| bool | touchingSprite (Sprite *sprite) const |
| bool | touchingEdge () const |
| double | graphicsEffectValue (IGraphicsEffect *effect) const |
| TextBubble * | bubble () |
| const TextBubble * | bubble () const |
| void | setEngine (IEngine *engine) override final |
| virtual bool | isTextBubble () const |
| int | layerOrder () const |
| virtual void | setLayerOrder (int newLayerOrder) |
| sigslot::signal< int > & | layerOrderChanged () const |
| IEngine * | engine () const |
Protected Member Functions | |
| virtual Target * | dataSource () const |
The Stage class is the project stage.
|
strong |
| Stage::Stage | ( | ) |
Constructs Stage.
|
delete |
|
inherited |
Adds a block and returns its index.
|
inherited |
Adds a comment and returns its index.
|
inherited |
Adds a costume and returns its index.
|
inherited |
Adds a list and returns its index.
|
inherited |
Adds a sound and returns its index.
|
inherited |
Adds a variable and returns its index.
|
inherited |
Returns the block at index.
|
inherited |
Returns the list of blocks.
|
overridevirtual |
Overrides Target::boundingRect().
Reimplemented from libscratchcpp::Target.
|
inherited |
Returns the Bubble of this Target.
|
inherited |
Returns the Bubble of this Target.
|
overridevirtual |
Overrides Target::clearGraphicsEffects().
Reimplemented from libscratchcpp::Target.
|
virtualinherited |
Sets the value of all sound effects to 0 (clears them).
|
inherited |
Returns the comment at index.
|
inherited |
Returns the list of comments in the code area.
|
inherited |
Returns the costume at index.
|
inherited |
Returns the index of the current costume.
|
inherited |
Returns the list of costumes.
|
inherited |
Returns the currently set costume.
|
overridevirtual |
Overrides Target::currentCostumeHeight().
Reimplemented from libscratchcpp::Target.
|
overridevirtual |
Overrides Target::currentCostumeWidth().
Reimplemented from libscratchcpp::Target.
|
inlineprotectedvirtualinherited |
Override this method to set a custom data source for blocks, assets, comments, etc.
|
inherited |
Returns the engine.
|
overridevirtual |
Overrides Target::boundingRect().
Reimplemented from libscratchcpp::Target.
|
inherited |
Returns the index of the block with the given ID.
|
inherited |
Returns the index of the comment with the given ID.
|
inherited |
Returns the index of the given costume.
|
inherited |
Returns the index of the list with the given name.
|
inherited |
Returns the index of the list with the given ID.
|
inherited |
Returns the index of the sound with the given name.
|
inherited |
Returns the index of the variable with the given name.
|
inherited |
Returns the index of the variable with the given ID.
| IStageHandler * Stage::getInterface | ( | ) | const |
Returns the stage interface.
|
inherited |
Returns the value of the given graphics effect.
|
inherited |
Returns list of all "when green flag clicked" blocks.
|
overridevirtual |
Returns true.
Reimplemented from libscratchcpp::Target.
|
finaloverridevirtualinherited |
Returns true.
Reimplemented from libscratchcpp::Drawable.
|
inlinevirtualinherited |
Returns true if this Drawable is a TextBubble.
Reimplemented in libscratchcpp::TextBubble.
|
inherited |
Returns the layer number.
|
inherited |
Emits when the layer number changes.
|
inherited |
Returns the list at index.
|
inherited |
Returns an array of list pointers (for optimized list access).
|
inherited |
Returns the list of Scratch lists.
|
inherited |
Returns the name of the target.
|
overridevirtual |
Overrides Target::setCostumeIndex().
Reimplemented from libscratchcpp::Target.
|
finaloverridevirtualinherited |
Overrides Drawable::setEngine().
Reimplemented from libscratchcpp::Drawable.
|
overridevirtual |
Overrides Target::setGraphicsEffectValue().
Reimplemented from libscratchcpp::Target.
| void Stage::setInterface | ( | IStageHandler * | newInterface | ) |
Sets the stage interface.
|
virtualinherited |
Sets the layer number.
Reimplemented in libscratchcpp::Sprite.
|
inherited |
Sets the name of the target.
|
virtualinherited |
Sets the value of the given sound effect.
| void Stage::setTempo | ( | int | newTempo | ) |
Sets the tempo.
| void Stage::setTextToSpeechLanguage | ( | const std::string & | newTextToSpeechLanguage | ) |
Sets the text to speech language.
| void Stage::setVideoState | ( | const char * | newVideoState | ) |
Sets the video state.
| void Stage::setVideoState | ( | const std::string & | newVideoState | ) |
Sets the video state.
| void Stage::setVideoState | ( | VideoState | newVideoState | ) |
Sets the video state.
| void Stage::setVideoTransparency | ( | int | newVideoTransparency | ) |
Sets the video transparency.
|
inherited |
Sets the volume of all sounds of this target.
|
inherited |
Returns the sound at index.
|
virtualinherited |
Returns the value of the given sound effect.
|
inherited |
Returns the list of sounds.
| int Stage::tempo | ( | ) | const |
Returns the tempo.
| const std::string & Stage::textToSpeechLanguage | ( | ) | const |
Returns the text to speech language.
|
overridevirtual |
Overrides Target::touchingColor().
Reimplemented from libscratchcpp::Target.
Overrides Target::touchingColor().
Reimplemented from libscratchcpp::Target.
|
inherited |
Returns true if the target is touching the edge.
|
overridevirtual |
Overrides Target::touchingPoint().
Reimplemented from libscratchcpp::Target.
|
inherited |
|
inherited |
Returns the variable at index.
|
inherited |
Returns an array of raw variable data pointers (for optimized variable access).
|
inherited |
Returns the list of variables.
| Stage::VideoState Stage::videoState | ( | ) | const |
Returns the video state.
| std::string Stage::videoStateStr | ( | ) | const |
Returns the video state as a string.
| int Stage::videoTransparency | ( | ) | const |
Returns the video transparency.
|
inherited |
Returns the volume.