class Viewer

(abstract) viewer class, responsible for the contents of the drawing area.

Inheritance:


Public Fields

static const int MIN_LINE_WIDTH
static const int MAX_LINE_WIDTH

Public Methods

Viewer (Config *c, DrawWindow *d)
virtual ~Viewer ()
virtual void Initialize ()
Scaler* GetScaler () const
Command* GetLastCmd ()
DrawWindow* GetMainWindow () const
Grafport* GetGrafport () const
Printer* GetPrinter () const
void SetPrinter (Printer *p)
virtual void SetGrafport (Grafport *g)
NToggleListDialog* GetLineWidthDialog ()
NToggleListDialog* GetLineStyleDialog ()
NToggleListDialog* GetTextAlignmentDialog ()
FontChooserDialog* GetFontChooserDialog ()
FileSelectionDialog* GetPrintFileSelectionDialog ()
ColorChooserDialog* GetColorChooserDialog ()
int Scale (int x) const
forwarding to scaler object.
Point Scale (const Point *p) const
int ScaleCorrect (int x) const
Point ScaleCorrect (const Point *p) const
virtual void Draw ()
Draw all elements of the viewer in grafport.
virtual void Undraw ()
Erase all elements from grafport.
void Undo ()
Undo last command.
void Redo ()
Redo last command.
void Refresh ()
Clear grafport contents, and redraw all viewer elements.
virtual void Redraw ()
redraw contents of grafport.
virtual void DeselectAll ()
deselect all elements in viewer;
virtual void Select (int x, int y)
Perform the function of the 1st button function of the mouse
virtual void Adjust (int x, int y)
Perform the function of the 2nd button function of the mouse.
virtual void Activate ()
show that viewer is active.
virtual void Deactivate ()
show that viewer is not active.
virtual void TextModeOff ()
stop being in editing mode.
void SetDefaultLineWidth (unsigned d)
int GetDefaultLineWidth ()
void UpdateLineWidth ()
void DefaultLineWidth ()
void ShowDefaultLineWidth ()
void ShowConfigLineWidth ()
virtual void UpdateLineWidthSelection (unsigned i)
void SetDefaultLineStyle (LineStyle::Type l)
LineStyle::Type GetDefaultLineStyle ()
void UpdateLineStyle ()
void DefaultLineStyle ()
void ShowDefaultLineStyle ()
void ShowConfigLineStyle ()
virtual void UpdateLineStyleSelection (LineStyle::Type s)
void SetDefaultLineColor (const string *s)
const string* GetDefaultLineColor ()
void SetDefaultTextColor (const string *s)
const string* GetDefaultTextColor ()
void SetDefaultFillColor (const string *s)
const string* GetDefaultFillColor ()
FillStyle::Type GetDefaultFillStyle () const
void SetDefaultFillStyle (FillStyle::Type l)
virtual void UpdateLineColorSelection (const string *s)
virtual void UpdateTextColorSelection (const string *s)
virtual void UpdateFillColorSelection ( const string *s, FillStyle::Type f)
void UpdateLineColor ()
void DefaultLineColor ()
void ShowDefaultLineColor ()
void ShowConfigLineColor ()
void UpdateTextColor ()
void DefaultTextColor ()
void ShowDefaultTextColor ()
void ShowConfigTextColor ()
void UpdateFillColor ()
void DefaultFillColor ()
void ShowDefaultFillColor ()
void ShowConfigFillColor ()
XFont* GetDefaultFont () const
void SetDefaultFontAttributes (int f, int s, int p)
virtual void SetDefaultFont (XFont *ft)
void UpdateFont ()
void DefaultFont ()
void ShowDefaultFont ()
void ShowConfigFont ()
virtual void UpdateFontSelection (int family, int style, int size)
XFont* GetFont (int family, int style, int size)
XFont* GetFont (const char *description)
void UpdateTextAlignment ()
void DefaultTextAlignment ()
void ShowDefaultTextAlignment ()
void ShowConfigTextAlignment ()
TextAlign::Type GetDefaultTextAlignment () const
void SetDefaultTextAlignment (TextAlign::Type a)
virtual void UpdateTextAlignmentSelection (TextAlign::Type a)
void EditText (int key)
bool IsAutoResize () const
void SetAutoResize (bool s)
bool IsInlineEdit () const
void SetInlineEdit (bool s)
bool IsPasting () const
void SetPasting (bool b)
bool IsZigZag () const
void SetZigZag (bool b)
bool IsEditing () const
virtual void MovingPointer (int x, int y)
change cursor to show which command can be performed.
void DoubleClick ()
not yet implemented (double clicked button).
void DoFunctionKey (int)
not yet implemented (function keys).
void NewCommand (Command *newCmd)
enable execution of last command as newCmd.
void AbortCommand ()
abort execution of last command.
void ExecuteCommand ()
execute last command.
void UndoCommand ()
undo execution of last command.
void RedoCommand ()
redo execution of last command.
void DeleteCommands ()
delete command history, make undo impossible.
virtual Command* Drag (int x, int y)
Perform the function of 1st button drag.
virtual Command* Connect (int x, int y)
Perform the function of 2nd button drag.
virtual void KeyTyped (int x, int y, int c)
Perform the function of keypress 'c'.
virtual void CalcSizeElements (Point &topLeft, Point &bottomRight)
calculate covered area of elements in grafport.
virtual void CalcSizeSelection (Point &topLeft, Point &bottomRight)
calculate covered area of selected elements in grafport.
void GetPageSize (double &width, double &height)
return page size (pixels).
void Save (OutputFile *f)
Save view attributes to file.
bool Load (InputFile *f, double format)
Load view attributes from file.
bool Check (InputFile *f, double format)
Check but not load view attributes from file.

Protected Methods

void ClearGrafport ()
Clear contents of grafport.
InlineEditor* GetInlineEditor () const
void SetInlineEditor (InlineEditor *i)
void SetEditing (bool b)

Documentation

(abstract) viewer class, responsible for the contents of the drawing area.
Viewer(Config *c, DrawWindow *d)

virtual ~Viewer()

virtual void Initialize()

Scaler* GetScaler() const

Command* GetLastCmd()

DrawWindow* GetMainWindow() const

Grafport* GetGrafport() const

Printer* GetPrinter() const

void SetPrinter(Printer *p)

virtual void SetGrafport(Grafport *g)

NToggleListDialog* GetLineWidthDialog()

NToggleListDialog* GetLineStyleDialog()

NToggleListDialog* GetTextAlignmentDialog()

FontChooserDialog* GetFontChooserDialog()

FileSelectionDialog* GetPrintFileSelectionDialog()

ColorChooserDialog* GetColorChooserDialog()

int Scale(int x) const
forwarding to scaler object.

Point Scale(const Point *p) const

int ScaleCorrect(int x) const

Point ScaleCorrect(const Point *p) const

virtual void Draw()
Draw all elements of the viewer in grafport.

virtual void Undraw()
Erase all elements from grafport.

void Undo()
Undo last command.

void Redo()
Redo last command.

void Refresh()
Clear grafport contents, and redraw all viewer elements.

virtual void Redraw()
redraw contents of grafport.

virtual void DeselectAll()
deselect all elements in viewer;

virtual void Select(int x, int y)
Perform the function of the 1st button function of the mouse

virtual void Adjust(int x, int y)
Perform the function of the 2nd button function of the mouse.

virtual void Activate()
show that viewer is active.

virtual void Deactivate()
show that viewer is not active.

virtual void TextModeOff()
stop being in editing mode.

void SetDefaultLineWidth(unsigned d)

int GetDefaultLineWidth()

void UpdateLineWidth()

void DefaultLineWidth()

void ShowDefaultLineWidth()

void ShowConfigLineWidth()

virtual void UpdateLineWidthSelection(unsigned i)

void SetDefaultLineStyle(LineStyle::Type l)

LineStyle::Type GetDefaultLineStyle()

void UpdateLineStyle()

void DefaultLineStyle()

void ShowDefaultLineStyle()

void ShowConfigLineStyle()

virtual void UpdateLineStyleSelection(LineStyle::Type s)

void SetDefaultLineColor(const string *s)

const string* GetDefaultLineColor()

void SetDefaultTextColor(const string *s)

const string* GetDefaultTextColor()

void SetDefaultFillColor(const string *s)

const string* GetDefaultFillColor()

FillStyle::Type GetDefaultFillStyle() const

void SetDefaultFillStyle(FillStyle::Type l)

virtual void UpdateLineColorSelection(const string *s)

virtual void UpdateTextColorSelection(const string *s)

virtual void UpdateFillColorSelection( const string *s, FillStyle::Type f)

void UpdateLineColor()

void DefaultLineColor()

void ShowDefaultLineColor()

void ShowConfigLineColor()

void UpdateTextColor()

void DefaultTextColor()

void ShowDefaultTextColor()

void ShowConfigTextColor()

void UpdateFillColor()

void DefaultFillColor()

void ShowDefaultFillColor()

void ShowConfigFillColor()

XFont* GetDefaultFont() const

void SetDefaultFontAttributes(int f, int s, int p)

virtual void SetDefaultFont(XFont *ft)

void UpdateFont()

void DefaultFont()

void ShowDefaultFont()

void ShowConfigFont()

virtual void UpdateFontSelection(int family, int style, int size)

XFont* GetFont(int family, int style, int size)

XFont* GetFont(const char *description)

void UpdateTextAlignment()

void DefaultTextAlignment()

void ShowDefaultTextAlignment()

void ShowConfigTextAlignment()

TextAlign::Type GetDefaultTextAlignment() const

void SetDefaultTextAlignment(TextAlign::Type a)

virtual void UpdateTextAlignmentSelection(TextAlign::Type a)

void EditText(int key)

bool IsAutoResize() const

void SetAutoResize(bool s)

bool IsInlineEdit() const

void SetInlineEdit(bool s)

bool IsPasting() const

void SetPasting(bool b)

bool IsZigZag() const

void SetZigZag(bool b)

bool IsEditing() const

virtual void MovingPointer(int x, int y)
change cursor to show which command can be performed.

void DoubleClick()
not yet implemented (double clicked button).

void DoFunctionKey(int)
not yet implemented (function keys).

void NewCommand(Command *newCmd)
enable execution of last command as newCmd.

void AbortCommand()
abort execution of last command.

void ExecuteCommand()
execute last command.

void UndoCommand()
undo execution of last command.

void RedoCommand()
redo execution of last command.

void DeleteCommands()
delete command history, make undo impossible.

virtual Command* Drag(int x, int y)
Perform the function of 1st button drag.

virtual Command* Connect(int x, int y)
Perform the function of 2nd button drag.

virtual void KeyTyped(int x, int y, int c)
Perform the function of keypress 'c'.

virtual void CalcSizeElements(Point &topLeft, Point &bottomRight)
calculate covered area of elements in grafport.

virtual void CalcSizeSelection(Point &topLeft, Point &bottomRight)
calculate covered area of selected elements in grafport.

void GetPageSize(double &width, double &height)
return page size (pixels).

void Save(OutputFile *f)
Save view attributes to file.

bool Load(InputFile *f, double format)
Load view attributes from file.

bool Check(InputFile *f, double format)
Check but not load view attributes from file.

static const int MIN_LINE_WIDTH

static const int MAX_LINE_WIDTH

void ClearGrafport()
Clear contents of grafport.

InlineEditor* GetInlineEditor() const

void SetInlineEditor(InlineEditor *i)

void SetEditing(bool b)


Direct child classes:
TableViewer
DiagramViewer

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de