Integrated 'Multicolored Procedure List' in IDE
Re: Integrated 'Multicolored Procedure List' in IDE
I have now considered the macros, and highlighting works the same as with the procedures.
The logic for this is now completely in 'ProcedureBrowser_HighlightTimer()', and no longer in 'ProcedureBrowser_ItemHighlight()'.
The ZIP archives have not been updated.
@AZJIO
I would make the input field and delete buttons for filtering above the list.
If there is not enough space for the buttons at the bottom, you could display only four buttons at a time and switch with another button.
The icons are loaded with 'Theme_LoadImage()' from the file 'ThemeManagement.pb', I assume.
Peter
The logic for this is now completely in 'ProcedureBrowser_HighlightTimer()', and no longer in 'ProcedureBrowser_ItemHighlight()'.
The ZIP archives have not been updated.
@AZJIO
I would make the input field and delete buttons for filtering above the list.
If there is not enough space for the buttons at the bottom, you could display only four buttons at a time and switch with another button.
The icons are loaded with 'Theme_LoadImage()' from the file 'ThemeManagement.pb', I assume.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
I have updated the ZIP archives. For the IDEs, only the Windows versions.
The buttons are now switchable, only five are ever displayed.
The filter is available. Automatic highlighting is deactivated with filter.
I don't know how to query the enter key in the input field. As a temporary alternative, there is the 'E' button for input.
EDIT: There is still a bug with highlighting and clicking in the procedure list. It is not updated immediately.
EDIT2: I think it works correctly now. Markers or macros within a procedure are also selected in the list, and not just the associated procedure. But I am not sure if this is correct.
Peter
The buttons are now switchable, only five are ever displayed.
The filter is available. Automatic highlighting is deactivated with filter.
I don't know how to query the enter key in the input field. As a temporary alternative, there is the 'E' button for input.
EDIT: There is still a bug with highlighting and clicking in the procedure list. It is not updated immediately.
EDIT2: I think it works correctly now. Markers or macros within a procedure are also selected in the list, and not just the associated procedure. But I am not sure if this is correct.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
#PB_EventType_Change ?
Re: Integrated 'Multicolored Procedure List' in IDE
The filter had an error, not everything was filtered, this has been corrected. The ZIP archives have not yet been updated.
@AZJIO
There is no change event on the Enter key. I don't know if I can use AddKeyboardShortcut() in the IDE without interfering.
EDIT: I have found the processing of the Enter key. In UserInterface.pb and MainMenuEvent() #MENU_Scintilla_Enter is queried. This has already been added with AddKeyboardShortcut() for the Enter key.
Peter
@AZJIO
There is no change event on the Enter key. I don't know if I can use AddKeyboardShortcut() in the IDE without interfering.
EDIT: I have found the processing of the Enter key. In UserInterface.pb and MainMenuEvent() #MENU_Scintilla_Enter is queried. This has already been added with AddKeyboardShortcut() for the Enter key.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
I have updated the ZIP archives in the first post.
With the Linux versions, the Enter key does not work with the filter. I'll have to look into that first.
EDIT: The Enter key work now with the Linux versions, archives updated.
Peter
With the Linux versions, the Enter key does not work with the filter. I'll have to look into that first.
EDIT: The Enter key work now with the Linux versions, archives updated.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
Don't hesitate to do a PR if you feel like it could be integrated in the IDE
Re: Integrated 'Multicolored Procedure List' in IDE
Code: Select all
[ProcedureBrowser_ItemColor]
You can do this:
Code: Select all
12304896-1="●"
8421631/0="┌","└"
16750848|1="├"
14588378,1="#"
Even then, are quotation marks necessary?
Code: Select all
"●" = 12304896,-1
Code: Select all
● = 12304896,-1
Code: Select all
ProcedureBrowserHighlightTimer = ReadPreferenceLong("HighlightTimer", 1000) ; PeDre
SCN_MODIFIED + linesAdded
Code: Select all
Case #SCN_MODIFIED
If \modificationType & #SC_MOD_DELETETEXT Or \modificationType & #SC_MOD_INSERTTEXT
AddWindowTimer(#WINDOW_Main, #TIMER_ProcedureBrowser, ProcedureBrowserHighlightTimer)
EndIf
If Event = #PB_Event_Timer And EventTimer() = #TIMER_ProcedureBrowser
RemoveWindowTimer(#WINDOW_Main , #TIMER_ProcedureBrowser)
; ...
EndIf
Re: Integrated 'Multicolored Procedure List' in IDE
Hello AZJIO,
viewtopic.php?t=85442
It then checks whether a new entry in the procedure list needs to be highlighted. This is done very quickly.
Your suggestion is far too risky. The input key for the editor alone is processed in separate places in the code for the different systems. It is very easy to interfere with this.
Edit: I do not access the Scintilla editor at all. I only use information or variables that are updated by the IDE.
Peter
Yes, the settings are saved when the IDE is closed.Does this persist every time you close it?
I asked the question in the forum:It is not clear why the problem with the "├" ("┌", "L") symbol occurs every time, and not just when adding new symbols.
viewtopic.php?t=85442
Looks more complicated, I'll have to have a look.You can do this:
No, I thought spaces were possible at the end, but that doesn't seem to be the case. I can leave out the quotation marks.Even then, are quotation marks necessary?
If automatic highlighting is activated, the timer checks whether the line number of the cursor has changed.Isn't it better to update the list by pressing Enter?
It then checks whether a new entry in the procedure list needs to be highlighted. This is done very quickly.
Your suggestion is far too risky. The input key for the editor alone is processed in separate places in the code for the different systems. It is very easy to interfere with this.
Edit: I do not access the Scintilla editor at all. I only use information or variables that are updated by the IDE.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
Thanks for the improvements Peter with filters, ...
For Multilanguage support, Translations can be added in:
devel\Documentation\Catalogs\Francais\Editor.catalog
And, in the final versions it is in:
PureBasic_Windows_X64_LTS_6.12\Catalogs\Francais\Editor.catalog
Here is the French Editor.catalog
Should also be done for Deutsch, Italian, Spanish
Of course when you think it's mature Peter, if you're afraid of Git, maybe Fred can do it from your sources.
For Multilanguage support, Translations can be added in:
devel\Documentation\Catalogs\Francais\Editor.catalog
And, in the final versions it is in:
PureBasic_Windows_X64_LTS_6.12\Catalogs\Francais\Editor.catalog
Code: Select all
[ToolsPanel]
FilterClear = Supprimer le filtre
HideModuleNames = Masquer les noms de modules
HighlightProcedure = Déterminer et mettre en évidence automatiquement la procédure en cours
DisableUnfolding = Désactiver le déploiement automatique de la procédure après le clic
FrontColor = Changer la couleur de la police d'une entrée
BackColor = Modifier la couleur d'arrière-plan d'une entrée
RestoreColor = Restaurer les couleurs d'une entrée
ScrollProcedure = Défilement automatique vers la procédure en cours
CopyClipboard = Copier les noms des procédures dans le presse-papiers. Options : Ctrl = Tous, Shift = Arguments
SwitchButtons = Changer les fonctions
[Preferences]
ProcedureMulticolor = Liste de procédures multicolores
Should also be done for Deutsch, Italian, Spanish
Oh YES, It would be really nice, +1000Fred wrote: Sun Sep 29, 2024 3:37 pm Don't hesitate to do a PR if you feel like it could be integrated in the IDE

Of course when you think it's mature Peter, if you're afraid of Git, maybe Fred can do it from your sources.
Re: Integrated 'Multicolored Procedure List' in IDE
You can make a "SaveRequired" flag. Initially this flag is zero. If you press the "F" or "B" or "R" button, the flag changes to "1". Before closing and saving, you check the flag, if there has been a change, then only save it.PeDe wrote: Sun Sep 29, 2024 5:29 pm Hello AZJIO,
Yes, the settings are saved when the IDE is closed.Does this persist every time you close it?
I didn’t immediately understand the purpose of the “S” button, so I made a translation into Russian with a slight semantic modification.
Code: Select all
[ToolsPanel]
FilterClear = Очистить фильтр
HideModuleNames = Не отображать имя модуля перед функцией
HighlightProcedure = Автоматически подсвечивать текущую процедуру
DisableUnfolding = Отключить автоматическое раскрытие свёрнутой процедуры
FrontColor = Изменить цвет пункта
BackColor = Изменить фон пункта
RestoreColor = Сбросить цвет выбранного пункта
ScrollProcedure = Автоматически прокручивать список к текущей процедуре
CopyClipboard = Копирует список процедур в буфер обмена. Удерживание +Ctrl = Все, +Shift = с параметрами.
SwitchButtons = Переключить на другие функциональные кнопки
[Preferences]
ProcedureMulticolor = Цветной список процедур
Re: Integrated 'Multicolored Procedure List' in IDE
Hello AZJIO,
If I do not save a setting that has not changed, it is no longer present in the settings file. The IDE determines when the settings are loaded and saved.
Peter
This is not necessary. The settings file for the IDE is always saved completely.You can make a "SaveRequired" flag. Initially this flag is zero. If you press the "F" or "B" or "R" button, the flag changes to "1". Before closing and saving, you check the flag, if there has been a change, then only save it.
If I do not save a setting that has not changed, it is no longer present in the settings file. The IDE determines when the settings are loaded and saved.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
Thanks for the translations, I hope I can somehow get it all together.
My current question is whether highlighting a marker or macro in the list within a procedure is correct?
If you change the cursor in the code in the line, the corresponding procedure is highlighted in the list, which is a bit confusing.
Or should it be like in the original RSBasic tool, and only the corresponding procedure is highlighted? This is also irritating if you click on a marker within a procedure and something else is highlighted.
If you have many markers in a procedure, this is of course more noticeable.
Peter
My current question is whether highlighting a marker or macro in the list within a procedure is correct?
If you change the cursor in the code in the line, the corresponding procedure is highlighted in the list, which is a bit confusing.
Or should it be like in the original RSBasic tool, and only the corresponding procedure is highlighted? This is also irritating if you click on a marker within a procedure and something else is highlighted.
If you have many markers in a procedure, this is of course more noticeable.
Peter
Re: Integrated 'Multicolored Procedure List' in IDE
But the [ProcedureBrowser_ItemColor] settings break only when this section is saved. If I don't make changes, I won't get into trouble. That is, once configured, it will always work for me. We don’t know when Fred will fix that problem, and we want to get a working version now, and not in half a year.
Code: Select all
If SaveRequired
PreferenceComment("") ; PeDre
PreferenceGroup("ProcedureBrowser_ItemColor") ; PeDre
With ProcedureBrowserItemColorList() ; PeDre With to EndWith
ForEach ProcedureBrowserItemColorList()
WritePreferenceString(#DOUBLEQUOTE$ + \Text$ + #DOUBLEQUOTE$, "" + \FrontColor + "," + \BackColor)
Next
EndWith ; PeDre
EndIf
Code: Select all
Case #GADGET_ProcedureBrowser_FrontColor
SaveRequired = 1
; ...
Case #GADGET_ProcedureBrowser_BackColor
SaveRequired = 1
; ...
Case #GADGET_ProcedureBrowser_RestoreColor
SaveRequired = 1
; ...
Code: Select all
\Text$ = StringField(PreferenceKeyValue(), 1, "<|>")
tmp$ = StringField(PreferenceKeyValue(), 2, "<|>")
\FrontColor = Val(StringField(tmp$, 1, ","))
\BackColor = Val(StringField(tmp$, 2, ","))
Code: Select all
[ProcedureBrowser_ItemColor]
1=●<|>12304896,-1
2=┌<|>8421631,-1
3=└<|>8421631,-1
4=├<|>16750848,-1
5=#<|>14588378,-1
Re: Integrated 'Multicolored Procedure List' in IDE
Hi Peter,
And even, if there's markers or macros inside a procedure, the marker or macro should be highlighted (rather than the procedure), if the cursor is inside a macro or after a marker, something like this whatever the Type (without the need to use \LineEnd) :
The cursor position in the source is thus always synchronized with the highlighted line in the procedures.
I don't understand why it would be made only for procedures, as RSBasic did.
My opinion.
For me, there's no doubt at all, it's fine the way it is, with the markers, macros or procedure highlighted.PeDe wrote: Mon Sep 30, 2024 5:13 am My current question is whether highlighting a marker or macro in the list within a procedure is correct?
If you change the cursor in the code in the line, the corresponding procedure is highlighted in the list, which is a bit confusing.
Or should it be like in the original RSBasic tool, and only the corresponding procedure is highlighted? This is also irritating if you click on a marker within a procedure and something else is highlighted.
If you have many markers in a procedure, this is of course more noticeable.
And even, if there's markers or macros inside a procedure, the marker or macro should be highlighted (rather than the procedure), if the cursor is inside a macro or after a marker, something like this whatever the Type (without the need to use \LineEnd) :
Code: Select all
If \Line <= CurrentLine
If \Line > AboveLine
AboveLine = \Line
Index = Counter
Type = \Type
EndIf
EndIf
I don't understand why it would be made only for procedures, as RSBasic did.
My opinion.
Re: Integrated 'Multicolored Procedure List' in IDE
Hello AZJIO,
I have changed the saving of the colors. There should now be no restrictions on the text.
Save:
Loading:
It's not elegant, but it works for the time being. Also for e.g: ├,"
Peter
I have changed the saving of the colors. There should now be no restrictions on the text.
Save:
Code: Select all
PreferenceComment("") ; PeDre
PreferenceGroup("ProcedureBrowser_ItemColor") ; PeDre
With ProcedureBrowserItemColorList() ; PeDre With to EndWith
Counter = 1
ForEach ProcedureBrowserItemColorList()
WritePreferenceString(Str(Counter), \Text$ + "," + \FrontColor + "," + \BackColor)
Counter + 1
Next
EndWith ; PeDre
Loading:
Code: Select all
PreferenceGroup("ProcedureBrowser_ItemColor") ; PeDre
ClearList(ProcedureBrowserItemColorList()) ; PeDre
If ExaminePreferenceKeys() ; PeDre - If to EndIf
While NextPreferenceKey()
AddElement(ProcedureBrowserItemColorList())
With ProcedureBrowserItemColorList()
; entries: 1 = Text,-1,13684944
Value$ = ReverseString(PreferenceKeyValue())
Length = Len(StringField(Value$, 1, ",")) + 1
\BackColor = Val(ReverseString(StringField(Value$, 1, ",")))
Length + Len(StringField(Value$, 2, ",")) + 1
\FrontColor = Val(ReverseString(StringField(Value$, 2, ",")))
\Text$ = Left(ReverseString(Value$), Len(Value$) - Length)
EndWith
Wend
EndIf ; PeDre
It's not elegant, but it works for the time being. Also for e.g: ├,"
Code: Select all
[ProcedureBrowser_ItemColor]
0 = ●,-1,8454143
1 = ┌,-1,8454016
2 = └,-1,16777088
3 = ├",,-1,12615935
;
Peter