Vital
Loading...
Searching...
No Matches
OpenGlTextEditor Class Reference

A text editor that uses an OpenGlImageComponent for rendering and updates the image on text changes. More...

#include <open_gl_image_component.h>

Inheritance diagram for OpenGlTextEditor:
OpenGlAutoImageComponent< TextEditor >

Public Member Functions

 OpenGlTextEditor (String name)
 Constructs an OpenGlTextEditor with a given name.
 
 OpenGlTextEditor (String name, wchar_t password_char)
 Constructs an OpenGlTextEditor with a given name and password character.
 
bool keyPressed (const KeyPress &key) override
 
void textEditorTextChanged (TextEditor &) override
 
void textEditorFocusLost (TextEditor &) override
 
virtual void mouseDrag (const MouseEvent &e) override
 
void applyFont ()
 Applies the appropriate font based on monospace setting and component size.
 
void visibilityChanged () override
 
void resized () override
 
void setMonospace ()
 Sets the text editor to use a monospace font.
 
- Public Member Functions inherited from OpenGlAutoImageComponent< TextEditor >
virtual void mouseDown (const MouseEvent &e) override
 
virtual void mouseUp (const MouseEvent &e) override
 
virtual void mouseDoubleClick (const MouseEvent &e) override
 
virtual void mouseEnter (const MouseEvent &e) override
 
virtual void mouseExit (const MouseEvent &e) override
 
virtual void mouseWheelMove (const MouseEvent &e, const MouseWheelDetails &wheel) override
 
OpenGlImageComponentgetImageComponent ()
 Gets the underlying OpenGlImageComponent.
 
virtual void redoImage ()
 Redraws the image after a state change.
 

Additional Inherited Members

- Protected Attributes inherited from OpenGlAutoImageComponent< TextEditor >
OpenGlImageComponent image_component_
 The OpenGlImageComponent for rendering this component.
 

Detailed Description

A text editor that uses an OpenGlImageComponent for rendering and updates the image on text changes.

The OpenGlTextEditor applies a font and redraws its image on various text events, mouse events, and focus changes.

Constructor & Destructor Documentation

◆ OpenGlTextEditor() [1/2]

OpenGlTextEditor::OpenGlTextEditor ( String name)
inline

Constructs an OpenGlTextEditor with a given name.

Parameters
nameThe name of the text editor.

◆ OpenGlTextEditor() [2/2]

OpenGlTextEditor::OpenGlTextEditor ( String name,
wchar_t password_char )
inline

Constructs an OpenGlTextEditor with a given name and password character.

Parameters
nameThe name of the text editor.
password_charThe character used to mask text if used as a password field.

Member Function Documentation

◆ applyFont()

void OpenGlTextEditor::applyFont ( )
inline

Applies the appropriate font based on monospace setting and component size.

◆ keyPressed()

bool OpenGlTextEditor::keyPressed ( const KeyPress & key)
inlineoverride

◆ mouseDrag()

virtual void OpenGlTextEditor::mouseDrag ( const MouseEvent & e)
inlineoverridevirtual

◆ resized()

void OpenGlTextEditor::resized ( )
inlineoverride

◆ setMonospace()

void OpenGlTextEditor::setMonospace ( )
inline

Sets the text editor to use a monospace font.

◆ textEditorFocusLost()

void OpenGlTextEditor::textEditorFocusLost ( TextEditor & )
inlineoverride

◆ textEditorTextChanged()

void OpenGlTextEditor::textEditorTextChanged ( TextEditor & )
inlineoverride

◆ visibilityChanged()

void OpenGlTextEditor::visibilityChanged ( )
inlineoverride

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