blob: 67c9d8f87efeb302c9e9dffd02c387140bf54d7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include "workspace.h"
#include "rendering/view.h"
#include "core/memory.h"
#include <vector>
namespace Donut
{
// The Dorico-style tab strip. Owns the workspaces (Setup / Scene / Simulation
// / Export); each frame it draws the dock space, the shared header, the tab
// bar, and delegates the active tab's panels. Returns the active workspace's
// View so the Application knows what the RenderPath should draw.
class UILayer
{
public:
UILayer();
auto draw(const UIContext& ctx) -> View;
private:
std::vector<Scope<Workspace>> m_workspaces;
int m_active = 0;
int m_landing = 0; // tab selected on the first frame
bool m_landed = false;
};
}
|