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

#include <activity_bar.h>

Collaboration diagram for yaze::editor::ActivityBar:

Public Member Functions

 ActivityBar (WorkspaceWindowManager &window_manager, std::function< bool()> is_dungeon_workbench_mode={}, std::function< void(bool)> set_dungeon_workflow_mode={})
 
 ~ActivityBar ()
 
void SetUserSettings (UserSettings *settings)
 
MoreActionsRegistryactions_registry ()
 
void Render (size_t session_id, const std::string &active_category, const std::vector< std::string > &all_categories, const std::unordered_set< std::string > &active_editor_categories, std::function< bool()> has_rom, std::function< bool()> is_rom_dirty={})
 
void DrawWindowBrowser (size_t session_id, bool *p_open)
 

Static Public Member Functions

static std::vector< std::string > SortCategories (const std::vector< std::string > &input, const std::vector< std::string > &order, const std::unordered_set< std::string > &pinned, const std::unordered_set< std::string > &hidden)
 

Private Member Functions

void DrawUtilityButtons (std::function< bool()> has_rom)
 
void DrawActivityBarStrip (size_t session_id, const std::string &active_category, const std::vector< std::string > &all_categories, const std::unordered_set< std::string > &active_editor_categories, std::function< bool()> has_rom, std::function< bool()> is_rom_dirty)
 
void DrawSidePanel (size_t session_id, const std::string &category, std::function< bool()> has_rom)
 
void DrawCategoryContextMenu (const std::string &category)
 
void HandleReorderDragAndDrop (const std::string &category)
 

Private Attributes

WorkspaceWindowManagerwindow_manager_
 
WindowBrowser window_browser_
 
WindowSidebar window_sidebar_
 
UserSettingsuser_settings_ = nullptr
 
std::unique_ptr< MoreActionsRegistryactions_registry_
 

Detailed Description

Definition at line 20 of file activity_bar.h.

Constructor & Destructor Documentation

◆ ActivityBar()

yaze::editor::ActivityBar::ActivityBar ( WorkspaceWindowManager & window_manager,
std::function< bool()> is_dungeon_workbench_mode = {},
std::function< void(bool)> set_dungeon_workflow_mode = {} )
explicit

Definition at line 39 of file activity_bar.cc.

◆ ~ActivityBar()

yaze::editor::ActivityBar::~ActivityBar ( )
default

Member Function Documentation

◆ SetUserSettings()

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

Definition at line 31 of file activity_bar.h.

References user_settings_.

◆ actions_registry()

MoreActionsRegistry & yaze::editor::ActivityBar::actions_registry ( )
inline

Definition at line 36 of file activity_bar.h.

References actions_registry_.

◆ Render()

void yaze::editor::ActivityBar::Render ( size_t session_id,
const std::string & active_category,
const std::vector< std::string > & all_categories,
const std::unordered_set< std::string > & active_editor_categories,
std::function< bool()> has_rom,
std::function< bool()> is_rom_dirty = {} )

◆ DrawWindowBrowser()

void yaze::editor::ActivityBar::DrawWindowBrowser ( size_t session_id,
bool * p_open )

Definition at line 493 of file activity_bar.cc.

References yaze::editor::WindowBrowser::Draw(), and window_browser_.

Here is the call graph for this function:

◆ SortCategories()

std::vector< std::string > yaze::editor::ActivityBar::SortCategories ( const std::vector< std::string > & input,
const std::vector< std::string > & order,
const std::unordered_set< std::string > & pinned,
const std::unordered_set< std::string > & hidden )
static

Definition at line 50 of file activity_bar.cc.

Referenced by DrawActivityBarStrip().

◆ DrawUtilityButtons()

void yaze::editor::ActivityBar::DrawUtilityButtons ( std::function< bool()> has_rom)
private

◆ DrawActivityBarStrip()

void yaze::editor::ActivityBar::DrawActivityBarStrip ( size_t session_id,
const std::string & active_category,
const std::vector< std::string > & all_categories,
const std::unordered_set< std::string > & active_editor_categories,
std::function< bool()> has_rom,
std::function< bool()> is_rom_dirty )
private

◆ DrawSidePanel()

void yaze::editor::ActivityBar::DrawSidePanel ( size_t session_id,
const std::string & category,
std::function< bool()> has_rom )
private

Definition at line 488 of file activity_bar.cc.

References yaze::editor::WindowSidebar::Draw(), and window_sidebar_.

Referenced by Render().

Here is the call graph for this function:

◆ DrawCategoryContextMenu()

void yaze::editor::ActivityBar::DrawCategoryContextMenu ( const std::string & category)
private

Definition at line 137 of file activity_bar.cc.

References yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Preferences::sidebar_pinned, and user_settings_.

Referenced by DrawActivityBarStrip().

Here is the call graph for this function:

◆ HandleReorderDragAndDrop()

void yaze::editor::ActivityBar::HandleReorderDragAndDrop ( const std::string & category)
private

Definition at line 182 of file activity_bar.cc.

References yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Preferences::sidebar_pinned, and user_settings_.

Referenced by DrawActivityBarStrip().

Here is the call graph for this function:

Member Data Documentation

◆ window_manager_

WorkspaceWindowManager& yaze::editor::ActivityBar::window_manager_
private

Definition at line 76 of file activity_bar.h.

Referenced by DrawActivityBarStrip(), and Render().

◆ window_browser_

WindowBrowser yaze::editor::ActivityBar::window_browser_
private

Definition at line 77 of file activity_bar.h.

Referenced by DrawWindowBrowser().

◆ window_sidebar_

WindowSidebar yaze::editor::ActivityBar::window_sidebar_
private

Definition at line 78 of file activity_bar.h.

Referenced by DrawSidePanel().

◆ user_settings_

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

◆ actions_registry_

std::unique_ptr<MoreActionsRegistry> yaze::editor::ActivityBar::actions_registry_
private

Definition at line 80 of file activity_bar.h.

Referenced by actions_registry(), and DrawActivityBarStrip().


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