tdesktop/Telegram/SourceFiles/layout/layout_item_base.h

34 lines
829 B
C
Raw Normal View History

2015-12-20 14:05:07 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2015-12-20 14:05:07 +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
#include "layout/abstract_layout_item.h"
namespace HistoryView {
struct TextState;
struct StateRequest;
} // namespace HistoryView
class LayoutItemBase : public AbstractLayoutItem {
2015-12-20 14:05:07 +00:00
public:
using TextState = HistoryView::TextState;
using StateRequest = HistoryView::StateRequest;
using AbstractLayoutItem::AbstractLayoutItem;
2015-12-20 14:05:07 +00:00
virtual void initDimensions() = 0;
[[nodiscard]] virtual TextState getState(
QPoint point,
StateRequest request) const;
2017-10-13 19:07:04 +00:00
[[nodiscard]] virtual TextSelection adjustSelection(
TextSelection selection,
TextSelectType type) const;
2015-12-20 14:05:07 +00:00
};