yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
oracle_ram_panel.h
Go to the documentation of this file.
1
#ifndef YAZE_APP_EDITOR_AGENT_ORACLE_RAM_PANEL_H_
2
#define YAZE_APP_EDITOR_AGENT_ORACLE_RAM_PANEL_H_
3
4
#include <cstdint>
5
#include <memory>
6
#include <string>
7
#include <vector>
8
9
#include "
app/editor/system/editor_panel.h
"
10
11
namespace
yaze
{
12
namespace
editor {
13
17
class
OracleRamPanel
:
public
WindowContent
{
18
public
:
19
OracleRamPanel
();
20
~OracleRamPanel
()
override
=
default
;
21
22
// WindowContent implementation
23
std::string
GetId
()
const override
{
return
"agent.oracle_ram"
; }
24
std::string
GetDisplayName
()
const override
{
return
"Oracle RAM"
; }
25
std::string
GetIcon
()
const override
;
// Returns ICON_MD_MEMORY
26
std::string
GetEditorCategory
()
const override
{
return
"Agent"
; }
27
WindowPresentationPolicy
GetPresentationPolicy
()
const override
{
28
return
WindowPresentationPolicy::OptionalPopOut
();
29
}
30
WindowLifecycle
GetWindowLifecycle
()
const override
{
31
return
WindowLifecycle::CrossEditor
;
32
}
33
34
void
Draw
(
bool
* p_open)
override
;
35
void
OnOpen
()
override
;
36
37
private
:
38
struct
RamVariable
{
39
uint32_t
address
;
40
std::string
label
;
41
std::string
description
;
42
uint8_t
size
;
// 1 or 2 bytes
43
uint16_t
last_value
= 0;
44
};
45
46
void
InitializeVariables
();
47
void
RefreshVariables
();
48
void
DrawVariableTable
();
49
50
std::vector<RamVariable>
variables_
;
51
double
last_refresh_time_
= 0.0;
52
bool
auto_refresh_
=
true
;
53
};
54
55
}
// namespace editor
56
}
// namespace yaze
57
58
#endif
// YAZE_APP_EDITOR_AGENT_ORACLE_RAM_PANEL_H_
yaze::editor::OracleRamPanel
Panel for live monitoring of Oracle of Secrets RAM variables.
Definition
oracle_ram_panel.h:17
yaze::editor::OracleRamPanel::Draw
void Draw(bool *p_open) override
Draw the panel content.
Definition
oracle_ram_panel.cc:73
yaze::editor::OracleRamPanel::GetDisplayName
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
Definition
oracle_ram_panel.h:24
yaze::editor::OracleRamPanel::InitializeVariables
void InitializeVariables()
Definition
oracle_ram_panel.cc:27
yaze::editor::OracleRamPanel::GetEditorCategory
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Definition
oracle_ram_panel.h:26
yaze::editor::OracleRamPanel::OracleRamPanel
OracleRamPanel()
Definition
oracle_ram_panel.cc:15
yaze::editor::OracleRamPanel::last_refresh_time_
double last_refresh_time_
Definition
oracle_ram_panel.h:51
yaze::editor::OracleRamPanel::auto_refresh_
bool auto_refresh_
Definition
oracle_ram_panel.h:52
yaze::editor::OracleRamPanel::RefreshVariables
void RefreshVariables()
Definition
oracle_ram_panel.cc:50
yaze::editor::OracleRamPanel::DrawVariableTable
void DrawVariableTable()
Definition
oracle_ram_panel.cc:97
yaze::editor::OracleRamPanel::variables_
std::vector< RamVariable > variables_
Definition
oracle_ram_panel.h:50
yaze::editor::OracleRamPanel::GetId
std::string GetId() const override
Unique identifier for this panel.
Definition
oracle_ram_panel.h:23
yaze::editor::OracleRamPanel::OnOpen
void OnOpen() override
Called when panel becomes visible.
Definition
oracle_ram_panel.cc:23
yaze::editor::OracleRamPanel::~OracleRamPanel
~OracleRamPanel() override=default
yaze::editor::OracleRamPanel::GetIcon
std::string GetIcon() const override
Material Design icon for this panel.
Definition
oracle_ram_panel.cc:19
yaze::editor::OracleRamPanel::GetWindowLifecycle
WindowLifecycle GetWindowLifecycle() const override
Get the lifecycle category for this window.
Definition
oracle_ram_panel.h:30
yaze::editor::OracleRamPanel::GetPresentationPolicy
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
Definition
oracle_ram_panel.h:27
yaze::editor::WindowContent
Base interface for all logical window content components.
Definition
editor_panel.h:199
editor_panel.h
yaze::editor::WindowLifecycle
WindowLifecycle
Defines lifecycle behavior for editor windows.
Definition
editor_panel.h:26
yaze::editor::WindowLifecycle::CrossEditor
@ CrossEditor
User can pin to persist across editors.
yaze
Definition
patch_export_usage.cc:8
yaze::editor::OracleRamPanel::RamVariable
Definition
oracle_ram_panel.h:38
yaze::editor::OracleRamPanel::RamVariable::label
std::string label
Definition
oracle_ram_panel.h:40
yaze::editor::OracleRamPanel::RamVariable::address
uint32_t address
Definition
oracle_ram_panel.h:39
yaze::editor::OracleRamPanel::RamVariable::description
std::string description
Definition
oracle_ram_panel.h:41
yaze::editor::OracleRamPanel::RamVariable::size
uint8_t size
Definition
oracle_ram_panel.h:42
yaze::editor::OracleRamPanel::RamVariable::last_value
uint16_t last_value
Definition
oracle_ram_panel.h:43
yaze::editor::WindowPresentationPolicy
Definition
editor_panel.h:102
yaze::editor::WindowPresentationPolicy::OptionalPopOut
static WindowPresentationPolicy OptionalPopOut()
Definition
editor_panel.h:149
src
app
editor
agent
oracle_ram_panel.h
Generated by
1.10.0