Skip to content

Commit

Permalink
clea dock internals
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondra Voves committed Jun 27, 2019
1 parent 8fef57b commit 13d3932
Show file tree
Hide file tree
Showing 16 changed files with 282 additions and 568 deletions.
14 changes: 7 additions & 7 deletions core/core/default.dock_layout
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ docks:
1:
cdb_type: dock_layout
index: 1
label:  Resource browser##asset_browser_dock1
label:  Resource browser##asset_browser_dock0
x: 197
y: 554
location: ""
Expand All @@ -38,7 +38,7 @@ docks:
2:
cdb_type: dock_layout
index: 2
label:  Explorer##explorer_dock2
label:  Explorer##explorer_dock0
x: 0
y: 18
location: ""
Expand All @@ -55,7 +55,7 @@ docks:
3:
cdb_type: dock_layout
index: 3
label:  Property editor##property_editor_dock3
label:  Property editor##property_editor_dock0
x: 772
y: 18
location: ""
Expand All @@ -72,7 +72,7 @@ docks:
4:
cdb_type: dock_layout
index: 4
label: Log view##log_view_dock4
label: Log view##log_view_dock0
x: 197
y: 554
location: ""
Expand All @@ -89,7 +89,7 @@ docks:
5:
cdb_type: dock_layout
index: 5
label: Editor##editor_dock5
label: Editor##editor_dock0
x: 161
y: 18
location: ""
Expand All @@ -106,7 +106,7 @@ docks:
6:
cdb_type: dock_layout
index: 6
label:  Game view##game_view_dock6
label:  Game view##game_view_dock0
x: 161
y: 18
location: ""
Expand All @@ -123,7 +123,7 @@ docks:
7:
cdb_type: dock_layout
index: 7
label: Resource preview##asset_preview_dock7
label: Resource preview##asset_preview_dock0
x: 0
y: 554
location: ""
Expand Down
25 changes: 11 additions & 14 deletions src/cetech/debugui/private/debugui.cpp
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
#undef IMGUI_DISABLE_OBSOLETE_FUNCTIONS

#include <celib/cdb.h>
#include <cetech/renderer/renderer.h>

#include <cetech/controlers/keyboard.h>
#include <celib/macros.h>
#include <celib/id.h>

#include <celib/fs.h>
#include <celib/memory/allocator.h>
#include <celib/containers/array.h>
#include <cetech/controlers/mouse.h>
#include <celib/log.h>
#include <celib/config.h>
#include <celib/memory/memory.h>
#include <celib/api.h>
#include <celib/module.h>
#include <celib/os/vio.h>
#include <celib/os/window.h>
#include <celib/os/input.h>

#include <cetech/renderer/renderer.h>
#include <cetech/controlers/keyboard.h>
#include <cetech/controlers/mouse.h>
#include <cetech/controlers/controlers.h>
#include <cetech/kernel/kernel.h>

#include "celib/config.h"
#include "celib/memory/memory.h"
#include "celib/api.h"
#include "celib/module.h"
#include <cetech/renderer/gfx.h>
#include <cetech/debugui/debugui.h>
#include <cetech/controlers/gamepad.h>
#include "imgui_wrap.inl"
#include <celib/os/vio.h>
#include <celib/os/window.h>
#include <celib/os/input.h>

#include "imgui_wrap.inl"

static struct DebugUIGlobal {
ce_alloc_t0 *allocator;
Expand Down
52 changes: 16 additions & 36 deletions src/cetech/editor/dock.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,15 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>


#define CT_DOCK_API \
CE_ID64_0("ct_dock_a0", 0x90cc2a5b4273931aULL)

#define DOCK_I_NAME \
"ct_dock_i0"

#define CT_DOCK_I \
CE_ID64_0("ct_dock_i0", 0x3a3181c12a9e109fULL)

#define DOCK_TYPE\
CE_ID64_0("dock", 0x3949d96def384d3cULL)

#define PROP_DOCK_VISIBLE\
CE_ID64_0("visible", 0x24b77991b5d39298ULL)

#define PROP_DOCK_flags\
CE_ID64_0("flags", 0x6def9a496b03ba91ULL)

#define PROP_DOCK_CONTEXT\
CE_ID64_0("context", 0x1349eedc2838510ULL)

#define PROP_DOCK_TYPE \
CE_ID64_0("dock_type", 0x5cea667e25e92f1dULL)

#define PROP_DOCK_DATA \
CE_ID64_0("dock_data", 0x944132def1f8c765ULL)

#define PROP_DOCK_SELECTED_OBJ\
CE_ID64_0("selected_object", 0x7cc97924b2b963b1ULL)


#define DOCKS_LAYOUT_TYPE \
CE_ID64_0("docks_layout", 0x7336aa61594d9ff9ULL)

Expand Down Expand Up @@ -95,32 +72,35 @@ extern "C" {
CE_ID64_0("parent", 0xc46a4b4368e0f801ULL)

typedef struct ct_dock_i0 {
uint64_t (*cdb_type)();
uint64_t type;

uint64_t (*dock_flags)();
uint64_t (*ui_flags)();

uint64_t (*open)(uint64_t dock);
uint64_t (*open)();

void (*close)(uint64_t dock,
void (*close)(uint64_t content,
uint64_t context);

const char *(*display_title)(uint64_t dock);
const char *(*name)();

const char *(*name)(uint64_t dock);
const char *(*display_title)(uint64_t content,
uint64_t selected_object);

void (*draw_ui)(uint64_t dock);
void (*draw_ui)(uint64_t content,
uint64_t context,
uint64_t selected_object);

void (*draw_menu)(uint64_t dock);
void (*draw_menu)(uint64_t content,
uint64_t context,
uint64_t selected_object);

void (*draw_main_menu)(uint64_t dock);
void (*draw_main_menu)(uint64_t content);
} ct_dock_i0;


struct ct_dock_a0 {
uint64_t (*create_dock)(uint64_t type,
bool visible);

bool (*context_btn)(uint64_t dock);
void (*create_dock)(uint64_t type,
bool visible);

void (*draw_all)();

Expand Down
3 changes: 0 additions & 3 deletions src/cetech/editor/editor_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ struct ct_editor_ui_a0 {
uint64_t *selected_resource,
uint32_t *count);

uint64_t (*lock_selected_obj)(uint64_t dock,
uint64_t selected_obj);

bool (*ui_prop_header)(const char *name);

void (*ui_prop_header_end)(bool open);
Expand Down
Loading

0 comments on commit 13d3932

Please sign in to comment.