libscratchcpp
A library for C++ based Scratch project players
Toggle main menu visibility
Loading...
Searching...
No Matches
textbubble.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
3
#pragma once
4
5
#include "
drawable.h
"
6
#include "signal.h"
7
8
namespace
libscratchcpp
9
{
10
11
class
Thread
;
12
class
TextBubblePrivate;
13
15
class
LIBSCRATCHCPP_EXPORT
TextBubble
:
public
Drawable
16
{
17
public
:
18
enum class
Type
19
{
20
Say,
21
Think
22
};
23
24
TextBubble
();
25
TextBubble
(
const
TextBubble
&) =
delete
;
26
27
bool
isTextBubble
() const override final;
28
29
Type
type
() const;
30
virtual
void
setType
(
Type
type
);
31
sigslot::signal<
Type
> &
typeChanged
() const;
32
33
const std::
string
&
text
() const;
34
virtual
void
setText
(const std::
string
&
text
);
35
virtual
void
setText
(const std::
string
&
text
,
Thread
*
owner
);
36
sigslot::signal<const std::
string
&> &
textChanged
() const;
37
38
Thread
*
owner
() const;
39
40
private:
41
spimpl::unique_impl_ptr<TextBubblePrivate> impl;
42
};
43
44
}
// namespace libscratchcpp
libscratchcpp::Drawable::Drawable
Drawable()
Definition
drawable.cpp:10
libscratchcpp::TextBubble
The TextBubble class represents a text bubble created using say or think block.
Definition
textbubble.h:16
libscratchcpp::TextBubble::owner
Thread * owner() const
Definition
textbubble.cpp:96
libscratchcpp::TextBubble::TextBubble
TextBubble(const TextBubble &)=delete
libscratchcpp::TextBubble::isTextBubble
bool isTextBubble() const override final
Definition
textbubble.cpp:18
libscratchcpp::TextBubble::TextBubble
TextBubble()
Definition
textbubble.cpp:11
libscratchcpp::TextBubble::Type
Type
Definition
textbubble.h:19
libscratchcpp::TextBubble::type
Type type() const
Definition
textbubble.cpp:24
libscratchcpp::TextBubble::textChanged
sigslot::signal< const std::string & > & textChanged() const
Definition
textbubble.cpp:90
libscratchcpp::TextBubble::setType
virtual void setType(Type type)
Definition
textbubble.cpp:30
libscratchcpp::TextBubble::text
const std::string & text() const
Definition
textbubble.cpp:46
libscratchcpp::TextBubble::setText
virtual void setText(const std::string &text)
Definition
textbubble.cpp:55
libscratchcpp::TextBubble::typeChanged
sigslot::signal< Type > & typeChanged() const
Definition
textbubble.cpp:37
libscratchcpp::Thread
The Thread class represents a running Scratch script.
Definition
thread.h:19
drawable.h
LIBSCRATCHCPP_EXPORT
#define LIBSCRATCHCPP_EXPORT
Definition
global.h:17
libscratchcpp
The main namespace of the library.
Definition
asset.h:10
include
scratchcpp
textbubble.h
Generated by
1.17.0