lib Library API Documentation

KoViewChild Class Reference

This class aggregates information about an embedded document. More...

#include <koView.h>

Inheritance diagram for KoViewChild:

Inheritance graph
[legend]
Collaboration diagram for KoViewChild:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KoViewChild (KoDocumentChild *child, KoView *_parentView)
KoDocumentChilddocumentChild () const
KoViewparentView () const
KoFrame * frame () const

Detailed Description

This class aggregates information about an embedded document.

Definition at line 428 of file koView.h.


Constructor & Destructor Documentation

KoViewChild::KoViewChild KoDocumentChild child,
KoView _parentView
 

KoViewChild has basically three geometries to keep in sync.

  • The KoDocumentChild geometry (i.e. the embedded object's geometry, unzoomed)
  • Its own geometry (used for hit-test etc.)
  • The KoFrame geometry (the graphical widget for moving the object when active)

So we need to subtract the scrollview's offset for the frame geometry, since it's a widget.

The rules are (R1) frameGeometry = childGeometry * zoom "+" m_frame->{left|right|top|bottom}Border() - scrollview offset, (R2) frameGeometry = myGeometry "+" active_frame_border - scrollview offset.

So: (R3, unused) myGeometry = childGeometry * zoom "+" m_frame->{left|right|top|bottom}Border() "-" active_frame_border

Notes: active_frame_border is m_frame->border() (0 when inactive, 5 when active). {left|right|top|bottom}Border are the borders used in kspread (0 when inactive, big when active). "+" border means we add a border, si it's a subtraction on x, y and an addition on width, height.

Definition at line 654 of file koView.cc.

References KoView::canvasAddChild(), KoView::canvasXOffset(), KoView::canvasYOffset(), KoDocument::createView(), KoDocumentChild::document(), KoChild::geometry(), KoView::setPartManager(), KoView::setZoom(), KoDocument::viewBuildDocument(), KoChild::xScaling(), KoChild::yScaling(), and KoView::zoom().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Mar 20 14:27:01 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003