I have a question that I think is harder to explain than to answer... I'll try.
There are several softwares that can be run on terminal with various input arguments (-h, -a, ...), and where one of these arguments runs the software GUI. At the moment, no real software came up to my mind, sorry... Let's use my_software
as an example
> my_software -h
This is my_software version 1.0
Options:
-h Display this help
-a Do processing 1
-b Do processing 2
-g Start software GUI
So, if I call the software from console, I can let it do processing 1 or 2 via ad input argument. Also, I can start its astounding GUI using -g
, and do processing 1 or 2 using buttons or whatever else.
Question: How to achive such a thing?
I've seen some solutions in MS forums (I'm working with C++ and VIsual Studio at the moment, but a "generic" approach hint will be ok), where one creates a Form application but start as command line, and open the form with a given command. Seems ok. Only question: in this case, after startup, are both console and GUI visible or just the selected one?
What I want is also to be able to reproduce the behaviour of the GUI using command line arguments, so every button/function of the GUI can be reproduced using a command line argument. This, mainly, to be able to automate some tests of the GUI events. Side question: does it make any senses?
I think there are some MVC design involved. Program functionality is separated from user interface, so Console and GUI can make the same controller calls. I'm not very familiar with MVC, but I think that it is involved in this case. Right?
I hope that everything is clear.
Thanks for your help!
MIX
EDIT: a good example can be VLC. It starts with its well known GUI, but it can be used from console, too (https://wiki.videolan.org/VLC_command-line_help/).