libscratchcpp
A library for C++ based Scratch project players
Toggle main menu visibility
Loading...
Searching...
No Matches
istagehandler.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
3
#pragma once
4
5
#include "
global.h
"
6
#include "
stage.h
"
7
8
namespace
libscratchcpp
9
{
10
11
class
Sprite
;
12
14
class
LIBSCRATCHCPP_EXPORT
IStageHandler
15
{
16
public
:
17
virtual
~IStageHandler
() { }
18
20
virtual
void
init
(
Stage
*stage) = 0;
21
23
virtual
void
onCostumeChanged
(
Costume
*costume) = 0;
24
26
virtual
void
onTempoChanged
(
int
tempo) = 0;
27
29
virtual
void
onVideoStateChanged
(
Stage::VideoState
videoState) = 0;
30
32
virtual
void
onVideoTransparencyChanged
(
int
videoTransparency) = 0;
33
38
virtual
void
onGraphicsEffectChanged
(
IGraphicsEffect
*effect,
double
value) = 0;
39
41
virtual
void
onGraphicsEffectsCleared
() = 0;
42
44
virtual
int
costumeWidth
()
const
= 0;
45
47
virtual
int
costumeHeight
()
const
= 0;
48
50
virtual
Rect
boundingRect
()
const
= 0;
51
56
virtual
Rect
fastBoundingRect
()
const
= 0;
57
59
virtual
bool
touchingClones
(
const
std::vector<Sprite *> &clones)
const
= 0;
60
62
virtual
bool
touchingPoint
(
double
x,
double
y)
const
= 0;
63
65
virtual
bool
touchingColor
(
Rgb
color)
const
= 0;
66
68
virtual
bool
touchingColor
(
Rgb
color,
Rgb
mask)
const
= 0;
69
};
70
71
}
// namespace libscratchcpp
libscratchcpp::Costume
The Costume class represents a Scratch costume.
Definition
costume.h:17
libscratchcpp::IGraphicsEffect
The IGraphicsEffects class is an interface for custom graphics effects.
Definition
igraphicseffect.h:14
libscratchcpp::IStageHandler
The IStageHandler class provides a stage interface for Scratch project players.
Definition
istagehandler.h:15
libscratchcpp::IStageHandler::onGraphicsEffectsCleared
virtual void onGraphicsEffectsCleared()=0
libscratchcpp::IStageHandler::onGraphicsEffectChanged
virtual void onGraphicsEffectChanged(IGraphicsEffect *effect, double value)=0
libscratchcpp::IStageHandler::onVideoStateChanged
virtual void onVideoStateChanged(Stage::VideoState videoState)=0
libscratchcpp::IStageHandler::init
virtual void init(Stage *stage)=0
libscratchcpp::IStageHandler::onCostumeChanged
virtual void onCostumeChanged(Costume *costume)=0
libscratchcpp::IStageHandler::costumeWidth
virtual int costumeWidth() const =0
libscratchcpp::IStageHandler::touchingColor
virtual bool touchingColor(Rgb color) const =0
libscratchcpp::IStageHandler::costumeHeight
virtual int costumeHeight() const =0
libscratchcpp::IStageHandler::touchingClones
virtual bool touchingClones(const std::vector< Sprite * > &clones) const =0
libscratchcpp::IStageHandler::touchingPoint
virtual bool touchingPoint(double x, double y) const =0
libscratchcpp::IStageHandler::fastBoundingRect
virtual Rect fastBoundingRect() const =0
libscratchcpp::IStageHandler::touchingColor
virtual bool touchingColor(Rgb color, Rgb mask) const =0
libscratchcpp::IStageHandler::boundingRect
virtual Rect boundingRect() const =0
libscratchcpp::IStageHandler::onVideoTransparencyChanged
virtual void onVideoTransparencyChanged(int videoTransparency)=0
libscratchcpp::IStageHandler::onTempoChanged
virtual void onTempoChanged(int tempo)=0
libscratchcpp::IStageHandler::~IStageHandler
virtual ~IStageHandler()
Definition
istagehandler.h:17
libscratchcpp::Rect
Definition
rect.h:15
libscratchcpp::Sprite
The Sprite class represents a Scratch sprite.
Definition
sprite.h:18
libscratchcpp::Stage
The Stage class is the project stage.
Definition
stage.h:17
libscratchcpp::Stage::VideoState
VideoState
Definition
stage.h:20
global.h
LIBSCRATCHCPP_EXPORT
#define LIBSCRATCHCPP_EXPORT
Definition
global.h:17
libscratchcpp
The main namespace of the library.
Definition
asset.h:10
libscratchcpp::Rgb
unsigned int Rgb
Definition
value_functions.h:11
stage.h
include
scratchcpp
istagehandler.h
Generated by
1.17.0