Multicolor Procedure List

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 281
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: Multicolor Procedure List

Post by oreopa »

This is a really good effort at improving the procedure browser. It's not perfect however simply because its not native. I really wish the PB IDE was open source... :D

I'm finding on some sources (that admittedly are somewhat slow in the IDE anyway (25k lines/lots of folding/all slowing ide options on)) it locks up a lot when the current procedure highlighting is on. Which is a shame, because that is a great feature... but I understand why...

Also I noted that my font in the procedure browser (Small font, 6) has more spacing added in the list between the items... which is annoying for a screen real estate freak like me :)

Other than my critics, it's a good job and well done. I hope this kind of thing can be native someday.
Proud supporter of PB! * Musician * C64/6502 Freak
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

I'm sorry for my late answer, but I had a cold.
BarryG wrote:The latest version (1.2.2) doesn't work for me at all now. I did a clean install of the tool (deleted old folder, unzipped new one). No procedure is highlighted in short or long sources, nor shown as "Current".
Is it working again?
oreopa wrote:I'm finding on some sources (that admittedly are somewhat slow in the IDE anyway (25k lines/lots of folding/all slowing ide options on)) it locks up a lot when the current procedure highlighting is on.
It's faster now.
oreopa wrote:Also I noted that my font in the procedure browser (Small font, 6) has more spacing added in the list between the items... which is annoying for a screen real estate freak like me :)
What font do you use?
HanPBF wrote:Ok, here comes the description to the return-does-not-work-behaviour:

- on or off: "Automatically determine and highlight the current procedure" does not matter
- [file in editor must be changed and not saved] -> wrong; have also behaviour when saved...
- switch to another tab
- switch back to non saved file without clicking into editor
- click on procedure once
- type enter without setting focus in editor window -> blocked
- next selected procedure does unblock
Thank you very much for your cooperation. I was able to reproduce it by repeatedly clicking on a procedure entry.
Sometimes the focus was still on the procedure list. I fixed it. Is there still a problem with the new version?



Multicolor Procedure List 1.2.3 has been released.

Changelog:
  • Optimized: The performance for determining the current procedure and the current module has been significantly improved.
  • Added: Button to delete the search filter.
  • Changed: The code for determining the current procedure and the current module has been modified.
  • Changed: The tool now checks whether the tool instance is already running.
  • Bugfix: Focus problem after clicking on a procedure entry.
Image
Image
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Multicolor Procedure List

Post by BarryG »

RSBasic wrote:
BarryG wrote:The latest version (1.2.2) doesn't work for me at all now. I did a clean install of the tool (deleted old folder, unzipped new one). No procedure is highlighted in short or long sources, nor shown as "Current".
Is it working again?
Yes, I downloaded 1.2.3 and everything works. :) The only issue I now have is the font in the list has a bigger gap (as someone else mentioned), so I see less procedures in the list than the normal IDE browser. It's not using the same font as the IDE.
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 281
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: Multicolor Procedure List

Post by oreopa »

RSBasic wrote:I'm sorry for my late answer, but I had a cold.
Hope it better.
RSBasic wrote:
oreopa wrote:I'm finding on some sources (that admittedly are somewhat slow in the IDE anyway (25k lines/lots of folding/all slowing ide options on)) it locks up a lot when the current procedure highlighting is on.
It's faster now.
Will test. Cool.
RSBasic wrote:
oreopa wrote:Also I noted that my font in the procedure browser (Small font, 6) has more spacing added in the list between the items... which is annoying for a screen real estate freak like me :)
What font do you use?
Windows font: small font - 6 point. (You need glasses! ;) ).

EDIT: for clarification, your tool gets the right font here and displays it "correctly"... It's just the spacing between the lines is a good 2 or 3 pixels more in your tool as compared to the native procedure browser.
Thanx a lot for the update.
Proud supporter of PB! * Musician * C64/6502 Freak
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 281
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: Multicolor Procedure List

Post by oreopa »

Hey great work. Dunno what you did but its *much* faster now. :D

Few more nitpicks... ;)

1. I'd like to be able to set a custom fore/background colour for the currently highlighted procedure... Bold and underlined isn't cutting it fully for me ;)
2. "Current: " string isn't really needed in the current proc line. Always the current proc is displayed there so no need to specify that (IMO) (screen real estate control freakery, again ;) )
3. Show procedure parameters in current proc line (as list does)
4. Allow always hiding horiz scrollbar
5. Middle/Right clicking in the list allows to focus the list for key input. Please allow return to function as single/double click (or whatever) on the list item if possible.

Again, thanx. It's getting better! Hope you can fix the list font spacing issue also. I can make a screenshot if it helps... And also, I'm on Win7Pro, using classic theme, 100% DPI if it makes a difference...
Proud supporter of PB! * Musician * C64/6502 Freak
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

Multicolor Procedure List 1.2.4 has been released.

Changelog:
  • Changed: The current procedure is now also determined if the cursor is in the first line of the current procedure.
  • Changed: The text "Current: <Procedure>" is now formatted exactly like the procedure list.
  • Changed: The focus is set on the editor at startup.
  • Changed: Horizontal scrollbar is now always hidden.
oreopa wrote:4. Allow always hiding horiz scrollbar
Done
oreopa wrote:1. I'd like to be able to set a custom fore/background colour for the currently highlighted procedure... Bold and underlined isn't cutting it fully for me ;)
Done, but I've added the new hidden settings because it gets too much. You can change the font color, background color, font type, and font formatting here: %AppData%\RSBasic\Multicolor Procedure List\Settings.ini or \Data\Settings.ini
Note: If you change the settings file, then a restart of my tool is necessary.
Settings you can change:
  • HighlightProcedure_Color: RGB value. If 0, then default.
  • HighlightProcedure_BackColor: RGB value. If 0, then default.
  • HighlightProcedure_FontName: If 0, then default.
  • HighlightProcedure_FontSize: If 0, then default.
  • HighlightProcedure_FontStyle: Value of #PB_Font_... If 0, then default.
oreopa wrote:It's just the spacing between the lines is a good 2 or 3 pixels more in your tool as compared to the native procedure browser.
BarryG wrote:The only issue I now have is the font in the list has a bigger gap (as someone else mentioned), so I see less procedures in the list than the normal IDE browser. It's not using the same font as the IDE.
I don't know how to determine the correct altitude. So I added a hidden setting: ProcedureLineHeight
Note: If you change the settings file, then a restart of my tool is necessary. If 0, then default.
Image
Image
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Multicolor Procedure List

Post by zikitrake »

:shock: Nice!! A tool that would be essential to me if I kept the focus on the selected procedure (as in the list of procedures in the default editor).

Is this so or is it an issue in my editor?
Image

Thank you!
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 281
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: Multicolor Procedure List

Post by oreopa »

Thank you for the updates RSBasic.

Everything but this line height issue is fixed... It won't go below the size it shows as default... It can go above that size using the "ProcedureLineHeight" option... but not below the default :cry:

Another thing thats not the same as native list is the extra dead space around the list (in red):
Image

And I also dont like the ellipsis at the end of the line ("...").

Can I ask for another option or two? :D
zikitrake wrote:Is this so or is it an issue in my editor?
I also noticed this and support it being added.
Proud supporter of PB! * Musician * C64/6502 Freak
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

@zikitrake
If you miss the mark of the current procedure, then you have to click on the third button to enable it.
Or do you mean something else?
Image
Image
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Multicolor Procedure List

Post by zikitrake »

Thank you for responding so quickly :)
I didn't even notice that button :oops:

Even so, when I mark it, it only works partially:

1 - When I click inside a procedure (in the code window), the procedure is correctly bolded in the list.

2 - But, when I click on a procedure in the list, the code window scrolls to that procedure, but it doesn't get bold in the list until I click or type something in the code.

I hope this gif helps to explain me:
Image

PS: Another flaw I found is that, when the first line in the editor is a procedure and we select it, it doesn't appear in bold in the procedures list (I s
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

Multicolor Procedure List 1.2.5 has been released.

Changelog:
  • Changed: The starting position of the current procedure has been changed so that the current procedure can be determined if the cursor is also positioned before "Procedure ...".
  • Bugfix: If the current procedure has been selected, the colors of the other entries are no longer displayed.
  • Bugfix: If a procedure exists in the first line, then the first procedure was not selected if the cursor is in this procedure.
oreopa wrote:Everything but this line height issue is fixed... It won't go below the size it shows as default... It can go above that size using the "ProcedureLineHeight" option... but not below the default :cry:
You're right. I'm using this:

Code: Select all

If OpenWindow(0, 0, 0, 500, 250, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListIconGadget(1, 10, 10, 480, 230, "Title", 400, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
  
  
  ;-If you enable  this, you can also make the row height smaller.
  ;LoadFont(1, "", 5)
  ;SetGadgetFont(1, FontID(1))
  
  
  For a=1 To 5
    AddGadgetItem(1, -1, "Item " + Str(a), 0, 0)
  Next
  
  SendMessage_(GadgetID(1), #LVM_SETIMAGELIST, #LVSIL_SMALL, ImageList_Create_(1, 5, #ILC_COLORDDB, 0, 0))
  
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
If I use SetGadgetFont() (e.g. with 5 Pixel), I can make the row height even smaller.
I can't make it smaller than the font height.
I don't think it's possible.
@RASHAD: Do you have a solution? :D
zikitrake wrote:2 - But, when I click on a procedure in the list, the code window scrolls to that procedure, but it doesn't get bold in the list until I click or type something in the code.
Hola :)
Fixed.
zikitrake wrote:PS: Another flaw I found is that, when the first line in the editor is a procedure and we select it, it doesn't appear in bold in the procedures list (I s
Fixed.
Image
Image
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Multicolor Procedure List

Post by zikitrake »

Yesss! It's works fine now!

A little issue :oops:
If you insert an IncludeFile "AnyStringModule.pbi" (Capital letter M), you will need to activate the button 'Hide module names' to activate bold correctly.

Try yourself :)

Code: Select all

IncludeFile "AnyStringModule.pbi"
Procedure Sample_01()
  ;I'm Proc 01
  Debug "hello, world 01"
EndProcedure
Procedure Sample_02()
  ;I'm Proc 02
  Debug "hello, world 02"
EndProcedure
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

Multicolor Procedure List 1.2.6 has been released.

Changelog:
  • Added: Added setting "Automatically scroll to current procedure".
  • Added: Added setting "Disable automatic unfolding of procedure after click".
  • Bugfix: IMA error when the cursor was at the end of the source code.
  • Bugfix: Incorrect recognition of the current module.
zikitrake wrote:If you insert an IncludeFile "AnyStringModule.pbi" (Capital letter M), you will need to activate the button 'Hide module names' to activate bold correctly.
Hola
Can you test again with the new version? I don't know if the error still exists.
Image
Image
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Multicolor Procedure List

Post by zikitrake »

RSBasic wrote:Hola...
Gute Nacht :D I can confirm that the error has been fixed.

I like the new options!
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Multicolor Procedure List

Post by RSBasic »

Multicolor Procedure List 1.2.7 has been released.

Changelog:
  • Bugfix: The automatic scrolling to the procedure is now compatible with the PB setting "Show Procedure Arguments".
Image
Image
Post Reply