libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
comment.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include "entity.h"
6
7namespace libscratchcpp
8{
9
10class Block;
11class CommentPrivate;
12
15{
16 public:
17 Comment(const std::string &id, double x = 0, double y = 0);
18 Comment(const Comment &) = delete;
19
20 const std::string &blockId() const;
21 void setBlockId(const std::string id);
22
23 Block *block() const;
24 void setBlock(Block *block);
25
26 double x() const;
27 void setX(double x);
28
29 double y() const;
30 void setY(double y);
31
32 double width() const;
33 void setWidth(double width);
34
35 double height() const;
36 void setHeight(double height);
37
38 bool minimized() const;
39 void setMinimized(bool minimized);
40
41 const std::string &text() const;
42 void setText(const std::string &text);
43
44 private:
45 spimpl::unique_impl_ptr<CommentPrivate> impl;
46};
47
48} // namespace libscratchcpp
The Block class represents a Scratch block.
Definition block.h:24
Comment(const Comment &)=delete
bool minimized() const
Definition comment.cpp:96
void setBlockId(const std::string id)
Definition comment.cpp:24
void setText(const std::string &text)
Definition comment.cpp:114
const std::string & text() const
Definition comment.cpp:108
void setBlock(Block *block)
Definition comment.cpp:37
const std::string & blockId() const
Definition comment.cpp:18
Block * block() const
Definition comment.cpp:31
void setWidth(double width)
Definition comment.cpp:78
double height() const
Definition comment.cpp:84
void setX(double x)
Definition comment.cpp:54
Comment(const std::string &id, double x=0, double y=0)
Definition comment.cpp:11
double width() const
Definition comment.cpp:72
void setMinimized(bool minimized)
Definition comment.cpp:102
void setHeight(double height)
Definition comment.cpp:90
double x() const
Definition comment.cpp:48
double y() const
Definition comment.cpp:60
void setY(double y)
Definition comment.cpp:66
Entity(const std::string &id)
Definition entity.cpp:10
#define LIBSCRATCHCPP_EXPORT
Definition global.h:17
The main namespace of the library.
Definition asset.h:10