beamformer_core.c (5511B)
1 /* See LICENSE for license details. */ 2 3 // GENERATED CODE 4 5 typedef enum { 6 BeamformerPanelKind_Nil = 0, 7 BeamformerPanelKind_Split = 1, 8 BeamformerPanelKind_TabGroup = 2, 9 BeamformerPanelKind_ComputeBarGraph = 3, 10 BeamformerPanelKind_ComputeStats = 4, 11 BeamformerPanelKind_FrameViewLive = 5, 12 BeamformerPanelKind_FrameViewCopy = 6, 13 BeamformerPanelKind_FrameViewXPlane = 7, 14 BeamformerPanelKind_LiveImagingControls = 8, 15 BeamformerPanelKind_ParameterListing = 9, 16 BeamformerPanelKind_Count, 17 } BeamformerPanelKind; 18 19 typedef enum { 20 BeamformerRegisterSlot_String = 0, 21 BeamformerRegisterSlot_TreeNode = 1, 22 BeamformerRegisterSlot_Window = 2, 23 BeamformerRegisterSlot_Frame = 3, 24 BeamformerRegisterSlot_FrameView = 4, 25 BeamformerRegisterSlot_LiveControls = 5, 26 BeamformerRegisterSlot_SplitAxis = 6, 27 BeamformerRegisterSlot_SplitLeftTree = 7, 28 BeamformerRegisterSlot_SplitRightTree = 8, 29 BeamformerRegisterSlot_DropTargetTree = 9, 30 BeamformerRegisterSlot_DropChildIndex = 10, 31 BeamformerRegisterSlot_Count, 32 } BeamformerRegisterSlot; 33 34 typedef enum { 35 BeamformerCommandKind_Nil = 0, 36 BeamformerCommandKind_CloseTab = 1, 37 BeamformerCommandKind_FocusTab = 2, 38 BeamformerCommandKind_MoveTab = 3, 39 BeamformerCommandKind_OpenTab = 4, 40 BeamformerCommandKind_SplitTree = 5, 41 BeamformerCommandKind_Count, 42 } BeamformerCommandKind; 43 44 typedef enum { 45 BeamformerPanelFlags_List = 1 << 0, 46 BeamformerPanelFlags_NeedsFrame = 1 << 1, 47 BeamformerPanelFlags_HasSettings = 1 << 2, 48 } BeamformerPanelFlags; 49 50 typedef struct { 51 str8 display; 52 str8 string; 53 str8 description; 54 BeamformerPanelFlags flags; 55 } BeamformerPanelInfo; 56 57 typedef struct { 58 str8 string; 59 u64 tree_node; 60 u64 window; 61 u64 frame; 62 u64 frame_view; 63 u64 live_controls; 64 u64 split_axis; 65 u64 split_left_tree; 66 u64 split_right_tree; 67 u64 drop_target_tree; 68 u64 drop_child_index; 69 } BeamformerRegisters; 70 71 typedef struct { 72 str8 string; 73 str8 display; 74 str8 description; 75 } BeamformerCommandInfo; 76 77 read_only global BeamformerPanelInfo beamformer_panel_infos[] = { 78 {str8_comp(""), str8_comp("nil"), str8_comp(""), (0*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 79 {str8_comp(""), str8_comp("split"), str8_comp(""), (0*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 80 {str8_comp(""), str8_comp("group"), str8_comp(""), (0*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 81 {str8_comp("Compute Bar Graph"), str8_comp("compute_bar_graph"), str8_comp("Bar graph showing portions of compute occupied by each stage."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 82 {str8_comp("Compute Stats"), str8_comp("compute_stats"), str8_comp("Average stats about beamforming computations."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 83 {str8_comp("Frame View"), str8_comp("frame_view_live"), str8_comp("Latest frame with selected tag."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(1*BeamformerPanelFlags_HasSettings)}, 84 {str8_comp("Frame View (Copy)"), str8_comp("frame_view_copy"), str8_comp("Copy of an old frame. Useful for comparisons."), (0*BeamformerPanelFlags_List)|(1*BeamformerPanelFlags_NeedsFrame)|(1*BeamformerPanelFlags_HasSettings)}, 85 {str8_comp("3D X-Plane"), str8_comp("frame_view_xplane"), str8_comp("3D Cross Plane View."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(1*BeamformerPanelFlags_HasSettings)}, 86 {str8_comp("Live Controls"), str8_comp("live_controls"), str8_comp("Imaging system controls."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(0*BeamformerPanelFlags_HasSettings)}, 87 {str8_comp("Parameter Listing"), str8_comp("parameters_listing"), str8_comp("Editable parameter set used for beamforming."), (1*BeamformerPanelFlags_List)|(0*BeamformerPanelFlags_NeedsFrame)|(1*BeamformerPanelFlags_HasSettings)}, 88 }; 89 90 #define beamformer_registers_init_literal \ 91 .string = beamformer_registers()->string, \ 92 .tree_node = beamformer_registers()->tree_node, \ 93 .window = beamformer_registers()->window, \ 94 .frame = beamformer_registers()->frame, \ 95 .frame_view = beamformer_registers()->frame_view, \ 96 .live_controls = beamformer_registers()->live_controls, \ 97 .split_axis = beamformer_registers()->split_axis, \ 98 .split_left_tree = beamformer_registers()->split_left_tree, \ 99 .split_right_tree = beamformer_registers()->split_right_tree, \ 100 .drop_target_tree = beamformer_registers()->drop_target_tree, \ 101 .drop_child_index = beamformer_registers()->drop_child_index, \ 102 103 read_only global BeamformerCommandInfo beamformer_command_infos[] = { 104 {0}, 105 {str8_comp("close_tab"), str8_comp("Close Tab"), str8_comp("Closes currently active tab.")}, 106 {str8_comp("focus_tab"), str8_comp("Focus Tab"), str8_comp("Focus the currently selected tab in its group.")}, 107 {str8_comp("move_tab"), str8_comp("Move Tab"), str8_comp("Moves an exisiting tab to a different group/split.")}, 108 {str8_comp("open_tab"), str8_comp("Open Tab"), str8_comp("Opens a new tab with a specified view.")}, 109 {str8_comp("split_tree"), str8_comp("Split Tree"), str8_comp("Splits the UI into two new splits.")}, 110 }; 111