doc_function_brief(arena,&func,"Compute a new line number and pixel shift relative to a given line number and pixel shift, guaranteeing that the new line number is the one closest to containing the new point");
doc_text(arena,params,"the id of the view who's layout will be measured");
doc_function_param(arena,&func,"line");
doc_text(arena,params,"the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena,&func,"y_shift");
doc_text(arena,params,"the y shift, in pixels, from the top of the specified line to be measured");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the best match line number and the remaining y shift that is not accounted for by the change in line number on success, when the view exists and contains the line, cleared to zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Line numbers are 1 based.");
doc_paragraph(arena,det);
doc_text(arena,det,"Equivalent to calling the buffer related function of the same name by deriving the buffer, width, and face from the view.");
doc_text(arena,params,"the id of the view who's layout will be measured");
doc_function_param(arena,&func,"base_line");
doc_text(arena,params,"the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena,&func,"relative_xy");
doc_text(arena,params,"the point, in pixels, interpreted relative to the line's top left corner, that will serve as the query point");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the byte index associated as the first byte of a character in the layout that is the closest to containing the query point on success, when the view exists and contains the line, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Line numbers are 1 based.");
doc_paragraph(arena,det);
doc_text(arena,det,"Equivalent to calling the buffer related function of the same name by deriving the buffer, width, and face from the view.");
doc_function_brief(arena,&func,"Compute the box of a character that spans a particular byte position, relative to the top left corner of a given line");
doc_text(arena,params,"the id of the view who's layout will be measured");
doc_function_param(arena,&func,"base_line");
doc_text(arena,params,"the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena,&func,"pos");
doc_text(arena,params,"the absolute byte index of the position to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the rectangle of a character in the layout that is closest to including the given query position in it's span, with coordinates set relative to the top left corner of the base line, on success, when the view exists and contains the base line and query position, cleared to zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Line numbers are 1 based.");
doc_paragraph(arena,det);
doc_text(arena,det,"Equivalent to calling the buffer related function of the same name by deriving the buffer, width, and face from the view.");
doc_text(arena,params,"the id of the view who's layout will be measured");
doc_function_param(arena,&func,"base_line");
doc_text(arena,params,"the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena,&func,"pos");
doc_text(arena,params,"the absolute byte index of the position to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the relative index, based at the first character of the base line, of the character that is closest to spanning the query position on success, when the view exists and contains the base line and query position, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Line numbers are 1 based.");
doc_paragraph(arena,det);
doc_text(arena,det,"Equivalent to calling the buffer related function of the same name by deriving the buffer, width, and face from the view.");
doc_function_brief(arena,&func,"Compute the byte position associated with the start of a particular character specified relative to the first character of a particular line");
doc_text(arena,params,"the id of the view who's layout will be measured");
doc_function_param(arena,&func,"base_line");
doc_text(arena,params,"the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena,&func,"character");
doc_text(arena,params,"the relative character index of the query character, based at the first character of base line");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the byte index associated with the start of the character specified by the the base_line and relative_character parameters on success, when the view exists and contains the base line, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Line numbers are 1 based.");
doc_paragraph(arena,det);
doc_text(arena,det,"Equivalent to calling the buffer related function of the same name by deriving the buffer, width, and face from the view.");
doc_text(arena,params,"the type of access requirements that the view must satisfy");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the id of the view attached to this thread, if the calling thread is a view context, and if it can satisfy the access requirements, zero otherwise");
doc_text(arena,params,"the id of the view to query");
doc_function_param(arena,&func,"access");
doc_text(arena,params,"required access flags for the buffer, in this call the flag Access_Visible indicates whether the view is currently displaying it's buffer, by adding it to the access flags you can require that the buffer is visible");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the id of the buffer if the view exists and the buffer satisfies the access requirements, zero otherwise");
doc_text(arena,params,"the id of the view to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the rectangle covered by the view in pixels relative to the screen rectangle's top left corner, if the view exists, zero otherwise");
doc_text(arena,params,"the id of the view to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the id of the panel associated with the view, if the view exists, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Associations between panels and views are not 'stable'. They often change whenever the layout of panels is adjusted. The results of this query should only be taken as correct for as long as no panels or views are opened or closed.");
doc_text(arena,params,"the id of the panel to query");
doc_function_param(arena,&func,"access");
doc_text(arena,params,"the type of access requirements that the view must satisfy");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the id of the view associated with the panel, if the panel exists and is a 'leaf' panel in the panel layout, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Associations between panels and views are not 'stable'. They often change whenever the layout of panels is adjusted. The results of this query should only be taken as correct for as long as no panels or views are opened or closed.");
doc_text(arena,params,"the id of the panel to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero if the panel exists and is an internal panel in the panel layout tree");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"The panel layout tree is a binary tree with internal panels having exactly two children and a split rule, and leaf panels having an associated view.");
doc_text(arena,params,"the id of the panel to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero if the panel exists and is a leaf panel in the panel layout tree");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"The panel layout tree is a binary tree with internal panels having exactly two children and a split rule, and leaf panels having an associated view.");
doc_text(arena,params,"the id of the panel to split");
doc_function_param(arena,&func,"split_dim");
doc_text(arena,params,"the dimension along which the split is placed - x splits split the horizontal axis with a vertical divider - y splits split the vertical axis with a horizontal divider");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero on success, when the panel exists and splitting it is possible, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"New splits are created as 50/50 proportional splits.");
doc_paragraph(arena,det);
doc_text(arena,det,"The only limit on splits is the number of views, which is 16. When a leaf panel is split, the view it was associated with is placed in the 'min' child of the split and a panel with a new view is placed in the 'max' child of the split. When an internal panel is split, it's 'min' child adopts the old children and split settings of the panel and the 'max' child gets a panel with a new view.");
doc_paragraph(arena,det);
doc_text(arena,det,"In either case, a successful split puts a new leaf panel in the 'max' child, puts the old contents of the panel into the 'min' child. The id of the panel that was split becomes the id of the parent of the split. View panel associations are modified by a split.");
doc_text(arena,params,"the id of the panel to query");
doc_function_param(arena,&func,"which_child");
doc_text(arena,params,"the selector for which of the children to acquire, 'min' children are the children on the top or left, and 'max' children are the children on the bottom or right, depending on the dimension of the split");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the id of the requested child of the given panel, if the given panel exists and is a split, otherwise zero");
doc_text(arena,params,"the id of the view to close");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero if the view exists, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"When the view is closed, it's associated panel is also closed and the layout is adjusted to compensate, possibly changing the associations of of panels and views.");
doc_text(arena,params,"the id of the view who's context thread will be sent the command");
doc_function_param(arena,&func,"custom_func");
doc_text(arena,params,"the function pointer to the command to be processed by the view");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero if the view exists, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Directly enqueued commands are triggered in the order they were enqueued before any additional events, virtual o real, are processed, and before the current frame renders.");
doc_text(arena,params,"the id of the view to modify");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"non-zero if the view exists, zero otherwise");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"A view is considered to be in a UI loop when it's context details have set their 'hides_buffer' field to true. This call attemps to get the view to a state with this field set to false by sending abort events repeatedly. This can fail due to buggy or non-compliant implementations of views. It can either fail because the UI loop refuses to respond to the abort after repeated attempts to close it, or because the view shuts down completely rather than returning to a buffer viewing state. The core ensures that if this happens to the final view, a new root panel and empty view will be initialized.");
doc_text(arena,params,"the id of the view to query");
doc_function_param(arena,&func,"hook_id");
doc_text(arena,params,"the id of the hook to query");
// return
Doc_Block*ret=doc_function_return(arena,&func);
doc_text(arena,ret,"the data struct pointing to the memory set aside for the context on success, when the view and hook exit and have associated memory for the hook, otherwise cleared to zero");
// details
Doc_Block*det=doc_function_details(arena,&func);
doc_text(arena,det,"Some hooks controlled by the view context details stack have their own requirements for unique, stable, context memory, which needs a variable sized allocation. The size of the memory available to such hooks is determined by the context details, and each instance of the context on the stack gets it's own allocation for these hooks. For example, smooth scrolling rules often require some state that wants to be locally tied to the scrolling for a particular UI loop.");