moved cmdid_show_scrollbar/cmdid_hide_scrollbar to custom side

master
Allen Webster 2016-06-29 14:38:58 -04:00
parent f37b2032c1
commit cb6d1d8953
8 changed files with 104 additions and 49 deletions

View File

@ -93,6 +93,9 @@ This is the documentation for alpha 4.0.9 super! The documentation has been made
<a href='#set_active_view_doc'>set_active_view</a>
</li>
<li>
<a href='#view_set_setting_doc'>view_set_setting</a>
</li>
<li>
<a href='#view_set_split_proportion_doc'>view_set_split_proportion</a>
</li>
<li>
@ -420,15 +423,15 @@ range is not within the bounds of the buffer.</div></div><hr>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Parameters</i></b></div><div>
<div style='font-weight: 600;'>buffer</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>the buffer to set a setting on</div></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The buffer on which to set a setting.</div></div>
</div>
<div>
<div style='font-weight: 600;'>setting</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>one of the Buffer_Setting_ID enum values that identifies the setting to set</div></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>One of the Buffer_Setting_ID enum values that identifies the setting to set.</div></div>
</div>
<div>
<div style='font-weight: 600;'>value</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>the value to set the specified setting to</div></div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The value to set the specified setting to.</div></div>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Setting_ID_doc'>Buffer_Setting_ID</a></div></div><hr>
<div id='buffer_auto_indent_doc' style='margin-bottom: 1cm;'>
@ -592,8 +595,26 @@ Views should not be closed or opened durring a view loop.</div><div style='margi
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero on success</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If the given view is a currently open view, it is set as the
active view, and takes subsequent commands and is returned
from get_active_view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#get_active_view_doc'>get_active_view</a></div></div><hr>
<div id='view_set_setting_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.22: view_set_setting</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_setting(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>int setting,<br>int value<br></div>)
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Parameters</i></b></div><div>
<div style='font-weight: 600;'>view</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The view on which to set a setting.</div></div>
</div>
<div>
<div style='font-weight: 600;'>setting</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>One of the View_Setting_ID enum values that identifies the setting to set.</div></div>
</div>
<div>
<div style='font-weight: 600;'>value</div>
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The value to set the specified setting to.</div></div>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#View_Setting_ID_doc'>View_Setting_ID</a></div></div><hr>
<div id='view_set_split_proportion_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.22: view_set_split_proportion</h4>
<h4>&sect;2.2.23: view_set_split_proportion</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_split_proportion(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>float t<br></div>)
</div>
@ -607,7 +628,7 @@ from get_active_view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; colo
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Returns non-zero on success.</div></div><hr>
<div id='view_compute_cursor_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.23: view_compute_cursor</h4>
<h4>&sect;2.2.24: view_compute_cursor</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_compute_cursor(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>Buffer_Seek seek,<br>Full_Cursor *cursor_out<br></div>)
</div>
@ -625,7 +646,7 @@ from get_active_view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; colo
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Returns non-zero on success.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Computes a full cursor for the given seek position.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Seek_doc'>Buffer_Seek</a></div></div><hr>
<div id='view_set_cursor_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.24: view_set_cursor</h4>
<h4>&sect;2.2.25: view_set_cursor</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_cursor(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>Buffer_Seek seek,<br>int set_preferred_x<br></div>)
</div>
@ -644,7 +665,7 @@ from get_active_view.</div><div style='margin-top: 3mm; margin-bottom: 3mm; colo
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero on success</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Sets the the view's cursor position. set_preferred_x should usually be true unless the change in
cursor position is is a vertical motion that tries to keep the cursor in the same column or x position.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Seek_doc'>Buffer_Seek</a></div></div><hr>
<div id='view_set_mark_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.25: view_set_mark</h4>
<h4>&sect;2.2.26: view_set_mark</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_mark(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>Buffer_Seek seek<br></div>)
</div>
@ -658,7 +679,7 @@ cursor position is is a vertical motion that tries to keep the cursor in the sam
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero on success</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Sets the the view's mark position.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Buffer_Seek_doc'>Buffer_Seek</a></div></div><hr>
<div id='view_set_highlight_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.26: view_set_highlight</h4>
<h4>&sect;2.2.27: view_set_highlight</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_highlight(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>int start,<br>int end,<br>int turn_on<br></div>)
</div>
@ -683,7 +704,7 @@ is set to true the highlight will be shown and the cursor will be hidden. After
that either setting the with view_set_cursor or calling view_set_highlight and
the turn_on set to false, will switch back to showing the cursor.</div></div><hr>
<div id='view_set_buffer_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.27: view_set_buffer</h4>
<h4>&sect;2.2.28: view_set_buffer</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_set_buffer(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>int buffer_id,<br>unsigned int flags<br></div>)
</div>
@ -702,7 +723,7 @@ the turn_on set to false, will switch back to showing the cursor.</div></div><hr
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero on success</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>On success view_set_buffer sets the specified view's current buffer and
cancels and dialogue shown in the view and displays the file.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Set_Buffer_Flag_doc'>Set_Buffer_Flag</a></div></div><hr>
<div id='view_post_fade_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.28: view_post_fade</h4>
<h4>&sect;2.2.29: view_post_fade</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->view_post_fade(
<div style='margin-left: 4mm;'>Application_Links *app,<br>View_Summary *view,<br>float seconds,<br>int start,<br>int end,<br>unsigned int color<br></div>)
</div>
@ -728,7 +749,7 @@ cancels and dialogue shown in the view and displays the file.</div><div style='m
</div>
</div><hr>
<div id='get_user_input_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.29: get_user_input</h4>
<h4>&sect;2.2.30: get_user_input</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>User_Input app->get_user_input(
<div style='margin-left: 4mm;'>Application_Links *app,<br>unsigned int get_type,<br>unsigned int abort_type<br></div>)
</div>
@ -746,19 +767,19 @@ command is executed an abort signal is returned. If an abort signal is ever ret
command should finish execution without any more calls that preempt the command.
If a get condition is met the user input is returned</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Input_Type_Flag_doc'>Input_Type_Flag</a></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#User_Input_doc'>User_Input</a></div></div><hr>
<div id='get_command_input_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.30: get_command_input</h4>
<h4>&sect;2.2.31: get_command_input</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>User_Input app->get_command_input(
<div style='margin-left: 4mm;'>Application_Links *app<br></div>)
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns the input that triggered the command in execution.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#User_Input_doc'>User_Input</a></div></div><hr>
<div id='get_mouse_state_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.31: get_mouse_state</h4>
<h4>&sect;2.2.32: get_mouse_state</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>Mouse_State app->get_mouse_state(
<div style='margin-left: 4mm;'>Application_Links *app<br></div>)
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns the current mouse state</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#Mouse_State_doc'>Mouse_State</a></div></div><hr>
<div id='start_query_bar_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.32: start_query_bar</h4>
<h4>&sect;2.2.33: start_query_bar</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->start_query_bar(
<div style='margin-left: 4mm;'>Application_Links *app,<br>Query_Bar *bar,<br>unsigned int flags<br></div>)
</div>
@ -773,7 +794,7 @@ If a get condition is met the user input is returned</div><div style='margin-top
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero on success</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>The memory pointed to by bar must remain valid until a call to end_query_bar or
until the command returns.</div></div><hr>
<div id='end_query_bar_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.33: end_query_bar</h4>
<h4>&sect;2.2.34: end_query_bar</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->end_query_bar(
<div style='margin-left: 4mm;'>Application_Links *app,<br>Query_Bar *bar,<br>unsigned int flags<br></div>)
</div>
@ -787,7 +808,7 @@ until the command returns.</div></div><hr>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>bar must be a pointer previously passed to start_query_bar previously in the same command.</div></div><hr>
<div id='print_message_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.34: print_message</h4>
<h4>&sect;2.2.35: print_message</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->print_message(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *str,<br>int len<br></div>)
</div>
@ -801,7 +822,7 @@ until the command returns.</div></div><hr>
</div>
</div><hr>
<div id='change_theme_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.35: change_theme</h4>
<h4>&sect;2.2.36: change_theme</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->change_theme(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *name,<br>int len<br></div>)
</div>
@ -815,7 +836,7 @@ until the command returns.</div></div><hr>
</div>
</div><hr>
<div id='change_font_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.36: change_font</h4>
<h4>&sect;2.2.37: change_font</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->change_font(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *name,<br>int len<br></div>)
</div>
@ -829,7 +850,7 @@ until the command returns.</div></div><hr>
</div>
</div><hr>
<div id='set_theme_colors_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.37: set_theme_colors</h4>
<h4>&sect;2.2.38: set_theme_colors</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->set_theme_colors(
<div style='margin-left: 4mm;'>Application_Links *app,<br>Theme_Color *colors,<br>int count<br></div>)
</div>
@ -844,7 +865,7 @@ until the command returns.</div></div><hr>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>For each color struct in the array, the color in the style pallet is set to the color
code paired with the tag.</div></div><hr>
<div id='get_theme_colors_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.38: get_theme_colors</h4>
<h4>&sect;2.2.39: get_theme_colors</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->get_theme_colors(
<div style='margin-left: 4mm;'>Application_Links *app,<br>Theme_Color *colors,<br>int count<br></div>)
</div>
@ -859,7 +880,7 @@ code paired with the tag.</div></div><hr>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>For each color struct in the array, the color field of the struct is filled with the
color from the specified color in the pallet.</div></div><hr>
<div id='directory_get_hot_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.39: directory_get_hot</h4>
<h4>&sect;2.2.40: directory_get_hot</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->directory_get_hot(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *out,<br>int capacity<br></div>)
</div>
@ -877,7 +898,7 @@ accessed in the GUI. Whenever the GUI is opened it shows the hot directory.
In the future this will be deprecated and eliminated in favor of more flexible
directories controlled by the custom side.</div></div><hr>
<div id='get_file_list_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.40: get_file_list</h4>
<h4>&sect;2.2.41: get_file_list</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>File_List app->get_file_list(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *dir,<br>int len<br></div>)
</div>
@ -893,7 +914,7 @@ directories controlled by the custom side.</div></div><hr>
the specified directory. The File_List returned should be passed to free_file_list
when it is no longer in use.</div></div><hr>
<div id='free_file_list_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.41: free_file_list</h4>
<h4>&sect;2.2.42: free_file_list</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>void app->free_file_list(
<div style='margin-left: 4mm;'>Application_Links *app,<br>File_List list<br></div>)
</div>
@ -903,7 +924,7 @@ when it is no longer in use.</div></div><hr>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>after this call the file list passed in should not be read or written to</div></div><hr>
<div id='file_exists_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.42: file_exists</h4>
<h4>&sect;2.2.43: file_exists</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->file_exists(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *filename,<br>int len<br></div>)
</div>
@ -917,7 +938,7 @@ when it is no longer in use.</div></div><hr>
</div>
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Return</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>returns non-zero if the file exists, returns zero if the file does not exist</div></div><hr>
<div id='directory_cd_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.43: directory_cd</h4>
<h4>&sect;2.2.44: directory_cd</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->directory_cd(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *dir,<br>int *len,<br>int capacity,<br>char *rel_path,<br>int rel_len<br></div>)
</div>
@ -949,7 +970,7 @@ For instance if dir contains "C:/Users/MySelf" and rel is "Documents" the buffer
"C:/Users/MySelf/Documents" and len will contain the length of that string. This call can
also be used with rel set to ".." to traverse to parent folders.</div></div><hr>
<div id='get_4ed_path_doc' style='margin-bottom: 1cm;'>
<h4>&sect;2.2.44: get_4ed_path</h4>
<h4>&sect;2.2.45: get_4ed_path</h4>
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>int app->get_4ed_path(
<div style='margin-left: 4mm;'>Application_Links *app,<br>char *out,<br>int capacity<br></div>)
</div>

View File

@ -140,9 +140,6 @@ enum{
cmdid_eol_dosify,
cmdid_eol_nixify,
cmdid_hide_scrollbar,
cmdid_show_scrollbar,
cmdid_interactive_new,
cmdid_interactive_open,
cmdid_reopen,
@ -280,6 +277,11 @@ enum Buffer_Setting_ID{
BufferSetting_MapID,
};
enum View_Setting_ID{
ViewSetting_Null,
ViewSetting_ShowScrollbar,
};
enum Buffer_Kill_Flag{
BufferKill_Background = 0x1,
BufferKill_AlwaysKill = 0x2,

View File

@ -20,6 +20,7 @@
#define GET_VIEW_SIG(n) View_Summary n(Application_Links *app, int view_id, unsigned int access)
#define GET_ACTIVE_VIEW_SIG(n) View_Summary n(Application_Links *app, unsigned int access)
#define SET_ACTIVE_VIEW_SIG(n) int n(Application_Links *app, View_Summary *view)
#define VIEW_SET_SETTING_SIG(n) int n(Application_Links *app, View_Summary *view, int setting, int value)
#define VIEW_SET_SPLIT_PROPORTION_SIG(n) int n(Application_Links *app, View_Summary *view, float t)
#define VIEW_COMPUTE_CURSOR_SIG(n) int n(Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out)
#define VIEW_SET_CURSOR_SIG(n) int n(Application_Links *app, View_Summary *view, Buffer_Seek seek, int set_preferred_x)
@ -66,6 +67,7 @@ extern "C"{
typedef GET_VIEW_SIG(Get_View_Function);
typedef GET_ACTIVE_VIEW_SIG(Get_Active_View_Function);
typedef SET_ACTIVE_VIEW_SIG(Set_Active_View_Function);
typedef VIEW_SET_SETTING_SIG(View_Set_Setting_Function);
typedef VIEW_SET_SPLIT_PROPORTION_SIG(View_Set_Split_Proportion_Function);
typedef VIEW_COMPUTE_CURSOR_SIG(View_Compute_Cursor_Function);
typedef VIEW_SET_CURSOR_SIG(View_Set_Cursor_Function);
@ -115,6 +117,7 @@ struct Application_Links{
Get_View_Function *get_view;
Get_Active_View_Function *get_active_view;
Set_Active_View_Function *set_active_view;
View_Set_Setting_Function *view_set_setting;
View_Set_Split_Proportion_Function *view_set_split_proportion;
View_Compute_Cursor_Function *view_compute_cursor;
View_Set_Cursor_Function *view_set_cursor;
@ -166,6 +169,7 @@ app_links->get_view_next = Get_View_Next;\
app_links->get_view = Get_View;\
app_links->get_active_view = Get_Active_View;\
app_links->set_active_view = Set_Active_View;\
app_links->view_set_setting = View_Set_Setting;\
app_links->view_set_split_proportion = View_Set_Split_Proportion;\
app_links->view_compute_cursor = View_Compute_Cursor;\
app_links->view_set_cursor = View_Set_Cursor;\

View File

@ -122,9 +122,9 @@ CUSTOM_COMMAND_SIG(seek_whitespace_down_end_line){
HOOK_SIG(my_start){
exec_command(app, cmdid_open_panel_vsplit);
exec_command(app, cmdid_hide_scrollbar);
exec_command(app, hide_scrollbar);
exec_command(app, cmdid_change_active_panel);
exec_command(app, cmdid_hide_scrollbar);
exec_command(app, hide_scrollbar);
app->change_theme(app, literal("4coder"));
app->change_font(app, literal("Liberation Sans"));
@ -318,13 +318,13 @@ default_keys(Bind_Helper *context){
bind(context, 'O', MDFR_CTRL, cmdid_reopen);
bind(context, 'q', MDFR_CTRL, query_replace);
bind(context, 'r', MDFR_CTRL, reverse_search);
bind(context, 's', MDFR_ALT, cmdid_show_scrollbar);
bind(context, 's', MDFR_ALT, show_scrollbar);
bind(context, 's', MDFR_CTRL, cmdid_save);
bind(context, 'u', MDFR_CTRL, cmdid_to_uppercase);
bind(context, 'U', MDFR_CTRL, rewrite_as_single_caps);
bind(context, 'v', MDFR_CTRL, paste);
bind(context, 'V', MDFR_CTRL, paste_next);
bind(context, 'w', MDFR_ALT, cmdid_hide_scrollbar);
bind(context, 'w', MDFR_ALT, hide_scrollbar);
bind(context, 'x', MDFR_CTRL, cut);
bind(context, 'y', MDFR_CTRL, cmdid_redo);
bind(context, 'z', MDFR_CTRL, cmdid_undo);

View File

@ -811,6 +811,20 @@ CUSTOM_COMMAND_SIG(snipe_token_or_word){
app->buffer_replace_range(app, &buffer, range.start, range.end, 0, 0);
}
//
// Scroll Bar Controlling
//
CUSTOM_COMMAND_SIG(show_scrollbar){
View_Summary view = app->get_active_view(app, AccessProtected);
app->view_set_setting(app, &view, ViewSetting_ShowScrollbar, true);
}
CUSTOM_COMMAND_SIG(hide_scrollbar){
View_Summary view = app->get_active_view(app, AccessProtected);
app->view_set_setting(app, &view, ViewSetting_ShowScrollbar, false);
}
//
//
//

13
4ed.cpp
View File

@ -976,16 +976,6 @@ COMMAND_DECL(user_callback){
if (binding.custom) binding.custom(&models->app_links);
}
COMMAND_DECL(hide_scrollbar){
USE_VIEW(view);
view->hide_scrollbar = 1;
}
COMMAND_DECL(show_scrollbar){
USE_VIEW(view);
view->hide_scrollbar = 0;
}
internal void
update_command_data(App_Vars *vars, Command_Data *cmd){
cmd->panel = cmd->models->layout.panels + cmd->models->layout.active_panel;
@ -1122,9 +1112,6 @@ setup_command_table(){
SET(open_menu);
SET(open_debug);
SET(hide_scrollbar);
SET(show_scrollbar);
#undef SET
}

View File

@ -688,9 +688,9 @@ range is not within the bounds of the buffer.
API_EXPORT int
Buffer_Set_Setting(Application_Links *app, Buffer_Summary *buffer, int setting, int value)/*
DOC_PARAM(buffer, the buffer to set a setting on)
DOC_PARAM(setting, one of the Buffer_Setting_ID enum values that identifies the setting to set)
DOC_PARAM(value, the value to set the specified setting to)
DOC_PARAM(buffer, The buffer on which to set a setting.)
DOC_PARAM(setting, One of the Buffer_Setting_ID enum values that identifies the setting to set.)
DOC_PARAM(value, The value to set the specified setting to.)
DOC_SEE(Buffer_Setting_ID)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
@ -1107,6 +1107,32 @@ DOC_SEE(get_active_view)
return(result);
}
API_EXPORT int
View_Set_Setting(Application_Links *app, View_Summary *view, int setting, int value)/*
DOC_PARAM(view, The view on which to set a setting.)
DOC_PARAM(setting, One of the View_Setting_ID enum values that identifies the setting to set.)
DOC_PARAM(value, The value to set the specified setting to.)
DOC_SEE(View_Setting_ID)
*/{
Command_Data *cmd = (Command_Data*)app->cmd_context;
View *vptr = imp_get_view(cmd, view);
int result = false;
if (vptr){
switch (setting){
case ViewSetting_ShowScrollbar:
{
result = true;
vptr->hide_scrollbar = !value;
}break;
}
fill_view_summary(view, vptr, cmd);
}
return(result);
}
API_EXPORT int
View_Set_Split_Proportion(Application_Links *app, View_Summary *view, float t)/*
DOC_PARAM(view, The view on which to adjust size.)

View File

@ -32,6 +32,7 @@ CUSTOM_COMMAND_SIG(build_in_build_panel){
if (!build_view.exists){
exec_command(app, cmdid_open_panel_hsplit);
exec_command(app, hide_scrollbar);
build_view = app->get_active_view(app, AccessAll);
app->view_set_split_proportion(app, &build_view, .2f);
}