mirror of https://github.com/buggins/dlangui.git
word wrapping for EditBox - starting implementation, issue #206
This commit is contained in:
parent
3e4d5b6622
commit
e525e13e73
|
|
@ -441,6 +441,13 @@ alias TokenProp = ubyte;
|
|||
/// TokenCategory string
|
||||
alias TokenPropString = TokenProp[];
|
||||
|
||||
struct LineSpan {
|
||||
/// start index of line
|
||||
int start;
|
||||
/// number of lines it spans
|
||||
int len;
|
||||
}
|
||||
|
||||
/// interface for custom syntax highlight, comments toggling, smart indents, and other language dependent features for source code editors
|
||||
interface SyntaxSupport {
|
||||
|
||||
|
|
|
|||
|
|
@ -285,6 +285,25 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
|||
return 1;
|
||||
}
|
||||
|
||||
protected bool _wordWrap;
|
||||
/// true if word wrap mode is set
|
||||
@property bool wordWrap() {
|
||||
return _wordWrap;
|
||||
}
|
||||
/// true if word wrap mode is set
|
||||
@property EditWidgetBase wordWrap(bool v) {
|
||||
_wordWrap = v;
|
||||
invalidate();
|
||||
return this;
|
||||
}
|
||||
|
||||
void wrapLine(dstring line, int maxWidth) {
|
||||
|
||||
}
|
||||
|
||||
/// information about line span into several lines - in word wrap mode
|
||||
protected LineSpan[] _span;
|
||||
|
||||
/// override to add custom items on left panel
|
||||
protected void updateLeftPaneWidth() {
|
||||
_iconsWidth = _showIcons ? _iconsPaneWidth : 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue