convert all region/endregion directives to the comment signature used with editor plugins
This commit is contained in:
@ -8,7 +8,7 @@ import "core:os"
|
||||
|
||||
Str_App_State := "App State"
|
||||
|
||||
#region("Memory")
|
||||
//region Memory
|
||||
|
||||
Memory_App : Memory
|
||||
|
||||
@ -133,9 +133,9 @@ MemoryConfig :: struct {
|
||||
commit_initial_filebuffer : uint,
|
||||
}
|
||||
|
||||
#endregion("Memory")
|
||||
//endregion Memory
|
||||
|
||||
#region("State")
|
||||
//region State
|
||||
|
||||
// ALl nobs available for this application
|
||||
AppConfig :: struct {
|
||||
@ -292,4 +292,4 @@ get_screen_extent :: #force_inline proc "contextless" () -> Extents2 { retu
|
||||
get_ui_context_mut :: #force_inline proc "contextless" () -> ^UI_State { return get_state().ui_context }
|
||||
set_ui_context :: #force_inline proc "contextless" ( ui : ^UI_State ) { get_state().ui_context = ui }
|
||||
|
||||
#endregion("State")
|
||||
//endregion State
|
||||
|
@ -6,7 +6,7 @@ import str "core:strings"
|
||||
|
||||
import sokol_app "thirdparty:sokol/app"
|
||||
|
||||
#region("Sokol App")
|
||||
//region Sokol App
|
||||
|
||||
sokol_app_init_callback :: proc "c" () {
|
||||
context = get_state().sokol_context
|
||||
@ -230,9 +230,9 @@ sokol_app_event_callback :: proc "c" (sokol_event : ^sokol_app.Event)
|
||||
}
|
||||
}
|
||||
|
||||
#endregion("Sokol App")
|
||||
//endregion Sokol App
|
||||
|
||||
#region("Sokol GFX")
|
||||
//region Sokol GFX
|
||||
|
||||
sokol_gfx_alloc :: proc "c" ( size : uint, user_data : rawptr ) -> rawptr {
|
||||
context = get_state().sokol_context
|
||||
@ -277,4 +277,4 @@ sokol_gfx_log_callback :: proc "c" (
|
||||
log_fmt( "%-80s %s::%v", cloned_msg, cloned_tag, line_nr, level = odin_level )
|
||||
}
|
||||
|
||||
#endregion("Sokol GFX")
|
||||
//endregion Sokol GFX
|
||||
|
@ -670,7 +670,7 @@ render_text_layer :: proc( screen_extent : Vec2, ve_ctx : ^ve.Context, render :
|
||||
}
|
||||
}
|
||||
|
||||
#region("Helpers")
|
||||
//region Helpers
|
||||
|
||||
draw_shape :: proc(color : RGBAN, screen_size, position, scale : Vec2, zoom : f32, shape : ShapedText)
|
||||
{
|
||||
@ -890,4 +890,4 @@ render_set_view_space :: #force_inline proc( extent : Extents2 )
|
||||
gp.project( -extent.x, extent.x, extent.y, -extent.y )
|
||||
}
|
||||
|
||||
#endregion("Helpers")
|
||||
//endregion Helpers
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
package sectr
|
||||
|
||||
#region("base")
|
||||
//region base
|
||||
|
||||
import "base:builtin"
|
||||
copy :: builtin.copy
|
||||
@ -25,9 +25,9 @@ import "base:runtime"
|
||||
SourceCodeLocation :: runtime.Source_Code_Location
|
||||
debug_trap :: runtime.debug_trap
|
||||
|
||||
#endregion("base")
|
||||
//endregion base
|
||||
|
||||
#region("core")
|
||||
//region core
|
||||
|
||||
import c "core:c/libc"
|
||||
|
||||
@ -153,14 +153,14 @@ import "core:unicode/utf8"
|
||||
runes_to_string :: utf8.runes_to_string
|
||||
// string_to_runes :: utf8.string_to_runes
|
||||
|
||||
#endregion("core")
|
||||
//endregion core
|
||||
|
||||
import "thirdparty:backtrace"
|
||||
StackTraceData :: backtrace.Trace_Const
|
||||
stacktrace :: backtrace.trace
|
||||
stacktrace_lines :: backtrace.lines
|
||||
|
||||
#region("codebase")
|
||||
//region codebase
|
||||
|
||||
import "codebase:grime"
|
||||
// asserts
|
||||
@ -345,9 +345,9 @@ import "codebase:grime"
|
||||
|
||||
varena_allocator :: grime.varena_allocator
|
||||
|
||||
#endregion("codebase")
|
||||
//endregion codebase
|
||||
|
||||
#region("Procedure overload mappings")
|
||||
//region Procedure overload mappings
|
||||
|
||||
// This has to be done on a per-module basis.
|
||||
|
||||
@ -717,4 +717,4 @@ wedge :: proc {
|
||||
wedge_bivec3,
|
||||
}
|
||||
|
||||
#endregion("Proc overload mappings")
|
||||
//endregion Proc overload mappings
|
||||
|
@ -73,7 +73,7 @@ Vec3i :: [3]i32
|
||||
vec2i_to_vec2 :: #force_inline proc "contextless" (v : Vec2i) -> Vec2 {return transmute(Vec2) v}
|
||||
vec3i_to_vec3 :: #force_inline proc "contextless" (v : Vec3i) -> Vec3 {return transmute(Vec3) v}
|
||||
|
||||
#region("Range2")
|
||||
//region Range2
|
||||
|
||||
// TODO(Ed): I rather keep the different usages as different types, then type coerece their procedure mappings
|
||||
// to support the base p0, p1 range
|
||||
@ -148,4 +148,4 @@ size_range2 :: #force_inline proc "contextless" ( value : Range2 ) -> Vec2 {
|
||||
return { abs( value.p1.x - value.p0.x ), abs( value.p0.y - value.p1.y ) }
|
||||
}
|
||||
|
||||
#endregion("Range2")
|
||||
//endregion Range2
|
||||
|
@ -168,7 +168,7 @@ UI_State :: struct {
|
||||
last_invalid_input_time : Time,
|
||||
}
|
||||
|
||||
#region("Lifetime")
|
||||
//region Lifetime
|
||||
|
||||
ui_startup :: proc( ui : ^ UI_State, spacial_indexing_method : UI_SpacialIndexingMethod = .QuadTree, cache_allocator : Allocator, cache_table_size : uint )
|
||||
{
|
||||
@ -362,9 +362,9 @@ ui_render_entry_tranverse :: proc( entry : ^UI_RenderEntry ) -> ^UI_RenderEntry
|
||||
@(deferred_in = ui_graph_build_end)
|
||||
ui_graph_build :: #force_inline proc( ui : ^ UI_State ) { ui_graph_build_begin( ui ) }
|
||||
|
||||
#endregion("Lifetime")
|
||||
//endregion Lifetime
|
||||
|
||||
#region("Caching")
|
||||
//region Caching
|
||||
// Mainly referenced from RAD Debugger
|
||||
|
||||
// TODO(Ed): Need to setup the proper hashing convention for strings the other reference imguis use.
|
||||
@ -399,7 +399,7 @@ ui_key_from_string :: #force_inline proc "contextless" ( value : string ) -> UI_
|
||||
|
||||
return key
|
||||
}
|
||||
#endregion("Caching")
|
||||
//endregion Caching
|
||||
|
||||
ui_cursor_pos :: #force_inline proc "contextless" () -> Vec2 {
|
||||
using state := get_state()
|
||||
|
@ -23,7 +23,8 @@ ui_button :: #force_inline proc( label : string, flags : UI_BoxFlags = {} ) -> (
|
||||
return
|
||||
}
|
||||
|
||||
#region("Drop Down")
|
||||
//region Drop Down
|
||||
|
||||
UI_DropDown :: struct {
|
||||
btn : UI_Widget,
|
||||
title : UI_Widget,
|
||||
@ -106,9 +107,10 @@ ui_drop_down_end_auto :: proc( drop_down : ^UI_DropDown) {
|
||||
ui_vbox_end(drop_down.vbox, compute_layout = false)
|
||||
ui_parent_pop()
|
||||
}
|
||||
#endregion("Drop Down")
|
||||
|
||||
#region("Horizontal Box")
|
||||
//endregion Drop Down
|
||||
|
||||
//region Horizontal Box
|
||||
/*
|
||||
Horizontal Boxes automatically manage a collection of widgets and
|
||||
attempt to slot them adjacent to each other along the x-axis.
|
||||
@ -166,9 +168,10 @@ ui_hbox_end_auto :: #force_inline proc( direction : UI_LayoutDirection_X, label
|
||||
ui_hbox_end(hbox, width_ref)
|
||||
ui_parent_pop()
|
||||
}
|
||||
#endregion("Horizontal Box")
|
||||
//endregion Horizontal Box
|
||||
|
||||
//region Resizable
|
||||
|
||||
#region("Resizable")
|
||||
// Parameterized widget def for ui_resizable_handles
|
||||
UI_Resizable :: struct {
|
||||
using widget : UI_Widget,
|
||||
@ -497,8 +500,10 @@ ui_resizable_handles :: #force_no_inline proc( parent : ^UI_Widget, pos : ^Vec2,
|
||||
// if drag_signal && compute_layout do ui_box_compute_layout(parent)
|
||||
return
|
||||
}
|
||||
#endregion("Resizable")
|
||||
|
||||
//endregion Resizable
|
||||
|
||||
//region Text
|
||||
ui_spacer :: proc( label : string ) -> (widget : UI_Widget) {
|
||||
widget.box = ui_box_make( {.Mouse_Clickable}, label )
|
||||
widget.signal = ui_signal_from_box( widget.box )
|
||||
@ -519,7 +524,6 @@ ui_scroll_box :: proc( label : string, flags : UI_BoxFlags ) -> (scroll_box : UI
|
||||
return
|
||||
}
|
||||
|
||||
#region("Text")
|
||||
ui_text :: #force_inline proc( label : string, content : StrCached, flags : UI_BoxFlags = {} ) -> UI_Widget
|
||||
{
|
||||
profile(#procedure)
|
||||
@ -566,9 +570,10 @@ ui_text_wrap_panel :: proc( parent : ^UI_Widget )
|
||||
{
|
||||
fatal("NOT IMPLEMENTED")
|
||||
}
|
||||
#endregion("Text")
|
||||
//endregion Text
|
||||
|
||||
//region Text Input
|
||||
|
||||
#region("Text Input")
|
||||
UI_TextInput_Policy :: struct {
|
||||
disallow_decimal : b32,
|
||||
disallow_leading_zeros : b32,
|
||||
@ -741,9 +746,9 @@ ui_text_input_box :: proc( text_input_box : ^UI_TextInputBox, label : string,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion("Text Input")
|
||||
//endregion Text Input
|
||||
|
||||
#region("Vertical Box")
|
||||
//region Vertical Box
|
||||
/*
|
||||
Vertical Boxes automatically manage a collection of widgets and
|
||||
attempt to slot them adjacent to each other along the y-axis.
|
||||
@ -800,4 +805,4 @@ ui_vbox :: #force_inline proc( direction : UI_LayoutDirection_Y, label : string,
|
||||
ui_parent_push(vbox.widget)
|
||||
return
|
||||
}
|
||||
#endregion("Vertical Box")
|
||||
//endregion Vertical Box
|
||||
|
Reference in New Issue
Block a user