Scroom  0.14
presentationinterface.hh
Go to the documentation of this file.
1 /*
2  * Scroom - Generic viewer for 2D data
3  * Copyright (C) 2009-2022 Kees-Jan Dijkzeul
4  *
5  * SPDX-License-Identifier: LGPL-2.1
6  */
7 
8 #pragma once
9 
10 #include <gmock/gmock.h>
11 
14 
16 {
17 public:
18  using Ptr = boost::shared_ptr<PresentationMock>;
19 
20  static Ptr create() { return Ptr(new PresentationMock()); }
21 
24 
27  MOCK_METHOD2(getProperty, bool(const std::string&, std::string&));
28  MOCK_METHOD1(isPropertyDefined, bool(const std::string&));
29  MOCK_METHOD0(getTitle, std::string());
30 };
31 
33  : public PresentationMock
34  , public ColormappableMock
35 {
36 public:
37  using Ptr = boost::shared_ptr<ColormappablePresentationMock>;
38 
39  static Ptr create() { return Ptr(new ColormappablePresentationMock()); }
40 };
PresentationMock::MOCK_METHOD1
MOCK_METHOD1(open, void(ViewInterface::WeakPtr))
Viewable::open
virtual void open(ViewInterface::WeakPtr vi)=0
PresentationInterface
Definition: presentationinterface.hh:69
PresentationMock::MOCK_METHOD0
MOCK_METHOD0(getRect, Scroom::Utils::Rectangle< double >())
Viewable::close
virtual void close(ViewInterface::WeakPtr vi)=0
PresentationMock::MOCK_METHOD4
MOCK_METHOD4(redraw, void(ViewInterface::Ptr const &, cairo_t *, Scroom::Utils::Rectangle< double >, int))
presentationinterface.hh
PresentationMock::create
static Ptr create()
Definition: presentationinterface.hh:20
PresentationInterface::redraw
virtual void redraw(ViewInterface::Ptr const &vi, cairo_t *cr, Scroom::Utils::Rectangle< double > presentationArea, int zoom)=0
ViewInterface::Ptr
boost::shared_ptr< ViewInterface > Ptr
Definition: viewinterface.hh:193
colormappable.hh
ColormappablePresentationMock
Definition: presentationinterface.hh:32
PresentationInterface::isPropertyDefined
virtual bool isPropertyDefined(const std::string &name)=0
PresentationMock
Definition: presentationinterface.hh:15
ColormappablePresentationMock::create
static Ptr create()
Definition: presentationinterface.hh:39
PresentationInterface::getTitle
virtual std::string getTitle()=0
ViewInterface::WeakPtr
boost::weak_ptr< ViewInterface > WeakPtr
Definition: viewinterface.hh:194
PresentationInterface::getProperty
virtual bool getProperty(const std::string &name, std::string &value)=0
ColormappablePresentationMock::Ptr
boost::shared_ptr< ColormappablePresentationMock > Ptr
Definition: presentationinterface.hh:37
PresentationInterface::getRect
virtual Scroom::Utils::Rectangle< double > getRect()=0
Colormappable::Ptr
boost::shared_ptr< Colormappable > Ptr
Definition: colormappable.hh:116
PresentationMock::Ptr
boost::shared_ptr< PresentationMock > Ptr
Definition: presentationinterface.hh:18
ColormappableMock
Definition: colormappable.hh:14
PresentationMock::MOCK_METHOD2
MOCK_METHOD2(getProperty, bool(const std::string &, std::string &))
Scroom::Utils::Rectangle< double >