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

Unified configuration for canvas display and interaction. More...

#include <canvas_utils.h>

Public Member Functions

float GetToolbarHeight () const
 
float GetGridSpacing () const
 

Public Attributes

bool enable_grid = true
 
bool enable_hex_labels = false
 
bool enable_custom_labels = false
 
bool enable_context_menu = true
 
bool show_builtin_context_menu = true
 
bool is_draggable = false
 
bool auto_resize = false
 
bool clamp_rect_to_local_maps
 
bool use_theme_sizing
 
bool enable_metrics = false
 
float grid_step = 32.0f
 
float global_scale = 1.0f
 
ImVec2 canvas_size = ImVec2(0, 0)
 
ImVec2 content_size = ImVec2(0, 0)
 
ImVec2 scrolling = ImVec2(0, 0)
 
bool custom_canvas_size = false
 
CanvasUsage usage_mode = CanvasUsage::kUnknown
 
std::function< void(const CanvasConfig &) on_config_changed )
 
std::function< void(const CanvasConfig &) on_scale_changed )
 

Detailed Description

Unified configuration for canvas display and interaction.

Consolidates all canvas configuration into a single struct, including display settings, interaction state, and optional callbacks for updates.

Definition at line 23 of file canvas_utils.h.

Member Function Documentation

◆ GetToolbarHeight()

float yaze::gui::CanvasConfig::GetToolbarHeight ( ) const

Definition at line 404 of file canvas_utils.cc.

References use_theme_sizing.

◆ GetGridSpacing()

float yaze::gui::CanvasConfig::GetGridSpacing ( ) const

Definition at line 416 of file canvas_utils.cc.

References grid_step, and use_theme_sizing.

Member Data Documentation

◆ enable_grid

◆ enable_hex_labels

◆ enable_custom_labels

◆ enable_context_menu

◆ show_builtin_context_menu

bool yaze::gui::CanvasConfig::show_builtin_context_menu = true

◆ is_draggable

◆ auto_resize

◆ clamp_rect_to_local_maps

bool yaze::gui::CanvasConfig::clamp_rect_to_local_maps

◆ use_theme_sizing

bool yaze::gui::CanvasConfig::use_theme_sizing
Initial value:
=
true

Definition at line 34 of file canvas_utils.h.

Referenced by GetGridSpacing(), and GetToolbarHeight().

◆ enable_metrics

bool yaze::gui::CanvasConfig::enable_metrics = false

Definition at line 36 of file canvas_utils.h.

Referenced by yaze::gui::Canvas::InitializeEnhancedComponents().

◆ grid_step

◆ global_scale

◆ canvas_size

◆ content_size

◆ scrolling

◆ custom_canvas_size

◆ usage_mode

CanvasUsage yaze::gui::CanvasConfig::usage_mode = CanvasUsage::kUnknown

◆ on_config_changed

◆ on_scale_changed


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