|
| CodeEditorComponent (CodeDocument &document, CodeTokeniser *codeTokeniser) |
|
| ~CodeEditorComponent () |
|
CodeDocument & | getDocument () const noexcept |
|
void | loadContent (const String &newContent) |
|
float | getCharWidth () const noexcept |
|
int | getLineHeight () const noexcept |
|
int | getNumLinesOnScreen () const noexcept |
|
int | getFirstLineOnScreen () const noexcept |
|
int | getNumColumnsOnScreen () const noexcept |
|
CodeDocument::Position | getCaretPos () const |
|
Rectangle< int > | getCaretRectangle () override |
|
void | moveCaretTo (const CodeDocument::Position &newPos, bool selecting) |
|
Rectangle< int > | getCharacterBounds (const CodeDocument::Position &pos) const |
|
CodeDocument::Position | getPositionAt (int x, int y) |
|
CodeDocument::Position | getSelectionStart () const |
|
CodeDocument::Position | getSelectionEnd () const |
|
void | setLineNumbersShown (bool shouldBeShown) |
|
bool | moveCaretLeft (bool moveInWholeWordSteps, bool selecting) |
|
bool | moveCaretRight (bool moveInWholeWordSteps, bool selecting) |
|
bool | moveCaretUp (bool selecting) |
|
bool | moveCaretDown (bool selecting) |
|
bool | scrollDown () |
|
bool | scrollUp () |
|
bool | pageUp (bool selecting) |
|
bool | pageDown (bool selecting) |
|
bool | moveCaretToTop (bool selecting) |
|
bool | moveCaretToStartOfLine (bool selecting) |
|
bool | moveCaretToEnd (bool selecting) |
|
bool | moveCaretToEndOfLine (bool selecting) |
|
bool | deleteBackwards (bool moveInWholeWordSteps) |
|
bool | deleteForwards (bool moveInWholeWordSteps) |
|
bool | deleteWhitespaceBackwardsToTabStop () |
|
virtual bool | copyToClipboard () |
|
virtual bool | cutToClipboard () |
|
virtual bool | pasteFromClipboard () |
|
bool | undo () |
|
bool | redo () |
|
void | selectRegion (const CodeDocument::Position &start, const CodeDocument::Position &end) |
|
bool | selectAll () |
|
void | deselectAll () |
|
void | scrollToLine (int newFirstLineOnScreen) |
|
void | scrollBy (int deltaLines) |
|
void | scrollToColumn (int newFirstColumnOnScreen) |
|
void | scrollToKeepCaretOnScreen () |
|
void | scrollToKeepLinesOnScreen (Range< int > linesToShow) |
|
void | insertTextAtCaret (const String &textToInsert) override |
|
void | insertTabAtCaret () |
|
void | indentSelection () |
|
void | unindentSelection () |
|
Range< int > | getHighlightedRegion () const override |
|
bool | isHighlightActive () const noexcept |
|
void | setHighlightedRegion (const Range< int > &newRange) override |
|
String | getTextInRange (const Range< int > &range) const override |
|
void | setTabSize (int numSpacesPerTab, bool insertSpacesInsteadOfTabCharacters) |
|
int | getTabSize () const noexcept |
|
bool | areSpacesInsertedForTabs () const |
|
String | getTabString (int numSpaces) const |
|
void | setFont (const Font &newFont) |
|
const Font & | getFont () const noexcept |
|
void | setReadOnly (bool shouldBeReadOnly) noexcept |
|
bool | isReadOnly () const noexcept |
|
void | setColourScheme (const ColourScheme &scheme) |
|
const ColourScheme & | getColourScheme () const noexcept |
|
Colour | getColourForTokenType (int tokenType) const |
|
void | setScrollbarThickness (int thickness) |
|
int | getScrollbarThickness () const noexcept |
|
virtual void | handleReturnKey () |
|
virtual void | handleTabKey () |
|
virtual void | handleEscapeKey () |
|
virtual void | addPopupMenuItems (PopupMenu &menuToAddTo, const MouseEvent *mouseClickEvent) |
|
virtual void | performPopupMenuAction (int menuItemID) |
|
void | setCommandManager (ApplicationCommandManager *newManager) noexcept |
|
void | paint (Graphics &) override |
|
void | resized () override |
|
bool | keyPressed (const KeyPress &) override |
|
void | mouseDown (const MouseEvent &) override |
|
void | mouseDrag (const MouseEvent &) override |
|
void | mouseUp (const MouseEvent &) override |
|
void | mouseDoubleClick (const MouseEvent &) override |
|
void | mouseWheelMove (const MouseEvent &, const MouseWheelDetails &) override |
|
void | focusGained (FocusChangeType) override |
|
void | focusLost (FocusChangeType) override |
|
bool | isTextInputActive () const override |
|
void | setTemporaryUnderlining (const Array< Range< int > > &) override |
|
ApplicationCommandTarget * | getNextCommandTarget () override |
|
void | getAllCommands (Array< CommandID > &) override |
|
void | getCommandInfo (CommandID, ApplicationCommandInfo &) override |
|
bool | perform (const InvocationInfo &) override |
|
| TextInputTarget () |
|
virtual | ~TextInputTarget () |
|
virtual VirtualKeyboardType | getKeyboardType () |
|
A text editor component designed specifically for source code.
This is designed to handle syntax highlighting and fast editing of very large files.
This adds the items to the popup menu.
By default it adds the cut/copy/paste items, but you can override this if you need to replace these with your own items.
If you want to add your own items to the existing ones, you can override this, call the base class's addPopupMenuItems() method, then append your own items.
When the menu has been shown, performPopupMenuAction() will be called to perform the item that the user has chosen.
If this was triggered by a mouse-click, the mouseClickEvent parameter will be a pointer to the info about it, or may be null if the menu is being triggered by some other means.
- See Also
- performPopupMenuAction, setPopupMenuEnabled, isPopupMenuEnabled