Logo Search packages:      
Sourcecode: tcm version File versions  Download package

CPViewer Class Reference

#include <cpviewer.h>

Inheritance diagram for CPViewer:

DiagramViewer Viewer

List of all members.


Detailed Description

component diagram viewer class.

Definition at line 30 of file cpviewer.h.


Public Member Functions

void AbortCommand ()
 abort execution of last command.
virtual void Activate ()
 show that viewer is active.
bool AddView (ShapeView *v)
void Adjust (int x, int y)
 Perform the 2nd button function: (de)selection.
virtual void AlignNodes (NodeAlign::Type alignment)
 Align selection in current view according to given align type.
virtual void AlignNodeShapes ()
 Align selection in current view according to given align type.
virtual void Annotate ()
 edit annotation of first selected subject in current view.
void CalcSizeElements (Point &topLeft, Point &bottomRight)
 calculate size of shapes in current view.
void CalcSizeSelection (Point &topLeft, Point &bottomRight)
 calc size of selection in current view.
void CalcSizeShapes (List< GShape * > *shapes, Point &topLeft, Point &bottomRight)
 calculate covered area of shapes in grafport.
bool Check (InputFile *f, double format)
 Check but not load view attributes from file.
void CheckShapes ()
 Check all shapes in all views.
CommandConnect (int x, int y)
 create an edge between nodes.
void ConvertNodeShapes ()
 convert selected node shapes.
virtual void Copy ()
 Copy subjects/shapes cmd from current view to buffer.
 CPViewer (Config *c, CPWindow *w)
virtual void Cut ()
 Cut subjects/shapes cmd from current view to buffer.
virtual void Deactivate ()
 show that viewer is not active.
void DefaultFillColor ()
void DefaultFont ()
void DefaultLineColor ()
void DefaultLineStyle ()
void DefaultLineWidth ()
void DefaultTextAlignment ()
void DefaultTextColor ()
virtual void DeleteAll ()
 All shapes (and subjects) are deleted from current view.
void DeleteAllViews ()
void DeleteCommands ()
 delete command history, make undo impossible.
virtual void DeleteShapes ()
 Delete shapes (and event. subjects) from selection.
virtual void DeleteSubjects ()
void DeselectAll ()
 deselect all shapes in all views in the viewer.
void DoFunctionKey (int)
 not yet implemented (function keys).
void DoubleClick ()
 not yet implemented (double clicked button).
CommandDrag (int x, int y)
 drag shapes and handles of line-segments.
virtual void Draw ()
 Draw all shapes of current view to grafport.
virtual void Duplicate ()
 Node shapes in selection are duplicated, pasted in current view.
void EditText (int key)
void ExecuteCommand ()
 execute last command.
virtual void FindAll (const string *s, bool sens, bool substr, bool nameOnly)
 select all shapes having string s (sens case sensitive).
virtual void FindNext (const string *s, bool sens, bool substr, bool nameOnly)
 select next shape having string s, and set cursor before it.
BufferGetBuffer () const
ColorChooserDialogGetColorChooserDialog ()
ShapeViewGetCurView () const
 return current view.
LineStyle::Type GetDefaultEdgeLineStyle () const
int GetDefaultEdgeType () const
const stringGetDefaultFillColor ()
FillStyle::Type GetDefaultFillStyle () const
XFontGetDefaultFont () const
const stringGetDefaultLineColor ()
LineEnd::Type GetDefaultLineEnd1 ()
LineEnd::Type GetDefaultLineEnd2 ()
LineStyle::Type GetDefaultLineStyle ()
int GetDefaultLineType () const
int GetDefaultLineWidth ()
LineStyle::Type GetDefaultNodeLineStyle () const
int GetDefaultNodeShapeType () const
int GetDefaultNodeType () const
TextAlign::Type GetDefaultTextAlignment () const
const stringGetDefaultTextColor ()
DiagramGetDiagram () const
XFontGetFont (const char *description)
XFontGetFont (int family, int style, int size)
FontChooserDialogGetFontChooserDialog ()
GrafportGetGrafport () const
GridGetGrid () const
CommandGetLastCmd ()
LineEndDialogGetLineEndDialog ()
NToggleListDialogGetLineStyleDialog ()
NToggleListDialogGetLineWidthDialog ()
DrawWindowGetMainWindow () const
NodeAlignmentDialogGetNodeAlignmentDialog ()
NodeShapeDialogGetNodeShapeDialog ()
void GetPageSize (double &width, double &height)
 return page size (pixels).
PrinterGetPrinter () const
FileSelectionDialogGetPrintFileSelectionDialog ()
ScalerGetScaler () const
GShapeGetShape (Subject *subject)
 return first shape from shapes having given subject (in any view).
void GetShapes (Subject *subject, List< GShape * > *shapes)
 put in shapes all shapes from all views having given subject.
NToggleListDialogGetTextAlignmentDialog ()
ShapeViewGetView (const string *index)
bool HasDuplicates () const
 Does any of the views have duplicates?
bool HasView (ShapeView *v)
bool HasView (const string *index)
void Initialize ()
bool IsAutoResize () const
bool IsDefaultCurve () const
bool IsEditing () const
bool IsInlineEdit () const
bool IsPasting () const
bool IsShowIndexes ()
bool IsZigZag () const
void KeyTyped (int x, int y, int key)
 start textmode, or (if in textmode) handle key. (x,y) is position.
bool Load (InputFile *f, double format)
 Load view attributes from file.
virtual void MoveAllShapes (Document::MoveType t)
 move all shapes in current view according to move type.
void MoveShapes (List< GShape * > *shapes, const Point *delta)
 all shapes are moved delta (result not propagated).
void MovingPointer (int x, int y)
 change cursor to show the possible command (resize, move or edit).
void NewCommand (Command *newCmd)
 enable execution of last command as newCmd.
unsigned int NumberOfViews () const
virtual void Paste ()
 Paste from buffer to current view and graph.
void RecalcAllParents (bool hierarchicDocument) const
 recalculates all parents of all views.
void Redo ()
 Redo last command.
void RedoCommand ()
 redo execution of last command.
void Redraw ()
 Redraw everything including grid.
void Refresh ()
 Clear grafport contents, and redraw all viewer elements.
void Reindex (List< Node * > *nodes)
virtual void ReplaceAll (const string *s1, const string *s2, bool sens, bool substr, bool nameOnly)
 replace all strings in current view.
virtual void ReplaceNext (const string *s1, const string *s2, bool sens, bool substr, bool nameOnly)
 replace string in next shape in current view.
virtual void SameSize ()
 makes the size of selection shapes equal to size of the first.
void Save (OutputFile *f)
 Save view attributes to file.
Point Scale (const Point *p) const
double Scale (double x) const
 forwarding to scaler object.
Point ScaleCorrect (const Point *p) const
double ScaleCorrect (double x) const
void Select (int x, int y)
 perform the button1 functions (includes creating and moving shapes).
virtual void SelectAll ()
 select all shapes in the current view.
void SetAutoResize (bool s)
void SetCursor (int cursor)
void SetDefaultCurve (bool s)
void SetDefaultEdgeLineStyle (LineStyle::Type l)
void SetDefaultEdgeType (int n)
void SetDefaultFillColor (const string *s)
void SetDefaultFillStyle (FillStyle::Type l)
virtual void SetDefaultFont (XFont *ft)
void SetDefaultFontAttributes (int f, int s, int p)
void SetDefaultLineColor (const string *s)
void SetDefaultLineEnd1 (LineEnd::Type t)
void SetDefaultLineEnd2 (LineEnd::Type t)
void SetDefaultLineStyle (LineStyle::Type l)
void SetDefaultLineType (int n)
void SetDefaultLineWidth (unsigned d)
void SetDefaultNodeLineStyle (LineStyle::Type l)
void SetDefaultNodeShapeType (int n)
void SetDefaultNodeType (int n)
void SetDefaultTextAlignment (TextAlign::Type a)
void SetDefaultTextColor (const string *s)
void SetDiagram (Diagram *d)
void SetGrafport (Grafport *g)
void SetIndexes (bool b)
void SetInlineEdit (bool s)
void SetPasting (bool b)
void SetPrinter (Printer *p)
void SetShowIndexes (bool b)
void SetSizeCursor (int cursor)
void SetStatus (const string *msg)
void SetStatus (const char *msg)
void SetView (ShapeView *v)
void SetZigZag (bool b)
void ShapePositionUpdate (GShape *shape)
 for each line connecting shape, position is propagated.
void ShowConfigFillColor ()
void ShowConfigFont ()
void ShowConfigLineColor ()
void ShowConfigLineStyle ()
void ShowConfigLineWidth ()
void ShowConfigTextAlignment ()
void ShowConfigTextColor ()
void ShowDefaultFillColor ()
void ShowDefaultFont ()
void ShowDefaultLineColor ()
void ShowDefaultLineEnd ()
void ShowDefaultLineStyle ()
void ShowDefaultLineWidth ()
void ShowDefaultNodeAlignment ()
void ShowDefaultNodeShape ()
void ShowDefaultTextAlignment ()
void ShowDefaultTextColor ()
virtual void Snap (Point *p)
virtual int Snap (int i) const
 forwarding to grid object.
void TextModeOff ()
 stop being in editing mode.
void TopLevel ()
void Undo ()
 Undo last command.
void UndoCommand ()
 undo execution of last command.
virtual void Undraw ()
 Erase all shapes of current view from grafport.
virtual void UpdateCurve ()
 Convert selected curves from/to selected segmented lines.
void UpdateDuplicationMarks (Subject *s)
 Update the duplication marks of shapes of given subject.
void UpdateDuplicationMarks (List< Subject * > *s)
 Update the duplication marks of shapes of given subjects.
void UpdateFillColor ()
void UpdateFillColorSelection (const string *color, FillStyle::Type f)
 update the fill colors of the selected shapes.
void UpdateFont ()
void UpdateFontSelection (int family, int style, int size)
 update the fonts of selected shapes.
void UpdateLineColor ()
void UpdateLineColorSelection (const string *color)
 update the colors of the lines of the selected shapes.
void UpdateLineEnd ()
void UpdateLineEndSelection (LineEnd::Type e1, LineEnd::Type e2)
void UpdateLineStyle ()
void UpdateLineStyleSelection (LineStyle::Type s)
 update line style of selected shapes.
void UpdateLineWidth ()
void UpdateLineWidthSelection (unsigned i)
 update line width of selected shapes.
void UpdateMoveShapes (List< GShape * > *shapes, const Point *delta)
 shapes are moved delta and result is propagated to drawing area.
virtual void UpdateNodeShapeType (int)
 convert selected node shapes to given code
void UpdateText (TextShape *t, const string *newtext, const string *oldtext)
 update text of textshape.
void UpdateTextAlignment ()
void UpdateTextAlignmentSelection (TextAlign::Type a)
 update text alignment of selection in current view.
void UpdateTextColor ()
void UpdateTextColorSelection (const string *color)
 update the colors of the texts of the selected shapes.
virtual void UpdateTextUnderline ()
 Set/Unset the text underlining of the names of the selected shapes.
void UpdateView (ShapeView *v)
void WriteSelection (OutputFile *f)
 write all selected shapes from current view to ofile.
void WriteShapes (OutputFile *f)
 write all shapes from all views to ofile.
virtual void ZoomIn ()
void ZoomOut ()

Static Public Attributes

static const int MAX_LINE_WIDTH = 10
static const int MIN_LINE_WIDTH = 1

Protected Member Functions

void ClearGrafport ()
 Clear contents of grafport.
void EmptySelectionMessage ()
 error message because of empty selection.
void EmptyShapesMessage ()
 error message because there are no shapes.
InlineEditorGetInlineEditor () const
List< ShapeView * > * GetViews () const
void SetEditing (bool b)
void SetInlineEditor (InlineEditor *i)

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

Generated by  Doxygen 1.6.0   Back to index