vn/code/vn_workspace_view.h

69 lines
1.5 KiB
C
Raw Normal View History

2023-06-17 17:00:55 +00:00
/* date = June 11th 2023 1:20 pm */
#ifndef VN_WORKSPACE_VIEW_H
#define VN_WORKSPACE_VIEW_H
2023-08-22 03:19:51 +00:00
////////////////////////////////
//~ sixten: Workspace View Types
2023-06-17 17:00:55 +00:00
struct workspace_view
{
arena *Arena;
2023-06-17 17:00:55 +00:00
workspace_panel *Parent;
workspace_view *Next;
workspace_view *Prev;
enum workspace_view_kind Kind;
2023-06-17 17:00:55 +00:00
void *Data;
};
enum workspace_view_kind
2023-06-17 17:00:55 +00:00
{
W_ViewKind_None,
W_ViewKind_Startup,
W_ViewKind_Settings,
W_ViewKind_FileLister,
W_ViewKind_TextEditor,
W_ViewKind_SceneView,
W_ViewKind_NavEditor,
W_ViewKind_Error,
};
struct workspace_view_error
{
string Message;
2023-06-17 17:00:55 +00:00
};
enum workspace_settings_category
{
2023-08-22 03:19:51 +00:00
W_Settings_All,
W_Settings_General,
W_Settings_Developer,
2023-06-17 17:00:55 +00:00
};
struct workspace_view_settings
{
workspace_settings_category Category;
2023-08-22 03:19:51 +00:00
r32 GlobalScroll;
2023-06-27 14:14:28 +00:00
// sixten: General
b32 GeneralDropdownOpen;
2023-06-17 17:00:55 +00:00
};
2023-08-22 03:19:51 +00:00
////////////////////////////////
//~ sixten: Workspace View Functions
2023-06-17 17:00:55 +00:00
//- sixten: Views
inline workspace_view *W_CreateNewView(workspace_view_kind Type, workspace_panel *Parent);
2023-08-22 03:19:51 +00:00
inline void W_DestroyView(workspace_view *View);
inline b32 W_ViewIsCurrent(workspace_view *View);
inline string W_GetViewName(arena *Arena, workspace_view *View);
2023-06-17 17:00:55 +00:00
//- sixten: Builder code
2023-08-22 03:19:51 +00:00
static void W_ViewListerInputCallback(render_group *Group, glyph_atlas *Atlas, ui_box *Box, void *Data);
static void W_BuildViewTypeLister(workspace_view *View);
static void W_BuildView(workspace_view *View);
2023-06-17 17:00:55 +00:00
#endif //VN_WORKSPACE_VIEW_H