platform independant dialog/alert/inpux boxes

Hi all, I was wondering if anyone has looked at implementing a platform independent dialog box? (i.e. it would be implemented natively on each OS, but with same API across all OS).


ofAlertBox("Major malfunction error, press OK to continue"); // brings up an alert dialog box with only an OK button  
int pressedButton = ofAlertBox("Do you wish to continue", OF_YES | OF_NO); // brings up alert dialog box with YES and NO buttons  
string strInput;  
ofInputBox("Enter your name", &strInput);  

I’m not saying that the API should be like above, I’m open to anything, but something like this could be useful. Any suggestions? (At this point I only need the first one, simple dialog box).

1 Like

Hey hey,

yes, I was looking into this as well, for me it would mostly be file browsers and stuff.
I don’t know about mac or linux, but windows gives you a simple call to create a messagebox ( i think it’s even just messagebox(“stuff here”)).
Looking a bit further into this, you can also get a windows handle on your openGL window I think.
The problem starts when you get callbacks on your windows. In my case, a file browser would send a callback function to my window handle - but since I’m using glut, there’s no way I will ever be able to catch that. At least that’s as far as I understood things.