Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
ViewInterfaceStub Class Reference

#include <measure-framerate-stubs.hh>

Inheritance diagram for ViewInterfaceStub:
Inheritance graph
Collaboration diagram for ViewInterfaceStub:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< ViewInterfaceStub >
 
- Public Types inherited from ViewInterface
using Ptr = std::shared_ptr< ViewInterface >
 
using WeakPtr = std::weak_ptr< ViewInterface >
 

Public Member Functions

void invalidate () override
 
ProgressInterface::Ptr getProgressInterface () override
 
void addSideWidget (std::string, GtkWidget *) override
 
void removeSideWidget (GtkWidget *) override
 
void addToToolbar (GtkToolItem *) override
 
void removeFromToolbar (GtkToolItem *) override
 
void registerSelectionListener (SelectionListener::Ptr) override
 
void registerPostRenderer (PostRenderer::Ptr) override
 
void setStatusMessage (const std::string &) override
 
std::shared_ptr< PresentationInterfacegetCurrentPresentation () override
 
void addToolButton (GtkToggleButton *, ToolStateListener::Ptr) override
 

Static Public Member Functions

static Ptr create (ProgressInterface::Ptr pi)
 

Private Member Functions

 ViewInterfaceStub (ProgressInterface::Ptr pi)
 

Private Attributes

ProgressInterface::Ptr pi
 

Member Typedef Documentation

◆ Ptr

using ViewInterfaceStub::Ptr = std::shared_ptr<ViewInterfaceStub>

Constructor & Destructor Documentation

◆ ViewInterfaceStub()

ViewInterfaceStub::ViewInterfaceStub ( ProgressInterface::Ptr  pi)
explicitprivate
21 : pi(std::move(pi_))
22{
23}
ProgressInterface::Ptr pi
Definition measure-framerate-stubs.hh:51

Member Function Documentation

◆ addSideWidget()

void ViewInterfaceStub::addSideWidget ( std::string  title,
GtkWidget *  w 
)
inlineoverridevirtual

Request that the given widget be added to the sidebar.

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

Implements ViewInterface.

60{}

◆ addToolButton()

void ViewInterfaceStub::addToolButton ( GtkToggleButton *  ,
ToolStateListener::Ptr   
)
inlineoverridevirtual

Adds a new tool button to the toolbar. The given ToolStateListener will be informed when the tool is turned on or off. Only one tool will be active at the same time.

See also
ToolStateListener

Implements ViewInterface.

68{};

◆ addToToolbar()

void ViewInterfaceStub::addToToolbar ( GtkToolItem *  ti)
inlineoverridevirtual

Request that the given tool item be added to the toolbar.

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

Implements ViewInterface.

62{}

◆ create()

ViewInterfaceStub::Ptr ViewInterfaceStub::create ( ProgressInterface::Ptr  pi)
static
25{ return Ptr(new ViewInterfaceStub(std::move(pi))); }
Definition measure-framerate-stubs.hh:46
std::shared_ptr< ViewInterfaceStub > Ptr
Definition measure-framerate-stubs.hh:48

◆ getCurrentPresentation()

std::shared_ptr< PresentationInterface > ViewInterfaceStub::getCurrentPresentation ( )
inlineoverridevirtual

Returns a shared pointer to the current presentation.

See also
PresentationInterface

Implements ViewInterface.

67{ return {}; };

◆ getProgressInterface()

ProgressInterface::Ptr ViewInterfaceStub::getProgressInterface ( )
overridevirtual

Return a pointer to the progess interface associated with the View

Note
The progress bar should only be manipulated from within a Gdk critical section (i.e. between gdk_threads_enter() and gdk_threads_leave() calls)

Implements ViewInterface.

27{ return pi; }

◆ invalidate()

void ViewInterfaceStub::invalidate ( )
inlineoverridevirtual

Request that the window content is redrawn.

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

Implements ViewInterface.

58{}

◆ registerPostRenderer()

void ViewInterfaceStub::registerPostRenderer ( PostRenderer::Ptr  )
inlineoverridevirtual

Register a postrenderer to be updated whenever a redraw occurs. When this happens, the 'render' function gets called on the instance that is passed to the given instance.

Note that the order in which different registered instances get updated is the order in which they register to the view. This order remains constant throughout the view's lifetime.

See also
PostRenderer

Implements ViewInterface.

65{};

◆ registerSelectionListener()

void ViewInterfaceStub::registerSelectionListener ( SelectionListener::Ptr  )
inlineoverridevirtual

Register a SelectionListener to be updated whenever the user selects a region . When the user changes the selection, various functions on the given instance are called.

See also
SelectionListener

Implements ViewInterface.

64{};

◆ removeFromToolbar()

void ViewInterfaceStub::removeFromToolbar ( GtkToolItem *  ti)
inlineoverridevirtual

Request that the given tool item be removed from the toolbar.

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

Implements ViewInterface.

63{}

◆ removeSideWidget()

void ViewInterfaceStub::removeSideWidget ( GtkWidget *  w)
inlineoverridevirtual

Request that the given widget be removed from the sidebar.

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

Implements ViewInterface.

61{}

◆ setStatusMessage()

void ViewInterfaceStub::setStatusMessage ( const std::string &  )
inlineoverridevirtual

Sets the status message in the status bar of the application.

Implements ViewInterface.

66{};

Member Data Documentation

◆ pi

ProgressInterface::Ptr ViewInterfaceStub::pi
private

Referenced by create(), and getProgressInterface().


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