merge
commit
0ec658baa8
|
@ -235,6 +235,7 @@ CUSTOM_COMMAND_SIG(build_at_launch_location){
|
||||||
exec_command(app, cmdid_command_line);
|
exec_command(app, cmdid_command_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// NOTE(allen|a4) See 4coder_styles.h for a list of available style tags.
|
// NOTE(allen|a4) See 4coder_styles.h for a list of available style tags.
|
||||||
// There are style tags corresponding to every color in the theme editor.
|
// There are style tags corresponding to every color in the theme editor.
|
||||||
CUSTOM_COMMAND_SIG(improve_theme){
|
CUSTOM_COMMAND_SIG(improve_theme){
|
||||||
|
@ -264,15 +265,16 @@ CUSTOM_COMMAND_SIG(ruin_theme){
|
||||||
|
|
||||||
app->set_theme_colors(app, colors, count);
|
app->set_theme_colors(app, colors, count);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void get_bindings(Bind_Helper *context, int set_hooks){
|
int get_bindings(void *data, int size){
|
||||||
|
Bind_Helper context_ = begin_bind_helper(data, size);
|
||||||
|
Bind_Helper *context = &context_;
|
||||||
|
|
||||||
// NOTE(allen|a3.1): Hooks have no loyalties to maps. All hooks are global
|
// NOTE(allen|a3.1): Hooks have no loyalties to maps. All hooks are global
|
||||||
// and once set they always apply, regardless of what map is active.
|
// and once set they always apply, regardless of what map is active.
|
||||||
if (set_hooks){
|
set_hook(context, hook_start, my_start);
|
||||||
set_hook(context, hook_start, my_start);
|
set_hook(context, hook_open_file, my_file_settings);
|
||||||
set_hook(context, hook_open_file, my_file_settings);
|
|
||||||
//set_hook(context, hook_frame, my_frame); // Example of a frame hook, but disabled by default.
|
|
||||||
}
|
|
||||||
|
|
||||||
set_scroll_rule(context, smooth_scroll_rule);
|
set_scroll_rule(context, smooth_scroll_rule);
|
||||||
|
|
||||||
|
@ -299,9 +301,6 @@ void get_bindings(Bind_Helper *context, int set_hooks){
|
||||||
bind(context, 'M', MDFR_ALT | MDFR_CTRL, open_my_files);
|
bind(context, 'M', MDFR_ALT | MDFR_CTRL, open_my_files);
|
||||||
bind(context, 'M', MDFR_ALT, build_at_launch_location);
|
bind(context, 'M', MDFR_ALT, build_at_launch_location);
|
||||||
|
|
||||||
bind(context, '`', MDFR_ALT, improve_theme);
|
|
||||||
bind(context, '~', MDFR_ALT, ruin_theme);
|
|
||||||
|
|
||||||
end_map(context);
|
end_map(context);
|
||||||
|
|
||||||
|
|
||||||
|
@ -431,6 +430,9 @@ void get_bindings(Bind_Helper *context, int set_hooks){
|
||||||
bind(context, 'T', MDFR_CTRL | MDFR_ALT, begin_html_mode);
|
bind(context, 'T', MDFR_CTRL | MDFR_ALT, begin_html_mode);
|
||||||
|
|
||||||
end_map(context);
|
end_map(context);
|
||||||
|
|
||||||
|
int result = end_bind_helper(context);
|
||||||
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOTTOM
|
// BOTTOM
|
||||||
|
|
|
@ -172,12 +172,15 @@ set_scroll_rule(Bind_Helper *helper, Scroll_Rule_Function *func){
|
||||||
write_unit(helper, unit);
|
write_unit(helper, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline int
|
||||||
end_bind_helper(Bind_Helper *helper){
|
end_bind_helper(Bind_Helper *helper){
|
||||||
|
int result;
|
||||||
if (helper->header){
|
if (helper->header){
|
||||||
helper->header->header.total_size = (int)(helper->cursor - helper->start);
|
helper->header->header.total_size = (int)(helper->cursor - helper->start);
|
||||||
helper->header->header.error = helper->error;
|
helper->header->header.error = helper->error;
|
||||||
}
|
}
|
||||||
|
result = helper->write_total;
|
||||||
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(allen): Useful functions and overloads on app links
|
// NOTE(allen): Useful functions and overloads on app links
|
||||||
|
|
4
4ed.cpp
4
4ed.cpp
|
@ -3959,7 +3959,9 @@ App_Step_Sig(app_step){
|
||||||
for (dll_items(panel, used_panels)){
|
for (dll_items(panel, used_panels)){
|
||||||
view = panel->view;
|
view = panel->view;
|
||||||
if (view->current_scroll){
|
if (view->current_scroll){
|
||||||
gui_get_scroll_vars(&view->gui_target, view->showing_ui, view->current_scroll);
|
GUI_Scroll_Vars vars = {0};
|
||||||
|
gui_get_scroll_vars(&view->gui_target, view->showing_ui, &vars);
|
||||||
|
view->current_scroll->region = vars.region;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
g++ -Wno-write-strings -std=gnu++0x 4coder_custom.cpp -shared -o 4coder_custom.so -fPIC
|
SOURCE="$1"
|
||||||
|
if [ -z "$SOURCE" ]
|
||||||
|
then
|
||||||
|
SOURCE="4coder_default_bindings.cpp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
g++ -Wno-write-strings -std=gnu++0x $SOURCE -shared -o 4coder_custom.so -fPIC
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "4ed_mem.cpp"
|
#include "4ed_mem.cpp"
|
||||||
#include "4ed_math.cpp"
|
#include "4ed_math.cpp"
|
||||||
|
|
||||||
#include "4coder_custom.cpp"
|
#include "4coder_default_bindings.cpp"
|
||||||
|
|
||||||
#undef exec_command
|
#undef exec_command
|
||||||
#undef exec_command_keep_stack
|
#undef exec_command_keep_stack
|
||||||
|
|
Loading…
Reference in New Issue