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

VerticesComp, VerticesView, PSVertices - abstract base classes for vertexed graphical component subjects

Description

       VerticesComp is an abstract base class for graphical components whose geometry can be expressed as a list
       of  coordinate  pairs.   VerticesComp  uses  a  Vertices  graphic  to  store  its  graphical  attributes.
       VerticesView is an abstract GraphicView subclass for displaying a VerticesComp. PSVertices is an abstract
       PostScriptView for subclasses that externalize VerticesComp information in PostScript form.

Name

       VerticesComp,  VerticesView, PSVertices - abstract base classes for vertexed graphical component subjects
       and their views and PostScript external representations

Psvertices Protected Operations

PSVertices(VerticesComp*=nil)
              Initialize a PostScript external representation of the given subject, if any.

       virtualconstchar*Name()
              Subclasses should redefine Name to return the proper tag for the object in the  PostScript  output
              as required for idraw compatibility.

See Also

GraphicComp(3U),  GraphicView(3U), Grid(3U), PatternCmd(3U), PostScriptView(3U), Vertices(3U), align(3U),
       idraw(3I)

Unidraw                                          23 January 1991                                VerticesComp(3U)

Synopsis

#include<Unidraw/Components/vertices.h>

Verticescomp Protected Operations

VerticesComp(Vertices*=nil)
              The constructor takes  an  optional  vertices  graphic  that  defines  the  component's  graphical
              attributes.

Verticescomp Public Operations

Vertices*GetVertices()
              Return  the Vertices graphic that defines the vertices's attributes.  GetVertices is simply a more
              specific form of the GetGraphic operation.

Verticesview Protected Operations

VerticesView(VerticesComp*=nil)
              Initialize a VerticesView, optionally supplying the subject.

       virtualvoidCreateHandles()
              VerticesView redefines CreateHandles  to  create  a  RubberHandles  object  that  draws  a  handle
              coinciding with each vertex.

       virtualbooleanVertexChanged()
              Returns  whether  or  not  the  vertices as stored in the view are different in any way from those
              stored in the subject.  The Update function relies on the result to determine whether to  recreate
              the   view's   structured   graphic   based   on   the   subject's.    VerticesView::VertexChanged
              (conservatively) returns false by default; subclasses should redefine this function to make a more
              discerning decision, thereby increasing the efficiency of the update operation.

Verticesview Public Operations

virtualvoidInterpret(Command*)
              VerticesView interprets AlignToGridCmd to align its first vertex to the grid.

       virtualvoidGetVertices(Coord*&x,Coord*&y,int&count)
              Return  the  view's vertices in canvas coordinates.  GetVertices allocates new arrays each time it
              is called.

       VerticesComp*GetVerticesComp()
              Return the subject.

See Also