Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
ViewInterface Class Referenceabstract

#include <viewinterface.hh>

Inheritance diagram for ViewInterface:
Inheritance graph
Collaboration diagram for ViewInterface:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< ViewInterface >
 
using WeakPtr = std::weak_ptr< ViewInterface >
 

Public Member Functions

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

Additional Inherited Members

- Private Member Functions inherited from Interface
 Interface ()=default
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
 Interface (Interface &&)=delete
 
Interfaceoperator= (Interface &&)=delete
 
virtual ~Interface ()=default
 

Detailed Description

Interface provided to something Viewable

Internally, scroom uses a View to represent the fact that something (typically a presentation) is visible on the screen. Being a presentation, you typically want to influence whatever is being shown. This interface allows you to do so.

See also
PresentationInterface, Viewable, SelectionListener, PostRenderer, ToolStateListener

Member Typedef Documentation

◆ Ptr

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

◆ WeakPtr

using ViewInterface::WeakPtr = std::weak_ptr<ViewInterface>

Member Function Documentation

◆ addSideWidget()

virtual void ViewInterface::addSideWidget ( std::string  title,
GtkWidget *  w 
)
pure virtual

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)

Implemented in View, Detail::ViewData, ChildView, ViewInterfaceStub, DummyView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ addToolButton()

virtual void ViewInterface::addToolButton ( GtkToggleButton *  ,
ToolStateListener::Ptr   
)
pure virtual

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

Implemented in View, ViewInterfaceStub, DummyView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, Detail::ViewData, and ChildView.

◆ addToToolbar()

virtual void ViewInterface::addToToolbar ( GtkToolItem *  ti)
pure virtual

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)

Implemented in ViewInterfaceStub, DummyView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, View, Detail::ViewData, and ChildView.

◆ getCurrentPresentation()

virtual std::shared_ptr< PresentationInterface > ViewInterface::getCurrentPresentation ( )
pure virtual

Returns a shared pointer to the current presentation.

See also
PresentationInterface

Implemented in View, Detail::ViewData, ViewInterfaceStub, DummyView, ChildView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ getProgressInterface()

virtual ProgressInterface::Ptr ViewInterface::getProgressInterface ( )
pure virtual

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)

Implemented in View, Detail::ViewData, ViewInterfaceStub, DummyView, ChildView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ invalidate()

virtual void ViewInterface::invalidate ( )
pure virtual

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)

Implemented in View, Detail::ViewData, ViewInterfaceStub, DummyView, ChildView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ registerPostRenderer()

virtual void ViewInterface::registerPostRenderer ( PostRenderer::Ptr  )
pure virtual

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

Implemented in Detail::ViewData, View, ChildView, ViewInterfaceStub, DummyView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ registerSelectionListener()

virtual void ViewInterface::registerSelectionListener ( SelectionListener::Ptr  )
pure virtual

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

Implemented in View, ChildView, Detail::ViewData, ViewInterfaceStub, DummyView, and anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy.

◆ removeFromToolbar()

virtual void ViewInterface::removeFromToolbar ( GtkToolItem *  ti)
pure virtual

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)

Implemented in ViewInterfaceStub, DummyView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, View, Detail::ViewData, and ChildView.

◆ removeSideWidget()

virtual void ViewInterface::removeSideWidget ( GtkWidget *  w)
pure virtual

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)

Implemented in ViewInterfaceStub, DummyView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, View, Detail::ViewData, and ChildView.

◆ setStatusMessage()

virtual void ViewInterface::setStatusMessage ( const std::string &  )
pure virtual

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

Implemented in ViewInterfaceStub, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, View, ChildView, DummyView, and Detail::ViewData.


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