LogWidget

Read only edit box for displaying logs with lines append operation

Constructors

this
this()
Undocumented in source.
this
this(string ID)
Undocumented in source.

Members

Functions

appendText
void appendText(dstring text)

append lines to the end of text

lastLineBegin
TextPosition lastLineBegin()
Undocumented in source. Be warned that the author may not have intended to support it.
layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

Properties

maxLines
int maxLines [@property getter]

max lines to show (when appended more than max lines, older lines will be truncated), 0 means no limit

maxLines
int maxLines [@property setter]

set max lines to show (when appended more than max lines, older lines will be truncated), 0 means no limit

scrollLock
bool scrollLock [@property getter]

when true, automatically scrolls down when new lines are appended (usually being reset by scrollbar interaction)

scrollLock
bool scrollLock [@property setter]

when true, automatically scrolls down when new lines are appended (usually being reset by scrollbar interaction)

Variables

_maxLines
int _maxLines;
Undocumented in source.
_scrollLock
bool _scrollLock;
Undocumented in source.

Inherited Members

From EditBox

~this
~this()
Undocumented in source.
_firstVisibleLine
int _firstVisibleLine;
Undocumented in source.
_maxLineWidth
int _maxLineWidth;
Undocumented in source.
_numVisibleLines
int _numVisibleLines;
Undocumented in source.
_visibleLines
dstring[] _visibleLines;
Undocumented in source.
_visibleLinesMeasurement
int[][] _visibleLinesMeasurement;
Undocumented in source.
_visibleLinesWidths
int[] _visibleLinesWidths;
Undocumented in source.
_visibleLinesHighlights
CustomCharProps[][] _visibleLinesHighlights;
Undocumented in source.
_visibleLinesHighlightsBuf
CustomCharProps[][] _visibleLinesHighlightsBuf;
Undocumented in source.
_measuredTextToSetWidgetSize
Point _measuredTextToSetWidgetSize;
Undocumented in source.
_textToSetWidgetSize
dstring _textToSetWidgetSize;
Undocumented in source.
_measuredTextToSetWidgetSizeWidths
int[] _measuredTextToSetWidgetSizeWidths;
Undocumented in source.
lineCount
int lineCount()
Undocumented in source. Be warned that the author may not have intended to support it.
updateMaxLineWidth
void updateMaxLineWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
minFontSize
int minFontSize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
minFontSize
int minFontSize [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
maxFontSize
int maxFontSize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
maxFontSize
int maxFontSize [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

measureVisibleText
Point measureVisibleText()
Undocumented in source. Be warned that the author may not have intended to support it.
_extendRightScrollBound
bool _extendRightScrollBound;
Undocumented in source.
checkIfScrollbarsNeeded
void checkIfScrollbarsNeeded(bool needHScroll, bool needVScroll)

override to determine if scrollbars are needed or not

updateHScrollBar
void updateHScrollBar()

update horizontal scrollbar widget position

updateVScrollBar
void updateVScrollBar()

update verticat scrollbar widget position

onHScroll
bool onHScroll(ScrollEvent event)

process horizontal scrollbar event

onVScroll
bool onVScroll(ScrollEvent event)

process vertical scrollbar event

_enableScrollAfterText
bool _enableScrollAfterText;
Undocumented in source.
ensureCaretVisible
void ensureCaretVisible(bool center)
Undocumented in source. Be warned that the author may not have intended to support it.
textPosToClient
Rect textPosToClient(TextPosition p)
Undocumented in source. Be warned that the author may not have intended to support it.
clientToTextPos
TextPosition clientToTextPos(Point pt)
Undocumented in source. Be warned that the author may not have intended to support it.
handleAction
bool handleAction(Action a)
Undocumented in source. Be warned that the author may not have intended to support it.
fullContentSize
Point fullContentSize()

calculate full content size in pixels

minimumVisibleContentSize
Point minimumVisibleContentSize()
Undocumented in source. Be warned that the author may not have intended to support it.
measure
void measure(int parentWidth, int parentHeight)

measure

highlightTextPattern
void highlightTextPattern(DrawBuf buf, int lineIndex, Rect lineRect, Rect visibleRect)
Undocumented in source. Be warned that the author may not have intended to support it.
isWordChar
bool isWordChar(dchar ch)
Undocumented in source. Be warned that the author may not have intended to support it.
isValidWordBound
bool isValidWordBound(dchar innerChar, dchar outerChar)
Undocumented in source. Be warned that the author may not have intended to support it.
isWholeWord
bool isWholeWord(dstring lineText, size_t start, size_t end)

returns true if selected range of string is whole word

findAll
TextRange[] findAll(dstring pattern, uint options)

find all occurences of text pattern in content; options = bitset of TextSearchFlag

findNextPattern
bool findNextPattern(TextPosition pos, dstring pattern, uint searchOptions, int direction)

find next occurence of text pattern in content, returns true if found

highlightLineRange
void highlightLineRange(DrawBuf buf, Rect lineRect, uint color, TextRange r)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLineBackground
void drawLineBackground(DrawBuf buf, int lineIndex, Rect lineRect, Rect visibleRect)

override to custom highlight of line background

drawExtendedArea
void drawExtendedArea(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
_tokenHighlightColors
CustomCharProps[ubyte] _tokenHighlightColors;
Undocumented in source.
setTokenHightlightColor
void setTokenHightlightColor(ubyte tokenCategory, uint color, bool underline, bool strikeThrough)

set highlight options for particular token category

clearTokenHightlightColors
void clearTokenHightlightColors()

clear highlight colors

handleCustomLineHighlight
CustomCharProps[] handleCustomLineHighlight(int line, dstring txt, CustomCharProps[] buf)

Custom text color and style highlight (using text highlight) support.

_matchingBraces
TextRange _matchingBraces;
Undocumented in source.
_showWhiteSpaceMarks
bool _showWhiteSpaceMarks;
Undocumented in source.
showWhiteSpaceMarks
bool showWhiteSpaceMarks [@property getter]

when true, show marks for tabs and spaces at beginning and end of line, and tabs inside line

showWhiteSpaceMarks
bool showWhiteSpaceMarks [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
findMaxTabMarkColumn
int findMaxTabMarkColumn(int lineIndex)

find max tab mark column position for line

drawTabPositionMarks
void drawTabPositionMarks(DrawBuf buf, FontRef font, int lineIndex, Rect lineRect)
Undocumented in source. Be warned that the author may not have intended to support it.
drawWhiteSpaceMarks
void drawWhiteSpaceMarks(DrawBuf buf, FontRef font, dstring txt, int tabSize, Rect lineRect, Rect visibleRect)
Undocumented in source. Be warned that the author may not have intended to support it.
drawClient
void drawClient(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
onLeftPaneMouseClick
bool onLeftPaneMouseClick(MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
getLeftPaneIconsPopupMenu
MenuItem getLeftPaneIconsPopupMenu(int line)
Undocumented in source. Be warned that the author may not have intended to support it.
_findPanel
FindPanel _findPanel;
Undocumented in source.
selectionText
dstring selectionText(bool singleLineOnly)
Undocumented in source. Be warned that the author may not have intended to support it.
findNext
void findNext(bool backward)
Undocumented in source. Be warned that the author may not have intended to support it.
openFindPanel
void openFindPanel()
Undocumented in source. Be warned that the author may not have intended to support it.
openReplacePanel
void openReplacePanel()
Undocumented in source. Be warned that the author may not have intended to support it.
createFindPanel
bool createFindPanel(bool selectionOnly, bool replaceMode)

create find panel; returns true if panel was not yet visible

closeFindPanel
void closeFindPanel(bool hideOnly)

close find panel

onDraw
void onDraw(DrawBuf buf)

Draw widget at its position to buffer

Meta