X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=72f29e36cf38f0d78245440ce6d015e01e1699ce;hp=273d82a5bd0901ca32c4c044bf55b0c86b7a9764;hb=42737c4c096f6469fb27e261806b48338a8f672f;hpb=901ea3355265e7f413674a62f7c29806ae35a565 diff --git a/src/main.cpp b/src/main.cpp index 273d82a..72f29e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,26 +1,16 @@ -#include "common.h" - -#include "document.h" -#include "view.h" -#include "screen.h" - -using namespace std; -using namespace IPDF; - +#include "main.h" +#include // Because we can. int main(int argc, char ** argv) -{ +{ Document doc; - doc.Add(0.5, 0.5, 0.5, 0.5); - - View view(doc); - - Screen scr; - - while (scr.PumpEvents()) + if (argc > 1) { - view.Render(); - scr.Present(); + for (int i = 2; i < argc; ++i) + { + if (fork() == 0) doc.Load(argv[i]); + } + doc.Load(argv[1]); } - + MainLoop(doc); return 0; }