Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
sizedeterminer.hh
Go to the documentation of this file.
1/*
2 * Scroom - Generic viewer for 2D data
3 * Copyright (C) 2009-2026 Kees-Jan Dijkzeul
4 *
5 * SPDX-License-Identifier: LGPL-2.1
6 */
7
8#pragma once
9
10#include <list>
11#include <map>
12#include <memory>
13#include <set>
14
17
19{
20public:
21 using Ptr = std::shared_ptr<SizeDeterminer>;
22
23private:
34
35private:
36 std::list<PresentationInterface::Ptr> presentations;
37 std::map<PresentationInterface::Ptr, PresentationData> resizablePresentationData;
38
39private:
40 SizeDeterminer() = default;
41 void sendUpdates();
42
43public:
44 static Ptr create();
45 void add(PresentationInterface::Ptr const& p);
46 [[nodiscard]] Scroom::Utils::Rectangle<double> getRect() const;
47
50};
std::shared_ptr< PresentationInterface > Ptr
Definition presentationinterface.hh:73
std::shared_ptr< ResizablePresentationInterface > Ptr
Definition resizablepresentationinterface.hh:27
Definition rectangle.hh:29
Definition sizedeterminer.hh:25
ResizablePresentationInterface::Ptr const resizablePresentationInterface
Definition sizedeterminer.hh:27
PresentationData()
Definition sizedeterminer.cc:51
Scroom::Utils::WeakKeySet< ViewInterface::WeakPtr > views
Definition sizedeterminer.hh:28
Definition sizedeterminer.hh:19
static Ptr create()
Definition sizedeterminer.cc:66
void close(PresentationInterface::Ptr const &p, ViewInterface::WeakPtr const &vi)
Definition sizedeterminer.cc:112
std::map< PresentationInterface::Ptr, PresentationData > resizablePresentationData
Definition sizedeterminer.hh:37
std::shared_ptr< SizeDeterminer > Ptr
Definition sizedeterminer.hh:21
void open(PresentationInterface::Ptr const &p, ViewInterface::WeakPtr const &vi)
Definition sizedeterminer.cc:96
SizeDeterminer()=default
std::list< PresentationInterface::Ptr > presentations
Definition sizedeterminer.hh:36
Scroom::Utils::Rectangle< double > getRect() const
Definition sizedeterminer.cc:83
void sendUpdates()
Definition sizedeterminer.cc:126
std::weak_ptr< ViewInterface > WeakPtr
Definition viewinterface.hh:194
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
std::set< K, std::owner_less< K > > WeakKeySet
Definition utilities.hh:121
ViewInterface::Ptr const vi
Definition pipette-tests.cc:186
t add()