Scroom  0.14
anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub Class Reference
Inheritance diagram for anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub:
Inheritance graph
Collaboration diagram for anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub:
Collaboration graph

Public Types

using Ptr = boost::shared_ptr< PresentationInterfaceStub >
 
- Public Types inherited from PresentationInterface
using Ptr = boost::shared_ptr< PresentationInterface >
 
using WeakPtr = boost::weak_ptr< PresentationInterface >
 
- Public Types inherited from Viewable
using Ptr = boost::shared_ptr< Viewable >
 
using WeakPtr = boost::weak_ptr< Viewable >
 
- Public Types inherited from Scroom::Utils::Observable< T >
using Observer = boost::shared_ptr< T >
 
using Ptr = boost::shared_ptr< Observable< T > >
 

Public Member Functions

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 &) override
 
std::string getTitle () override
 
void open (ViewInterface::WeakPtr) override
 
void close (ViewInterface::WeakPtr) override
 
- Public Member Functions inherited from PresentationInterface
virtual Scroom::Utils::Point< double > getAspectRatio () const
 
- 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)
 

Static Public Member Functions

static Ptr create (Scroom::Utils::Rectangle< double > const &rect)
 

Protected Member Functions

 PresentationInterfaceStub (Scroom::Utils::Rectangle< double > const &rect_)
 
- Protected Member Functions inherited from Scroom::Utils::Observable< T >
std::list< ObservergetObservers ()
 
virtual void observerAdded (Observer const &observer, Scroom::Bookkeeping::Token const &token)
 

Private Attributes

Scroom::Utils::Rectangle< double > rect
 

Member Typedef Documentation

◆ Ptr

using anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::Ptr = boost::shared_ptr<PresentationInterfaceStub>

Constructor & Destructor Documentation

◆ PresentationInterfaceStub()

anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::PresentationInterfaceStub ( Scroom::Utils::Rectangle< double > const &  rect_)
inlineexplicitprotected
65  : rect(rect_)
66  {
67  }

Member Function Documentation

◆ close()

void anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::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.

85 {}

◆ create()

static Ptr anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::create ( Scroom::Utils::Rectangle< double > const &  rect)
inlinestatic
70 { return Ptr(new PresentationInterfaceStub(rect)); }

◆ getProperty()

bool anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::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.

80 { return false; }

◆ getRect()

Scroom::Utils::Rectangle<double> anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::getRect ( )
inlineoverridevirtual

Return the dimensions of your presentation

Implements PresentationInterface.

72 { return rect; }

◆ getTitle()

std::string anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::getTitle ( )
inlineoverridevirtual

Return the title of the presentation

Implements PresentationInterface.

82 { return ""; }

◆ isPropertyDefined()

bool anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::isPropertyDefined ( const std::string &  name)
inlineoverridevirtual

Return true if the named property exists

Implements PresentationInterface.

81 { return false; }

◆ open()

void anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::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.

84 {}

◆ redraw()

void anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::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.

78  {
79  }

Member Data Documentation

◆ rect

Scroom::Utils::Rectangle<double> anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::rect
private

The documentation for this class was generated from the following file:
anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::rect
Scroom::Utils::Rectangle< double > rect
Definition: determine-size-test.cc:61
anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::PresentationInterfaceStub
PresentationInterfaceStub(Scroom::Utils::Rectangle< double > const &rect_)
Definition: determine-size-test.cc:64
anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::Ptr
boost::shared_ptr< PresentationInterfaceStub > Ptr
Definition: determine-size-test.cc:58