Simple IDE Demo
Folder: Demos\SimpleIDEDemo. Project: SimpleIDEDemo.dproj.
Demonstrates how to highlight the breakpoint lines and the current line in different colors, as the Delphi IDE does, and how to create a custom gutter band that shows the information of a debugger.
How it works
The demo has a simulated debugger, TSampleDebugger (unit uSimpleIDEDebugger), that runs a small sample program line by line. It supports the usual commands: run, pause, step, stop, goto cursor (GotoCursor) and the toggle of the breakpoints (ToggleBreakpoint).
The editor shows the state of the debugger with:
- a gutter band that draws the glyphs of the breakpoints, of the executable lines and of the current line (
GutterGlyphs.bmp), created with the eventsOnPaintLines,OnClickandOnMouseCursorof the gutter band; - the colors of the lines (breakpoint, current line), set with the event
OnSpecialLineColorsof the editor; - the commands of the debugger as actions (
ActionGlyphs.bmp).
What you can try
- Click in the gutter to set and remove a breakpoint.
- Run the program and see the current line move; pause and step.
- Use "Goto Cursor" to run to the line of the caret.
