|
libscratchcpp
A library for C++ based Scratch project players
|
The BlockPrototype class represents the prototype of a custom block. More...
#include <scratchcpp/blockprototype.h>
Public Types | |
| enum class | ArgType { StringNum , Bool } |
Public Member Functions | |
| BlockPrototype () | |
| BlockPrototype (const std::string &procCode) | |
| const std::string & | procCode () const |
| void | setProcCode (const std::string &newProcCode) |
| const std::vector< std::string > & | argumentIds () const |
| void | setArgumentIds (const std::vector< std::string > &newArgumentIds) |
| const std::vector< std::string > & | argumentNames () const |
| void | setArgumentNames (const std::vector< std::string > &newArgumentNames) |
| const std::vector< Value > & | argumentDefaults () const |
| const std::vector< ArgType > & | argumentTypes () const |
| bool | warp () const |
| void | setWarp (bool newWarp) |
The BlockPrototype class represents the prototype of a custom block.
|
strong |
| BlockPrototype::BlockPrototype | ( | ) |
Constructs BlockPrototype.
| BlockPrototype::BlockPrototype | ( | const std::string & | procCode | ) |
Constructs BlockPrototype with the given proc code.
| const std::vector< Value > & BlockPrototype::argumentDefaults | ( | ) | const |
Returns the list of argument default values.
| const std::vector< std::string > & BlockPrototype::argumentIds | ( | ) | const |
Returns the list of argument IDs.
| const std::vector< std::string > & BlockPrototype::argumentNames | ( | ) | const |
Returns the list of argument names.
| const std::vector< BlockPrototype::ArgType > & BlockPrototype::argumentTypes | ( | ) | const |
Returns the list of argument types.
| const std::string & BlockPrototype::procCode | ( | ) | const |
Returns the name of the custom block, including inputs.
| void BlockPrototype::setArgumentIds | ( | const std::vector< std::string > & | newArgumentIds | ) |
Sets the list of argument IDs.
| void BlockPrototype::setArgumentNames | ( | const std::vector< std::string > & | newArgumentNames | ) |
Sets the list of argument names.
| void BlockPrototype::setProcCode | ( | const std::string & | newProcCode | ) |
Sets the name of the custom block, including inputs.
| void BlockPrototype::setWarp | ( | bool | newWarp | ) |
Sets whether to run the block without screen refresh.
| bool BlockPrototype::warp | ( | ) | const |
Returns true if the block is set to run without screen refresh.