Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
An IlvCodeEditor specialization providing features to create a debugger-like text control. More...
#include <ilviews/gadgets/codeedit.h>
Public Member Functions | |
IlBoolean | setErrorLine (IlInt line) |
Registers the given line as a line with an error. More... | |
IlBoolean | setErrorLocation (IlInt beginLine, IlInt beginColumn, IlInt endLine, IlInt endColumn) |
Registers the given text span as being in error. More... | |
IlBoolean | unsetAllErrorLines () |
Removes all error marks from the editor. More... | |
Public Member Functions inherited from IlvCodeEditor | |
IlvCodeEditor (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, Binding::Mode mode=Binding::MSVCMode, StyleSheet *sheet=0) | |
Constructor. More... | |
IlvCodeEditor (IlvDisplay *display, const IlvRect &rect, const char *text, IlUShort thickness, StyleSheet *sheet, IlvDim marginWidth, Binding::Mode mode, Parser *parser=0) | |
Constructor. More... | |
void | adjustFromScrollBar (const IlvScrollBar *sb, IlvDirection dir) |
Is called to adjust the gadget to the scroll bars values. More... | |
void | adjustScrollBarValue (IlvScrollBar *sb, IlvDirection dir) |
Is called to adjust the scroll bar values. More... | |
void | appendText (const char *txt) |
Appends the given text to the buffer. More... | |
IlBoolean | appendToClipBoard () |
Appends the current selection to the clipboard. More... | |
void | blockUndoRedo () |
Inhibits the undo/redo feature. More... | |
IlBoolean | braceHighLight () const |
Tells if brace matching highlighting is activated. More... | |
IlInt | breakLine (IlBoolean autoIndent) |
Breaks a line at the current cursor position. More... | |
IlBoolean | centerOnCurrentLine () |
Scrolls as needed to place the current line at the center of the editor view. More... | |
void | clearEditSignal () |
Sets the edition signal to IlFalse . | |
IlBoolean | commentRegion () |
Inserts a mono-line comment in the text. More... | |
IlBoolean | completeWord () |
Tries to complete the word preceding the cursor. More... | |
char * | concatText (const Location &begin, const Location &end, IlBoolean tabAsBlanks) const |
Concatenates the text between two locations. More... | |
IlBoolean | copyToClipBoard () const |
Copies the current selection to the clipboard. More... | |
IlBoolean | cutLineToClipBoard () |
Executes a partial cut from cursor to end of line and puts it into the clipboard. More... | |
IlBoolean | cutToClipBoard () |
Cuts the current selection to the clipboard. More... | |
virtual void | drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the gadget contents. More... | |
IlBoolean | find (IlBoolean forwardDir, IlBoolean limited, IlBoolean caseSens, IlBoolean wholeWord, const char *pattern, Location from, Location to, IlBoolean s=IlTrue) |
Finds the first occurence of the specified patern from the current cursor position. More... | |
IlInt | getCursorColumn () const |
Returns the column where the cursor is located. More... | |
IlInt | getCursorLine () const |
Returns the index of the line where the cursor is located. More... | |
const Location & | getCursorLocation () const |
Returns the location of the cursor. | |
void | getRedoCommandLabel (IlString &l) const |
Returns in its argument the label of the last redoable command. More... | |
char * | getSelection () const |
Retrieves the text from the current selection. More... | |
void | getSelection (Location &from, Location &to) const |
Returns the start and end locations of the current selection. | |
Location | getSelectionEnd () const |
Returns the location of the end of the current selection. More... | |
IlInt | getSelectionEndColumn () const |
Returns the index of the last column of the current selection. More... | |
IlInt | getSelectionEndLine () const |
Returns the index of the last line of the current selection. More... | |
Location | getSelectionStart () const |
Returns the location of the start of the current selection. More... | |
IlInt | getSelectionStartColumn () const |
Returns the index of the first column of the current selection. More... | |
IlInt | getSelectionStartLine () const |
Returns the index of the first line of the current selection. More... | |
char * | getText (IlBoolean blanks) |
Gets the text from the buffer. More... | |
void | getUndoCommandLabel (IlString &l) const |
Returns in its argument the label of the last undoable command. More... | |
void | gotoEnd () |
Moves the cursor to the end of the buffer. More... | |
IlBoolean | gotoLine (IlInt line) |
Moves the cursor to the given line. More... | |
virtual IlBoolean | handleGadgetEvent (IlvEvent &event) |
Handles the gadget events. More... | |
virtual IlBoolean | handleScrollBarsEvent (IlvEvent &event) |
Handles the internal scroll bars event. More... | |
IlBoolean | hasSelection () const |
Tells whether there is an active selection or not. More... | |
IlInt | indentLine (IlInt line) |
indents the specified line. More... | |
IlInt | insertCharacter (char key, IlBoolean bckIndent=IlTrue) |
Inserts the given charater at the current cursor location. More... | |
IlInt | insertTabulation () |
Inserts a tabulation at the current cursor location. More... | |
void | insertText (const char *txt, IlInt line, IlInt column, IlBoolean reDraw=IlFalse) |
Inserts the given text at the given location. More... | |
Location | insertText (const char *text, const Location &at, IlBoolean reDraw=IlFalse) |
Concatenates the text between two locations. More... | |
void | insertTextReversible (const char *txt, IlInt line, IlInt column, IlBoolean reDraw) |
Inserts the given text at the given location. More... | |
IlBoolean | isBlockCloser (char character) const |
tells if the given charater is a block closer. More... | |
IlBoolean | isMultilineSelection () const |
Indicates if the current selection spans several lines. More... | |
IlBoolean | isReadOnly () const |
Returns the editor read-only state. More... | |
IlBoolean | isRedoable () const |
Tells if the redo feature is usable. More... | |
IlBoolean | isSaveNeeded () const |
Tells if the buffer has been changed. More... | |
IlBoolean | isTabulation (const Location &l) const |
Tells if the character at location is a tabulation. More... | |
IlBoolean | isUndoable () const |
Tells if the undo feature is usable. More... | |
IlBoolean | killComment () |
Removes a mono-line comment in the text. More... | |
IlBoolean | loadFile (const IlPathName &filePath, IlBoolean redraw=IlTrue) |
Loads text from given file into the buffer. More... | |
void | loadText (const char *txt) |
Loads the given text into the buffer. More... | |
IlBoolean | pasteFromClipBoard () |
Pastes the clipboard contents replacing the current selection if any. More... | |
void | propagateSheet (const StyleSheet *s=0) |
Propagates style sheet modifications. More... | |
IlBoolean | redo () |
Replays the last undone command. More... | |
void | removeMarker (IlvCEdtMarker &marker, IlInt line) |
Removes a marker from the margin of a line. More... | |
void | removeMarkers (IlInt line=-1) |
Removes all markers from the margin of a given line or all lines. More... | |
void | removeOneLogicalCharacter () |
Removes one logical character just before the cursor. More... | |
char * | removeText (const Location &from, const Location &to, IlBoolean retStr=IlTrue) |
Removes the text and the lines between two locations. More... | |
void | replaceSelection (const char *by, IlBoolean autoRedraw, IlBoolean forwardDir) |
Replaces the selected text by the new value. More... | |
void | resetAll () |
Empties the buffer and releases the internal memory. | |
void | resetSaveNeeded () |
Resets the buffer changed indicator. More... | |
virtual void | scrollableSize (IlvDim &w, IlvDim &h) const |
Returns the size of the scrollable area of the gadget. More... | |
IlBoolean | selectAll () |
Selects all text from the buffer. More... | |
void | setCursorLocation (const Location &loc) |
Sets the location of the cursor. | |
void | setCursorLocation (IlInt line, IlInt column) |
Moves the cursor to the location given by its arguments. More... | |
void | setEditable (IlBoolean mode) |
Sets the editor to be editable or read-only. More... | |
void | setFindTrigger (Trigger *trigger) |
Sets the Find trigger. More... | |
void | setGotoTrigger (Trigger *trigger) |
Sets the Goto trigger. More... | |
void | setKillBufferTrigger (Trigger *trigger) |
Sets the Kill Buffer trigger. More... | |
void | setLine (IlInt line, const char *txt) |
Replaces the text at line by the new value. More... | |
IlBoolean | setMark () |
Sets the selection mark. More... | |
void | setMarker (IlvCEdtMarker &marker, IlInt line) |
Adds a marker to the margin of a line. More... | |
void | setOpenTrigger (Trigger *trigger) |
Sets the Open trigger. More... | |
void | setQuitTrigger (Trigger *trigger) |
Sets the Quit trigger. More... | |
void | setReadOnlyTrigger (Trigger *trigger) |
Sets the Read Only trigger. More... | |
void | setReplaceTrigger (Trigger *trigger) |
Sets the Replace trigger. More... | |
void | setSaveAllTrigger (Trigger *trigger) |
Sets the Save All trigger. More... | |
void | setSaveAsTrigger (Trigger *trigger) |
Sets the Save As trigger. More... | |
void | setSaveTrigger (Trigger *trigger) |
Sets the Save trigger. More... | |
IlBoolean | setSelection (IlInt startOffset, IlInt endOffset) |
Selects part of the text on current line. More... | |
void | setSwitchBufferTrigger (Trigger *trigger) |
Sets the Switch Buffer trigger. More... | |
void | setText (const char *txt) |
Loads the given text into the buffer. More... | |
void | stopBraceHighLighting () |
Inhibits the brace matching highlight feature. | |
IlBoolean | syntaxHighLight () const |
Tells if syntax highlighting is activated. More... | |
IlBoolean | undo () |
Reverses the effects of the last run command. More... | |
IlInt | unindentLine (IlInt line) |
Outdents the specified line. More... | |
void | unsetMark () |
Removes the selection mark. More... | |
Public Member Functions inherited from IlvScrolledGadget | |
IlvScrolledGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
virtual void | adjustScrollBars (IlBoolean redraw=IlFalse) |
Recomputes the scroll bars. More... | |
void | computeBBox (IlvRect &ibox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const |
Computes the bounding boxes of the elements that compose the gadget. More... | |
void | computeBBox (IlvRect &ibox, IlvRect &vbox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const |
Computes the bounding boxes of the elements that compose the gadget. More... | |
virtual IlvScrollBar * | createScrollBar (const IlvRect &rect, IlvDirection direction, IlUShort thickness, IlvPalette *palette) |
Returns a new instance of the IlvScrollBar class. More... | |
virtual void | drawBackground (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the gadget background. More... | |
virtual void | drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the gadget frame. More... | |
virtual void | drawScrollBar (IlvPort *dst, IlvDirection direction, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the specified internal scroll bar. More... | |
void | fitToRect (const IlvRect &rect) |
Resizes the object so that the scrollable area fits the specified rectangle. More... | |
IlUShort | getBottomMargin () const |
Returns the bottom margin. More... | |
IlvScrollBar * | getHorizontalScrollBar () const |
Returns a pointer to the internal horizontal scroll bar. More... | |
IlUShort | getLeftMargin () const |
Returns the left margin. More... | |
IlUShort | getRightMargin () const |
Returns the right margin. More... | |
IlvScrollBar * | getScrollBar (IlvDirection direction) const |
Returns a pointer to the specified internal scroll bar. More... | |
void | getScrollBarShowAsNeeded (IlBoolean &vert, IlBoolean &hor) const |
Returns the scroll bar mode of the internal scroll bars. More... | |
IlUShort | getTopMargin () const |
Returns the top margin. More... | |
IlvScrollBar * | getVerticalScrollBar () const |
Returns a pointer to the internal vertical scroll bar. More... | |
void | hideScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue) |
Hides the specified internal scroll bar. More... | |
virtual void | internalBBox (IlvRect &bbox, const IlvTransformer *t=0) const |
Returns the internal bounding box of the gadget. More... | |
void | moveScrollBar (IlvDirection direction, IlvPosition where, IlBoolean redraw=IlTrue) |
Moves the specified internal scroll bar to a new position. More... | |
virtual void | scrollBarBBox (IlvDirection direction, IlvRect &bbox, const IlvTransformer *t=0) const |
Returns the bounding box of the specified internal scroll bar. More... | |
virtual void | scrollBarHasMoved (IlvDirection direction) |
Is called when an internal scroll bar has moved. More... | |
void | scrollBarShowAsNeeded (IlBoolean vertical, IlBoolean horizontal, IlBoolean redraw=IlTrue) |
Sets the scroll bar mode of the internal scroll bars. More... | |
virtual void | scrollBarVisibilityChanged (IlvDirection direction) |
Is called when an internal scroll bar is shown or hidden. More... | |
void | setBottomMargin (IlUShort margin) |
Sets the bottom margin. More... | |
void | setLeftMargin (IlUShort margin) |
Sets the left margin. More... | |
void | setMargin (IlUShort val) |
Sets the left, right, top, and bottom margins. More... | |
void | setRightMargin (IlUShort margin) |
Sets the right margin. More... | |
void | setTopMargin (IlUShort margin) |
Sets the top margin. More... | |
void | showScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue) |
Shows the specified internal scroll bar. More... | |
virtual void | visibleBBox (IlvRect &bbox, const IlvTransformer *t=0) const |
Returns the visible bounding box of the gadget. More... | |
IlvPosition | whereIsScrollBar (IlvDirection direction) const |
Returns the location of the specified internal scroll bar. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvScrolledGadget | |
static IlSymbol * | ScrollBarMovedSymbol () |
Returns the callback type for the Scroll Bar Moved callback. More... | |
static IlSymbol * | ScrollBarVisibilitySymbol () |
Returns the callback type for the Scroll Bar Visibility Changed callback. More... | |
Protected Member Functions inherited from IlvScrolledGadget | |
IlvDim | getLimitHeightValue () const |
Returns the limit value for the vertical scrolling. More... | |
IlvDim | getLimitWidthValue () const |
Returns the limit value for the horizontal scrolling. More... | |
IlvDim | getScrollableHeight () const |
Returns the height of the scrollable area. More... | |
IlvDim | getScrollableWidth () const |
Returns the width of the scrollable area. More... | |
void | setLimitHeightValue (IlvDim value) |
Sets the limit value for the vertical scrolling. More... | |
void | setLimitWidthValue (IlvDim value) |
Sets the limit value for the horizontal scrolling. More... | |
void | setScrollableHeight (IlvDim height) |
Sets the height of the scrollable area. More... | |
void | setScrollableWidth (IlvDim width) |
Sets the width of the scrollable area. More... | |
An IlvCodeEditor specialization providing features to create a debugger-like text control.
Library: ilvadvgdt
The text has a margin area where markers can be displayed. This can indicate a breakpoint or the current selected line.
Registers the given line as a line with an error.
line | the line to set as erroneous. |
IlTrue
if the line is valid and a specific error symbol existed; otherwise returns IlFalse
.The line is memorized as erroneous, colorized with the defined color, and the error symbol is added to its margin.
IlBoolean IlvDebuggerEditor::setErrorLocation | ( | IlInt | beginLine, |
IlInt | beginColumn, | ||
IlInt | endLine, | ||
IlInt | endColumn | ||
) |
Registers the given text span as being in error.
beginLine | the start line of the text span. |
beginColumn | the start column of the text span. |
endLine | the final line of the text span. |
endColumn | the final column of the text span. |
IlFalsee
if beginLine or endLine are invalid or no specific error symbol exists; otherwise returns IlTrue
.The lines are memorized as erroneous, colorized with the defined color, and the error symbol is added to their margins. In case or endColumn indicate that their respective lines are onoly partially in error, the start and end columns are memorized.
IlBoolean IlvDebuggerEditor::unsetAllErrorLines | ( | ) |
Removes all error marks from the editor.
IlTrue
.For all error memorized lines, the error symbols are cleared form their margin and the decoration are recomputed. Finally the whole editor is redrawn.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.