So I'm developing an application and it occurred to me that I need to have an easy way to open files. My application is somewhat similar to a word processor, and right now if I want to open a file right off the bat, I either have to have to go into a command line to launch my application, or I have to launch my application and navigate the menus in order to open a file. I eventually want to distribute my application, but this is obviously very inconvenient and non user friendly.
In Windows or Mac OS or whatever you use, when you are in your file explorer, you can double click on a file and it will be automatically opened with the default application for that file type. That is exactly what I want to do to open files, and I would also like to know how to set my application as the default program for a certain file type. How would I go about accomplishing this?