2015-12-20 14:05:07 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2015-12-20 14:05:07 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2015-12-20 14:05:07 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2021-07-25 22:01:00 +00:00
|
|
|
#include "layout/abstract_layout_item.h"
|
2016-09-29 11:37:16 +00:00
|
|
|
|
2018-01-27 13:59:24 +00:00
|
|
|
namespace HistoryView {
|
|
|
|
struct TextState;
|
|
|
|
struct StateRequest;
|
|
|
|
} // namespace HistoryView
|
2018-01-11 19:33:26 +00:00
|
|
|
|
2021-07-25 22:01:00 +00:00
|
|
|
class LayoutItemBase : public AbstractLayoutItem {
|
2015-12-20 14:05:07 +00:00
|
|
|
public:
|
2018-01-27 13:59:24 +00:00
|
|
|
using TextState = HistoryView::TextState;
|
|
|
|
using StateRequest = HistoryView::StateRequest;
|
|
|
|
|
2021-07-25 22:01:00 +00:00
|
|
|
using AbstractLayoutItem::AbstractLayoutItem;
|
2015-12-20 14:05:07 +00:00
|
|
|
|
|
|
|
virtual void initDimensions() = 0;
|
|
|
|
|
2018-01-27 13:59:24 +00:00
|
|
|
[[nodiscard]] virtual TextState getState(
|
2018-01-11 19:33:26 +00:00
|
|
|
QPoint point,
|
2018-01-27 13:59:24 +00:00
|
|
|
StateRequest request) const;
|
2017-10-13 19:07:04 +00:00
|
|
|
[[nodiscard]] virtual TextSelection adjustSelection(
|
2018-01-11 19:33:26 +00:00
|
|
|
TextSelection selection,
|
|
|
|
TextSelectType type) const;
|
2015-12-20 14:05:07 +00:00
|
|
|
|
2016-04-04 21:09:46 +00:00
|
|
|
};
|