docs(cli): document argument parsing

This commit is contained in:
2026-06-18 21:02:32 -05:00
parent 0c675d6fbb
commit 7172a00e2e

View File

@@ -6,6 +6,7 @@ one consistent API on Windows and Linux.
## Features ## Features
- Native open, save, folder, message, input, and color dialogs - Native open, save, folder, message, input, and color dialogs
- Command-line flags, values, integers, and positional arguments
- UTF-8 text clipboard access - UTF-8 text clipboard access
- Standard application, user, temporary, and executable paths - Standard application, user, temporary, and executable paths
- Non-blocking process launch - Non-blocking process launch
@@ -44,6 +45,13 @@ Include individual feature headers or the complete API:
```cpp ```cpp
#include <izo/iZo.hpp> #include <izo/iZo.hpp>
izo::CommandLine args(argc, argv);
if (args.Has("--verbose")) {
// Enable verbose logging.
}
const auto configPath = args.Get("--config");
const int threads = args.GetInt("--threads", 4);
izo::DialogOptions options; izo::DialogOptions options;
options.title = "Choose an image"; options.title = "Choose an image";
options.filters = {{"Images", {"*.png", "*.jpg"}}}; options.filters = {{"Images", {"*.png", "*.jpg"}}};