Have a look at 4coder_default_bindings.cpp, it's the file that gets compiled by default for the custom layer. I suggest you to make a copy of that file to do your custom layer to avoid overwriting it when you update to a new version.
You can compile your file using buildsuper.bat by passing its name as the first argument in a terminal.
| buildsuper.bat custom_layer.cpp
|
You can create a new command (function) like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | CUSTOM_COMMAND_SIG( command_name_here ) {
// command code here.
}
CUSTOM_COMMAND_SIG( other_command_name_here ) {
// command code here.
}
void default_keys(Bind_Helper *context){
begin_map(context, mapid_global);
...
bind(context, 'a', MDFR_CTRL, command_name_here);
...
end_map(context);
// Those bind only work in code files.
begin_map(context, default_code_map);
...
bind(context, 'b', MDFR_CTRL|MDFR_ALT, other_command_name_here);
...
end_map(context);
}
|
You can find some tutorials and the API documentation on the
4coder website.
Apart from that you can search the source files in the 4coder directory to find out how to do things, or copy some of the functions and modify them to better suit your needs. For example 4coder_default_hooks.cpp contains the default function that get called when something happens (opening/closing a file, detecting if a file is code...). Note that if you change hooks you should modify get_bindings to set up your hooks (see set_all_default_hooks to know how to do that).
For your questions:
1. It depends on the warning you have. If you didn't modify the file, you can signal the exact warning and the version of visual studio you use to
Mr4thDimention by e-mail. You can probably disable WX until it is fixed (or fix the problem on your side).
2. get_bindings is the function that will be used to "start" your custom layer, you must have it in one of the file of your custom layer.