Scroom  0.14
ChildView Class Reference

#include <transparentoverlayviewinfo.hh>

Inheritance diagram for ChildView:
Inheritance graph
Collaboration diagram for ChildView:
Collaboration graph

Public Types

using Ptr = boost::shared_ptr< ChildView >
 
- Public Types inherited from ViewInterface
using Ptr = boost::shared_ptr< ViewInterface >
 
using WeakPtr = boost::weak_ptr< ViewInterface >
 

Public Member Functions

void invalidate () override
 
ProgressInterface::Ptr getProgressInterface () override
 
void addSideWidget (std::string title, GtkWidget *w) override
 
void removeSideWidget (GtkWidget *w) override
 
void addToToolbar (GtkToolItem *ti) override
 
void removeFromToolbar (GtkToolItem *ti) override
 
void registerSelectionListener (SelectionListener::Ptr listener) override
 
void registerPostRenderer (PostRenderer::Ptr renderer) override
 
void setStatusMessage (const std::string &message) override
 
PresentationInterface::Ptr getCurrentPresentation () override
 
void addToolButton (GtkToggleButton *name, ToolStateListener::Ptr callback) override
 
- 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 >
boost::shared_ptr< R > shared_from_this ()
 
template<typename R >
boost::shared_ptr< R const > shared_from_this () const
 

Static Public Member Functions

static Ptr create (boost::shared_ptr< TransparentOverlayViewInfo > const &parent)
 

Private Member Functions

 ChildView (boost::shared_ptr< TransparentOverlayViewInfo > parent)
 

Private Attributes

boost::shared_ptr< TransparentOverlayViewInfoparent
 
ProgressInterface::Ptr progressInterface
 

Member Typedef Documentation

◆ Ptr

using ChildView::Ptr = boost::shared_ptr<ChildView>

Constructor & Destructor Documentation

◆ ChildView()

ChildView::ChildView ( boost::shared_ptr< TransparentOverlayViewInfo parent)
explicitprivate
65  : parent(std::move(parent_))
66  , progressInterface(parent->getProgressInterface())
67 {
68 }

Referenced by create().

Here is the caller graph for this function:

Member Function Documentation

◆ addSideWidget()

void ChildView::addSideWidget ( std::string  title,
GtkWidget *  w 
)
overridevirtual

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.

76 {}

◆ addToolButton()

void ChildView::addToolButton ( GtkToggleButton *  ,
ToolStateListener::Ptr   
)
overridevirtual

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.

92 {}

◆ addToToolbar()

void ChildView::addToToolbar ( GtkToolItem *  ti)
overridevirtual

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.

80 {}

◆ create()

ChildView::Ptr ChildView::create ( boost::shared_ptr< TransparentOverlayViewInfo > const &  parent)
static
70 { return Ptr(new ChildView(parent)); }

Referenced by TransparentOverlayViewInfo::addChild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentPresentation()

PresentationInterface::Ptr ChildView::getCurrentPresentation ( )
overridevirtual

Returns a shared pointer to the current presentation.

See also
PresentationInterface

Implements ViewInterface.

90 { return parent->getChild(shared_from_this<ChildView>()); }

◆ getProgressInterface()

ProgressInterface::Ptr ChildView::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.

74 { return progressInterface; }

◆ invalidate()

void ChildView::invalidate ( )
overridevirtual

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.

72 { parent->invalidate(); }

◆ registerPostRenderer()

void ChildView::registerPostRenderer ( PostRenderer::Ptr  )
overridevirtual

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.

86 {}

◆ registerSelectionListener()

void ChildView::registerSelectionListener ( SelectionListener::Ptr  )
overridevirtual

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.

84 {}

◆ removeFromToolbar()

void ChildView::removeFromToolbar ( GtkToolItem *  ti)
overridevirtual

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.

82 {}

◆ removeSideWidget()

void ChildView::removeSideWidget ( GtkWidget *  w)
overridevirtual

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.

78 {}

◆ setStatusMessage()

void ChildView::setStatusMessage ( const std::string &  )
overridevirtual

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

Implements ViewInterface.

88 {}

Member Data Documentation

◆ parent

boost::shared_ptr<TransparentOverlayViewInfo> ChildView::parent
private

◆ progressInterface

ProgressInterface::Ptr ChildView::progressInterface
private

Referenced by getProgressInterface().


The documentation for this class was generated from the following files:
ChildView::ChildView
ChildView(boost::shared_ptr< TransparentOverlayViewInfo > parent)
Definition: transparentoverlayviewinfo.cc:64
ChildView::progressInterface
ProgressInterface::Ptr progressInterface
Definition: transparentoverlayviewinfo.hh:38
ChildView::parent
boost::shared_ptr< TransparentOverlayViewInfo > parent
Definition: transparentoverlayviewinfo.hh:37
ChildView::Ptr
boost::shared_ptr< ChildView > Ptr
Definition: transparentoverlayviewinfo.hh:34