yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::MemoryEditorWidget Struct Reference

#include <imgui_memory_editor.h>

Classes

struct  Sizes
 

Public Types

enum  DataFormat { DataFormat_Bin = 0 , DataFormat_Dec = 1 , DataFormat_Hex = 2 , DataFormat_COUNT }
 

Public Member Functions

void SetComparisonData (void *data)
 
 MemoryEditorWidget ()
 
void GotoAddrAndHighlight (size_t addr_min, size_t addr_max)
 
void CalcSizes (Sizes &s, size_t mem_size, size_t base_display_addr)
 
void DrawWindow (const char *title, void *mem_data, size_t mem_size, size_t base_display_addr=0x0000)
 
void DrawContents (void *mem_data_void, size_t mem_size, size_t base_display_addr=0x0000)
 
void DrawOptionsLine (const Sizes &s, void *mem_data, size_t mem_size, size_t base_display_addr)
 
void DrawPreviewLine (const Sizes &s, void *mem_data_void, size_t mem_size, size_t base_display_addr)
 
const char * DataTypeGetDesc (ImGuiDataType data_type) const
 
size_t DataTypeGetSize (ImGuiDataType data_type) const
 
const char * DataFormatGetDesc (DataFormat data_format) const
 
bool IsBigEndian () const
 
void * EndianessCopy (void *dst, void *src, size_t size) const
 
const char * FormatBinary (const uint8_t *buf, int width) const
 
void DrawPreviewData (size_t addr, const ImU8 *mem_data, size_t mem_size, ImGuiDataType data_type, DataFormat data_format, char *out_buf, size_t out_buf_size) const
 

Static Public Member Functions

static void * EndianessCopyBigEndian (void *_dst, void *_src, size_t s, int is_little_endian)
 
static void * EndianessCopyLittleEndian (void *_dst, void *_src, size_t s, int is_little_endian)
 

Public Attributes

bool Open
 
bool ReadOnly
 
int Cols
 
bool OptShowOptions
 
bool OptShowDataPreview
 
bool OptShowHexII
 
bool OptShowAscii
 
bool OptGreyOutZeroes
 
bool OptUpperCaseHex
 
int OptMidColsCount
 
int OptAddrDigitsCount
 
float OptFooterExtraHeight
 
ImU32 HighlightColor
 
ImU8(* ReadFn )(const ImU8 *data, size_t off)
 
void(* WriteFn )(ImU8 *data, size_t off, ImU8 d)
 
bool(* HighlightFn )(const ImU8 *data, size_t off)
 
bool ContentsWidthChanged
 
size_t DataPreviewAddr
 
size_t DataEditingAddr
 
bool DataEditingTakeFocus
 
char DataInputBuf [32]
 
char AddrInputBuf [32]
 
size_t GotoAddr
 
size_t HighlightMin
 
size_t HighlightMax
 
int PreviewEndianess
 
ImGuiDataType PreviewDataType
 
ImU8 * ComparisonData
 

Detailed Description

Definition at line 25 of file imgui_memory_editor.h.

Member Enumeration Documentation

◆ DataFormat

Enumerator
DataFormat_Bin 
DataFormat_Dec 
DataFormat_Hex 
DataFormat_COUNT 

Definition at line 26 of file imgui_memory_editor.h.

Constructor & Destructor Documentation

◆ MemoryEditorWidget()

Member Function Documentation

◆ SetComparisonData()

void yaze::gui::MemoryEditorWidget::SetComparisonData ( void * data)
inline

Definition at line 85 of file imgui_memory_editor.h.

References ComparisonData.

Referenced by yaze::editor::MemoryEditor::Update().

◆ GotoAddrAndHighlight()

void yaze::gui::MemoryEditorWidget::GotoAddrAndHighlight ( size_t addr_min,
size_t addr_max )
inline

◆ CalcSizes()

◆ DrawWindow()

void yaze::gui::MemoryEditorWidget::DrawWindow ( const char * title,
void * mem_data,
size_t mem_size,
size_t base_display_addr = 0x0000 )
inline

Definition at line 171 of file imgui_memory_editor.h.

References CalcSizes(), ContentsWidthChanged, DrawContents(), Open, and yaze::gui::MemoryEditorWidget::Sizes::WindowWidth.

Referenced by yaze::editor::GraphicsEditor::DrawMemoryEditor().

Here is the call graph for this function:

◆ DrawContents()

◆ DrawOptionsLine()

◆ DrawPreviewLine()

void yaze::gui::MemoryEditorWidget::DrawPreviewLine ( const Sizes & s,
void * mem_data_void,
size_t mem_size,
size_t base_display_addr )
inline

◆ DataTypeGetDesc()

const char * yaze::gui::MemoryEditorWidget::DataTypeGetDesc ( ImGuiDataType data_type) const
inline

Definition at line 621 of file imgui_memory_editor.h.

Referenced by DrawPreviewLine().

◆ DataTypeGetSize()

size_t yaze::gui::MemoryEditorWidget::DataTypeGetSize ( ImGuiDataType data_type) const
inline

Definition at line 628 of file imgui_memory_editor.h.

Referenced by DrawContents(), and DrawPreviewData().

◆ DataFormatGetDesc()

const char * yaze::gui::MemoryEditorWidget::DataFormatGetDesc ( DataFormat data_format) const
inline

Definition at line 635 of file imgui_memory_editor.h.

References DataFormat_COUNT.

◆ IsBigEndian()

bool yaze::gui::MemoryEditorWidget::IsBigEndian ( ) const
inline

Definition at line 641 of file imgui_memory_editor.h.

Referenced by EndianessCopy().

◆ EndianessCopyBigEndian()

static void * yaze::gui::MemoryEditorWidget::EndianessCopyBigEndian ( void * _dst,
void * _src,
size_t s,
int is_little_endian )
inlinestatic

Definition at line 648 of file imgui_memory_editor.h.

Referenced by EndianessCopy().

◆ EndianessCopyLittleEndian()

static void * yaze::gui::MemoryEditorWidget::EndianessCopyLittleEndian ( void * _dst,
void * _src,
size_t s,
int is_little_endian )
inlinestatic

Definition at line 661 of file imgui_memory_editor.h.

Referenced by EndianessCopy().

◆ EndianessCopy()

void * yaze::gui::MemoryEditorWidget::EndianessCopy ( void * dst,
void * src,
size_t size ) const
inline

Definition at line 674 of file imgui_memory_editor.h.

References EndianessCopyBigEndian(), EndianessCopyLittleEndian(), IsBigEndian(), and PreviewEndianess.

Referenced by DrawPreviewData().

Here is the call graph for this function:

◆ FormatBinary()

const char * yaze::gui::MemoryEditorWidget::FormatBinary ( const uint8_t * buf,
int width ) const
inline

Definition at line 681 of file imgui_memory_editor.h.

Referenced by DrawPreviewData().

◆ DrawPreviewData()

void yaze::gui::MemoryEditorWidget::DrawPreviewData ( size_t addr,
const ImU8 * mem_data,
size_t mem_size,
ImGuiDataType data_type,
DataFormat data_format,
char * out_buf,
size_t out_buf_size ) const
inline

Definition at line 697 of file imgui_memory_editor.h.

References DataFormat_Bin, DataFormat_Dec, DataFormat_Hex, DataTypeGetSize(), EndianessCopy(), FormatBinary(), ImSnprintf, and ReadFn.

Referenced by DrawPreviewLine().

Here is the call graph for this function:

Member Data Documentation

◆ Open

bool yaze::gui::MemoryEditorWidget::Open

Definition at line 34 of file imgui_memory_editor.h.

Referenced by DrawWindow(), and MemoryEditorWidget().

◆ ReadOnly

bool yaze::gui::MemoryEditorWidget::ReadOnly

Definition at line 36 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ Cols

int yaze::gui::MemoryEditorWidget::Cols

Definition at line 37 of file imgui_memory_editor.h.

Referenced by CalcSizes(), DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptShowOptions

bool yaze::gui::MemoryEditorWidget::OptShowOptions

Definition at line 38 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ OptShowDataPreview

bool yaze::gui::MemoryEditorWidget::OptShowDataPreview

Definition at line 41 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptShowHexII

bool yaze::gui::MemoryEditorWidget::OptShowHexII

Definition at line 44 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptShowAscii

bool yaze::gui::MemoryEditorWidget::OptShowAscii

Definition at line 47 of file imgui_memory_editor.h.

Referenced by CalcSizes(), DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptGreyOutZeroes

bool yaze::gui::MemoryEditorWidget::OptGreyOutZeroes

Definition at line 49 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptUpperCaseHex

bool yaze::gui::MemoryEditorWidget::OptUpperCaseHex

Definition at line 51 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ OptMidColsCount

int yaze::gui::MemoryEditorWidget::OptMidColsCount

Definition at line 53 of file imgui_memory_editor.h.

Referenced by CalcSizes(), DrawContents(), and MemoryEditorWidget().

◆ OptAddrDigitsCount

int yaze::gui::MemoryEditorWidget::OptAddrDigitsCount

Definition at line 55 of file imgui_memory_editor.h.

Referenced by CalcSizes(), and MemoryEditorWidget().

◆ OptFooterExtraHeight

float yaze::gui::MemoryEditorWidget::OptFooterExtraHeight

Definition at line 58 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ HighlightColor

ImU32 yaze::gui::MemoryEditorWidget::HighlightColor

Definition at line 60 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ ReadFn

ImU8(* yaze::gui::MemoryEditorWidget::ReadFn) (const ImU8 *data, size_t off)

Definition at line 61 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawPreviewData(), and MemoryEditorWidget().

◆ WriteFn

void(* yaze::gui::MemoryEditorWidget::WriteFn) (ImU8 *data, size_t off, ImU8 d)

Definition at line 63 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ HighlightFn

bool(* yaze::gui::MemoryEditorWidget::HighlightFn) (const ImU8 *data, size_t off)

Definition at line 65 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ ContentsWidthChanged

bool yaze::gui::MemoryEditorWidget::ContentsWidthChanged

Definition at line 71 of file imgui_memory_editor.h.

Referenced by DrawOptionsLine(), DrawWindow(), and MemoryEditorWidget().

◆ DataPreviewAddr

size_t yaze::gui::MemoryEditorWidget::DataPreviewAddr

◆ DataEditingAddr

size_t yaze::gui::MemoryEditorWidget::DataEditingAddr

Definition at line 73 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ DataEditingTakeFocus

bool yaze::gui::MemoryEditorWidget::DataEditingTakeFocus

Definition at line 74 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ DataInputBuf

char yaze::gui::MemoryEditorWidget::DataInputBuf[32]

Definition at line 75 of file imgui_memory_editor.h.

Referenced by DrawContents(), and MemoryEditorWidget().

◆ AddrInputBuf

char yaze::gui::MemoryEditorWidget::AddrInputBuf[32]

Definition at line 76 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawOptionsLine(), and MemoryEditorWidget().

◆ GotoAddr

size_t yaze::gui::MemoryEditorWidget::GotoAddr

Definition at line 77 of file imgui_memory_editor.h.

Referenced by DrawOptionsLine(), GotoAddrAndHighlight(), and MemoryEditorWidget().

◆ HighlightMin

size_t yaze::gui::MemoryEditorWidget::HighlightMin

◆ HighlightMax

size_t yaze::gui::MemoryEditorWidget::HighlightMax

◆ PreviewEndianess

int yaze::gui::MemoryEditorWidget::PreviewEndianess

Definition at line 79 of file imgui_memory_editor.h.

Referenced by DrawPreviewLine(), EndianessCopy(), and MemoryEditorWidget().

◆ PreviewDataType

ImGuiDataType yaze::gui::MemoryEditorWidget::PreviewDataType

Definition at line 80 of file imgui_memory_editor.h.

Referenced by DrawContents(), DrawPreviewLine(), and MemoryEditorWidget().

◆ ComparisonData

ImU8* yaze::gui::MemoryEditorWidget::ComparisonData

Definition at line 83 of file imgui_memory_editor.h.

Referenced by DrawContents(), and SetComparisonData().


The documentation for this struct was generated from the following file: