Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
DummyPresentation Class Reference
Inheritance diagram for DummyPresentation:
Inheritance graph
Collaboration diagram for DummyPresentation:
Collaboration graph

Public Member Functions

 DummyPresentation ()
 
Scroom::Utils::Rectangle< double > getRect () override
 
void redraw (ViewInterface::Ptr const &, cairo_t *, Scroom::Utils::Rectangle< double >, int) override
 
bool getProperty (const std::string &, std::string &) override
 
bool isPropertyDefined (const std::string &name) override
 
std::string getTitle () override
 
void open (ViewInterface::WeakPtr) override
 
void close (ViewInterface::WeakPtr) override
 
PipetteLayerOperations::PipetteColor getPixelAverages (Scroom::Utils::Rectangle< double >) override
 
Scroom::Utils::Context::ConstPtr getContext () const override
 
- Public Member Functions inherited from Scroom::Utils::Observable< T >
 Observable ()
 
 ~Observable () override
 
 Observable (const Observable &)=delete
 
 Observable (Observable &&)=delete
 
Observable operator= (const Observable &)=delete
 
Observable operator= (Observable &&)=delete
 
Scroom::Bookkeeping::Token registerStrongObserver (Observer const &observer)
 
Scroom::Bookkeeping::Token registerObserver (ObserverWeak const &observer)
 
- Public Member Functions inherited from Scroom::Utils::Base
 Base ()=default
 
 Base (const Base &)=delete
 
 Base (Base &&)=delete
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&)=delete
 
virtual ~Base ()=default
 
template<typename R >
std::shared_ptr< R > shared_from_this ()
 
template<typename R >
std::shared_ptr< R const > shared_from_this () const
 

Static Public Member Functions

static PresentationInterface::Ptr create ()
 

Private Attributes

Scroom::Utils::Context::Ptr context
 

Additional Inherited Members

- Public Types inherited from PresentationInterface
using Ptr = std::shared_ptr< PresentationInterface >
 
using WeakPtr = std::weak_ptr< PresentationInterface >
 
- Public Types inherited from Viewable
using Ptr = std::shared_ptr< Viewable >
 
using WeakPtr = std::weak_ptr< Viewable >
 
- Public Types inherited from Scroom::Utils::Observable< T >
using Observer = std::shared_ptr< T >
 
using Ptr = std::shared_ptr< Observable< T > >
 
- Public Types inherited from PipetteViewInterface
using Ptr = std::shared_ptr< PipetteViewInterface >
 
- Protected Member Functions inherited from Scroom::Utils::Observable< T >
std::list< ObservergetObservers ()
 
virtual void observerAdded (Observer const &observer, Scroom::Bookkeeping::Token const &token)
 

Constructor & Destructor Documentation

◆ DummyPresentation()

DummyPresentation::DummyPresentation ( )
inline
38 {
39 }
Scroom::Utils::Context::Ptr context
Definition pipette-tests.cc:32
static Ptr create()
Definition context.cc:15

Referenced by create().

Here is the caller graph for this function:

Member Function Documentation

◆ close()

void DummyPresentation::close ( ViewInterface::WeakPtr  vi)
inlineoverridevirtual

Gets called just before the View is destroyed

Precondition
Should be called from within a Gdk critical section (i.e. between gdk_threads_enter() and gdk_threads_leave() calls)

Implements Viewable.

54{};

◆ create()

static PresentationInterface::Ptr DummyPresentation::create ( )
inlinestatic
DummyPresentation()
Definition pipette-tests.cc:36
std::shared_ptr< PresentationInterface > Ptr
Definition presentationinterface.hh:73

Referenced by DummyView::createWithPresentation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getContext()

Scroom::Utils::Context::ConstPtr DummyPresentation::getContext ( ) const
inlineoverridevirtual

Implements PresentationInterface.

59{ return context; }

◆ getPixelAverages()

PipetteLayerOperations::PipetteColor DummyPresentation::getPixelAverages ( Scroom::Utils::Rectangle< double >  area)
inlineoverridevirtual

Returns the average pixel values for each component, contained in the area.

Parameters
areaselected area to get the pixel values from.

Implements PipetteViewInterface.

56 {
57 return {{"C", 1.0}};
58 }

◆ getProperty()

bool DummyPresentation::getProperty ( const std::string &  name,
std::string &  value 
)
inlineoverridevirtual

Return the value of the requested property

Parameters
[in]nameThe name of the requested property
[out]valueThe value of the requested property
Return values
trueif the property existed
falseif the property didn't exist

Implements PresentationInterface.

50{ return false; }

◆ getRect()

Scroom::Utils::Rectangle< double > DummyPresentation::getRect ( )
inlineoverridevirtual

Return the dimensions of your presentation

Implements PresentationInterface.

41{ return {0, 0, 100, 100}; }

◆ getTitle()

std::string DummyPresentation::getTitle ( )
inlineoverridevirtual

Return the title of the presentation

Implements PresentationInterface.

52{ return {}; }

◆ isPropertyDefined()

bool DummyPresentation::isPropertyDefined ( const std::string &  name)
inlineoverridevirtual

Return true if the named property exists

Implements PresentationInterface.

51{ return PIPETTE_PROPERTY_NAME == name; }
const std::string PIPETTE_PROPERTY_NAME
Definition pipetteviewinterface.hh:14

◆ open()

void DummyPresentation::open ( ViewInterface::WeakPtr  vi)
inlineoverridevirtual

Gets called just after the View is created

Precondition
Should be called from within a Gdk critical section (i.e. between gdk_threads_enter() and gdk_threads_leave() calls)

Implements Viewable.

53{};

◆ redraw()

void DummyPresentation::redraw ( ViewInterface::Ptr const &  vi,
cairo_t *  cr,
Scroom::Utils::Rectangle< double >  presentationArea,
int  zoom 
)
inlineoverridevirtual

Draw the requested ara at the requested zoom level

Parameters
viThe ViewInterface on whose behalf the request is made
crThe context to draw the area on
presentationAreathe area that is to be drawn. The given x and y coordinates should map on 0,0 of the given context cr.
zoomThe requested zoom level. One pixel of your presentation should have size 2**zoom when drawn. zoom may be negative.

Implements PresentationInterface.

48 {
49 }

Member Data Documentation

◆ context

Scroom::Utils::Context::Ptr DummyPresentation::context
private

Referenced by getContext().


The documentation for this class was generated from the following file: