yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::platform::native_menu Namespace Reference

Namespaces

namespace  anonymous_namespace{native_menu_bridge.cc}
 

Classes

struct  ActionSpec
 
struct  KeyChord
 
class  NativeMenuHost
 
struct  ResolvedItem
 

Enumerations

enum class  MenuAction : int {
  kAbout = 0 , kSettings , kHide , kHideOthers ,
  kShowAll , kQuit , kOpenRom , kOpenProject ,
  kSave , kSaveAs , kCloseRom , kUndo ,
  kRedo , kCut , kCopy , kPaste ,
  kSelectAll , kToggleSidebar , kToggleFullScreen , kMinimize ,
  kZoom , kBringAllToFront , kKeyboardShortcuts , kCount
}
 
enum class  ChordOwner { kNone , kImGui , kNative }
 
enum class  Dispatch { kShortcut , kHost , kTextOrShortcut , kCocoa }
 

Functions

const std::vector< ActionSpec > & ActionSpecs ()
 
const ActionSpec * FindSpec (MenuAction action)
 
KeyChord ChordFromImGuiKeys (const std::vector< ImGuiKey > &keys)
 
ImGuiKey ImGuiKeyFromChordKey (char key)
 
ResolvedItem ResolveItem (const editor::ShortcutManager *shortcuts, MenuAction action)
 
bool IsNativeOwnedChord (const editor::ShortcutManager *shortcuts, const KeyChord &chord)
 
bool ShouldMenuPerformKeyEquivalent (const editor::ShortcutManager *shortcuts, const KeyChord &chord)
 
bool IsActionEnabled (NativeMenuHost &host, MenuAction action)
 
bool PerformAction (NativeMenuHost &host, MenuAction action)
 
std::string RecentFileLabel (const std::string &path)
 

Enumeration Type Documentation

◆ MenuAction

enum class yaze::platform::native_menu::MenuAction : int
strong
Enumerator
kAbout 
kSettings 
kHide 
kHideOthers 
kShowAll 
kQuit 
kOpenRom 
kOpenProject 
kSave 
kSaveAs 
kCloseRom 
kUndo 
kRedo 
kCut 
kCopy 
kPaste 
kSelectAll 
kToggleSidebar 
kToggleFullScreen 
kMinimize 
kZoom 
kBringAllToFront 
kKeyboardShortcuts 
kCount 

Definition at line 42 of file native_menu_bridge.h.

◆ ChordOwner

Enumerator
kNone 
kImGui 
kNative 

Definition at line 93 of file native_menu_bridge.h.

◆ Dispatch

Enumerator
kShortcut 
kHost 
kTextOrShortcut 
kCocoa 

Definition at line 96 of file native_menu_bridge.h.

Function Documentation

◆ ActionSpecs()

◆ FindSpec()

const ActionSpec * yaze::platform::native_menu::FindSpec ( MenuAction action)

Definition at line 173 of file native_menu_bridge.cc.

References ActionSpecs().

Referenced by PerformAction(), and ResolveItem().

Here is the call graph for this function:

◆ ChordFromImGuiKeys()

◆ ImGuiKeyFromChordKey()

ImGuiKey yaze::platform::native_menu::ImGuiKeyFromChordKey ( char key)

Definition at line 213 of file native_menu_bridge.cc.

Referenced by PerformAction().

◆ ResolveItem()

◆ IsNativeOwnedChord()

bool yaze::platform::native_menu::IsNativeOwnedChord ( const editor::ShortcutManager * shortcuts,
const KeyChord & chord )

◆ ShouldMenuPerformKeyEquivalent()

bool yaze::platform::native_menu::ShouldMenuPerformKeyEquivalent ( const editor::ShortcutManager * shortcuts,
const KeyChord & chord )

◆ IsActionEnabled()

◆ PerformAction()

◆ RecentFileLabel()

std::string yaze::platform::native_menu::RecentFileLabel ( const std::string & path)

Definition at line 369 of file native_menu_bridge.cc.