openshot-audio  0.1.6
Public Types | Public Member Functions | List of all members
juce::TextInputTarget Class Referenceabstract

#include <juce_gui_basics.h>

Inheritance diagram for juce::TextInputTarget:
juce::CodeEditorComponent juce::TextEditor juce::AlertTextComp

Public Types

enum  VirtualKeyboardType {
  textKeyboard = 0, numericKeyboard, decimalKeyboard, urlKeyboard,
  emailAddressKeyboard, phoneNumberKeyboard
}
 

Public Member Functions

 TextInputTarget ()
 
virtual ~TextInputTarget ()
 
virtual bool isTextInputActive () const =0
 
virtual Range< intgetHighlightedRegion () const =0
 
virtual void setHighlightedRegion (const Range< int > &newRange)=0
 
virtual void setTemporaryUnderlining (const Array< Range< int > > &underlinedRegions)=0
 
virtual String getTextInRange (const Range< int > &range) const =0
 
virtual void insertTextAtCaret (const String &textToInsert)=0
 
virtual Rectangle< intgetCaretRectangle ()=0
 
virtual VirtualKeyboardType getKeyboardType ()
 

Detailed Description

An abstract base class which can be implemented by components that function as text editors.

This class allows different types of text editor component to provide a uniform interface, which can be used by things like OS-specific input methods, on-screen keyboards, etc.

Member Enumeration Documentation

A set of possible on-screen keyboard types, for use in the getKeyboardType() method.

Enumerator
textKeyboard 
numericKeyboard 
decimalKeyboard 
urlKeyboard 
emailAddressKeyboard 
phoneNumberKeyboard 

Constructor & Destructor Documentation

juce::TextInputTarget::TextInputTarget ( )
inline
virtual juce::TextInputTarget::~TextInputTarget ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual Rectangle<int> juce::TextInputTarget::getCaretRectangle ( )
pure virtual

Returns the position of the caret, relative to the component's origin.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual Range<int> juce::TextInputTarget::getHighlightedRegion ( ) const
pure virtual

Returns the extents of the selected text region, or an empty range if nothing is selected,

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual VirtualKeyboardType juce::TextInputTarget::getKeyboardType ( )
inlinevirtual

Returns the target's preference for the type of keyboard that would be most appropriate. This may be ignored, depending on the capabilities of the OS.

Reimplemented in juce::TextEditor.

virtual String juce::TextInputTarget::getTextInRange ( const Range< int > &  range) const
pure virtual

Returns a specified sub-section of the text.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual void juce::TextInputTarget::insertTextAtCaret ( const String textToInsert)
pure virtual

Inserts some text, overwriting the selected text region, if there is one.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual bool juce::TextInputTarget::isTextInputActive ( ) const
pure virtual

Returns true if this input target is currently accepting input. For example, a text editor might return false if it's in read-only mode.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual void juce::TextInputTarget::setHighlightedRegion ( const Range< int > &  newRange)
pure virtual

Sets the currently-selected text region.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.

virtual void juce::TextInputTarget::setTemporaryUnderlining ( const Array< Range< int > > &  underlinedRegions)
pure virtual

Sets a number of temporarily underlined sections. This is needed by MS Windows input method UI.

Implemented in juce::TextEditor, and juce::CodeEditorComponent.


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