Author Topic: Keyword Sets  (Read 7617 times)

Offline cybergray

  • Single posting newcomer
  • *
  • Posts: 3
Keyword Sets
« on: December 05, 2021, 08:40:50 am »
Hello, i will need Keyword Set 8 for coloring special words in C++
with other color then for example "Keywords" Set1 or "User Keywords"
Set 2. The other Sets (3-7) seem to have special purposes. How can this
be done, when no entry for Keyword Set 8 is available (e.g. for user keyword
Set 2 there is an entry, here you can choose the color simply over the given
Syntax coloring panel entry "User Keywords"). Thanks in forward for any
help and kind regards!

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Keyword Sets
« Reply #1 on: December 06, 2021, 01:26:24 am »
If i understand you correctly, you want to color the Set Number 8?

Sadly this seems not to be possible over the UI. Can you please report this as a bug on Sourceforge?
I looked a bit into the code, but was not able to determine how coloring works exactly.

I found out, that scintilla has 255 styles, and for example style 0 ist the default background color.
Codeblocks overrides this styles in the configuration file with the xml path: editor/colour_sets and then in the tags <styleX> where X is the style number.
I was not able to find out, what style number the keyword set 8 has...
What i found out is, that, when the keyword is in the middle of a comment section of the code, than the styleX+64 is applied. For example numbers have the style nr 4, if they are in a comment section they have the style 4+64=68

maybe some other dev can help you...

Offline cybergray

  • Single posting newcomer
  • *
  • Posts: 3
Re: Keyword Sets
« Reply #2 on: December 06, 2021, 05:20:18 am »
Hello BlueHazzard,

first thanks to you for all your friendly efforts. For myself i tried a little bit in the default.conf maybe to find out the <styleX> for the Set8 about "manually trial and error" with the xml-sequence (hopefully in the right section):

         <colour r="128" g="128" b="64" />

, but until now with no success X between 47 and 128 (sorry must correct it.) It's about to kill me softly ;D Maybe you know a dev who has another ingenious idea but i have not much hope therefore. Nevertheless thank you very much again and have a nice day (without solving overwhelming problems). *cybergray*
« Last Edit: December 07, 2021, 03:05:10 am by cybergray »

Offline cybergray

  • Single posting newcomer
  • *
  • Posts: 3
Re: Keyword Sets
« Reply #3 on: December 07, 2021, 11:59:27 am »
Hello BlueHazzard,

the bug is reported to Sourceforge as demanded. I choose you as owner (hope that is oK). Kind regards. *cybergray*