Integrated 'Multicolored Procedure List' in IDE

Working on new editor enhancements?
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

The ZIP archives in the first post have been updated.

I have added icons, just simple ones with letters. But I don't understand loading the icons in ThemeManagement.pb and LoadTheme() yet.

For the icons I created a copy of the SilkTheme.zip archive, named SilkTheme2.zip. This must be copied into the 'Themes' directory.
In the IDE you can select the new theme in the settings 'General' -> 'Themes'. In the third line you will find 'Version for Multicolored Procedure List'.

This is a test of how the whole thing works.

Peter
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Integrated 'Multicolored Procedure List' in IDE

Post by ChrisR »

Thanks for the update, I'll take a look

Edit:
Everything I've tested seems to work as expected
I didn't look at it before, issues in Settings with "Show in procedures browser" enabled are not colored and the FrontColor and BackColor buttons are disabled for them.
;TODO
;FIXME
PeDe wrote: Tue Oct 01, 2024 1:14 pm I have added icons, just simple ones with letters.
Personally, I prefer the letters as before

#
PeDe wrote: Tue Oct 01, 2024 7:43 am
ChrisR wrote: Mon Sep 30, 2024 11:12 pm The tab order comes from PureBasic.prefs, I didn't go further to find out why it is initialized in this order!
I cannot recreate the behavior. I have also tested it with the French language. The specified sequence is always saved in the settings file.
In first, it has nothing to do with your Multicolored Procedure List.

What I mean is, on a new fresh PureBasic installation,
without PureBasic.prefs in %AppData%\PureBasic or in source directory (portable mode)
PureBasic.prefs is then cureently created with this default order (XIncludeFile order) :

Code: Select all

[ToolsPanel]
Tool_1 = Form
Tool_2 = Explorer
Tool_3 = ProjectPanel
Tool_4 = ProcedureBrowser
Which isn't really good, the “Procedures” tab comes last, the 4th.
We'd like it to be the first tab, it's the most useful, used tab.

Once PureBasic.prefs created, the tabs order is related to the settings with
Tool_1 as the 1st Tab, followed by Tool_2, Tool_3 and Tool_4 as the last tab

However, rather than making a tiny enhancement request, to have the “Procedures” on 1st tab, so activated by default at IDE startup,
You could do it just by adding ResetList(AvailablePanelTools()) in ProcedureBrowser.pb, it does the trick!

Code: Select all

ResetList(AvailablePanelTools())
AddElement(AvailablePanelTools())
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Integrated 'Multicolored Procedure List' in IDE

Post by AZJIO »

ChrisR wrote: Tue Oct 01, 2024 1:50 pm Personally, I prefer the letters as before
If you use icons, you need to draw them.
I made icons: Multicolored_icon.zip
For the "C", "R" button I already gave the code

Code: Select all

ButtonImageGadget(#GADGET_ProcedureBrowser_CopyClipboard, 0, 0, 0, 0, ImageID(#IMAGE_Option_CopyTarget)) ; C
ButtonImageGadget(#GADGET_ProcedureBrowser_RestoreColor, 0, 0, 0, 0, ImageID(#IMAGE_Diff_Refresh)) ; R
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

Hello ChrisR,

I will remove the icons again.

The issues cannot be colored because there is no text or name for them in the internal procedure list.
You can only create a marker, color it and delete it again, e.g.: ;- TODO

Peter
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

The ZIP archives have been updated, the icons have been removed, otherwise no changes.

Peter
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Integrated 'Multicolored Procedure List' in IDE

Post by ChrisR »

PeDe wrote: Tue Oct 01, 2024 4:57 pm The issues cannot be colored because there is no text or name for them in the internal procedure list.
You can only create a marker, color it and delete it again, e.g.: ;- TODO
Ok, thanks

It suits me just fine without the icons.
However, If you want to try again with the icons, here's a set SilkTheme3.zip prepared with images instead of letters.

Image
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

Hello ChrisR,

thanks, the icons look very good.
I think icons have to be used, otherwise ToolTip texts are displayed as labels if you enable the 'Enable accessibility features' option in the settings. The buttons are then displayed very wide and no longer visible.

Peter
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Integrated 'Multicolored Procedure List' in IDE

Post by AZJIO »

Will there be a version for Linux_x86?

If you are going to add icons, then you need to add an icon to the “Open in folder” item.
UserInterface.pb -> ShortcutMenuItem(#MENU_ShowInFolder, ...
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

Hello AZJIO,
AZJIO wrote: Wed Oct 02, 2024 9:14 am Will there be a version for Linux_x86?
I don't have 32-bit Linux available at the moment.
AZJIO wrote: Wed Oct 02, 2024 9:14 am If you are going to add icons, then you need to add an icon to the “Open in folder” item.
UserInterface.pb -> ShortcutMenuItem(#MENU_ShowInFolder, ...
There are several icons you could add, but I'm not doing that now.


I have added the Ctrl and Shift option for the copy button for Linux and Mac. I cannot compile or test a Mac version. The ZIP archives have not been updated.


I found a strange error with the Raspberry Pi OS 12, but I can't reproduce it in a sample code.
When the resize procedure is called, the determined size in Width and Height is only correct the first time. After that, only zero is returned.
However, this only affects the toggle button, not the normal buttons. The error does not occur under Debian.

Code: Select all

Procedure ProcedureBrowser_ResizeHandler(*Entry.ToolsPanelEntry, PanelWidth, PanelHeight)

  If ProcedureMulticolor ; PeDre - If to Else, EndIf  
    ;GetRequiredSize(#GADGET_ProcedureBrowser_SwitchButtons, @Width.l, @Height.l) ; OK
    GetRequiredSize(#GADGET_ProcedureBrowser_HideModuleNames, @Width.l, @Height.l) ; False
    ...
    ...

Peter
Last edited by PeDe on Wed Oct 02, 2024 11:39 am, edited 1 time in total.
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Integrated 'Multicolored Procedure List' in IDE

Post by AZJIO »

PeDe wrote: Wed Oct 02, 2024 9:47 am There are several icons you could add, but I'm not doing that now.
I tried adding the following code to the SilkTheme.zip -> Theme.prefs file:

Code: Select all

[Menu]
ShowInFolder = folder.png
But it doesn't work yet.
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

Hello AZJIO,

you have to add the following in ToolbarManagement.pb in line 484:

Code: Select all

Data.l #MENU_ShowInFolder:  Data$ "Menu:ShowInFolder"
Peter
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

I have updated the ZIP archives in the first post.

The new icons for the 'Multicolored Procedure List' from ChrisR are now used.
To do this, the ZIP archive 'SilkTheme_PBMC.zip' must be copied into the 'Themes' directory of PB. The new icons can be selected in the settings under 'General' -> 'Themes'. They can be recognized by the third line 'Version for Multicolored Procedur List'.
This is a temporary solution until the new procedure list is possibly adopted in the official version.

Peter
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Integrated 'Multicolored Procedure List' in IDE

Post by AZJIO »

I compiled on x86, but the problem is with the buttons
Image
C Backend + optimization
Last edited by AZJIO on Wed Oct 02, 2024 1:18 pm, edited 1 time in total.
PeDe
Enthusiast
Enthusiast
Posts: 278
Joined: Sun Nov 26, 2017 3:13 pm

Re: Integrated 'Multicolored Procedure List' in IDE

Post by PeDe »

Hello AZJIO,

which button do you use in the procedure:

Code: Select all

Procedure ProcedureBrowser_ResizeHandler(*Entry.ToolsPanelEntry, PanelWidth, PanelHeight)

  If ProcedureMulticolor ; PeDre - If to Else, EndIf  
    GetRequiredSize(#GADGET_ProcedureBrowser_SwitchButtons, @Width.l, @Height.l)
    ...
The #GADGET_ProcedureBrowser_SwitchButtons should work, not the #GADGET_ProcedureBrowser_HideModuleNames.
Did you not use the current code?

Peter
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Integrated 'Multicolored Procedure List' in IDE

Post by AZJIO »

I copied the last archive again and now everything is working. Dialogue of file replacement showed new file sizes.
Image
purebasic.zip (x86) (ASM compiled)

Edit: purebasic.zip (2024.10.05)
Last edited by AZJIO on Sat Oct 05, 2024 2:14 pm, edited 2 times in total.
Post Reply