mirror of https://github.com/buggins/dlangui.git
new editor actions - part 1
This commit is contained in:
parent
e91114994e
commit
688866b017
|
@ -720,6 +720,18 @@ enum KeyCode : uint {
|
||||||
KEY_Y = 0x59,
|
KEY_Y = 0x59,
|
||||||
/// Z
|
/// Z
|
||||||
KEY_Z = 0x5a,
|
KEY_Z = 0x5a,
|
||||||
|
/// key /
|
||||||
|
KEY_DIVIDE = 0x6F,
|
||||||
|
/// key +
|
||||||
|
KEY_ADD = 0x6B,
|
||||||
|
/// key -
|
||||||
|
KEY_MULTIPLY = 0x6A,
|
||||||
|
/// key ,
|
||||||
|
KEY_COMMA = 0xBC,
|
||||||
|
/// key .
|
||||||
|
KEY_PERIOD = 0xBE,
|
||||||
|
/// key -
|
||||||
|
KEY_SUBTRACT = 0x6D,
|
||||||
/// left win key
|
/// left win key
|
||||||
LWIN = 0x5b,
|
LWIN = 0x5b,
|
||||||
/// right win key
|
/// right win key
|
||||||
|
|
|
@ -158,6 +158,14 @@ enum EditorActions : int {
|
||||||
/// Zoom out editor font
|
/// Zoom out editor font
|
||||||
ZoomOut,
|
ZoomOut,
|
||||||
|
|
||||||
|
/// Togle line comment
|
||||||
|
ToggleLineComment,
|
||||||
|
/// Toggle block comment
|
||||||
|
ToggleBlockComment,
|
||||||
|
/// Delete current line
|
||||||
|
DeleteLine,
|
||||||
|
/// Insert line
|
||||||
|
InsertLine,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// base for all editor widgets
|
/// base for all editor widgets
|
||||||
|
@ -361,6 +369,11 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
|
|
||||||
new Action(EditorActions.ToggleReplaceMode, KeyCode.INS, 0),
|
new Action(EditorActions.ToggleReplaceMode, KeyCode.INS, 0),
|
||||||
new Action(EditorActions.SelectAll, KeyCode.KEY_A, KeyFlag.Control),
|
new Action(EditorActions.SelectAll, KeyCode.KEY_A, KeyFlag.Control),
|
||||||
|
|
||||||
|
new Action(EditorActions.ToggleLineComment, KeyCode.KEY_DIVIDE, KeyFlag.Control),
|
||||||
|
new Action(EditorActions.ToggleBlockComment, KeyCode.KEY_DIVIDE, KeyFlag.Control | KeyFlag.Shift),
|
||||||
|
new Action(EditorActions.DeleteLine, KeyCode.KEY_Y, KeyFlag.Control),
|
||||||
|
new Action(EditorActions.InsertLine, KeyCode.RETURN, KeyFlag.Control),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue