yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
workflow_activity_widgets.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_HACK_WORKFLOW_WORKFLOW_ACTIVITY_WIDGETS_H_
2#define YAZE_APP_EDITOR_HACK_WORKFLOW_WORKFLOW_ACTIVITY_WIDGETS_H_
3
4#include <chrono>
5#include <functional>
6#include <string>
7#include <vector>
8
10#include "imgui/imgui.h"
11
12namespace yaze::editor::workflow {
13
15 std::function<void()> start_build;
16 std::function<void()> run_project;
17 std::function<void()> show_output;
18 std::function<void()> cancel_build;
19};
20
22 bool visible = false;
23 ImGuiID id = 0;
24 ImVec2 min = ImVec2(0.0f, 0.0f);
25 ImVec2 max = ImVec2(0.0f, 0.0f);
26
27 ImVec2 Center() const {
28 return ImVec2((min.x + max.x) * 0.5f, (min.y + max.y) * 0.5f);
29 }
30};
31
33 bool show_open_output = false;
34 bool show_copy_log = true;
35};
36
42
43std::string FormatHistoryTime(
44 std::chrono::system_clock::time_point timestamp);
46const char* WorkflowIcon(const ProjectWorkflowStatus& status,
47 const char* fallback_icon);
48std::string BuildCopyPayload(const ProjectWorkflowStatus& status,
49 const std::string& output_log);
50WorkflowButtonRect DrawCopyCurrentLogButton(const std::string& build_log);
52 const ProjectWorkflowHistoryEntry& entry,
53 const WorkflowActionCallbacks& callbacks,
54 const WorkflowActionRowOptions& options = {});
55std::vector<ProjectWorkflowHistoryEntry> SelectWorkflowPreviewEntries(
56 const std::vector<ProjectWorkflowHistoryEntry>& history,
57 size_t max_entries);
58
59} // namespace yaze::editor::workflow
60
61#endif // YAZE_APP_EDITOR_HACK_WORKFLOW_WORKFLOW_ACTIVITY_WIDGETS_H_
WorkflowButtonRect DrawCopyCurrentLogButton(const std::string &build_log)
std::string FormatHistoryTime(std::chrono::system_clock::time_point timestamp)
const char * WorkflowIcon(const ProjectWorkflowStatus &status, const char *fallback_icon)
std::string BuildCopyPayload(const ProjectWorkflowStatus &status, const std::string &output_log)
WorkflowActionRowResult DrawHistoryActionRow(const ProjectWorkflowHistoryEntry &entry, const WorkflowActionCallbacks &callbacks, const WorkflowActionRowOptions &options)
std::vector< ProjectWorkflowHistoryEntry > SelectWorkflowPreviewEntries(const std::vector< ProjectWorkflowHistoryEntry > &history, size_t max_entries)
ImVec4 WorkflowColor(ProjectWorkflowState state)