logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Viewport - scrollable view

Description

Viewport  is  a  subclass  of  MonoScene  that  allocates its component exactly as much space as it wants
       (determined from its shape).  This space will  be  clipped  to  the  viewport's  size  and  the  viewport
       maintains  a  perspective  to  adjust  the  portion  of the component that is actually displayed.  If the
       component is smaller than the viewport's canvas, then the viewport background will be filled with a light
       gray pattern.

Name

       Viewport - scrollable view

Public Operations

Viewport(Interactor*=nil,Alignment=Center)
              Construct a new viewport.  If the interactor  is  not  nil,  it  is  inserted  as  the  viewport's
              component.   The  second  parameter  determines  where  the  component  is  placed relative to the
              viewport.

       Insert(Interactor*)
              Set the component interactor.

       voidChange(Interactor*)
              A viewport does not propagate changes.  Thus, if the component's shape changes the viewport simply
              resizes the component according to the new shape.

       voidRemove(Interactor*)
              Take out the component interactor.

       virtualvoidAdjust(Perspective&)
              Change the viewport's perspective to the given one.  This operation will cause the desired area of
              the component to be drawn.

       voidAdjustTo(floatpx,floatpy,floatzx,floatzy)voidAdjustBy(floatdpx,floatdpy,floatdzx,floatdzy)voidScrollTo(floatpx,floatpy)voidScrollXTo(floatpx)voidScrollYTo(floatpy)voidScrollBy(floatdpx,floatdpy)voidScrollXBy(floatdpx)voidScrollYBy(floatdpy)voidZoomTo(floatzx,floatzy)voidZoomXTo(floatzx)voidZoomYTo(floatzy)voidZoomBy(floatdzx,floatdzy)voidZoomXBy(floatdzx)voidZoomYBy(floatdzy)
              Short-hand operations for explicit manipulation of the viewport's perspective.

       floatXPos()floatYPos()floatXMag()floatYMag()
              Short-hand for retrieving information about the current perspective.

See Also

Perspective(3I), Scene(3I), Shape(3I)

InterViews                                      10 February 1988                                    Viewport(3I)

Synopsis

#include<InterViews/viewport.h>

See Also