Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
presentationinterface.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 <memory>
11
12#include <gmock/gmock.h>
13
16
18{
19public:
20 using Ptr = std::shared_ptr<PresentationMock>;
21
22 static Ptr create() { return std::make_shared<PresentationMock>(); }
23
26
29 MOCK_METHOD2(getProperty, bool(const std::string&, std::string&));
30 MOCK_METHOD1(isPropertyDefined, bool(const std::string&));
31 MOCK_METHOD0(getTitle, std::string());
33};
34
36 : public PresentationMock
37 , public ColormappableMock
38{
39public:
40 using Ptr = std::shared_ptr<ColormappablePresentationMock>;
41
42 static Ptr create() { return std::make_shared<ColormappablePresentationMock>(); }
43};
Definition colormappable.hh:15
Definition presentationinterface.hh:38
std::shared_ptr< ColormappablePresentationMock > Ptr
Definition presentationinterface.hh:40
static Ptr create()
Definition presentationinterface.hh:42
Definition presentationinterface.hh:71
virtual Scroom::Utils::Rectangle< double > getRect()=0
virtual Scroom::Utils::Context::ConstPtr getContext() const =0
virtual void redraw(ViewInterface::Ptr const &vi, cairo_t *cr, Scroom::Utils::Rectangle< double > presentationArea, int zoom)=0
virtual std::string getTitle()=0
virtual bool getProperty(const std::string &name, std::string &value)=0
virtual bool isPropertyDefined(const std::string &name)=0
Definition presentationinterface.hh:18
MOCK_METHOD2(getProperty, bool(const std::string &, std::string &))
MOCK_METHOD1(isPropertyDefined, bool(const std::string &))
MOCK_METHOD1(close, void(ViewInterface::WeakPtr))
MOCK_METHOD1(open, void(ViewInterface::WeakPtr))
static Ptr create()
Definition presentationinterface.hh:22
MOCK_METHOD0(getTitle, std::string())
MOCK_METHOD0(getRect, Scroom::Utils::Rectangle< double >())
MOCK_CONST_METHOD0(getContext, Scroom::Utils::Context::ConstPtr())
std::shared_ptr< PresentationMock > Ptr
Definition presentationinterface.hh:20
MOCK_METHOD4(redraw, void(ViewInterface::Ptr const &, cairo_t *, Scroom::Utils::Rectangle< double >, int))
std::shared_ptr< const Context > ConstPtr
Definition context.hh:27
Definition rectangle.hh:29
std::weak_ptr< ViewInterface > WeakPtr
Definition viewinterface.hh:194
std::shared_ptr< ViewInterface > Ptr
Definition viewinterface.hh:193
virtual void open(ViewInterface::WeakPtr vi)=0
virtual void close(ViewInterface::WeakPtr vi)=0