yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
gui_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_GUI_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_GUI_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
14 public:
15 std::string GetName() const { return "gui-place-tile"; }
16 std::string GetDescription() const {
17 return "Place a tile at specific coordinates using GUI automation";
18 }
19 std::string GetUsage() const {
20 return "gui-place-tile --tile <tile_id> --x <x> --y <y> [--format "
21 "<json|text>]";
22 }
23
24 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
25 return parser.RequireArgs({"tile", "x", "y"});
26 }
27
28 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
29 resources::OutputFormatter& formatter) override;
30};
31
36 public:
37 std::string GetName() const { return "gui-click"; }
38 std::string GetDescription() const {
39 return "Click on a GUI element using automation";
40 }
41 std::string GetUsage() const {
42 return "gui-click --target <target> [--click-type <left|right|middle>] "
43 "[--format <json|text>]";
44 }
45
46 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
47 return parser.RequireArgs({"target"});
48 }
49
50 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
51 resources::OutputFormatter& formatter) override;
52};
53
58 public:
59 std::string GetName() const { return "gui-discover-tool"; }
60 std::string GetDescription() const {
61 return "Discover available GUI tools and widgets";
62 }
63 std::string GetUsage() const {
64 return "gui-discover-tool [--window <window>] [--type <type>] [--format "
65 "<json|text>]";
66 }
67
68 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
69 return absl::OkStatus(); // No required args
70 }
71
72 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
73 resources::OutputFormatter& formatter) override;
74};
75
80 public:
81 std::string GetName() const { return "gui-screenshot"; }
82 std::string GetDescription() const { return "Take a screenshot of the GUI"; }
83 std::string GetUsage() const {
84 return "gui-screenshot [--region <region>] [--format <format>] [--format "
85 "<json|text>]";
86 }
87
88 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
89 return absl::OkStatus(); // No required args
90 }
91
92 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
93 resources::OutputFormatter& formatter) override;
94};
95
96} // namespace handlers
97} // namespace cli
98} // namespace yaze
99
100#endif // YAZE_SRC_CLI_HANDLERS_GUI_COMMANDS_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Command handler for clicking GUI elements.
std::string GetName() const
Get the command name.
std::string GetUsage() const
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for discovering GUI tools.
std::string GetUsage() const
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Command handler for placing tiles via GUI automation.
std::string GetUsage() const
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for taking screenshots.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const
Get the command usage string.
std::string GetName() const
Get the command name.
Utility for parsing common CLI argument patterns.
absl::Status RequireArgs(const std::vector< std::string > &required) const
Validate that required arguments are present.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.