Scroom  0.14
ViewInterface Class Referenceabstract

#include <viewinterface.hh>

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

Public Types

using Ptr = boost::shared_ptr< ViewInterface >
 
using WeakPtr = boost::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 boost::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 (const Interface &&)=delete
 
Interfaceoperator= (const 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 = boost::shared_ptr<ViewInterface>

◆ WeakPtr

using ViewInterface::WeakPtr = boost::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 anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, ViewInterfaceStub, View, Detail::ViewData, and ChildView.

◆ 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 ChildView, Detail::ViewData, View, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, and ViewInterfaceStub.

◆ 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 View, Detail::ViewData, ChildView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, and ViewInterfaceStub.

◆ getCurrentPresentation()

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

Returns a shared pointer to the current presentation.

See also
PresentationInterface

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

◆ 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, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, Detail::ViewData, ViewInterfaceStub, and ChildView.

◆ 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, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, Detail::ViewData, ViewInterfaceStub, and ChildView.

◆ 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 anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, ViewInterfaceStub, View, ChildView, and Detail::ViewData.

◆ 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 anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, ViewInterfaceStub, Detail::ViewData, View, and ChildView.

◆ 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 View, Detail::ViewData, ChildView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, and ViewInterfaceStub.

◆ 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 View, Detail::ViewData, ChildView, anonymous_namespace{determine-size-test.cc}::ViewInterfaceDummy, DummyView, and ViewInterfaceStub.

◆ setStatusMessage()

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

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

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


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