Skip to content

Commit b2d541f

Browse files
committed
Document methods of target interfaces
1 parent 2325f46 commit b2d541f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

include/scratchcpp/ispritehandler.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,31 @@ class LIBSCRATCHCPP_EXPORT ISpriteHandler
1414
public:
1515
virtual ~ISpriteHandler() { }
1616

17+
/*! Called when the interface is set on a sprite. */
1718
virtual void init(Sprite *sprite) = 0;
1819

20+
/*! Called when the sprite clones. */
1921
virtual void onCloned(Sprite *clone) = 0;
2022

23+
/*! Called when the costume changes. */
2124
virtual void onCostumeChanged(Costume *costume) = 0;
2225

26+
/*! Called when the visibility changes. */
2327
virtual void onVisibleChanged(bool visible) = 0;
28+
29+
/*! Called when the X-coordinate changes. */
2430
virtual void onXChanged(double x) = 0;
31+
32+
/*! Called when the Y-coordinate changes. */
2533
virtual void onYChanged(double y) = 0;
34+
35+
/*! Called when the size changes. */
2636
virtual void onSizeChanged(double size) = 0;
37+
38+
/*! Called when the direction changes. */
2739
virtual void onDirectionChanged(double direction) = 0;
40+
41+
/*! Called when the rotation style changes. */
2842
virtual void onRotationStyleChanged(Sprite::RotationStyle rotationStyle) = 0;
2943
};
3044

include/scratchcpp/istagehandler.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ class LIBSCRATCHCPP_EXPORT IStageHandler
1414
public:
1515
virtual ~IStageHandler() { }
1616

17+
/*! Called when the interface is set on a stage. */
1718
virtual void init(Stage *stage) = 0;
1819

20+
/*! Called when the costume changes. */
1921
virtual void onCostumeChanged(Costume *costume) = 0;
2022

23+
/*! Called when the tempo changes. */
2124
virtual void onTempoChanged(int tempo) = 0;
25+
26+
/*! Called when the video state changes. */
2227
virtual void onVideoStateChanged(Stage::VideoState videoState) = 0;
28+
29+
/*! Called when the video transparency changes. */
2330
virtual void onVideoTransparencyChanged(int videoTransparency) = 0;
2431
};
2532

0 commit comments

Comments
 (0)