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

ID: "drawers". Right-drawer toggles with "drawer: " prefix for discovery. More...

#include <command_palette_providers.h>

Inheritance diagram for yaze::editor::DrawerCommandsProvider:
Collaboration diagram for yaze::editor::DrawerCommandsProvider:

Public Member Functions

 DrawerCommandsProvider (std::function< void(int drawer_type)> toggle_callback, std::function< void()> cycle_next={}, std::function< void()> cycle_prev={})
 
std::string ProviderId () const override
 Stable identifier. Used for selective refresh; must be unique.
 
void Provide (CommandPalette *palette) override
 Populate palette with this source's commands.
 
- Public Member Functions inherited from yaze::editor::CommandProvider
virtual ~CommandProvider ()=default
 

Private Attributes

std::function< void(int)> toggle_callback_
 
std::function< void()> cycle_next_
 
std::function< void()> cycle_prev_
 

Detailed Description

ID: "drawers". Right-drawer toggles with "drawer: " prefix for discovery.

Definition at line 75 of file command_palette_providers.h.

Constructor & Destructor Documentation

◆ DrawerCommandsProvider()

yaze::editor::DrawerCommandsProvider::DrawerCommandsProvider ( std::function< void(int drawer_type)> toggle_callback,
std::function< void()> cycle_next = {},
std::function< void()> cycle_prev = {} )

Definition at line 43 of file command_palette_providers.cc.

Member Function Documentation

◆ ProviderId()

std::string yaze::editor::DrawerCommandsProvider::ProviderId ( ) const
inlineoverridevirtual

Stable identifier. Used for selective refresh; must be unique.

Implements yaze::editor::CommandProvider.

Definition at line 80 of file command_palette_providers.h.

◆ Provide()

void yaze::editor::DrawerCommandsProvider::Provide ( CommandPalette * palette)
overridevirtual

Populate palette with this source's commands.

Implements yaze::editor::CommandProvider.

Definition at line 50 of file command_palette_providers.cc.

References cycle_next_, cycle_prev_, yaze::editor::CommandPalette::RegisterDrawerCommands(), and toggle_callback_.

Here is the call graph for this function:

Member Data Documentation

◆ toggle_callback_

std::function<void(int)> yaze::editor::DrawerCommandsProvider::toggle_callback_
private

Definition at line 84 of file command_palette_providers.h.

Referenced by Provide().

◆ cycle_next_

std::function<void()> yaze::editor::DrawerCommandsProvider::cycle_next_
private

Definition at line 85 of file command_palette_providers.h.

Referenced by Provide().

◆ cycle_prev_

std::function<void()> yaze::editor::DrawerCommandsProvider::cycle_prev_
private

Definition at line 86 of file command_palette_providers.h.

Referenced by Provide().


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