
There is only one, and instead the contents of what it displays are changed, via a view.Ī view represents the file, its contents, and metadata about it required for display. The tabs do not change which TCustomEditControl is visible onscreen. The tabs at the top of the editor change the file that’s being displayed. Others occasionally appear – you can open a file in a second window and in the Options dialog one can be hosted – but that’s outside the scope of normal IDE usage for this article. To do this we need to hook another TCustomEditControl method: SetEditView.Ī brief overview of the edit control’s architecture: the IDE has (usually) only one edit control visible onscreen. Yet none of these directly indicate which file is in the editor being painted. The TCustomEditControl.PaintLine method has a number of parameters, including Self (the edit control) and others. Miscellaneous things, like getting a point onscreen in pixel coordinates for a line / column pair
#Blacksmith3d standard 6 code#
To account for folded code in the above, ie to know which lines are visible onscreen and which aren’t, and if a line is visible as normal, is hidden, or is a folded line (has the + symbol indicating it can be expanded) To know the line number that is being painted in your hooked paint event To know which file the code editor is displaying Once you have a plugin that can paint on the code editor – see Part 1 – you need a number of other things: This articles assumes you have read the first are familiar with the concept of code hooking and are familiar with function pointers to OO methods and can convert between OO and non-OO prototypes of the same method (ie with an explicit Self parameter you pass in order to call an OO method, procedural-style.)
#Blacksmith3d standard 6 how to#
How to coexist with other plugins that also paint in the code editor Integrating with line numbers, folded code, and paint coordinates for a line, in order to know exactly what is onscreen in the code editor and where it is, and accurately paint your own additions to it How do they do it? The answer is by hooking a number of IDE methods at runtime, and the first article showed how to do this with one method, TCustomEditControl.PaintLine, and ended painting some text on the top left of the editor.

Yet several plugins, such as CnPack, Castalia, and two of my own soon-to-be-released plugins (Bookmarks and a Mystery Plugin), integrate into the code editor painting along with the code. The first part of this series examined an area not exposed by the Open Tools API (Delphi’s plugin API): integrating with the code editor.


Parnassus Core Editor 1.6.3 for Alexandria from May 25, 2022
