libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
drawable.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 "signal.h"
7#include "spimpl.h"
8
9namespace libscratchcpp
10{
11
12class IEngine;
13
14class DrawablePrivate;
15
18{
19 public:
20 Drawable();
21 Drawable(const Drawable &) = delete;
22
24 virtual bool isTarget() const { return false; }
25
27 virtual bool isTextBubble() const { return false; }
28
29 int layerOrder() const;
30 virtual void setLayerOrder(int newLayerOrder);
31 sigslot::signal<int> &layerOrderChanged() const;
32
33 IEngine *engine() const;
34 virtual void setEngine(IEngine *engine);
35
36 private:
37 spimpl::unique_impl_ptr<DrawablePrivate> impl;
38};
39
40} // namespace libscratchcpp
virtual bool isTarget() const
Definition drawable.h:24
virtual bool isTextBubble() const
Definition drawable.h:27
Drawable()
Definition drawable.cpp:10
Drawable(const Drawable &)=delete
The IEngine interface provides an API for running Scratch projects.
Definition iengine.h:41
#define LIBSCRATCHCPP_EXPORT
Definition global.h:17
The main namespace of the library.
Definition asset.h:10