Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Protected Member Functions | Friends
IlvTimeScale Class Reference

Graphic class that displays a time scale. More...

#include <ilviews/graphics/timescale.h>

Inheritance diagram for IlvTimeScale:
IlvSimpleGraphic IlvTimeScrollable IlvGraphic IlvStylable IlvValueInterface IlvCalendarScale

Public Member Functions

 IlvTimeScale (IlvDisplay *display, const IlvRect &drawrect, IlvPalette *palette=0)
 Constructor. More...
 
virtual void addRow (IlvTimeScaleRow *row)
 Append the specified IlvTimeScaleRow to the scale. More...
 
void applyTransform (const IlvTransformer *)
 Applies a transformation function to the graphic object. More...
 
virtual void boundingBox (IlvRect &r, const IlvTransformer *t=0) const
 Retrieves the bounding box of the graphic object. More...
 
IlvTimeScalePaintContextcreatePaintContext (IlDate start, IlvDuration duration, IlvRect viewport)
 Create a IlvTimeScalePaintContext. More...
 
void draw (IlvPort *, const IlvTransformer *=0, const IlvRegion *=0) const
 Draws the graphic object. More...
 
IlCalendargetCalendar ()
 Get the internal calendar.
 
IlCalendargetCalendar (IlDate time)
 Get the internal calendar set to the specified time. More...
 
virtual IlInt getLocation (IlDate time)
 Get the x position corresponding to the specified time. More...
 
virtual IlInt getLocation (IlDate time, const IlvTimeScalePaintContext &context)
 Get the x position corresponding to the specified time in the specified paint context. More...
 
virtual IlDate getMaxVisibleTime () const
 Returns the maximum time that the time scrollable can show. More...
 
virtual IlDate getMinVisibleTime () const
 Returns the minimum time that the time scrollable can show. More...
 
IlDouble getOffset () const
 Get the scale offset.
 
IlvTimeScalePaintContextgetPaintContext ()
 Gets the scales' cached IlvTimeScalePaintContext. More...
 
virtual IlvTimeScaleRowgetRow (IlInt index) const
 Get the IlvTimeScaleRow at a specified index. More...
 
virtual IlDate getTime (IlInt x)
 Get the time that is under the x position in the component. More...
 
IlvTimeConvertergetTimeConverter () const
 
virtual IlvDuration getVisibleDuration () const
 Returns the duration of the time interval displayed by the time scrollable. More...
 
virtual IlvTimeInterval getVisibleInterval () const
 Returns the time interval displayed by the scale. More...
 
virtual IlDate getVisibleTime () const
 Returns the beginning of the time interval displayed by the time scrollable. More...
 
IlDouble getZoomFactor () const
 Get the scale zoom factor.
 
virtual void hideRow (IlInt index)
 Hide the specified row. More...
 
virtual void hideRow (IlvTimeScaleRow *row)
 Hide the specified row. More...
 
IlBoolean isLabelVisible () const
 Returns whether the labels should be visible. More...
 
IlBoolean isSeparatorVisible () const
 Returns whether the separators should be visible. More...
 
virtual void move (IlvPos x, IlvPos y)
 Moves the graphic object. More...
 
virtual IlBoolean removeRow (IlvTimeScaleRow *row)
 Remove a row from the IlvTimeScale object. More...
 
void setLabelVisible (IlBoolean visible)
 Specifies whether the labels should be visible. More...
 
virtual void setMaxVisibleTime (IlDate d)
 Sets the maximum time that the time scrollable can show. More...
 
virtual void setMinVisibleTime (IlDate d)
 Sets the minimum time that the time scrollable can show. More...
 
virtual void setRow (IlInt index, IlvTimeScaleRow *row)
 Change the IlvTimeScaleRow object at a specified index. More...
 
void setSeparatorVisible (IlBoolean visible)
 Specifies whether the separators should be visible. More...
 
void setTimeConverter (IlvTimeConverter *t)
 Sets the convertor of the time scale. More...
 
virtual void setVisibleDuration (IlvDuration duration)
 Sets the duration of the time interval displayed by the time scrollable. More...
 
virtual void setVisibleInterval (IlDate time, IlvDuration duration)
 Sets the time interval displayed by the scale. More...
 
virtual void setVisibleTime (IlDate time)
 Sets the beginning of the time interval displayed by the time scrollable. More...
 
virtual void showRow (IlInt index)
 Show the specified row. More...
 
virtual void showRow (IlvTimeScaleRow *row)
 Show the specified row. More...
 
- Public Member Functions inherited from IlvSimpleGraphic
 IlvSimpleGraphic (IlvDisplay *display, IlvPalette *palette=0)
 Initializes a new IlvSimpleGraphic. More...
 
virtual ~IlvSimpleGraphic ()
 Destructor. More...
 
virtual void applyResources (const char *, const char *, const char *, const char *, IlvDisplay *=0)
 Applies resources on a graphic object. More...
 
IlvIntensity getAlpha () const
 Retrieves the alpha value. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Retrieves the anti-aliasing mode. More...
 
IlvArcMode getArcMode () const
 Retrieves the arc mode. More...
 
IlvColorgetBackground () const
 Retrieves the background color. More...
 
IlvColorPatterngetColorPattern () const
 Retrieves the color pattern. More...
 
IlString getCssElementName () const override
 Returns the DOM element name of this stylable object. More...
 
virtual IlvDisplaygetDisplay () const
 Retrieves the IlvDisplay instance. More...
 
IlvFillRule getFillRule () const
 Retrieves the fill rule. More...
 
IlvFillStyle getFillStyle () const
 Retrieves the fill style. More...
 
IlvFontgetFont () const
 Retrieves the font. More...
 
IlvColorgetForeground () const
 Retrieves the foreground color. More...
 
IlvGradientPatterngetGradientPattern () const
 Retrieves the gradient pattern. More...
 
IlvLineStylegetLineStyle () const
 Retrieves the line style. More...
 
IlUShort getLineWidth () const
 Retrieves the line width. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object. More...
 
virtual int getLookupStringInputMethod (IlvEvent &event, char *bufferReturn, int bytesBuffer, int *statusReturn)
 Gets the preedit string from an input method. More...
 
IlvDrawMode getMode () const
 Retrieves the draw mode. More...
 
IlBoolean getOverwrite () const
 Retrieves the overwrite mode. More...
 
IlvPalettegetPalette () const
 Retrieves the internal palette value. More...
 
IlvPatterngetPattern () const
 Retrieves the pattern. More...
 
IlvDisplaygetStylableDisplay () const override
 Returns the display for this object. More...
 
IlString getStylableName () const override
 Returns the name of this object. More...
 
IlvStylistgetStylist () const override
 Returns the stylist for this object. More...
 
virtual void invert (IlBoolean=IlFalse)
 Highlights the object. More...
 
virtual void registerInputMethod () const
 Controls the connection of a graphic object to an input method. More...
 
virtual void setAlpha (IlvIntensity)
 Sets the alpha value of the object. More...
 
virtual void setAntialiasingMode (IlvAntialiasingMode)
 Sets the anti-aliasing mode of the object. More...
 
virtual void setArcMode (IlvArcMode)
 Sets the arc mode of the object. More...
 
virtual void setBackground (IlvColor *)
 Sets the background color of the object. More...
 
virtual void setColorPattern (IlvColorPattern *)
 Sets the color pattern of the object. More...
 
virtual void setFillRule (IlvFillRule)
 Sets the fill rule of the object. More...
 
virtual void setFillStyle (IlvFillStyle)
 Sets the fill style of the object. More...
 
virtual void setFocusValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a simple graphic object and an input method. More...
 
virtual void setFont (IlvFont *)
 Sets the font of the object. More...
 
virtual void setForeground (IlvColor *)
 Sets the foreground color of the object. More...
 
virtual void setGradientPattern (IlvGradientPattern *)
 Sets the gradient pattern of the object. More...
 
virtual void setHolder (IlvGraphicHolder *)
 Sets the object's holder. More...
 
virtual void setLineStyle (IlvLineStyle *)
 Sets the line style of the object. More...
 
virtual void setLineWidth (IlUShort)
 Sets the line width of the object. More...
 
virtual void setMode (IlvDrawMode)
 Sets the drawing mode of the object temporarily. More...
 
virtual void setOverwrite (IlBoolean)
 Sets an overwrite mode that modifies how the drawing member functions operate. More...
 
virtual void setPalette (IlvPalette *palette)
 Sets the internal palette. More...
 
virtual void setPattern (IlvPattern *)
 Sets the pattern of the object. More...
 
virtual void setValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a graphic object and an input method. More...
 
virtual void unRegisterInputMethod () const
 Controls the disconnection of a graphic object from an input method. More...
 
virtual void unsetFocusInputMethod () const
 Controls the interaction between a graphic object and an input method. More...
 
- Public Member Functions inherited from IlvGraphic
void addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Adds a callback function to a callback list. More...
 
void addClassProperty (const IlSymbol *key, IlAny value)
 Adds a property to this object's class. More...
 
void addProperty (const IlSymbol *key, IlAny value)
 Adds a specific property to the object. More...
 
void addTag (const IlSymbol *tag)
 Adds a tag. More...
 
virtual void apply (IlvApplyObject function, IlAny arg)
 Applies a function to objects that compose another object. More...
 
IlBoolean applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const
 Applies attributes. More...
 
virtual void applyReferences (IlvApplyObject function, IlAny arg)
 Applies a function to objects that are referenced by another object. More...
 
virtual void callCallbacks (const IlSymbol *callbackType)
 Calls every callback of a given type. More...
 
const char * className () const
 Returns the class name of an object. More...
 
virtual void computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const
 Computes the region needed for the drawing of the focus. More...
 
IlBoolean contains (const IlvPoint &p) const
 Checks whether a point is in the object. More...
 
virtual IlBoolean contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const
 Checks whether a point is in the object. More...
 
virtual IlvGraphiccopy () const =0
 Copies this object. More...
 
void draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const
 Draws a graphic object. More...
 
virtual void drawFocus (IlvPort *dst, const IlvPalette *palette, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws additional drawings for an object that has the keyboard focus. More...
 
virtual void getAccessors (const IlSymbol *const **, const IlvValueTypeClass *const **, IlUInt &) const
 Retrieves the list of available accessors of an object. More...
 
IlvGraphicCallback getCallback () const
 Gets the main callback function. More...
 
IlvGraphicCallback getCallback (const IlSymbol *callbackType) const
 Gets a callback. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Gets a callback user data. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Gets a callback user data. More...
 
IlSymbolgetCallbackName () const
 Gets the symbol that identifies the main callback. More...
 
IlSymbolgetCallbackName (const IlSymbol *callbackType) const
 Gets the name of a callback. More...
 
virtual IlUInt getCallbackTypes (const char *const **names, const IlSymbol *const **types) const
 Gets the number of register callback types for the object. More...
 
virtual IlvGraphicgetChildAt (IlUInt index) const
 Returns the sub-object of the graphic object specified by index. More...
 
virtual IlvGraphicgetChildByName (const char *name) const
 Returns the sub-object of the graphic object specified by a name. More...
 
virtual IlUInt getChildCount () const
 Returns the number of children of this graphic object. More...
 
virtual IlInt getChildIndex (const IlvGraphic *object) const
 Returns the index of the specified sub-object in this graphic object. More...
 
virtual IlvGraphic *const * getChildren (IlUInt &count) const
 Returns an array containing the sub-objects of this graphic object. More...
 
virtual IlvClassInfogetClassInfo () const
 Gets class information. More...
 
IlAny getClassProperty (const IlSymbol *key, IlBoolean checkParent=IlFalse) const
 Retrieves the indicated property value in the class of this object. More...
 
IlAny getClientData () const
 Gets client data. More...
 
virtual const char * getDefaultInteractor () const
 Gets the name of the default interactor for this object. More...
 
virtual IlvGraphicHoldergetHolder () const
 Gets a pointer to an object's holder. More...
 
IlvInteractorgetInteractor () const
 Returns the interactor associated with the current object. More...
 
const char * getName () const
 Gets the name of the object. More...
 
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Gets a named property. More...
 
IlSymbolgetNextFocusGraphic () const
 Gets the next object in the focus chain. More...
 
IlSymbolgetPreviousFocusGraphic () const
 Gets the previous object in the focus chain. More...
 
IlAny getProperty (const IlSymbol *key) const
 Gets a property. More...
 
IlvSmartSetgetSmartSet () const
 Gets the smart set object containing this graphic object. More...
 
const IlSymbol *const * getTags (IlUInt &count) const
 Returns all the tags applied to this object. More...
 
IlvDim h () const
 Gets the height value of the object. More...
 
void h (IlvDim h)
 Sets the height value of the object. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function has user data. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function has user data. More...
 
const IlvClassInfohasClassProperty (const IlSymbol *key, IlBoolean s=IlFalse) const
 Checks for a class where the keyed property exists. More...
 
IlBoolean hasProperty (const IlSymbol *key) const
 Checks whether the object has a particular property. More...
 
IlBoolean hasTag (const IlSymbol *tag) const
 Checks whether the object has a specific tag. More...
 
IlBoolean inside (const IlvRect &r) const
 Determines whether a rectangle is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
virtual IlBoolean inside (const IlvRegion &r, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean intersects (const IlvRect &r) const
 Checks whether a rectangle intersects the bounding box. More...
 
IlBoolean intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Checks whether a rectangle intersects the bounding box with transformation applied. More...
 
virtual IlBoolean intersects (const IlvRegion &r, const IlvTransformer *t=0) const
 Checks whether a region intersects the bounding box with transformation applied. More...
 
IlBoolean isFirstFocusGraphic () const
 Checks whether the object is first in the focus chain. More...
 
IlBoolean isFocusable () const
 Checks whether the object can receive the keyboard focus. More...
 
IlBoolean isInSmartSet () const
 Checks whether a graphic object belongs to a smart set. More...
 
IlBoolean isLastFocusGraphic () const
 Checks whether the object is last in the focus chain. More...
 
IlBoolean isSensitive () const
 Checks whether the object is sensitive. More...
 
IlBoolean isSubtypeOf (const char *parentClass) const
 Checks whether this object's class is a subclass of a given parent class. More...
 
IlBoolean isSubtypeOf (const IlvClassInfo *classInfo) const
 Checks whether this object's class is a subclass. More...
 
void move (const IlvPoint &p)
 Moves the graphic object. More...
 
void moveResize (const IlvRect &size)
 Moves and resizes a graphic object. More...
 
virtual IlBoolean needsInputContext () const
 Indicates whether the graphic instance can connect to an input method for locale dependent input. More...
 
virtual void print (std::ostream &out, int level=0) const
 Prints for debugging purposes. More...
 
void removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName)
 Removes a callback function from a callback list. More...
 
void removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Removes a callback function from a callback list. More...
 
IlBoolean removeClassProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
void removeInteractor ()
 Removes the interactor from the current object. More...
 
IlvNamedPropertyremoveNamedProperty (IlSymbol *name)
 Removes a named property from the object. More...
 
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property from the object. More...
 
void removeTag (const IlSymbol *tag)
 Removes a tag. More...
 
IlBoolean replaceClassProperty (const IlSymbol *key, IlAny value)
 Replaces a property in this object's class. More...
 
IlBoolean replaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property. More...
 
virtual void resize (IlvDim newW, IlvDim newH)
 Resizes a graphic object. More...
 
virtual void rotate (const IlvPoint &center, IlFloat angle)
 Rotates a graphic object. More...
 
virtual void scale (IlFloat zoomX, IlFloat zoomY)
 Scales the graphic object. More...
 
void setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Removes all previously set callbacks. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Sets a new callback. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Removes all previously set callbacks. More...
 
void setCallback (IlvGraphicCallback callback, IlAny data)
 Sets the main callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackName (const IlSymbol *callbackName)
 Sets the symbol that identifies the main callback. More...
 
void setClientData (IlAny clientData)
 Sets client data. More...
 
void setFirstFocusGraphic ()
 Sets the object to be first in the focus chain.
 
void setFocusable (IlBoolean value)
 Set the focusable state of the object. More...
 
IlBoolean setInteractor (const char *name)
 Attaches an interactor to this graphic object. More...
 
IlBoolean setInteractor (IlvInteractor *inter)
 Attaches an interactor to the current object. More...
 
void setLastFocusGraphic ()
 Sets the object to be last in the focus chain.
 
virtual void setName (const char *name)
 Sets the name of the object. More...
 
IlvNamedPropertysetNamedProperty (IlvNamedProperty *property)
 Sets a named property on the object. More...
 
virtual void setNeedsInputContext (IlBoolean val)
 Specifies whether the graphic object should have locale dependent input. More...
 
void setNextFocusGraphic (IlSymbol *name)
 Sets the object to be next in the focus chain. More...
 
void setPreviousFocusGraphic (IlSymbol *name)
 Sets an object as previous in the focus chain. More...
 
void setProperty (const IlSymbol *key, IlAny value)
 Sets a property of the object to a value. More...
 
virtual void setSensitive (IlBoolean value)
 Sets the sensitivity of the object. More...
 
virtual void symmetry (IlvDirection axis)
 Flips a graphic object. More...
 
virtual void translate (IlvPos dx, IlvPos dy)
 Applies a transformation function on a graphic object. More...
 
IlvDim w () const
 Gets the width value of the object. More...
 
void w (IlvDim w)
 Sets the width value of the object. More...
 
virtual void write (IlvOutputFile &output) const =0
 Writes an object description to a file. More...
 
IlvPos x () const
 Gets the x coordinate value of the object. More...
 
void x (IlvPos x)
 Sets the x coordinate value of the object. More...
 
IlvPos y () const
 Gets the y coordinate value of the object. More...
 
void y (IlvPos y)
 Sets the y coordinate value of the object. More...
 
virtual IlBoolean zoomable () const
 Checks whether this object is zoomable. More...
 
- Public Member Functions inherited from IlvValueInterface
virtual IlBoolean applyValue (const IlvValue &value)
 Apply an accessor. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count=0)
 Changes several accessor values simultaneously. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves an accessor value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 
- Public Member Functions inherited from IlvStylable
 IlvStylable ()
 Constructor.
 
IlvStylablegetChildStylable (const IlString &cssElementName) const
 Returns child stylable with specified css element name. Returns null if the child is not found. More...
 
virtual IlString getCssElementClass () const
 Returns the DOM class of this stylable object. <cssElement class="cssClass"> More...
 
IlString getCssElementId () const
 Returns the DOM element id of this stylable object. <cssElement id="cssId"> More...
 
virtual void getOuterStylableSize (IlvDim &w, IlvDim &h) const
 Returns the size of the outer stylable if any. More...
 
virtual IlvStylablegetStylableParent () const
 Returns the parent of this object in the style hierarchy. More...
 
virtual void getStylableSize (IlvDim &w, IlvDim &h) const
 Returns the size of this object. More...
 
void setCssId (const IlString &id)
 Sets the object's css styling id. The id is initially the same as the name property of the object, but can be overridden using this function. More...
 
virtual void setupDefaultCssStyle ()
 virtual functions used to setupDefaultStyle. Override this to change default styling
 

Protected Member Functions

void shiftRows (IlInt index, IlvDim height)
 Shift rows vertically of height. More...
 

Friends

class IlvTimeScalePaintContext
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvGraphic
static void AddProperty (const IlSymbol *key, IlAny value)
 Adds a property to this object's class. More...
 
static void AddToCallbackTypeList (IlUInt &count, const char *const **names, const IlSymbol *const **types, const char *newName, const IlSymbol *newType)
 Adds a callback to a list. More...
 
static void AllowZoom (IlBoolean az)
 Sets or inhibits zooming. More...
 
static IlvClassInfoClassInfo () const
 Gets class information. More...
 
static IlAny GetProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse)
 Retrieves the property value associated with the key in this object's class. More...
 
static const IlvClassInfoHasProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse)
 Checks for the existence of a property for this object's class hierarchy. More...
 
static IlBoolean IsZoomAllowed ()
 Checks whether zoomable objects can display themselves when zooming out. More...
 
static IlvGraphicread (IlvInputFile &file, IlvPalette *palette)
 Reads an object description from a file. More...
 
static IlBoolean RemoveProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
static IlBoolean ReplaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property in this object's class. More...
 
- Static Public Member Functions inherited from IlvStylable
static void DisableCssDom ()
 Disables any further DOM additions. More...
 

Detailed Description

Graphic class that displays a time scale.

Library: views

The IlvTimeScale class is a time scale component that contains several IlvTimeScaleRow objects. Each row represents a particular time unit and is responsible for drawing itself. The rows are not true UI components, but behave like renderers.

To scroll through the scale or to zoom on it when changing the time value and the visible duration, a new IlvTimeConverter object must be set for the scale.

See also
setTimeConverter()

Constructor & Destructor Documentation

◆ IlvTimeScale()

IlvTimeScale::IlvTimeScale ( IlvDisplay display,
const IlvRect drawrect,
IlvPalette palette = 0 
)

Constructor.

Creates a new IlvTimeScale that initially contains no rows. By default, the time scale uses an IlvLinearTimeConverter. The time scale's time converter can be set by calling the setTimeConverter() method.

Parameters
displayThe display this graphic will use.
drawrectThe rectangle the scale will be drawn into.
paletteThe palette to use, or 0 to use the default palette.

Member Function Documentation

◆ addRow()

virtual void IlvTimeScale::addRow ( IlvTimeScaleRow row)
virtual

Append the specified IlvTimeScaleRow to the scale.

To see the modification, you must redraw the object.

Parameters
rowThe row to be added.
See also
removeRow()

◆ applyTransform()

void IlvTimeScale::applyTransform ( const IlvTransformer t)
virtual

Applies a transformation function to the graphic object.

Applies the transformer t to the shape of the object. Unless the transformation is a scaling operation, the result of applying it to certain objects can be insignificant. For example, applying a non-scaling transformer to an IlvRectangle object is meaningless, since the rectangle remains a rectangle. On the other hand, meaningful transformations can be applied to objects that are instances of types such as IlvLine or IlvPolyPoints.

Note
applyTransform() is one of the most important method to be rewritten for classes derived from IlvGraphic, since it is called by the resize(), move(), moveResize(), scale(), etc., methods.
Parameters
tThe transformer value. If 0, no transformation is performed.

Implements IlvGraphic.

◆ boundingBox()

virtual void IlvTimeScale::boundingBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Retrieves the bounding box of the graphic object.

Sets bbox, the rectangle reference parameter, to be the bounding box of the object. Since the object can appear within a transformed environment (for example, in a multiview editor), an IlvTransformer object occurs as an optional parameter in order to compute the bounding box in the coordinate system of the transformed environment.

Parameters
bboxThe bounding box to be set.
tA transformer value or 0 if there is no transformation.

Implements IlvGraphic.

◆ createPaintContext()

IlvTimeScalePaintContext* IlvTimeScale::createPaintContext ( IlDate  start,
IlvDuration  duration,
IlvRect  viewport 
)

Create a IlvTimeScalePaintContext.

Creates a IlvTimeScalePaintContext so that the time scale paints the specified time interval into the specified view port. Caller owns the returned object.

Parameters
startThe begin of the visible time interval.
durationThe duration of the visible time interval.
viewportThe rectangle defining the position the time scale to paint to.
Returns
The paint context.

◆ draw()

void IlvTimeScale::draw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the graphic object.

Draws the object in the given IlvPort using the transformer t.

Parameters
dstThe destination port this object is drawn onto.
tThe transformer value. If 0, no transformation is performed.
clipThe clipping region, relative to the transformed object, or 0 if none.

Implements IlvGraphic.

◆ getCalendar()

IlCalendar* IlvTimeScale::getCalendar ( IlDate  time)

Get the internal calendar set to the specified time.

Parameters
timeThe time to set the calendar to.

◆ getLocation() [1/2]

virtual IlInt IlvTimeScale::getLocation ( IlDate  time)
virtual

Get the x position corresponding to the specified time.

Parameters
timeThe time.
Returns
the coordinate corresponding to the IlDate.

◆ getLocation() [2/2]

virtual IlInt IlvTimeScale::getLocation ( IlDate  time,
const IlvTimeScalePaintContext context 
)
virtual

Get the x position corresponding to the specified time in the specified paint context.

Parameters
timeThe time.
contextThe paint context.
Returns
The x position.

◆ getMaxVisibleTime()

virtual IlDate IlvTimeScale::getMaxVisibleTime ( ) const
virtual

Returns the maximum time that the time scrollable can show.

Returns
The maximum visible time.
See also
setMaxVisibleTime()

Implements IlvTimeScrollable.

◆ getMinVisibleTime()

virtual IlDate IlvTimeScale::getMinVisibleTime ( ) const
virtual

Returns the minimum time that the time scrollable can show.

Returns
The minimum visible time.
See also
setMinVisibleTime()

Implements IlvTimeScrollable.

◆ getPaintContext()

IlvTimeScalePaintContext* IlvTimeScale::getPaintContext ( )

Gets the scales' cached IlvTimeScalePaintContext.

Gets the cached IlvTimeScalePaintContext used to paint the time scale on screen.

Caller owns the returned object

Returns
The cached paint context.

◆ getRow()

virtual IlvTimeScaleRow* IlvTimeScale::getRow ( IlInt  index) const
virtual

Get the IlvTimeScaleRow at a specified index.

Parameters
indexThe index of the returned row. The index value must be valid (not greater than the actual number of rows).
Returns
the IlvTimeScaleRow.

◆ getTime()

virtual IlDate IlvTimeScale::getTime ( IlInt  x)
virtual

Get the time that is under the x position in the component.

Parameters
xThe x position in the component.
Returns
the IlDate corresponding to the position.

◆ getTimeConverter()

IlvTimeConverter* IlvTimeScale::getTimeConverter ( ) const

Returns the IlvTimeConverter object of this scale.

◆ getVisibleDuration()

virtual IlvDuration IlvTimeScale::getVisibleDuration ( ) const
virtual

Returns the duration of the time interval displayed by the time scrollable.

See also
setVisibleDuration()

Implements IlvTimeScrollable.

◆ getVisibleInterval()

virtual IlvTimeInterval IlvTimeScale::getVisibleInterval ( ) const
virtual

Returns the time interval displayed by the scale.

See also
setVisibleInterval()

Implements IlvTimeScrollable.

◆ getVisibleTime()

virtual IlDate IlvTimeScale::getVisibleTime ( ) const
virtual

Returns the beginning of the time interval displayed by the time scrollable.

See also
setVisibleTime()

Implements IlvTimeScrollable.

◆ hideRow() [1/2]

virtual void IlvTimeScale::hideRow ( IlInt  index)
virtual

Hide the specified row.

Parameters
indexThe index of the row to be hidden.

◆ hideRow() [2/2]

virtual void IlvTimeScale::hideRow ( IlvTimeScaleRow row)
virtual

Hide the specified row.

Parameters
rowThe row to be hidden.

◆ isLabelVisible()

IlBoolean IlvTimeScale::isLabelVisible ( ) const

Returns whether the labels should be visible.

Returns
Whether the labels should be visible.

◆ isSeparatorVisible()

IlBoolean IlvTimeScale::isSeparatorVisible ( ) const

Returns whether the separators should be visible.

Returns
IlTrue if the separators should be visible, otherwise IlFalse.

◆ move()

virtual void IlvTimeScale::move ( IlvPos  x,
IlvPos  y 
)
virtual

Moves the graphic object.

Moves the upper left corner of the bounding box of the object to the position (x, y). The default implementation calls the member function translate().

Parameters
xThe x coordinate position.
yThe y coordinate position.

Reimplemented from IlvGraphic.

◆ removeRow()

virtual IlBoolean IlvTimeScale::removeRow ( IlvTimeScaleRow row)
virtual

Remove a row from the IlvTimeScale object.

To see the modification, you must redraw the object.

Parameters
rowThe row to be removed.
Returns
IlTrue if the specified row was found in the object, IlFalse otherwise.

◆ setLabelVisible()

void IlvTimeScale::setLabelVisible ( IlBoolean  visible)

Specifies whether the labels should be visible.

Parameters
visibleIlTrue if the labels should be visible or IlFalse if they should not.

◆ setMaxVisibleTime()

virtual void IlvTimeScale::setMaxVisibleTime ( IlDate  d)
virtual

Sets the maximum time that the time scrollable can show.

The current visible time and duration are trimmed to fit the new min-max interval by calling the IlvTimeScrollUtil::trimInterval() method.

Parameters
dThe maximum visible time.
See also
getMaxVisibleTime()
getVisibleDuration()

Implements IlvTimeScrollable.

◆ setMinVisibleTime()

virtual void IlvTimeScale::setMinVisibleTime ( IlDate  d)
virtual

Sets the minimum time that the time scrollable can show.

The current visible time and duration are trimmed to fit the new min-max interval by calling the IlvTimeScrollUtil::trimInterval() method.

Parameters
dThe minimum visible time.
See also
getMinVisibleTime()
getVisibleDuration()

Implements IlvTimeScrollable.

◆ setRow()

virtual void IlvTimeScale::setRow ( IlInt  index,
IlvTimeScaleRow row 
)
virtual

Change the IlvTimeScaleRow object at a specified index.

Parameters
indexThe index of the changed row. The index value must be valid (not greater than the actual number of rows).
rowThe new IlvTimeScaleRow.

Reimplemented in IlvCalendarScale.

◆ setSeparatorVisible()

void IlvTimeScale::setSeparatorVisible ( IlBoolean  visible)

Specifies whether the separators should be visible.

Parameters
visibleIlTrue if the separators should be visible or IlFalse if they shoud not.

◆ setTimeConverter()

void IlvTimeScale::setTimeConverter ( IlvTimeConverter t)

Sets the convertor of the time scale.

This method can be used to change the IlvTimeConverter object of this scale.

This object allows you to draw the scale correctly by converting time value to units on the screen.

Note
The scale takes ownership of the time converter, it will be deleted along with the scale or when a new time converter is set.
Parameters
tThe new IlvTimeConverter object.

◆ setVisibleDuration()

virtual void IlvTimeScale::setVisibleDuration ( IlvDuration  duration)
virtual

Sets the duration of the time interval displayed by the time scrollable.

The specified duration is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil::trimInterval() method. If you are changing both the visible time and duration, it is preferable to use the setVisibleInterval() method instead.

Parameters
durationThe new duration value.
See also
getVisibleDuration()
getMinVisibleTime()
getMaxVisibleTime()

Implements IlvTimeScrollable.

Reimplemented in IlvCalendarScale.

◆ setVisibleInterval()

virtual void IlvTimeScale::setVisibleInterval ( IlDate  time,
IlvDuration  duration 
)
virtual

Sets the time interval displayed by the scale.

The specified duration is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil::trimInterval() method.

Parameters
timeThe new time value.
durationThe new duration value.
See also
getMinVisibleTime()
getMaxVisibleTime()

Implements IlvTimeScrollable.

Reimplemented in IlvCalendarScale.

◆ setVisibleTime()

virtual void IlvTimeScale::setVisibleTime ( IlDate  time)
virtual

Sets the beginning of the time interval displayed by the time scrollable.

The specified time value is compared against the min and max visible times and is trimmed if necessary by calling the IlvTimeScrollUtil::trimInterval() method. If you are changing both the visible time and duration, it is preferable to use the setVisibleInterval() method instead.

Parameters
timeThe new time value.
See also
getVisibleTime()
getMinVisibleTime()
getMaxVisibleTime()
setVisibleInterval()

Implements IlvTimeScrollable.

◆ shiftRows()

void IlvTimeScale::shiftRows ( IlInt  index,
IlvDim  height 
)
protected

Shift rows vertically of height.

Parameters
indexThe index of the first row to be shifted.
heightThe height in pixel of which to shift the rows.

◆ showRow() [1/2]

virtual void IlvTimeScale::showRow ( IlInt  index)
virtual

Show the specified row.

Parameters
indexThe index of the row to be shown.

◆ showRow() [2/2]

virtual void IlvTimeScale::showRow ( IlvTimeScaleRow row)
virtual

Show the specified row.

Parameters
rowThe row to be shown.