JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Types | Public Member Functions
CaretComponent Class Reference

Inherits Component, and Timer.

List of all members.

Public Types

enum  ColourIds { caretColourId = 0x1000204 }
 A set of colour IDs to use to change the colour of various aspects of the caret. More...

Public Member Functions

 CaretComponent (Component *keyFocusOwner)
 Creates the caret component.
 ~CaretComponent ()
 Destructor.
virtual void setCaretPosition (const Rectangle< int > &characterArea)
 Sets the caret's position to place it next to the given character.
void paint (Graphics &g)
void timerCallback ()

Member Enumeration Documentation

A set of colour IDs to use to change the colour of various aspects of the caret.

These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() methods.

See also:
Component::setColour, Component::findColour, LookAndFeel::setColour, LookAndFeel::findColour
Enumerator:
caretColourId 

The colour with which to draw the caret.


Constructor & Destructor Documentation

Creates the caret component.

The keyFocusOwner is an optional component which the caret will check, making itself visible only when the keyFocusOwner has keyboard focus.

Destructor.


Member Function Documentation

virtual void CaretComponent::setCaretPosition ( const Rectangle< int > &  characterArea) [virtual]

Sets the caret's position to place it next to the given character.

The area is the rectangle containing the entire character that the caret is positioned on, so by default a vertical-line caret may choose to just show itself at the left of this area. You can override this method to customise its size. This method will also force the caret to reset its timer and become visible (if appropriate), so that as it moves, you can see where it is.

void CaretComponent::paint ( Graphics g) [virtual]

Reimplemented from Component.

void CaretComponent::timerCallback ( ) [virtual]

Implements Timer.


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