| IGLib 1.7.2 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Properties | List of all members
IG.Forms.IFileViewer Interface Reference
Inheritance diagram for IG.Forms.IFileViewer:
[legend]

## Public Member Functions
void | ShowViewedItem ()
| Shows / plays the viewed contents. More...
void | Clear ()
| Clears the viewer and eventually releases any resources used. More...
bool | IsEligibleForViewing (string fileLocation)
| Rerurns a flag indicating whether the file (or web resource) at the specified location is eligible for vieiwnig in the current viewer or not. More...
bool | IsEligibleForViewing (Stream stream)
| Returnns a flag indicating whether the specified stream is eligible for vieiwnig or not. More...
void | BrowseFile ()
| Opens a browser to select the file shown. More...

## Properties
string | ViewedFile`[get, set]`
| Gets or sets path to the file or URL of the file that is currently being viewed. More...
Stream | ViewedStream`[get, set]`
| Gets or sets the stream containing the file that is currently being viewed. More...
bool | IsShownImmediately`[get, set]`
| Flag that specifies whether content is shown / played immediately after the viewed object is set. More...
bool | CanViewFiles`[get, set]`
| Whether the current viewer can view files from the file system. More...
bool | CanViewUrls`[get, set]`
| Whether the current viewer can view web resources (files on the internet). More...
bool | CanViewStreams`[get, set]`
| Whether the current viewer can read streams. More...
bool | IsControlsVisible`[get, set]`
| Gets / sets a flag that specified whether the viewer's controls are visible or not. More...
bool | IsBrowsable`[get, set]`
| Gets or sets the flag specifying whether one can browse for the file to be opened (e.g. by using the file selection dialog). More...
bool | IsDragAndDrop`[get, set]`
| Whether the viewer provides drag & drop capability. More...

## Member Function Documentation

void IG.Forms.IFileViewer.ShowViewedItem | ( |  | ) |

Shows / plays the viewed contents.

Can have the role of refresh when IsShownImmediately is true, or is used to actually show the contents after assigning it.

Implemented in IG.Forms.ImageViewerControl, and IG.Forms.FileViewerControl.

Referenced by IG.Forms.ResourceViewerControl.ShowViewedItem().

void IG.Forms.IFileViewer.Clear | ( |  | ) |

Clears the viewer and eventually releases any resources used.

Viewed entities are unset.

Implemented in IG.Forms.ImageViewerControl, and IG.Forms.FileViewerControl.

bool IG.Forms.IFileViewer.IsEligibleForViewing | ( | string | fileLocation | ) |

Rerurns a flag indicating whether the file (or web resource) at the specified location is eligible for vieiwnig in the current viewer or not.

Parameters

  fileLocation | Path to the file on a file system, or file URL.

Returns
  True if the file can be viewed in the current viewer, false otherwise.

Implemented in IG.Forms.ImageViewerControl, and IG.Forms.FileViewerControl.

Referenced by IG.Forms.ResourceViewerControl.ShowViewedItem().

bool IG.Forms.IFileViewer.IsEligibleForViewing | ( | Stream | stream | ) |

Returnns a flag indicating whether the specified stream is eligible for vieiwnig or not.

Parameters

  stream | Path to the file on a file system, or file URL.

Returns
  True if the stream can be viewed in the current viewer, false otherwise.

Implemented in IG.Forms.ImageViewerControl, and IG.Forms.FileViewerControl.

void IG.Forms.IFileViewer.BrowseFile | ( |  | ) |

Opens a browser to select the file shown.

Available only when IsBrowsable property is true.

Implemented in IG.Forms.ImageViewerControl, and IG.Forms.FileViewerControl.

## Property Documentation

string IG.Forms.IFileViewer.ViewedFile
| get set

Gets or sets path to the file or URL of the file that is currently being viewed.

Whether it is actually shown depends on the IsShownImmediately flag).

Stream IG.Forms.IFileViewer.ViewedStream
| get set

Gets or sets the stream containing the file that is currently being viewed.

Whether it is actually shown depends on the IsShownImmediately flag).

Referenced by IG.Forms.ResourceViewerControl.ShowViewedItem().

bool IG.Forms.IFileViewer.IsShownImmediately
| get set

Flag that specifies whether content is shown / played immediately after the viewed object is set.

If set to true and the viewer does not at all have such capability, this should NOT throw an exception (thus, user should check success by verifying if flag changed).

bool IG.Forms.IFileViewer.CanViewFiles
| get set

Whether the current viewer can view files from the file system.

bool IG.Forms.IFileViewer.CanViewUrls
| get set

Whether the current viewer can view web resources (files on the internet).

bool IG.Forms.IFileViewer.CanViewStreams
| get set

Whether the current viewer can read streams.

bool IG.Forms.IFileViewer.IsControlsVisible
| get set

Gets / sets a flag that specified whether the viewer's controls are visible or not.

Setting should have immediate effect and make controls visible / invisible.

This is important because viewers must be able to be used embedded in other controls, where all behavior is handled by those controls and viewer just provides the viewing area.

bool IG.Forms.IFileViewer.IsBrowsable
| get set

Gets or sets the flag specifying whether one can browse for the file to be opened (e.g. by using the file selection dialog).

If the viewer does not at all have browser capability then setting to true should not throw an exception (therefore, the user should verify by getter if setting actually worked).

Setter can be used to disable drag & drop (e.g. for security, or when used as embedded control and drag & drop would be disturbing). If the viewer does not at all have drag & drop capability, setting this flag to true should NOT throw an exception (thus, user should check if it was successful).

bool IG.Forms.IFileViewer.IsDragAndDrop
| get set

Whether the viewer provides drag & drop capability.

If the viewer does not at all have browser capability then setting to true should not throw an exception (therefore, the user should verify by getter if setting actually worked).

Setter can be used to disable drag & drop (e.g. for security, or when used as embedded control and drag & drop would be disturbing). If the viewer does not at all have drag & drop capability, setting this flag to true should NOT throw an exception (thus, user should check if it was successful).

The documentation for this interface was generated from the following file:

- igforms/Basic/IFileViewer.cs