1// Aseprite
2// Copyright (C) 2001-2017 David Capello
3//
4// This program is distributed under the terms of
5// the End-User License Agreement for Aseprite.
6
7#ifdef HAVE_CONFIG_H
8#include "config.h"
9#endif
10
11#ifndef ENABLE_SCRIPTING
12 #error ENABLE_SCRIPTING must be defined
13#endif
14
15#include "app/app.h"
16#include "app/commands/command.h"
17#include "app/ui/main_window.h"
18
19namespace app {
20
21using namespace ui;
22
23class DeveloperConsoleCommand : public Command {
24public:
25 DeveloperConsoleCommand();
26 ~DeveloperConsoleCommand();
27
28protected:
29 void onExecute(Context* context);
30};
31
32DeveloperConsoleCommand::DeveloperConsoleCommand()
33 : Command(CommandId::DeveloperConsole(), CmdUIOnlyFlag)
34{
35}
36
37DeveloperConsoleCommand::~DeveloperConsoleCommand()
38{
39}
40
41void DeveloperConsoleCommand::onExecute(Context* context)
42{
43 App::instance()->mainWindow()->showDevConsole();
44}
45
46Command* CommandFactory::createDeveloperConsoleCommand()
47{
48 return new DeveloperConsoleCommand;
49}
50
51} // namespace app
52