For my needs, I made some modifications that could perhaps interest you.
- Added View_Resize() in PBEdit_SetGadgetText() for multi-line texts otherwise only the first 2 lines are displayed
- Add a Redonly parameter in PBEdit_Gadget(WindowID, X, Y, Width, Height, LanguageFile$ = "", ReadOnly = #False)
In readonly, Redo/Undo, GadgetDrop procedures are not called and only some keys, mouse events are active
In the example, the readonly mode is done with the parameter -Read : PBEdit -Read - Add a button in the top right corner, if wanted, with ex: PBedit_AddButton(editor, "Copy All")
The button is made with a new canvas added, it would certainly be better if it was drawn directly in the main *view\canvas.
With the EventType LeftClick, MouseEnter and MouseLeave events depending on the mouse position
I'm a bit afraid to ruin this nice code, it would be nice if someone could implement it like this - For my needs and testing, personalized PBEdit_Dark(Light)Color.xml and PBEdit_Dark(Light)PureBasic.xml are included
Please correct me, improves,.. it would be nice to have a part of it in your next update.
I named the version 1.0.85 not to interfere with yours: 1.0.8, 1.0.9
PBEdit_1_0_85.zip
Keep up the good work