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
WindowLifecycle
GetWindowLifecycle
()
const override
{
28
return
WindowLifecycle::CrossEditor
;
29
}
30
31
void
Draw
(
bool
* p_open)
override
;
32
void
OnOpen
()
override
;
33
34
private
:
35
struct
RamVariable
{
36
uint32_t
address
;
37
std::string
label
;
38
std::string
description
;
39
uint8_t
size
;
// 1 or 2 bytes
40
uint16_t
last_value
= 0;
41
};
42
43
void
InitializeVariables
();
44
void
RefreshVariables
();
45
void
DrawVariableTable
();
46
47
std::vector<RamVariable>
variables_
;
48
double
last_refresh_time_
= 0.0;
49
bool
auto_refresh_
=
true
;
50
};
51
52
}
// namespace editor
53
}
// namespace yaze
54
55
#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:48
yaze::editor::OracleRamPanel::auto_refresh_
bool auto_refresh_
Definition
oracle_ram_panel.h:49
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:47
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:27
yaze::editor::WindowContent
Base interface for all logical window content components.
Definition
editor_panel.h:89
editor_panel.h
yaze::editor::WindowLifecycle
WindowLifecycle
Defines lifecycle behavior for editor windows.
Definition
editor_panel.h:24
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:35
yaze::editor::OracleRamPanel::RamVariable::label
std::string label
Definition
oracle_ram_panel.h:37
yaze::editor::OracleRamPanel::RamVariable::address
uint32_t address
Definition
oracle_ram_panel.h:36
yaze::editor::OracleRamPanel::RamVariable::description
std::string description
Definition
oracle_ram_panel.h:38
yaze::editor::OracleRamPanel::RamVariable::size
uint8_t size
Definition
oracle_ram_panel.h:39
yaze::editor::OracleRamPanel::RamVariable::last_value
uint16_t last_value
Definition
oracle_ram_panel.h:40
src
app
editor
agent
oracle_ram_panel.h
Generated by
1.10.0