ICF 3.1.1.10
Technical documentation of ICF Libraries
iview::CViewBase Class Referenceabstract

#include <CViewBase.h>

Inheritance diagram for iview::CViewBase:
Collaboration diagram for iview::CViewBase:

Public Types

enum  ZoomMode {
  ZM_RESET , ZM_ZOOM_IN , ZM_ZOOM_OUT , ZM_FIT ,
  ZM_FIT_COVER , ZM_FIT_UNPROP , ZM_FIT_H , ZM_FIT_V
}
 
- Public Types inherited from iview::IShapeView
typedef IShapeObserver BaseClass
 
- Public Types inherited from iview::IDisplay
enum  ChangeFlags {
  CF_TRANSFORM = 0x3f67360 , CF_COLORS , CF_SIZE , CF_EDIT_MODE ,
  CS_CONSOLE
}
 Define possible display change flags. More...
 
- Public Types inherited from iview::ISelectable
enum  MousePointerMode {
  MPM_NONE , MPM_DEFAULT , MPM_DESELECT , MPM_POINTER ,
  MPM_WAIT , MPM_CROSS , MPM_HAND , MPM_DRAG ,
  MPM_SCREEN_MOVE , MPM_LAST = MPM_SCREEN_MOVE
}
 Defines possible states of mouse pointer. More...
 
enum  EditMode { EM_NONE = 0 , EM_MOVE = 1 , EM_ADD = 2 , EM_REMOVE = 3 }
 Describes standard edit modes. More...
 
typedef QSet< IInteractiveShape * > SelectedShapes
 
- Public Types inherited from iview::ITouchable
enum  TouchState {
  TS_NONE , TS_TRANSPARENT , TS_INACTIVE , TS_TICKER ,
  TS_DRAGGABLE , TS_OTHER , TS_LAST = TS_OTHER
}
 Enumeration for possible shape touch states. More...
 

Public Member Functions

 CViewBase ()
 
virtual ~CViewBase ()
 
virtual void SetZoom (ZoomMode zoom)
 Set zoom.
 
virtual void SetEditMode (int mode)
 Set edit mode.
 
virtual void UpdateAllShapes (const istd::IChangeable::ChangeSet &changeSet)
 Inform all shapes about changes.
 
virtual void SetScreenPosition (const i2d::CVector2d &client, istd::CIndex2d screen)
 It sets position to become transformation of client point to specified screen position.
 
virtual const i2d::CRectangleGetFitArea () const
 Get area will be used to automatic fit the zoom to view size.
 
virtual void SetFitArea (const i2d::CRectangle &area)
 Set area will be used to fit in some zoom modes.
 
virtual void SetViewDraggable (bool state=true)
 Turn on/off possibility to move whole view transform.
 
virtual void SetMultiselectable (bool state=true)
 Turn on/off possibility to select more shapes using control keys.
 
virtual void SetDraggable (bool state=true)
 Turn on/off possibility to move more selected shapes, when one is moved.
 
virtual void AddViewEventObserver (iview::IViewEventObserver *listenerPtr)
 Adds handler to catch view events.
 
virtual void RemoveViewEventObserver (iview::IViewEventObserver *listenerPtr)
 Removes handler to catch view events.
 
virtual void InsertDefaultLayers ()
 Insert default layers, when there is no one user layer.
 
int GetBackgroundLayerIndex () const
 Get index of default background layer.
 
int GetInactiveLayerIndex () const
 Get index of default inactive layer.
 
int GetActiveLayerIndex () const
 Get index of default active layer.
 
IInteractiveShapeGetMouseShapePtr () const
 Get shape under mouse pointer.
 
IInteractiveShapeGetFirstActiveShape () const
 
virtual void Update ()
 Updates all invalidates shapes.
 
virtual bool IsViewDraggable () const
 Check if is draggable mode.
 
virtual bool IsMultiselectable () const
 Check, if it is possible to select more than one shape.
 
virtual int InsertLayer (IViewLayer *layerPtr, int index=-1, int layerType=IViewLayer::LT_NONE)
 Insert layer to view.
 
virtual int GetLayerIndex (const IViewLayer &layer) const
 Get index of layer.
 
virtual int GetLayerIndex (int layerType) const
 Get index of layer by type.
 
virtual void RemoveLayer (int index)
 Remove layer from view.
 
virtual int GetLayersCount () const
 Get count of layer in this view.
 
virtual IViewLayerGetLayer (int index) const
 Get layer with the given index.
 
virtual bool ConnectShape (IShape *shapePtr)
 Connect shape object to view.
 
virtual ISelectableLayerGetFocusedLayerPtr () const
 Get focused layer.
 
virtual void OnLayerShapeFocused (IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)
 Called when shape in layer get focus.
 
virtual void OnLayerShapeDefocused (IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)
 Called when shape in layer loose focus.
 
virtual void OnLayerInvalidated (const IViewLayer &layer, const i2d::CRect &prevArea, const i2d::CRect &newArea)
 Inform that layer was invalidated.
 
virtual int GetSelectedShapesCount () const
 Get count of selected shapes.
 
virtual void InsertSelectedShapes (SelectedShapes &result) const
 Get set of selected shapes.
 
virtual void DeselectAllShapes ()
 Set all shapes to be deselected.
 
virtual int GetKeysState () const
 Get state of system keys.
 
virtual int GetEditMode () const
 Get actual edit mode.
 
virtual void OnShapeFocused (IInteractiveShape *)
 Called when shape get focus.
 
virtual void OnShapeDefocused (IInteractiveShape *)
 Called when shape loose focus.
 
virtual TouchState IsTouched (istd::CIndex2d position) const
 Check, if any shape is touched.
 
virtual QString GetShapeDescriptionAt (istd::CIndex2d position) const
 Get description to shape at specified position.
 
virtual void SetTransform (const i2d::CAffine2d &transform)
 Set a screen transformation.
 
virtual void UpdateMousePointer ()
 Update mouse pointer.
 
virtual bool OnMouseButton (istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
 It is called, when mouse button is pushed down or up on this object.
 
virtual bool OnMouseMove (istd::CIndex2d position)
 It is called, when mouse is moved.
 
virtual IDisplayGetParentDisplayPtr () const
 Get parent object of this display.
 
virtual const iview::CScreenTransformGetTransform () const
 Return a screen transformation.
 
virtual i2d::CRect GetBoundingBox () const
 Get bounding box of all object in this display.
 
virtual const IColorSchemaGetColorSchema () const
 Get color schema.
 
virtual void OnAreaInvalidated (const i2d::CRect &prevArea, const i2d::CRect &newArea)
 Invalidate display area.
 
virtual void OnChangeShape (IShape *shapePtr)
 Invalidate a shape.
 
virtual bool DisconnectShape (IShape *shapePtr)
 Disconnect shape object from view.
 
virtual void OnShapeSelected (IInteractiveShape &shape, bool state=true)
 It is called after change shape selection state.
 
virtual bool IsDraggable () const
 Check if drag is enabled.
 
virtual void BeginDrag (const istd::CIndex2d &reference)
 Called before dragging is begin.
 
virtual void SetDragPosition (const istd::CIndex2d &position)
 Set new drag position.
 
virtual void EndDrag ()
 Called after dragging.
 
virtual const IColorSchemaGetDefaultColorSchema () const =0
 
- Public Member Functions inherited from iview::IShapeView
- Public Member Functions inherited from iview::IDisplay
virtual i2d::CRect GetClientRect () const =0
 Get bounding box of client area.
 
- Public Member Functions inherited from iview::IShapeObserver
- Public Member Functions inherited from iview::ISelectable
- Public Member Functions inherited from iview::ITouchable
- Public Member Functions inherited from iview::IDraggable

Protected Types

typedef QVector< IViewLayer * > Layers
 

Protected Member Functions

virtual void DrawLayers (QPainter &drawContext, int firstLayer, int lastLayer)
 Draw Background layer.
 
int GetLastBackgroundLayerIndex ()
 Get last background layer index.
 
void SetLastBackgroundLayerIndex (int index)
 
virtual bool CanBeMoved () const
 This method is internal used to check, if drag mode is allowed.
 
void DisconnectAllShapes ()
 Disconnect all shapes from this view.
 
virtual void InvalidateBackground ()
 Invalidate whole background buffer.
 
virtual void InvalidateBoundingBox ()
 Invalidate bounding box.
 
bool EnsureBoundingBoxValid ()
 Calculate bounding box if it was invalid.
 
virtual i2d::CRect CalcBoundingBox () const
 Calculate bounding box of all shapes.
 
virtual void OnBoundingBoxChanged ()
 Called when bounding box has been changed.
 
virtual MousePointerMode CalcMousePointer (istd::CIndex2d position) const
 
virtual void InvalidateMouseShape ()
 Invalidate stored shape under mouse pointer.
 
virtual void CalcMouseShape () const
 Calc shape under mouse pointer.
 
virtual bool IsBackgroundBufferValid () const
 Check if background buffer is valid.
 
virtual void SetBackgroundBufferValid (bool state=true)
 Set validate flag of background buffer.
 
virtual int CalcShapeLayerIndex (const IShape &shape) const
 Calculate optimal layer index for some shape.
 
const i2d::CRectGetInvalidatedBox () const
 Get bounding box of all invalidated rectangles.
 
void InvalidateBox (const i2d::CRect &rect)
 Invalidate rectangle screen area.
 
void ResetInvalidatedBox ()
 Reset invalidated box.
 
void SetKeysState (int state)
 Set state of keys.
 
const LayersGetLayers () const
 
LayersGetLayers ()
 
virtual void SetMousePointer (MousePointerMode mode)=0
 Set mouse pointer.
 
virtual void UpdateRectArea (const i2d::CRect &rect)=0
 Start updating specified rectangle area.
 
- Protected Member Functions inherited from iview::IMouseActionObserver

Detailed Description

Definition at line 32 of file CViewBase.h.

Member Typedef Documentation

◆ Layers

QVector<IViewLayer*> iview::CViewBase::Layers
protected

Definition at line 196 of file CViewBase.h.

Member Enumeration Documentation

◆ ZoomMode

Enumerator
ZM_RESET 
ZM_ZOOM_IN 
ZM_ZOOM_OUT 
ZM_FIT 
ZM_FIT_COVER 
ZM_FIT_UNPROP 
ZM_FIT_H 
ZM_FIT_V 

Definition at line 38 of file CViewBase.h.

Constructor & Destructor Documentation

◆ CViewBase()

iview::CViewBase::CViewBase ( )

◆ ~CViewBase()

virtual iview::CViewBase::~CViewBase ( )
virtual

Member Function Documentation

◆ AddViewEventObserver()

virtual void iview::CViewBase::AddViewEventObserver ( iview::IViewEventObserver * listenerPtr)
virtual

Adds handler to catch view events.

◆ BeginDrag()

virtual void iview::CViewBase::BeginDrag ( const istd::CIndex2d & reference)
virtual

Called before dragging is begin.

It set also reference value for dragging position.

Implements iview::IDraggable.

◆ CalcBoundingBox()

virtual i2d::CRect iview::CViewBase::CalcBoundingBox ( ) const
protectedvirtual

Calculate bounding box of all shapes.

It doesn't update current bounding box.

◆ CalcMousePointer()

virtual MousePointerMode iview::CViewBase::CalcMousePointer ( istd::CIndex2d position) const
protectedvirtual

◆ CalcMouseShape()

virtual void iview::CViewBase::CalcMouseShape ( ) const
protectedvirtual

Calc shape under mouse pointer.

Referenced by GetMouseShapePtr().

◆ CalcShapeLayerIndex()

virtual int iview::CViewBase::CalcShapeLayerIndex ( const IShape & shape) const
protectedvirtual

Calculate optimal layer index for some shape.

Returns
layer index or negative value, if is not calculable.

Reimplemented in iview::CCalibratedViewBase.

◆ CanBeMoved()

virtual bool iview::CViewBase::CanBeMoved ( ) const
protectedvirtual

This method is internal used to check, if drag mode is allowed.

Normally it return IsViewDraggable(), but in derived class you can change its implementation to avoid dragging.

Reimplemented in iview::CViewport.

◆ ConnectShape()

virtual bool iview::CViewBase::ConnectShape ( IShape * shapePtr)
virtual

Connect shape object to view.

Parameters
shapePtrpointer shape object, will be not owned by this view.
Returns
true, if it was possible to connect this shape.

Implements iview::IShapeView.

◆ DeselectAllShapes()

virtual void iview::CViewBase::DeselectAllShapes ( )
virtual

Set all shapes to be deselected.

Implements iview::ISelectable.

◆ DisconnectAllShapes()

void iview::CViewBase::DisconnectAllShapes ( )
protected

Disconnect all shapes from this view.

◆ DisconnectShape()

virtual bool iview::CViewBase::DisconnectShape ( IShape * shapePtr)
virtual

Disconnect shape object from view.

This shape had to be connected using ConnectShape.

Returns
true, if it was possible to disconnect this shape.

Implements iview::IShapeObserver.

◆ DrawLayers()

virtual void iview::CViewBase::DrawLayers ( QPainter & drawContext,
int firstLayer,
int lastLayer )
protectedvirtual

Draw Background layer.

Standard implementation draws background shape, but it is also possible to use this method to display additional visual elements like a grid or rulers.

◆ EndDrag()

virtual void iview::CViewBase::EndDrag ( )
virtual

Called after dragging.

Implements iview::IDraggable.

◆ EnsureBoundingBoxValid()

bool iview::CViewBase::EnsureBoundingBoxValid ( )
protected

Calculate bounding box if it was invalid.

Returns
true, if the new bounding box was calculated.

Referenced by GetBoundingBox().

◆ GetActiveLayerIndex()

int iview::CViewBase::GetActiveLayerIndex ( ) const
inline

Get index of default active layer.

Definition at line 517 of file CViewBase.h.

◆ GetBackgroundLayerIndex()

int iview::CViewBase::GetBackgroundLayerIndex ( ) const
inline

Get index of default background layer.

Definition at line 505 of file CViewBase.h.

◆ GetBoundingBox()

i2d::CRect iview::CViewBase::GetBoundingBox ( ) const
inlinevirtual

Get bounding box of all object in this display.

Implements iview::IDisplay.

Definition at line 461 of file CViewBase.h.

References EnsureBoundingBoxValid().

◆ GetColorSchema()

const IColorSchema & iview::CViewBase::GetColorSchema ( ) const
inlinevirtual

Get color schema.

Implements iview::IDisplay.

Definition at line 469 of file CViewBase.h.

References GetDefaultColorSchema().

◆ GetDefaultColorSchema()

virtual const IColorSchema & iview::CViewBase::GetDefaultColorSchema ( ) const
pure virtual

Implemented in iview::CCalibratedViewBase.

Referenced by GetColorSchema().

◆ GetEditMode()

virtual int iview::CViewBase::GetEditMode ( ) const
virtual

Get actual edit mode.

Implements iview::ISelectable.

◆ GetFirstActiveShape()

IInteractiveShape * iview::CViewBase::GetFirstActiveShape ( ) const

◆ GetFitArea()

const i2d::CRectangle & iview::CViewBase::GetFitArea ( ) const
inlinevirtual

Get area will be used to automatic fit the zoom to view size.

See also
SetZoom(ZoomMode)

Definition at line 370 of file CViewBase.h.

◆ GetFocusedLayerPtr()

virtual ISelectableLayer * iview::CViewBase::GetFocusedLayerPtr ( ) const
virtual

Get focused layer.

Implements iview::IShapeView.

◆ GetInactiveLayerIndex()

int iview::CViewBase::GetInactiveLayerIndex ( ) const
inline

Get index of default inactive layer.

Definition at line 511 of file CViewBase.h.

◆ GetInvalidatedBox()

const i2d::CRect & iview::CViewBase::GetInvalidatedBox ( ) const
inlineprotected

Get bounding box of all invalidated rectangles.

Definition at line 540 of file CViewBase.h.

◆ GetKeysState()

int iview::CViewBase::GetKeysState ( ) const
inlinevirtual

Get state of system keys.

Implements iview::ISelectable.

Definition at line 477 of file CViewBase.h.

◆ GetLastBackgroundLayerIndex()

int iview::CViewBase::GetLastBackgroundLayerIndex ( )
inlineprotected

Get last background layer index.

Definition at line 493 of file CViewBase.h.

◆ GetLayer()

IViewLayer & iview::CViewBase::GetLayer ( int index) const
inlinevirtual

Get layer with the given index.

Implements iview::IShapeView.

Definition at line 431 of file CViewBase.h.

References GetLayersCount(), and InsertDefaultLayers().

◆ GetLayerIndex() [1/2]

virtual int iview::CViewBase::GetLayerIndex ( const IViewLayer & layer) const
virtual

Get index of layer.

Returns
layer index, or -1 if not found.

Implements iview::IShapeView.

◆ GetLayerIndex() [2/2]

virtual int iview::CViewBase::GetLayerIndex ( int layerType) const
virtual

Get index of layer by type.

Returns
layer index, or -1 if not found.

Implements iview::IShapeView.

◆ GetLayers() [1/2]

CViewBase::Layers & iview::CViewBase::GetLayers ( )
inlineprotected

Definition at line 570 of file CViewBase.h.

◆ GetLayers() [2/2]

const CViewBase::Layers & iview::CViewBase::GetLayers ( ) const
inlineprotected

Definition at line 564 of file CViewBase.h.

◆ GetLayersCount()

int iview::CViewBase::GetLayersCount ( ) const
inlinevirtual

Get count of layer in this view.

Implements iview::IShapeView.

Definition at line 425 of file CViewBase.h.

Referenced by GetLayer().

◆ GetMouseShapePtr()

IInteractiveShape * iview::CViewBase::GetMouseShapePtr ( ) const
inline

Get shape under mouse pointer.

Returns
shape under mouse pointer, or nullptr if there is no shape.

Definition at line 400 of file CViewBase.h.

References CalcMouseShape().

◆ GetParentDisplayPtr()

IDisplay * iview::CViewBase::GetParentDisplayPtr ( ) const
inlinevirtual

Get parent object of this display.

If this display is root, it returns nullptr.

Implements iview::IDisplay.

Definition at line 449 of file CViewBase.h.

◆ GetSelectedShapesCount()

virtual int iview::CViewBase::GetSelectedShapesCount ( ) const
virtual

Get count of selected shapes.

Implements iview::ISelectable.

◆ GetShapeDescriptionAt()

virtual QString iview::CViewBase::GetShapeDescriptionAt ( istd::CIndex2d position) const
virtual

Get description to shape at specified position.

Implements iview::ITouchable.

◆ GetTransform()

const iview::CScreenTransform & iview::CViewBase::GetTransform ( ) const
inlinevirtual

Return a screen transformation.

This transformation converts view units to screen units.

Implements iview::IDisplay.

Definition at line 455 of file CViewBase.h.

◆ InsertDefaultLayers()

virtual void iview::CViewBase::InsertDefaultLayers ( )
virtual

Insert default layers, when there is no one user layer.

Reimplemented in iview::CCalibratedViewBase.

Referenced by GetLayer().

◆ InsertLayer()

virtual int iview::CViewBase::InsertLayer ( IViewLayer * layerPtr,
int index = -1,
int layerType = IViewLayer::LT_NONE )
virtual

Insert layer to view.

Parameters
layerPtrpointer to inserted layer.
indexindex of inserted layer. If equals -1, layer will be inserted after last existing layer.
layerTypeused to set standard layers.
See also
iview::IShapeView::LayerType
Returns
index of this layer.

Implements iview::IShapeView.

Reimplemented in iview::CCalibratedViewBase.

◆ InsertSelectedShapes()

virtual void iview::CViewBase::InsertSelectedShapes ( SelectedShapes & result) const
virtual

Get set of selected shapes.

Implements iview::ISelectable.

◆ InvalidateBackground()

virtual void iview::CViewBase::InvalidateBackground ( )
protectedvirtual

Invalidate whole background buffer.

By next call Update() background buffer will be full repainted.

Reimplemented in iview::CCalibratedViewBase.

◆ InvalidateBoundingBox()

virtual void iview::CViewBase::InvalidateBoundingBox ( )
protectedvirtual

Invalidate bounding box.

◆ InvalidateBox()

void iview::CViewBase::InvalidateBox ( const i2d::CRect & rect)
inlineprotected

Invalidate rectangle screen area.

It added this area to other invalidated areas.

Definition at line 546 of file CViewBase.h.

References i2d::CRect::Union().

◆ InvalidateMouseShape()

virtual void iview::CViewBase::InvalidateMouseShape ( )
protectedvirtual

Invalidate stored shape under mouse pointer.

◆ IsBackgroundBufferValid()

bool iview::CViewBase::IsBackgroundBufferValid ( ) const
inlineprotectedvirtual

Check if background buffer is valid.

Definition at line 523 of file CViewBase.h.

◆ IsDraggable()

bool iview::CViewBase::IsDraggable ( ) const
inlinevirtual

Check if drag is enabled.

Implements iview::IDraggable.

Definition at line 485 of file CViewBase.h.

◆ IsMultiselectable()

bool iview::CViewBase::IsMultiselectable ( ) const
inlinevirtual

Check, if it is possible to select more than one shape.

Implements iview::IShapeView.

Definition at line 419 of file CViewBase.h.

◆ IsTouched()

virtual TouchState iview::CViewBase::IsTouched ( istd::CIndex2d position) const
virtual

Check, if any shape is touched.

When shape is touched, it return also pointer to this shape.

Returns
touch state for the shape, or iview::IInteractiveShape::TS_NONE, when nothing found.

Implements iview::ITouchable.

◆ IsViewDraggable()

bool iview::CViewBase::IsViewDraggable ( ) const
inlinevirtual

Check if is draggable mode.

If this function return true, user can move a view by dragging.

Implements iview::IShapeView.

Definition at line 413 of file CViewBase.h.

◆ OnAreaInvalidated()

virtual void iview::CViewBase::OnAreaInvalidated ( const i2d::CRect & prevArea,
const i2d::CRect & newArea )
virtual

Invalidate display area.

Parameters
prevAreaprevious area used to display object.
newAreanew area used to display object.

Implements iview::IDisplay.

Reimplemented in iview::CViewport.

◆ OnBoundingBoxChanged()

virtual void iview::CViewBase::OnBoundingBoxChanged ( )
protectedvirtual

Called when bounding box has been changed.

Reimplemented in iview::CViewport.

◆ OnChangeShape()

virtual void iview::CViewBase::OnChangeShape ( IShape * shapePtr)
virtual

Invalidate a shape.

When you call Update, all invalidated shapes will be repainted.

Returns
true, if it was possible to invalidate this shape.

Implements iview::IShapeObserver.

◆ OnLayerInvalidated()

virtual void iview::CViewBase::OnLayerInvalidated ( const IViewLayer & layer,
const i2d::CRect & prevArea,
const i2d::CRect & newArea )
virtual

Inform that layer was invalidated.

Implements iview::IShapeView.

◆ OnLayerShapeDefocused()

virtual void iview::CViewBase::OnLayerShapeDefocused ( IInteractiveShape * shapePtr,
ISelectableLayer * layerPtr )
virtual

Called when shape in layer loose focus.

Implements iview::IShapeView.

◆ OnLayerShapeFocused()

virtual void iview::CViewBase::OnLayerShapeFocused ( IInteractiveShape * shapePtr,
ISelectableLayer * layerPtr )
virtual

Called when shape in layer get focus.

Implements iview::IShapeView.

◆ OnMouseButton()

virtual bool iview::CViewBase::OnMouseButton ( istd::CIndex2d position,
Qt::MouseButton buttonType,
bool downFlag )
virtual

It is called, when mouse button is pushed down or up on this object.

Parameters
positionposition of mouse pointer on client area (picture coords).
buttonTypedetermine the mouse butten type.
downFlagtrue, if mouse button is pushed down, false if pushed up.
Returns
true if this shape should get focus to catch all mouse movements.

Implements iview::IMouseActionObserver.

◆ OnMouseMove()

virtual bool iview::CViewBase::OnMouseMove ( istd::CIndex2d position)
virtual

It is called, when mouse is moved.

Only objects with focus receive this event.

Parameters
position- position of mouse pointer on client area (picture coords).
Returns
true if this shape should hold focus to catch longer all mouse movements.

Implements iview::IMouseActionObserver.

Reimplemented in iview::CViewport.

◆ OnShapeDefocused()

virtual void iview::CViewBase::OnShapeDefocused ( IInteractiveShape * shapePtr)
inlinevirtual

Called when shape loose focus.

Implements iview::ISelectable.

Definition at line 160 of file CViewBase.h.

◆ OnShapeFocused()

virtual void iview::CViewBase::OnShapeFocused ( IInteractiveShape * shapePtr)
inlinevirtual

Called when shape get focus.

Implements iview::ISelectable.

Definition at line 159 of file CViewBase.h.

◆ OnShapeSelected()

virtual void iview::CViewBase::OnShapeSelected ( IInteractiveShape & shape,
bool state = true )
virtual

It is called after change shape selection state.

Implements iview::ISelectable.

◆ RemoveLayer()

virtual void iview::CViewBase::RemoveLayer ( int index)
virtual

Remove layer from view.

Implements iview::IShapeView.

Reimplemented in iview::CCalibratedViewBase.

◆ RemoveViewEventObserver()

virtual void iview::CViewBase::RemoveViewEventObserver ( iview::IViewEventObserver * listenerPtr)
virtual

Removes handler to catch view events.

◆ ResetInvalidatedBox()

void iview::CViewBase::ResetInvalidatedBox ( )
inlineprotected

Reset invalidated box.

Definition at line 552 of file CViewBase.h.

References i2d::CRect::Reset().

◆ SetBackgroundBufferValid()

void iview::CViewBase::SetBackgroundBufferValid ( bool state = true)
inlineprotectedvirtual

Set validate flag of background buffer.

Reimplemented in iview::CViewport.

Definition at line 529 of file CViewBase.h.

References iview::IDisplay::GetClientRect().

Referenced by iview::CCalibratedViewBase::SetGridInMm(), and iview::CCalibratedViewBase::SetMinGridDistance().

◆ SetDraggable()

void iview::CViewBase::SetDraggable ( bool state = true)
inlinevirtual

Turn on/off possibility to move more selected shapes, when one is moved.

Definition at line 394 of file CViewBase.h.

◆ SetDragPosition()

virtual void iview::CViewBase::SetDragPosition ( const istd::CIndex2d & position)
virtual

Set new drag position.

It must be enclosed using BeginDrag() and EndDrag() methods.

Implements iview::IDraggable.

◆ SetEditMode()

virtual void iview::CViewBase::SetEditMode ( int mode)
virtual

Set edit mode.

Implements iview::IShapeView.

Reimplemented in iview::CViewport.

◆ SetFitArea()

void iview::CViewBase::SetFitArea ( const i2d::CRectangle & area)
inlinevirtual

Set area will be used to fit in some zoom modes.

See also
SetZoom(ZoomMode)

Implements iview::IShapeView.

Reimplemented in iview::CViewport.

Definition at line 376 of file CViewBase.h.

◆ SetKeysState()

void iview::CViewBase::SetKeysState ( int state)
inlineprotected

Set state of keys.

Definition at line 558 of file CViewBase.h.

◆ SetLastBackgroundLayerIndex()

void iview::CViewBase::SetLastBackgroundLayerIndex ( int index)
inlineprotected

Definition at line 499 of file CViewBase.h.

◆ SetMousePointer()

virtual void iview::CViewBase::SetMousePointer ( MousePointerMode mode)
protectedpure virtual

Set mouse pointer.

You have to implement it in your iview::CViewBase implementations.

Implemented in iview::CViewport.

◆ SetMultiselectable()

void iview::CViewBase::SetMultiselectable ( bool state = true)
inlinevirtual

Turn on/off possibility to select more shapes using control keys.

Definition at line 388 of file CViewBase.h.

◆ SetScreenPosition()

virtual void iview::CViewBase::SetScreenPosition ( const i2d::CVector2d & client,
istd::CIndex2d screen )
virtual

It sets position to become transformation of client point to specified screen position.

◆ SetTransform()

virtual void iview::CViewBase::SetTransform ( const i2d::CAffine2d & transform)
virtual

Set a screen transformation.

See also
GetTransform()

Implements iview::IShapeView.

◆ SetViewDraggable()

void iview::CViewBase::SetViewDraggable ( bool state = true)
inlinevirtual

Turn on/off possibility to move whole view transform.

Definition at line 382 of file CViewBase.h.

◆ SetZoom()

virtual void iview::CViewBase::SetZoom ( ZoomMode zoom)
virtual

Set zoom.

◆ Update()

virtual void iview::CViewBase::Update ( )
virtual

Updates all invalidates shapes.

Implements iview::IShapeView.

◆ UpdateAllShapes()

virtual void iview::CViewBase::UpdateAllShapes ( const istd::IChangeable::ChangeSet & changeSet)
virtual

Inform all shapes about changes.

Reimplemented in iview::CCalibratedViewBase.

◆ UpdateMousePointer()

virtual void iview::CViewBase::UpdateMousePointer ( )
virtual

Update mouse pointer.

Implements iview::IShapeView.

◆ UpdateRectArea()

virtual void iview::CViewBase::UpdateRectArea ( const i2d::CRect & rect)
protectedpure virtual

Start updating specified rectangle area.

Implemented in iview::CViewport.


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

© Witold Gantzke and Kirill Lepskiy