openshot-audio  0.1.7
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
TextPropertyComponent Class Reference

#include <juce_TextPropertyComponent.h>

Inheritance diagram for TextPropertyComponent:
PropertyComponent SettableTooltipClient TooltipClient

Classes

class  LabelComp
 

Public Types

enum  ColourIds { backgroundColourId = 0x100e401, textColourId = 0x100e402, outlineColourId = 0x100e403 }
 
- Public Types inherited from PropertyComponent
enum  ColourIds { backgroundColourId = 0x1008300, labelTextColourId = 0x1008301 }
 

Public Member Functions

 TextPropertyComponent (const Value &valueToControl, const String &propertyName, int maxNumChars, bool isMultiLine)
 
 ~TextPropertyComponent ()
 
virtual void setText (const String &newText)
 
virtual String getText () const
 
void refresh ()
 
- Public Member Functions inherited from PropertyComponent
 PropertyComponent (const String &propertyName, int preferredHeight=25)
 
 ~PropertyComponent ()
 
int getPreferredHeight () const noexcept
 
void setPreferredHeight (int newHeight) noexcept
 
void paint (Graphics &) override
 
void resized () override
 
void enablementChanged () override
 
- Public Member Functions inherited from SettableTooltipClient
virtual ~SettableTooltipClient ()
 
virtual void setTooltip (const String &newTooltip)
 
virtual String getTooltip ()
 
- Public Member Functions inherited from TooltipClient
virtual ~TooltipClient ()
 

Protected Member Functions

 TextPropertyComponent (const String &propertyName, int maxNumChars, bool isMultiLine)
 
- Protected Member Functions inherited from SettableTooltipClient
 SettableTooltipClient ()
 

Friends

class LabelComp
 

Additional Inherited Members

- Protected Attributes inherited from PropertyComponent
int preferredHeight
 

Detailed Description

A PropertyComponent that shows its value as editable text.

See Also
PropertyComponent

Member Enumeration Documentation

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

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
backgroundColourId 

The colour to fill the background of the text area.

textColourId 

The colour to use for the editable text.

outlineColourId 

The colour to use to draw an outline around the text area.

Constructor & Destructor Documentation

TextPropertyComponent::TextPropertyComponent ( const String propertyName,
int  maxNumChars,
bool  isMultiLine 
)
protected

Creates a text property component.

The maxNumChars is used to set the length of string allowable, and isMultiLine sets whether the text editor allows carriage returns.

See Also
TextEditor
TextPropertyComponent::TextPropertyComponent ( const Value valueToControl,
const String propertyName,
int  maxNumChars,
bool  isMultiLine 
)

Creates a text property component.

The maxNumChars is used to set the length of string allowable, and isMultiLine sets whether the text editor allows carriage returns.

See Also
TextEditor
TextPropertyComponent::~TextPropertyComponent ( )

Destructor.

Member Function Documentation

String TextPropertyComponent::getText ( ) const
virtual

Returns the text that should be shown in the text editor.

void TextPropertyComponent::refresh ( )
virtual

Updates the property component if the item it refers to has changed.

A subclass must implement this method, and other objects may call it to force it to refresh itself.

The subclass should be economical in the amount of work is done, so for example it should check whether it really needs to do a repaint rather than just doing one every time this method is called, as it may be called when the value being displayed hasn't actually changed.

Implements PropertyComponent.

void TextPropertyComponent::setText ( const String newText)
virtual

Called when the user edits the text.

Your subclass must use this callback to change the value of whatever item this property component represents.

Friends And Related Function Documentation

friend class LabelComp
friend

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