7 #include <boost/noncopyable.hpp> 14 using MessagePtr = std::shared_ptr<const Message>;
17 struct MessageLayoutContainer;
18 class MessageLayoutElement;
42 int getHeight()
const;
50 void paint(QPainter &painter,
int width,
int y,
int messageIndex,
51 Selection &selection,
bool isLastReadMessage,
52 bool isWindowFocused,
bool isMentions);
53 void invalidateBuffer();
59 int getLastCharacterIndex()
const;
60 int getFirstMessageCharacterIndex()
const;
61 int getSelectionIndex(QPoint position);
62 void addSelectionText(QString &str, uint32_t from = 0,
63 uint32_t to = UINT32_MAX,
67 bool isDisabled()
const;
68 bool isReplyable()
const;
73 std::shared_ptr<MessageLayoutContainer> container_;
74 std::shared_ptr<QPixmap> buffer_{};
75 bool bufferValid_ =
false;
79 int currentLayoutWidth_ = -1;
80 int layoutState_ = -1;
82 unsigned int layoutCount_ = 0;
83 unsigned int bufferUpdatedCount_ = 0;
87 int collapsedHeight_ = 32;
91 void updateBuffer(QPixmap *pixmap,
int messageIndex,
Selection &selection);
int64_t FlagsEnum< MessageElementFlag > MessageElementFlags
Definition: MessageLayout.hpp:21
MessageLayoutFlag
Definition: MessageLayout.hpp:23
Definition: MessageLayoutElement.hpp:26
Definition: MessageLayout.hpp:33
Definition: Selection.hpp:44
Definition: Application.cpp:48
MessageElementFlag
Definition: MessageElement.hpp:29
MessageLayoutFlags flags
Definition: MessageLayout.hpp:45
Definition: FlagsEnum.hpp:9
CopyMode
Definition: Common.hpp:52
std::shared_ptr< const Message > MessagePtr
Definition: Channel.hpp:18
Definition: Message.hpp:54
std::shared_ptr< MessageLayout > MessageLayoutPtr
Definition: MessageLayout.hpp:94