OK, but it doesn't work for C code...
... hence the "pseudo"

.
The logic used is fairly simplistic:
- List functions in the current file
- Collect the classes they are from
- List the classes in the current file
- Iterate through the member variables of both lists of classes
- Put this list of variables in Scintilla's (previously unused by Code::Blocks) keyword set for "Global classes and typedefs"
This makes a lot of assumptions about coding style, but these assumptions generally yield decent results on C++ code. However, searching for a
class in C code will fail for obvious reasons.
In C code, what would your expectations be for choosing the highlighted set?
Probably you have to look in this topic: http://forums.codeblocks.org/index.php/topic,16249.0.html
Yes... the plugin there is a lot more ambitious than what I am attempting.
Is it possible to extract this code in a separate plugin or in core?
Probably not; this makes use of the token tree that CC builds to decide on the set of keywords to highlight.
For example, add a new member variable to the class in a header file, then create an inline method to use this member variable (i.e. a getter-method). This variable will be the only one not highlighted like the others until CC scans this file again... 
Although the code is not necessarily expensive, I would prefer it run the fewest number of times necessary. Do you have a recommended selection of events I should attach it to?