Inherits Component, and Timer.
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 () |
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.
| CaretComponent::CaretComponent | ( | Component * | keyFocusOwner | ) |
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.
| 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.