libscratchcpp
A library for C++ based Scratch project players
Toggle main menu visibility
Loading...
Searching...
No Matches
blockprototype.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
3
#pragma once
4
5
#include <vector>
6
7
#include "spimpl.h"
8
#include "
value.h
"
9
10
namespace
libscratchcpp
11
{
12
13
class
BlockPrototypePrivate;
14
16
class
LIBSCRATCHCPP_EXPORT
BlockPrototype
17
{
18
public
:
19
enum class
ArgType
20
{
21
StringNum,
22
Bool
23
};
24
25
BlockPrototype
();
26
BlockPrototype
(
const
std::string &procCode);
27
28
const
std::string &procCode()
const
;
29
void
setProcCode(
const
std::string &newProcCode);
30
31
const
std::vector<std::string> &argumentIds()
const
;
32
void
setArgumentIds(
const
std::vector<std::string> &newArgumentIds);
33
34
const
std::vector<std::string> &argumentNames()
const
;
35
void
setArgumentNames(
const
std::vector<std::string> &newArgumentNames);
36
37
const
std::vector<Value> &argumentDefaults()
const
;
38
39
const
std::vector<ArgType> &argumentTypes()
const
;
40
41
bool
warp()
const
;
42
void
setWarp(
bool
newWarp);
43
44
private
:
45
spimpl::impl_ptr<BlockPrototypePrivate> impl;
46
};
47
48
}
// namespace libscratchcpp
libscratchcpp::BlockPrototype
The BlockPrototype class represents the prototype of a custom block.
Definition
blockprototype.h:17
libscratchcpp::BlockPrototype::ArgType
ArgType
Definition
blockprototype.h:20
libscratchcpp::BlockPrototype::BlockPrototype
BlockPrototype()
Definition
blockprototype.cpp:10
LIBSCRATCHCPP_EXPORT
#define LIBSCRATCHCPP_EXPORT
Definition
global.h:17
libscratchcpp
The main namespace of the library.
Definition
asset.h:10
value.h
Bool
Bool
Definition
valuedata.h:17
include
scratchcpp
blockprototype.h
Generated by
1.17.0