VizKit  3.3.7
Classes | Public Member Functions | Private Member Functions | Private Attributes
VizKit::VisualTextAutoScrollView Class Reference

A VisualTextAutoScrollView displays rendered text. More...

#include <VisualTextAutoScrollView.h>

Inheritance diagram for VizKit::VisualTextAutoScrollView:
VizKit::VisualObject

List of all members.

Classes

class  VisualTextAutoScrollViewTextLineImageRecord

Public Member Functions

 VisualTextAutoScrollView ()
 The constructor.
 ~VisualTextAutoScrollView ()
 The destructor.
 VisualTextAutoScrollView (const VisualTextAutoScrollView &other)
 Copy constructor.
VisualTextAutoScrollViewoperator= (const VisualTextAutoScrollView &other)
 Assignment operator.
bool operator< (const VisualTextAutoScrollView &other) const
 Less than operator.
bool operator== (const VisualTextAutoScrollView &other) const
 Equality operator.
bool operator!= (const VisualTextAutoScrollView &other) const
 Inequality operator.
virtual VisualTextAutoScrollViewclone (void) const
 Copies the current VisualTextAutoScrollView and returns a pointer to a new VisualTextAutoScrollView.
void setStyledString (VisualStyledString &aStyledString)
 Sets the visual string.
const VisualStyledString *const getStyledString (void)
 Returns the styled string.
void setStringStyle (VisualStringStyle aStringStyle)
 Sets the style of the visual string.
VisualStringStyle getStringStyle (void)
 Returns the current string style.
void draw (float aCurrAudioPlayProgressValue)
 Draws the visual string.
void refreshLayout (void)
 Refreshes the layout based on current canvas size.
PixelRect getViewRect (void)
 Returns the pixel rect of the view.
void setDisplayedPixelHeight (size_t aDisplayedPixelHeight)
 Sets the height of the displayed view in pixels inside which the content is clipped.

Private Member Functions

void copy (const VisualTextAutoScrollView &other)
 Copy method for assignment operator and copy constructor.
void refreshTextlineImageData (float aProgressValue)
 Loads as much image data as necessary.
void calculateFirstAndLastTextLineIndexToShow (float aProgressValue)
 Calculates the first and the last index of text lines to show.
float convertProgressValueToInternalProgressValue (float aCurrAudioPlayProgressValue)
 Converts the passed-in progress values of audio play progress to the internally used progress value for auto-scrolling.
size_t completeTextLinesPixelHeight (void)
 The pixel height of all text lines summed up.

Private Attributes

VisualStyledStringtextScrollViewStyledString
 The styled string to be displayed in the scroll view.
std::vector
< VisualTextAutoScrollViewTextLineImageRecord * > 
textScrollViewImageVector
 The vector with image data per text line.
size_t firstTextLineIndexToShow
 The index of the first text line that needs to be shown (and needs to be loaded as image).
size_t lastTextLineIndexToShow
 The index of the last text line that needs to be shown (and needs to be loaded as image).
size_t longestTextLinePixelWidth
 The pixel width of the longest text line image.
size_t displayedPixelHeight
 The maximum number of vertically displayed pixels.

Detailed Description

A VisualTextAutoScrollView displays rendered text.

Text that does not fit inside the view bounds is scrolled in automatically. Scrolling speed and scrolling position depends on the auto play position that is passed in with the draw method. Only text lines currently being displayed are rendered into images.


Constructor & Destructor Documentation

The constructor.

The destructor.

Copy constructor.

Parameters:
otherReference to another VisualTextAutoScrollView.

Member Function Documentation

Calculates the first and the last index of text lines to show.

Parameters:
aProgressValueProgress of the scrolling (range: 0.0 to 1.0).

Copies the current VisualTextAutoScrollView and returns a pointer to a new VisualTextAutoScrollView.

Implements VizKit::VisualObject.

The pixel height of all text lines summed up.

float VisualTextAutoScrollView::convertProgressValueToInternalProgressValue ( float  aCurrAudioPlayProgressValue) [private]

Converts the passed-in progress values of audio play progress to the internally used progress value for auto-scrolling.

Parameters:
aCurrAudioPlayProgressValueProgress of the audio track (range: 0.0 to 1.0).
void VisualTextAutoScrollView::copy ( const VisualTextAutoScrollView other) [private]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualTextAutoScrollView.
void VisualTextAutoScrollView::draw ( float  aCurrAudioPlayProgressValue)

Draws the visual string.

Parameters:
aCurrAudioPlayProgressValueProgress of the audio track (range: 0.0 to 1.0).

Returns the current string style.

Returns:
The current string style.

Returns the styled string.

Returns:
The styled string.

Returns the pixel rect of the view.

bool VisualTextAutoScrollView::operator!= ( const VisualTextAutoScrollView other) const

Inequality operator.

Parameters:
otherAnother VisualTextAutoScrollView.
bool VisualTextAutoScrollView::operator< ( const VisualTextAutoScrollView other) const

Less than operator.

Parameters:
otherAnother VisualTextAutoScrollView.
Remarks:
The less than operator is used by std::map for find() and sorting (if VisualTextAutoScrollView is used as key_type).
VisualTextAutoScrollView & VisualTextAutoScrollView::operator= ( const VisualTextAutoScrollView other)

Assignment operator.

Parameters:
otherReference to another VisualTextAutoScrollView.
bool VisualTextAutoScrollView::operator== ( const VisualTextAutoScrollView other) const

Equality operator.

Parameters:
otherAnother VisualTextAutoScrollView.

Refreshes the layout based on current canvas size.

void VisualTextAutoScrollView::refreshTextlineImageData ( float  aProgressValue) [private]

Loads as much image data as necessary.

Parameters:
aProgressValueProgress of the scrolling (range: 0.0 to 1.0).
void VisualTextAutoScrollView::setDisplayedPixelHeight ( size_t  aDisplayedPixelHeight)

Sets the height of the displayed view in pixels inside which the content is clipped.

Parameters:
aDisplayedPixelHeightThe maximum pixel height of the view content.

Sets the style of the visual string.

Parameters:
aStringStyleA string style.

Sets the visual string.

Parameters:
aStyledStringReference to a styled string.

Member Data Documentation

The maximum number of vertically displayed pixels.

The index of the first text line that needs to be shown (and needs to be loaded as image).

The index of the last text line that needs to be shown (and needs to be loaded as image).

The pixel width of the longest text line image.

The vector with image data per text line.

The styled string to be displayed in the scroll view.


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

Generated on Sun May 3 2015 20:26:32 for VizKit by doxygen 1.8.0