Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
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 = std::shared_ptr< PresentationInterfaceStub >
 
- 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 Member Functions

Scroom::Utils::Context::ConstPtr getContext () const override
 
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 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 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
 
Scroom::Utils::Context::ConstPtr context
 

Member Typedef Documentation

◆ Ptr

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

Constructor & Destructor Documentation

◆ PresentationInterfaceStub()

anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::PresentationInterfaceStub ( Scroom::Utils::Rectangle< double > const &  rect_)
inlineexplicitprotected
68 : rect(rect_)
70 {
71 }
static Ptr create()
Definition context.cc:15
Scroom::Utils::Rectangle< double > rect
Definition determine-size-test.cc:63
Scroom::Utils::Context::ConstPtr context
Definition determine-size-test.cc:64

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.

94{}

◆ create()

static Ptr anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::create ( Scroom::Utils::Rectangle< double > const &  rect)
inlinestatic
77{ return Ptr(new PresentationInterfaceStub(rect)); }
std::shared_ptr< PresentationInterfaceStub > Ptr
Definition determine-size-test.cc:60
PresentationInterfaceStub(Scroom::Utils::Rectangle< double > const &rect_)
Definition determine-size-test.cc:67

◆ getContext()

Scroom::Utils::Context::ConstPtr anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::getContext ( ) const
inlineoverridevirtual

Implements PresentationInterface.

74{ return context; }

◆ 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.

89{ return false; }

◆ getRect()

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

Return the dimensions of your presentation

Implements PresentationInterface.

79{ return rect; }

◆ getTitle()

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

Return the title of the presentation

Implements PresentationInterface.

91{ 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.

90{ 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.

93{}

◆ 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.

87 {
88 }

Member Data Documentation

◆ context

Scroom::Utils::Context::ConstPtr anonymous_namespace{determine-size-test.cc}::PresentationInterfaceStub::context
private

◆ 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: