Scroom  0.14
measure-framerate-stubs.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 <string>
11 #include <vector>
12 
13 #include <gtk/gtk.h>
14 
16 #include <scroom/tile.hh>
18 #include <scroom/viewinterface.hh>
19 
21 
23 {
24 public:
25  using Ptr = boost::shared_ptr<ProgressInterfaceStub>;
26 
27 private:
28  bool finished{false};
29 
30 private:
31  ProgressInterfaceStub() = default;
32 
33 public:
34  static Ptr create();
35 
36  [[nodiscard]] bool isFinished() const;
37 
38  // ProgressInterface ///////////////////////////////////////////////////
39  void setIdle() override {}
40  void setWaiting(double /*progress*/) override {}
41  void setWorking(double /*progress*/) override {}
42  void setFinished() override;
43 };
44 
46 {
47 public:
48  using Ptr = boost::shared_ptr<ViewInterfaceStub>;
49 
50 private:
52 
53 private:
55 
56 public:
58  void invalidate() override {}
60  void addSideWidget(std::string /*title*/, GtkWidget* /*w*/) override {}
61  void removeSideWidget(GtkWidget* /*w*/) override {}
62  void addToToolbar(GtkToolItem* /*ti*/) override {}
63  void removeFromToolbar(GtkToolItem* /*ti*/) override {}
65  void registerPostRenderer(PostRenderer::Ptr /*unused*/) override{};
66  void setStatusMessage(const std::string& /*unused*/) override{};
67  boost::shared_ptr<PresentationInterface> getCurrentPresentation() override { return {}; };
68  void addToolButton(GtkToggleButton* /*unused*/, ToolStateListener::Ptr /*unused*/) override{};
69 };
70 
72 {
73 public:
74  void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector<Tile::Ptr>& tiles) override;
75  void done() override{};
76  std::string getName() override { return "Source1Bpp"; }
77 };
78 
80 {
81 public:
82  void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector<Tile::Ptr>& tiles) override;
83  void done() override{};
84  std::string getName() override { return "Source2Bpp"; }
85 };
86 
88 {
89 public:
90  void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector<Tile::Ptr>& tiles) override;
91  void done() override{};
92  std::string getName() override { return "Source4Bpp"; }
93 };
94 
96 {
97 public:
98  void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector<Tile::Ptr>& tiles) override;
99  void done() override{};
100  std::string getName() override { return "Source8Bpp"; }
101 };
Source8Bpp::fillTiles
void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector< Tile::Ptr > &tiles) override
Definition: measure-framerate-stubs.cc:86
PresentationInterface
Definition: presentationinterface.hh:69
Source2Bpp::done
void done() override
Definition: measure-framerate-stubs.hh:83
ViewInterfaceStub::pi
ProgressInterface::Ptr pi
Definition: measure-framerate-stubs.hh:51
ProgressInterfaceStub::ProgressInterfaceStub
ProgressInterfaceStub()=default
ViewInterfaceStub::getProgressInterface
ProgressInterface::Ptr getProgressInterface() override
Definition: measure-framerate-stubs.cc:27
ViewInterfaceStub::getCurrentPresentation
boost::shared_ptr< PresentationInterface > getCurrentPresentation() override
Definition: measure-framerate-stubs.hh:67
ViewInterfaceStub::removeFromToolbar
void removeFromToolbar(GtkToolItem *) override
Definition: measure-framerate-stubs.hh:63
ViewInterfaceStub::ViewInterfaceStub
ViewInterfaceStub(ProgressInterface::Ptr pi)
Definition: measure-framerate-stubs.cc:20
progressinterfacehelpers.hh
ViewInterfaceStub::create
static Ptr create(ProgressInterface::Ptr pi)
Definition: measure-framerate-stubs.cc:25
ViewInterfaceStub::removeSideWidget
void removeSideWidget(GtkWidget *) override
Definition: measure-framerate-stubs.hh:61
ViewInterfaceStub::addToolButton
void addToolButton(GtkToggleButton *, ToolStateListener::Ptr) override
Definition: measure-framerate-stubs.hh:68
ProgressInterface::Ptr
boost::shared_ptr< ProgressInterface > Ptr
Definition: progressinterface.hh:20
ViewInterface::Ptr
boost::shared_ptr< ViewInterface > Ptr
Definition: viewinterface.hh:193
ProgressInterface
Definition: progressinterface.hh:17
Source2Bpp::fillTiles
void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector< Tile::Ptr > &tiles) override
Definition: measure-framerate-stubs.cc:50
ProgressInterfaceStub::setWaiting
void setWaiting(double) override
Definition: measure-framerate-stubs.hh:40
Source1Bpp::fillTiles
void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector< Tile::Ptr > &tiles) override
Definition: measure-framerate-stubs.cc:29
ViewInterfaceStub::setStatusMessage
void setStatusMessage(const std::string &) override
Definition: measure-framerate-stubs.hh:66
Source1Bpp::getName
std::string getName() override
Definition: measure-framerate-stubs.hh:76
ProgressInterfaceStub::finished
bool finished
Definition: measure-framerate-stubs.hh:28
Source4Bpp::done
void done() override
Definition: measure-framerate-stubs.hh:91
SelectionListener::Ptr
boost::shared_ptr< SelectionListener > Ptr
Definition: viewinterface.hh:118
ViewInterfaceStub
Definition: measure-framerate-stubs.hh:45
ProgressInterfaceStub
Definition: measure-framerate-stubs.hh:22
ProgressInterfaceStub::isFinished
bool isFinished() const
Definition: measure-framerate-stubs.cc:18
ProgressInterfaceStub::create
static Ptr create()
Definition: measure-framerate-stubs.cc:14
Source8Bpp::done
void done() override
Definition: measure-framerate-stubs.hh:99
progressinterface.hh
Source8Bpp::getName
std::string getName() override
Definition: measure-framerate-stubs.hh:100
tiledbitmapinterface.hh
ProgressInterfaceStub::Ptr
boost::shared_ptr< ProgressInterfaceStub > Ptr
Definition: measure-framerate-stubs.hh:25
tile.hh
Tile::Ptr
boost::shared_ptr< Tile > Ptr
Definition: tile.hh:21
ViewInterfaceStub::Ptr
boost::shared_ptr< ViewInterfaceStub > Ptr
Definition: measure-framerate-stubs.hh:48
Source4Bpp::getName
std::string getName() override
Definition: measure-framerate-stubs.hh:92
SourcePresentation
Definition: tiledbitmapinterface.hh:195
Source1Bpp
Definition: measure-framerate-stubs.hh:71
ViewInterfaceStub::invalidate
void invalidate() override
Definition: measure-framerate-stubs.hh:58
ViewInterfaceStub::addToToolbar
void addToToolbar(GtkToolItem *) override
Definition: measure-framerate-stubs.hh:62
Source2Bpp::getName
std::string getName() override
Definition: measure-framerate-stubs.hh:84
ProgressInterfaceStub::setFinished
void setFinished() override
Definition: measure-framerate-stubs.cc:16
measure-framerate-stubs.hh
viewinterface.hh
ProgressInterfaceStub::setWorking
void setWorking(double) override
Definition: measure-framerate-stubs.hh:41
Source2Bpp
Definition: measure-framerate-stubs.hh:79
ViewInterfaceStub::registerPostRenderer
void registerPostRenderer(PostRenderer::Ptr) override
Definition: measure-framerate-stubs.hh:65
ProgressInterfaceStub::setIdle
void setIdle() override
Definition: measure-framerate-stubs.hh:39
ViewInterfaceStub::addSideWidget
void addSideWidget(std::string, GtkWidget *) override
Definition: measure-framerate-stubs.hh:60
Source1Bpp::done
void done() override
Definition: measure-framerate-stubs.hh:75
Source8Bpp
Definition: measure-framerate-stubs.hh:95
Source4Bpp::fillTiles
void fillTiles(int startLine, int lineCount, int tileWidth, int firstTile, std::vector< Tile::Ptr > &tiles) override
Definition: measure-framerate-stubs.cc:68
ViewInterfaceStub::registerSelectionListener
void registerSelectionListener(SelectionListener::Ptr) override
Definition: measure-framerate-stubs.hh:64
ToolStateListener::Ptr
boost::shared_ptr< ToolStateListener > Ptr
Definition: viewinterface.hh:164
ViewInterface
Definition: viewinterface.hh:190
Source4Bpp
Definition: measure-framerate-stubs.hh:87
PostRenderer::Ptr
boost::shared_ptr< PostRenderer > Ptr
Definition: viewinterface.hh:83