Page 1 of 1

Syntax coloring for gadget definitions

Posted: Fri Aug 02, 2013 6:48 am
by PB
I'd like to request syntax coloring for gadget definitions, and also
for OpenWindow. Would make it easier to spot our GUI elements
in our sea of source code. :)

Currently I've added ButtonGadget, ComboBoxGadget, etc, all
as custom keywords, but there's so many and it means I can't
change their color from my own custom keywords there. :(

[Edited to explain for definitions, not for every keyword]

Re: Syntax coloring for gadget keywords

Posted: Fri Aug 02, 2013 6:56 am
by eesau
IMO it would be best if there were several custom keyword groups that you could select syntax coloring for. I'd say built-in syntax coloring for GUI functions is too specific to be added.

Re: Syntax coloring for gadget keywords

Posted: Fri Aug 02, 2013 8:15 am
by PB
> built-in syntax coloring for GUI functions is too specific to be added

I mean for their definitions; not for every function of them. First post edited.

Re: Syntax coloring for gadget keywords

Posted: Fri Aug 02, 2013 10:17 am
by eesau
PB wrote:> built-in syntax coloring for GUI functions is too specific to be added

I mean for their definitions; not for every function of them. First post edited.
I'm not sure I follow. What do you mean by definitions?

Re: Syntax coloring for gadget keywords

Posted: Fri Aug 02, 2013 11:31 am
by PB
> What do you mean by definitions?

The commands where the gadgets are first defined.

Take the example images below... say you want to find where the
CalendarGadget is first defined in the big screenshot below. When
you scroll such code in the IDE, it's hard to spot it at first, just as
it is in the screenshot. It gets "lost in the sea", as it were.

Then look at the second big screenshot under it, and with syntax
coloring for gadget definitions you can easily see CalendarGadget
immediately. :) Makes for quicker editing, especially when a lot
of code surrounds the definition.

Yes, I know all gadget definitions would be colored, but that's
not a problem, IMO. Makes finding all gadgets very easy when
scrolling your source looking for them.

Image
.
Image

Re: Syntax coloring for gadget definitions

Posted: Fri Aug 02, 2013 12:14 pm
by eesau
Okay, now I get it.

It's not a bad request as such. I think it could even be extended so that the IDE would color or highlight not just UI functions but other function groups as well: drawing, math etc. (maybe each PB library listed in the help file). Highlighting could be user requested or automatic, based on the function the cursor is currently on, same way it is for some of the keyword -pairs. Still, it's just IDE sugar, nice to have but not required :wink:

Re: Syntax coloring for gadget definitions

Posted: Fri Aug 02, 2013 12:35 pm
by PB
> It's not a bad request as such

:lol:

I don't use the form designer at all to create my windows,
so being able to scroll around my code and easily see my
gadgets is a necessity. Usually the definitions are followed
by AddGadgetItem and GadgetToolTip etc, so it makes them
hard to spot. This type of highlighting would solve that.

If this request can't be done, then at least it would be good
to have more than ONE custom keywords section. Maybe
allow up to 10, so people like me can create their own little
sections of coloring. Hope the team reads this soon. ;)

PS. A color for all debugger commands is my wish, too!

Re: Syntax coloring for gadget definitions

Posted: Fri Aug 02, 2013 12:55 pm
by Rescator
Nice idea on the library color hinting there eesau, I'd like to see that myself.