2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-23 10:47:11 +00:00
tdesktop/Telegram/SourceFiles/layout/layout_item_base.h

34 lines
829 B
C
Raw Permalink Normal View History

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