DSourceEdit

DIDE source file editor

class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
Signal!BreakpointListChangeListener breakpointListChanged;
Signal!BookmarkListChangeListener bookmarkListChanged;
IDESettings _settings;
int _previousFontSizeSetting;
EditorTool _editorTool;
ProjectSourceFile _projectSourceFile;
uint _executionLineHighlightColor;
int _executionLine;
PopupWidget _docsPopup;
CompletionPopupMenu _completionPopupMenu;
PopupWidget _completionPopup;
ulong _completionTimerId;
enum COMPLETION_TIMER_MS;
uint _lastKeyDownCode;
uint _periodKeyCode;
}

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

drawLineBackground
void drawLineBackground(DrawBuf buf, int lineIndex, Rect lineRect, Rect visibleRect)

override to custom highlight of line background

handleAction
bool handleAction(const Action a)

override to handle specific actions

handleActionStateRequest
bool handleActionStateRequest(const Action a)

override to handle specific actions state (e.g. change enabled state for supported actions)

handleFocusChange
void handleFocusChange(bool focused, bool receivedFocusFromKeyboard = false)

override to handle focus changes

handleLeftPaneIconsMouseClick
bool handleLeftPaneIconsMouseClick(MouseEvent event, Rect rc, int line)

left button click on icons panel: toggle breakpoint

importPaths
string[] importPaths(IDESettings ideSettings)

returns project import paths - if file from project is opened in current editor

load
bool load(string fn)

load by filename

load
bool load(ProjectSourceFile f)

load by project item

onControlClick
void onControlClick()

Handle Ctrl + Left mouse click on text

onHoverTimeout
void onHoverTimeout(Point pt, TextPosition pos)

override to handle mouse hover timeout in text

onKeyEvent
bool onKeyEvent(KeyEvent event)

handle keys: support autocompletion after . press with delay

onThemeChanged
void onThemeChanged()

handle theme change: e.g. reload some themed resources

onTimer
bool onTimer(ulong id)

handle timer; return true to repeat timer event after next interval, false cancel timer

save
bool save()

save to the same file

save
bool save(string fn)

save to the same file

Properties

visibility
Visibility visibility [@property getter]

returns widget visibility (Visible, Invisible, Gone)

visibility
Visibility visibility [@property setter]

sets widget visibility (Visible, Invisible, Gone)

Meta