aseprite/src/app/commands/commands.h
2017-12-01 15:10:21 -03:00

42 lines
746 B
C++

// Aseprite
// Copyright (C) 2001-2017 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifndef APP_COMMANDS_COMMANDS_H_INCLUDED
#define APP_COMMANDS_COMMANDS_H_INCLUDED
#pragma once
#include "app/commands/command_ids.h"
#include "ui/base.h"
#include <map>
#include <string>
#include <vector>
namespace app {
class Command;
class Commands {
static Commands* m_instance;
public:
Commands();
~Commands();
static Commands* instance();
Command* byId(const char* id);
Commands* add(Command* command);
void getAllIds(std::vector<std::string>& ids);
private:
std::map<std::string, Command*> m_commands;
};
} // namespace app
#endif