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 <json|text>]";
21 }
22
23 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
24 return parser.RequireArgs({"tile", "x", "y"});
25 }
26
27 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
28 resources::OutputFormatter& formatter) override;
29};
30
35 public:
36 std::string GetName() const { return "gui-click"; }
37 std::string GetDescription() const {
38 return "Click on a GUI element using automation";
39 }
40 std::string GetUsage() const {
41 return "gui-click --target <target> [--click-type <left|right|middle>] [--format <json|text>]";
42 }
43
44 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
45 return parser.RequireArgs({"target"});
46 }
47
48 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
49 resources::OutputFormatter& formatter) override;
50};
51
56 public:
57 std::string GetName() const { return "gui-discover-tool"; }
58 std::string GetDescription() const {
59 return "Discover available GUI tools and widgets";
60 }
61 std::string GetUsage() const {
62 return "gui-discover-tool [--window <window>] [--type <type>] [--format <json|text>]";
63 }
64
65 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
66 return absl::OkStatus(); // No required args
67 }
68
69 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
70 resources::OutputFormatter& formatter) override;
71};
72
77 public:
78 std::string GetName() const { return "gui-screenshot"; }
79 std::string GetDescription() const {
80 return "Take a screenshot of the GUI";
81 }
82 std::string GetUsage() const {
83 return "gui-screenshot [--region <region>] [--format <format>] [--format <json|text>]";
84 }
85
86 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
87 return absl::OkStatus(); // No required args
88 }
89
90 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
91 resources::OutputFormatter& formatter) override;
92};
93
94} // namespace handlers
95} // namespace cli
96} // namespace yaze
97
98#endif // YAZE_SRC_CLI_HANDLERS_GUI_COMMANDS_H_
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
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.
Main namespace for the application.