rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvCalendarScale Class Reference

Calendar time scale class. More...

#include <ilviews/graphics/calendarscale.h>

Inheritance diagram for IlvCalendarScale:
IlvTimeScale IlvSimpleGraphic IlvTimeScrollable IlvGraphic

List of all members.

Public Types

enum  Rows
 

Predefined rows indexes.

More...

Public Member Functions

 IlvCalendarScale (IlvDisplay *display, const IlvRect &drawrect, IlvPalette *palette=0)
 Constructor.
const char * className () const
 Returns the class name of an object.
virtual IlvGraphiccopy () const
 Copies this object.
virtual IlvClassInfogetClassInfo () const
 Gets class information.
IlvTimeScaleRowgetPredefinedRow (IlInt index)
 Returns the predefined row corresponding to a particular index.
IlInt getPredefinedRowCount ()
 Returns the number of predefined row.
void hidePredefinedRow (IlInt index)
 Hides the predefined time scale row.
IlBoolean isSubtypeOf (const IlvClassInfo *c) const
 Checks whether this object's class is a subclass.
IlBoolean isSubtypeOf (const char *t) const
 Checks whether this object's class is a subclass of a given parent class.
virtual void setRow (IlInt index, IlvTimeScaleRow *row)
 changes the IlvTimeScaleRow object at a specified index.
void setVisibleDuration (IlvDuration duration)
 Sets the time interval displayed by this scale.
void setVisibleInterval (IlDate time, IlvDuration duration)
 Sets the visible time and the visible duration of the time scale.
void showPredefinedRow (IlInt index)
 Shows the predefined time scale row.
virtual void write (IlvOutputFile &) const
 Writes an object description to a file.

Static Public Member Functions

static void AddProperty (const IlSymbol *k, IlAny v)
 Adds a property to this object's class.
static IlAny GetProperty (const IlSymbol *key, IlBoolean p=((IlBoolean) 0))
 Retrieves the property value associated with the key in this object's class.
static const IlvClassInfoHasProperty (const IlSymbol *key, IlBoolean p=((IlBoolean) 0))
 Checks for the existence of a property for this object's class hierarchy.
static IlvGraphicread (IlvInputFile &, IlvPalette *pal)
 Reads an object description from a file.
static IlBoolean RemoveProperty (const IlSymbol *key)
 Removes a property from this object's class.
static IlBoolean ReplaceProperty (const IlSymbol *k, IlAny v)
 Replaces a property in this object's class.

Protected Member Functions

virtual void drawRows (IlvPort *p, const IlvTransformer *t) const
 Paints each visible IlvTimeScaleRow object of this scale.

Detailed Description

Calendar time scale class.

Library: views

This class is an extension of the class IlvTimeScale. It contains all the predefined kinds of rows. Only two of these predefined rows are visible at a time, depending on the zoom level of the time scale.


Member Enumeration Documentation

Predefined rows indexes.

The indexes of each predefined row of the IlvCalendarScale.

See also:
getPredefinedRow
hidePredefinedRow
showPredefinedRow

Constructor & Destructor Documentation

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

Constructor.

Create a new IlvCalendarScale

Parameters:
display The display where this object is created.
drawrect The rectangle in which the scale will be drawn.
palette The palette of the display object.

Member Function Documentation

static void IlvCalendarScale::AddProperty ( const IlSymbol key,
IlAny  value 
) [static]

Adds a property to this object's class.

This static function associates the given value with the given key for the class of this object only.

Parameters:
key The key to be associated.
value The value to be associated.

Reimplemented from IlvTimeScale.

const char* IlvCalendarScale::className (  )  const

Returns the class name of an object.

This method is equivalent to getClassInfo()->getClassName().

Returns:
The class name of the object. For example, for an IlvRectangle object, the className function returns "IlvRectangle".

Reimplemented from IlvTimeScale.

virtual IlvGraphic* IlvCalendarScale::copy (  )  const [virtual]

Copies this object.

Allocates and returns a copy of this object. If the object is composite, the implementation of this member function makes a copy of the object's components.

Returns:
A copy of the object.
See also:
IlvPredefinedIOMembers.

Reimplemented from IlvTimeScale.

virtual void IlvCalendarScale::drawRows ( IlvPort p,
const IlvTransformer t 
) const [protected, virtual]

Paints each visible IlvTimeScaleRow object of this scale.

This method is overridden to automatically adjust which rows are visible, their tick spacing, and their format strings.

Parameters:
p The destination graphics.
t The transformer value. If 0, no transformation is performed.

Reimplemented from IlvTimeScale.

virtual IlvClassInfo* IlvCalendarScale::getClassInfo (  )  const [virtual]

Gets class information.

Returns a pointer to the IlvClassInfo object associated with this object's class.

Returns:
A pointer to the class information object of the class of this object.

Reimplemented from IlvTimeScale.

IlvTimeScaleRow* IlvCalendarScale::getPredefinedRow ( IlInt  index  ) 

Returns the predefined row corresponding to a particular index.

Parameters:
index The index of the row.
static IlAny IlvCalendarScale::GetProperty ( const IlSymbol key,
IlBoolean  checkSuperClass = ((IlBoolean) 0) 
) [static]

Retrieves the property value associated with the key in this object's class.

Retrieves the property value associated with the property name key. If the property cannot be found in the class of this object, and if checkSuperClass is set to IlTrue, then the function operates iteratively on each superclass until the property is found. If the property cannot be found, then 0 is returned.

Parameters:
key The key with which the property value is associated.
checkSuperClass IlTrue specifies iterative search on superclasses.
Returns:
The property value associated with the proper name key, or 0.

Reimplemented from IlvTimeScale.

static const IlvClassInfo* IlvCalendarScale::HasProperty ( const IlSymbol key,
IlBoolean  checkSuperClass = ((IlBoolean) 0) 
) [static]

Checks for the existence of a property for this object's class hierarchy.

Retrieves a pointer to the IlvClassInfo that indicates a class where the key property exists. If the returned value is non-0, then this property actually exists for this class. If this is not the case and if checkSuperClass is set to IlTrue, then the function operates iteratively on each superclass until a match is found. If the property cannot be found, then 0 is returned.

Parameters:
key The key with which the property value is associated.
checkSuperClass IlTrue specifies iterative search on superclasses.
Returns:
A pointer to the ClassInfo that indicates a class where the key property exists, or 0.

Reimplemented from IlvTimeScale.

void IlvCalendarScale::hidePredefinedRow ( IlInt  index  ) 

Hides the predefined time scale row.

Parameters:
index The index of the predefined row.
See also:
showPredefinedRow
IlBoolean IlvCalendarScale::isSubtypeOf ( const IlvClassInfo classInfo  )  const

Checks whether this object's class is a subclass.

This method is equivalent to getClassInfo()->isSubtypeOf(classInfo).

Parameters:
classInfo The name of a class on which the object's class is tested.
Returns:
Either IlTrue or IlFalse, depending on whether or not this object's class is a subclass of the class indicated by classInfo.

Reimplemented from IlvTimeScale.

IlBoolean IlvCalendarScale::isSubtypeOf ( const char *  parentClass  )  const

Checks whether this object's class is a subclass of a given parent class.

This method is equivalent to getClassInfo()->isSubtypeOf(parentClass).

Parameters:
parentClass A string representing the parent class.
Returns:
Either IlTrue or IlFalse, depending on whether or not this object's class inherits parentClass attributes. The parentClass parameter should be a string representing the class name of an IlvGraphic subclass. A call to this member function for a given class instance returns IlTrue if given the name of its class.

Reimplemented from IlvTimeScale.

static IlvGraphic* IlvCalendarScale::read ( IlvInputFile file,
IlvPalette palette 
) [static]

Reads an object description from a file.

Reads an object description from the file input, given the palette graphic attributes. It reads the information that was saved by the member function write to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile, read should be equivalent to:

 IlvGraphic*
 MyClass::read(IlvInputFile& file, IlvPalette* palette)
 {
     return new MyClass(file, palette);
 }

In the following example, the static member function read of the IlvLabel class could have the following form:

 IlvGraphic*
 IlvLabel::read(IlvInputFile& file, IlvPalette* pal)
 {
     IlvPoint pos;
     file.getStream() >> pos;     // Read the position field
     return new IlvLabel(pal->getDisplay(), pos,
     IlvReadString(file.getStream()), pal);
 }
Parameters:
file The name of the file to be read from.
palette The name of the palette for the object.
See also:
DeclareTypeInfoRO, DeclareTypeInfo, IlvPredefinedIOMembers.
Warning:
[note] The read method is not capitalized like other static methods so that it is consistent with the write method.

Reimplemented from IlvTimeScale.

static IlBoolean IlvCalendarScale::RemoveProperty ( const IlSymbol key  )  [static]

Removes a property from this object's class.

This static function removes the indicated property to the class of this object.

Parameters:
key The key property to be removed.
Returns:
IlTrue if the key property was actually found, or IlFalse otherwise.

Reimplemented from IlvTimeScale.

static IlBoolean IlvCalendarScale::ReplaceProperty ( const IlSymbol key,
IlAny  value 
) [static]

Replaces a property in this object's class.

This static function replaces the indicated property value to the class of this object.

Parameters:
key The key to be replaced.
value The value to be replaced.
Returns:
IlTrue if the key property was actually found, or IlFalse otherwise.

Reimplemented from IlvTimeScale.

virtual void IlvCalendarScale::setRow ( IlInt  index,
IlvTimeScaleRow row 
) [virtual]

changes the IlvTimeScaleRow object at a specified index.

Checks that the index is within the range of predefined rows.

Parameters:
index The index of the changed row.
row The new IlvTimeScaleRow.

Reimplemented from IlvTimeScale.

void IlvCalendarScale::setVisibleDuration ( IlvDuration  duration  )  [virtual]

Sets the time interval displayed by this scale.

The time scale adjusts its internal zoom and scroll parameters so that the specified duration is visible.

Parameters:
duration The duration of the new time interval.

Reimplemented from IlvTimeScale.

void IlvCalendarScale::setVisibleInterval ( IlDate  time,
IlvDuration  duration 
) [virtual]

Sets the visible time and the visible duration of the time scale.

Parameters:
time The new visible time.
duration The new visible duration.

Reimplemented from IlvTimeScale.

void IlvCalendarScale::showPredefinedRow ( IlInt  index  ) 

Shows the predefined time scale row.

Parameters:
index The index of the predefined row.
See also:
hidePredefinedRow
virtual void IlvCalendarScale::write ( IlvOutputFile output  )  const [virtual]

Writes an object description to a file.

Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function read. Information concerning any IlvPalette object attached to this object is written out by the object containers. All other information, such as the position and size of the object, is written out by this virtual member function.
For example, suppose we have an IlvLabel class that implements a graphic object drawn as a text string at a given position. It maintains its position in an internal IlvPoint field called _position and its textual content in an internal character array field called _text. The only information we need to save is the contents of those fields. So, the member function write of such an object should have the following form:

 void
 IlvLabel::write(IlvOutputFile& file) const
 {
     // Save the position field
     file.getStream() << IlvSpc() << _position;
     // Save the text field
     IlvWriteString(file.getStream(), _text);
 }
Parameters:
output The the output file to be written to.
See also:
DeclareTypeInfo.

Reimplemented from IlvTimeScale.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.