yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::WindowSidebar Class Reference

#include <window_sidebar.h>

Collaboration diagram for yaze::editor::WindowSidebar:

Public Member Functions

 WindowSidebar (WorkspaceWindowManager &window_manager, std::function< bool()> is_dungeon_workbench_mode={}, std::function< void(bool)> set_dungeon_workflow_mode={}, std::function< float()> get_bottom_reserved_height={}, std::function< EditorContextSnapshot(const std::string &)> context_provider={})
 
void SetUserSettings (UserSettings *settings)
 
void DrawContextDetailsWindow (size_t session_id)
 
void Draw (size_t session_id, const std::string &category, std::function< bool()> has_rom)
 

Static Public Member Functions

static bool MatchesWindowSearch (const std::string &query, const std::string &display_name, const std::string &window_id, const std::string &shortcut_hint)
 
static bool IsDungeonWindowModeTarget (const std::string &window_id)
 
static std::string SidebarSectionFor (const std::string &workflow_group)
 
static std::string SidebarSectionFor (const WindowDescriptor &window)
 
static bool ShouldOmitWindowInSidebar (const std::string &window_id, bool dungeon_workbench_mode)
 
static bool HasRenderableContext (const EditorContextSnapshot &snapshot)
 

Private Member Functions

void DrawEditorContext (size_t session_id, const std::string &category, const EditorContextSnapshot &snapshot)
 
void DrawEditorContextDetails (size_t session_id, const EditorContextSnapshot &snapshot)
 
void DispatchContextAction (size_t session_id, const EditorContextAction &action)
 

Private Attributes

WorkspaceWindowManager & window_manager_
 
std::function< bool()> is_dungeon_workbench_mode_
 
std::function< void(bool)> set_dungeon_workflow_mode_
 
std::function< float()> get_bottom_reserved_height_
 
std::function< EditorContextSnapshot(const std::string &) context_provider_ )
 
UserSettings * user_settings_ = nullptr
 
char sidebar_search_ [256] = {}
 
std::string context_details_category_
 

Friends

class WindowSidebarTestPeer
 

Detailed Description

Definition at line 16 of file window_sidebar.h.

Constructor & Destructor Documentation

◆ WindowSidebar()

yaze::editor::WindowSidebar::WindowSidebar ( WorkspaceWindowManager & window_manager,
std::function< bool()> is_dungeon_workbench_mode = {},
std::function< void(bool)> set_dungeon_workflow_mode = {},
std::function< float()> get_bottom_reserved_height = {},
std::function< EditorContextSnapshot(const std::string &)> context_provider = {} )
explicit

Definition at line 59 of file window_sidebar.cc.

Member Function Documentation

◆ SetUserSettings()

void yaze::editor::WindowSidebar::SetUserSettings ( UserSettings * settings)
inline

Definition at line 26 of file window_sidebar.h.

References user_settings_.

Referenced by yaze::editor::ActivityBar::SetUserSettings().

◆ MatchesWindowSearch()

bool yaze::editor::WindowSidebar::MatchesWindowSearch ( const std::string & query,
const std::string & display_name,
const std::string & window_id,
const std::string & shortcut_hint )
static

◆ IsDungeonWindowModeTarget()

bool yaze::editor::WindowSidebar::IsDungeonWindowModeTarget ( const std::string & window_id)
static

◆ SidebarSectionFor() [1/2]

std::string yaze::editor::WindowSidebar::SidebarSectionFor ( const std::string & workflow_group)
static

Definition at line 269 of file window_sidebar.cc.

Referenced by Draw(), and SidebarSectionFor().

◆ SidebarSectionFor() [2/2]

std::string yaze::editor::WindowSidebar::SidebarSectionFor ( const WindowDescriptor & window)
static

Definition at line 277 of file window_sidebar.cc.

References yaze::editor::WindowDescriptor::card_id, SidebarSectionFor(), and yaze::editor::WindowDescriptor::workflow_group.

Here is the call graph for this function:

◆ ShouldOmitWindowInSidebar()

bool yaze::editor::WindowSidebar::ShouldOmitWindowInSidebar ( const std::string & window_id,
bool dungeon_workbench_mode )
static

Definition at line 288 of file window_sidebar.cc.

References IsDungeonWindowModeTarget().

Referenced by Draw().

Here is the call graph for this function:

◆ HasRenderableContext()

◆ DrawContextDetailsWindow()

void yaze::editor::WindowSidebar::DrawContextDetailsWindow ( size_t session_id)

Definition at line 133 of file window_sidebar.cc.

References context_details_category_, context_provider_, DrawEditorContextDetails(), and HasRenderableContext().

Referenced by yaze::editor::ActivityBar::Render().

Here is the call graph for this function:

◆ Draw()

void yaze::editor::WindowSidebar::Draw ( size_t session_id,
const std::string & category,
std::function< bool()> has_rom )

Definition at line 293 of file window_sidebar.cc.

References yaze::editor::WorkspaceWindowManager::CloseWindow(), yaze::gui::ConvertColorToImVec4(), yaze::editor::WindowDescriptor::display_name, yaze::gui::ThemeManager::Get(), get_bottom_reserved_height_, yaze::editor::WorkspaceWindowManager::GetActiveSidePanelWidth(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetOnSurfaceVec4(), yaze::editor::WorkspaceWindowManager::GetPinnedWindows(), yaze::gui::GetPrimaryVec4(), yaze::gui::LayoutHelpers::GetSafeAreaInsets(), yaze::editor::WorkspaceWindowManager::GetSidebarWidth(), yaze::gui::LayoutHelpers::GetStandardSpacing(), yaze::gui::LayoutHelpers::GetStandardWidgetHeight(), yaze::gui::GetSurfaceContainerHighestVec4(), yaze::gui::GetSurfaceContainerHighVec4(), yaze::gui::GetTextSecondaryVec4(), yaze::gui::LayoutHelpers::GetTopInset(), yaze::editor::WorkspaceWindowManager::GetWindowDescriptor(), yaze::editor::WorkspaceWindowManager::GetWindowsInCategory(), yaze::editor::WorkspaceWindowManager::GetWindowsSortedByMRU(), yaze::editor::WorkspaceWindowManager::GetWorkspaceWindowName(), yaze::editor::WorkspaceWindowManager::HideAllWindowsInCategory(), ICON_MD_APPS, ICON_MD_CHEVRON_LEFT, ICON_MD_CLEAR, ICON_MD_FOLDER_OPEN, ICON_MD_MORE_HORIZ, ICON_MD_PUSH_PIN, ICON_MD_SEARCH, ICON_MD_VIEW_QUILT, ICON_MD_VISIBILITY, ICON_MD_VISIBILITY_OFF, ICON_MD_WORKSPACES, is_dungeon_workbench_mode_, yaze::editor::WorkspaceWindowManager::IsWindowOpen(), yaze::editor::WorkspaceWindowManager::IsWindowPinned(), MatchesWindowSearch(), yaze::editor::WorkspaceWindowManager::OpenWindow(), yaze::gui::ScaledSize(), set_dungeon_workflow_mode_, yaze::editor::WorkspaceWindowManager::SetSidebarExpanded(), yaze::editor::WorkspaceWindowManager::SetWindowPinned(), ShouldOmitWindowInSidebar(), yaze::editor::WorkspaceWindowManager::ShowAllWindowsInCategory(), sidebar_search_, SidebarSectionFor(), yaze::gui::IconSize::Small(), yaze::editor::WorkspaceWindowManager::ToggleWindow(), yaze::gui::TransparentIconButton(), yaze::editor::WorkspaceWindowManager::TriggerShowWindowBrowser(), yaze::editor::WorkspaceWindowManager::TriggerWindowClicked(), yaze::editor::WindowDescriptor::visibility_flag, and window_manager_.

Referenced by yaze::editor::ActivityBar::DrawSidePanel().

◆ DrawEditorContext()

◆ DrawEditorContextDetails()

◆ DispatchContextAction()

Friends And Related Symbol Documentation

◆ WindowSidebarTestPeer

friend class WindowSidebarTestPeer
friend

Definition at line 52 of file window_sidebar.h.

Member Data Documentation

◆ window_manager_

WorkspaceWindowManager& yaze::editor::WindowSidebar::window_manager_
private

Definition at line 61 of file window_sidebar.h.

Referenced by DispatchContextAction(), and Draw().

◆ is_dungeon_workbench_mode_

std::function<bool()> yaze::editor::WindowSidebar::is_dungeon_workbench_mode_
private

Definition at line 62 of file window_sidebar.h.

Referenced by Draw().

◆ set_dungeon_workflow_mode_

std::function<void(bool)> yaze::editor::WindowSidebar::set_dungeon_workflow_mode_
private

Definition at line 63 of file window_sidebar.h.

Referenced by Draw().

◆ get_bottom_reserved_height_

std::function<float()> yaze::editor::WindowSidebar::get_bottom_reserved_height_
private

Definition at line 64 of file window_sidebar.h.

Referenced by Draw().

◆ context_provider_

std::function<EditorContextSnapshot(const std::string&) yaze::editor::WindowSidebar::context_provider_)
private

Definition at line 65 of file window_sidebar.h.

Referenced by DrawContextDetailsWindow().

◆ user_settings_

UserSettings* yaze::editor::WindowSidebar::user_settings_ = nullptr
private

Definition at line 66 of file window_sidebar.h.

Referenced by SetUserSettings().

◆ sidebar_search_

char yaze::editor::WindowSidebar::sidebar_search_[256] = {}
private

Definition at line 67 of file window_sidebar.h.

Referenced by Draw().

◆ context_details_category_

std::string yaze::editor::WindowSidebar::context_details_category_
private

Definition at line 68 of file window_sidebar.h.

Referenced by DrawContextDetailsWindow(), and DrawEditorContext().


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