yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::anonymous_namespace{layout_manager.cc} Namespace Reference

Classes

struct  DockNodeIds
 
struct  DockSplitConfig
 
struct  DockSplitNeeds
 

Functions

void ShowDefaultWindowsForEditor (WorkspaceWindowManager *registry, EditorType type)
 
yaze::Json BoolMapToJson (const std::unordered_map< std::string, bool > &map)
 
void JsonToBoolMap (const yaze::Json &obj, std::unordered_map< std::string, bool > *map)
 
void JsonToWindowMap (const yaze::Json &entry, std::unordered_map< std::string, bool > *windows)
 
std::filesystem::path GetLayoutsFilePath (LayoutScope scope, const std::string &project_key)
 
bool TryGetNamedPreset (const std::string &preset_name, PanelLayoutPreset *preset_out)
 
std::string ResolveProfilePresetName (const std::string &profile_id, EditorType editor_type)
 
bool ShouldDockPanelInDefaultLayout (const PanelLayoutPreset &preset, const std::string &panel_id)
 
std::vector< std::pair< std::string, DockPosition > > CollectDockedPanels (const PanelLayoutPreset &preset)
 
DockSplitNeeds ComputeSplitNeeds (const std::vector< std::pair< std::string, DockPosition > > &docked_panels)
 
bool IsRightDockPosition (DockPosition pos)
 
bool IsLeftDockPosition (DockPosition pos)
 
float ResolvePreferredRegionWidth (WorkspaceWindowManager *window_manager, const std::vector< std::pair< std::string, DockPosition > > &docked_panels, bool(*matches_region)(DockPosition))
 
void ApplyPreferredSplitWidths (DockSplitConfig *cfg, const DockSplitNeeds &needs, float viewport_width, WorkspaceWindowManager *window_manager, const std::vector< std::pair< std::string, DockPosition > > &docked_panels)
 
DockNodeIds BuildDockTree (ImGuiID dockspace_id, const DockSplitNeeds &needs, const DockSplitConfig &cfg)
 

Variables

constexpr char kLegacyPanelsKey [] = "panels"
 
constexpr char kWindowsKey [] = "windows"
 

Function Documentation

◆ ShowDefaultWindowsForEditor()

void yaze::editor::anonymous_namespace{layout_manager.cc}::ShowDefaultWindowsForEditor ( WorkspaceWindowManager * registry,
EditorType type )

◆ BoolMapToJson()

yaze::Json yaze::editor::anonymous_namespace{layout_manager.cc}::BoolMapToJson ( const std::unordered_map< std::string, bool > & map)

Definition at line 46 of file layout_manager.cc.

References BoolMapToJson(), and yaze::Json::object().

Referenced by BoolMapToJson().

Here is the call graph for this function:

◆ JsonToBoolMap()

void yaze::editor::anonymous_namespace{layout_manager.cc}::JsonToBoolMap ( const yaze::Json & obj,
std::unordered_map< std::string, bool > * map )

Definition at line 54 of file layout_manager.cc.

References yaze::Json::is_object(), yaze::Json::items(), and JsonToBoolMap().

Referenced by JsonToBoolMap(), and JsonToWindowMap().

Here is the call graph for this function:

◆ JsonToWindowMap()

void yaze::editor::anonymous_namespace{layout_manager.cc}::JsonToWindowMap ( const yaze::Json & entry,
std::unordered_map< std::string, bool > * windows )

Definition at line 67 of file layout_manager.cc.

References yaze::Json::contains(), yaze::Json::is_object(), JsonToBoolMap(), JsonToWindowMap(), kLegacyPanelsKey, and kWindowsKey.

Referenced by JsonToWindowMap().

Here is the call graph for this function:

◆ GetLayoutsFilePath()

std::filesystem::path yaze::editor::anonymous_namespace{layout_manager.cc}::GetLayoutsFilePath ( LayoutScope scope,
const std::string & project_key )

◆ TryGetNamedPreset()

◆ ResolveProfilePresetName()

std::string yaze::editor::anonymous_namespace{layout_manager.cc}::ResolveProfilePresetName ( const std::string & profile_id,
EditorType editor_type )

Definition at line 145 of file layout_manager.cc.

References yaze::editor::kDungeon, and ResolveProfilePresetName().

Referenced by ResolveProfilePresetName().

Here is the call graph for this function:

◆ ShouldDockPanelInDefaultLayout()

bool yaze::editor::anonymous_namespace{layout_manager.cc}::ShouldDockPanelInDefaultLayout ( const PanelLayoutPreset & preset,
const std::string & panel_id )

◆ CollectDockedPanels()

std::vector< std::pair< std::string, DockPosition > > yaze::editor::anonymous_namespace{layout_manager.cc}::CollectDockedPanels ( const PanelLayoutPreset & preset)

◆ ComputeSplitNeeds()

DockSplitNeeds yaze::editor::anonymous_namespace{layout_manager.cc}::ComputeSplitNeeds ( const std::vector< std::pair< std::string, DockPosition > > & docked_panels)

◆ IsRightDockPosition()

bool yaze::editor::anonymous_namespace{layout_manager.cc}::IsRightDockPosition ( DockPosition pos)

Definition at line 455 of file layout_manager.cc.

References IsRightDockPosition(), yaze::editor::Right, yaze::editor::RightBottom, and yaze::editor::RightTop.

Referenced by ApplyPreferredSplitWidths(), and IsRightDockPosition().

Here is the call graph for this function:

◆ IsLeftDockPosition()

bool yaze::editor::anonymous_namespace{layout_manager.cc}::IsLeftDockPosition ( DockPosition pos)

Definition at line 460 of file layout_manager.cc.

References IsLeftDockPosition(), yaze::editor::Left, yaze::editor::LeftBottom, and yaze::editor::LeftTop.

Referenced by ApplyPreferredSplitWidths(), and IsLeftDockPosition().

Here is the call graph for this function:

◆ ResolvePreferredRegionWidth()

float yaze::editor::anonymous_namespace{layout_manager.cc}::ResolvePreferredRegionWidth ( WorkspaceWindowManager * window_manager,
const std::vector< std::pair< std::string, DockPosition > > & docked_panels,
bool(*)(DockPosition) matches_region )

Definition at line 465 of file layout_manager.cc.

References yaze::editor::WorkspaceWindowManager::GetWindowContent(), and ResolvePreferredRegionWidth().

Referenced by ApplyPreferredSplitWidths(), and ResolvePreferredRegionWidth().

Here is the call graph for this function:

◆ ApplyPreferredSplitWidths()

void yaze::editor::anonymous_namespace{layout_manager.cc}::ApplyPreferredSplitWidths ( DockSplitConfig * cfg,
const DockSplitNeeds & needs,
float viewport_width,
WorkspaceWindowManager * window_manager,
const std::vector< std::pair< std::string, DockPosition > > & docked_panels )

◆ BuildDockTree()

Variable Documentation

◆ kLegacyPanelsKey

constexpr char yaze::editor::anonymous_namespace{layout_manager.cc}::kLegacyPanelsKey[] = "panels"
constexpr

Definition at line 28 of file layout_manager.cc.

Referenced by JsonToWindowMap().

◆ kWindowsKey

constexpr char yaze::editor::anonymous_namespace{layout_manager.cc}::kWindowsKey[] = "windows"
constexpr

Definition at line 29 of file layout_manager.cc.

Referenced by JsonToWindowMap().