This module provides text highlighting of types, functions and macros (as of 4coder 4.1.6, 4coder commands are not supported) by coloring them with a user specified color. For an identifier to be recognized as a type, function or macro, the file declaring it must be loaded.
This was tested with 4coder 4.1.6.
You need to #include this file in your custom layer (
4coder_default_bindings.cpp by default) below the line:
You need to call the function
4coder_default_hooks.cpp instead of
draw_cpp_token_colors. The function takes one extra argument which is the buffer that is currently being drawn. The call should look like this:
primitive_highlight_draw_cpp_token_colors( app, text_layout_id, &token_array, buffer );
You'll need to insert the following function prototype above the declaration of
function void primitive_highlight_draw_cpp_token_colors( Application_Links *app, Text_Layout_ID text_layout_id, Token_Array *array, Buffer_ID buffer );
Add those lines in your theme file to change the colors.
1 2 3 4
primitive_highlight_type = 0xffaaaaef; primitive_highlight_function = 0xffbbbbbb; primitive_highlight_macro = 0xffa46391; primitive_highlight_4coder_command = 0xffffffff;
You can define the order in which primitive types are chosen in case ...