I just recently purchased 4coder and trying to dive into the customization layer. I'm also a beginner in C++ so bear with me!
I always use 2 panels side-by-side and have code wrapping enabled. I'd like to disable wrapping and have a toggle-binding that "expands" the active panel, and then restores the split panels with their buffers if it is pressed a second time.
I came up with the following command which does what I want. The only problem is I'm not aware of way to tell if the active panel is at the left or right of the other panel. I currently have it set up to always open a new panel to the right.
static bool expanded = false;
int access = AccessAll;
View_Summary view = get_active_view(app,access);
static int32_t buffer_id;
view = get_active_view(app,access);
buffer_id = view.buffer_id;
View_Summary newview = open_view(app, &view, ViewSplit_Right);
view_set_buffer(app, &newview, buffer_id, 0);
expanded = !expanded;
So what I'm looking for is a way to pass ViewSplit_Right/ViewSplit_Left to the open_view() function, depending on which panel has been previously expanded.