tags:

views:

47

answers:

1

I am developing a CAD like application. This application is cross platform in the sense that I have a main window which is native to the platform it is running on (Linux, Windows and Apple). Within this window I have an OpenGL context and there I do all my rendering. The application in question does not really rely on common controls (radio buttons, check-boxes, labels etc), however there is the need for the user to be able to enter/edit some text. This text could be a few lines long but not more than one hundred.

How would I go about implementing such a control, I don't want to go as deep as developing my own text editor but it would be nice if it had some basic editor controls (cursor movement, delete, insert etc). I also don't want to use the native systems common controls as my own none cross platform code at the moment is the main window.

Any ideas?

Edit: This is informative http://stackoverflow.com/questions/78238/opengl-user-interface-programming

Thank you

+1  A: 

I think you are taking a longer approach here.

Rather than providing an interface through OpenGL and writing my own controls, I would go for a cross-platform GUI toolkit such as wxWindows, and use the GLCanvas provided to do my rendering. You'll have all the might and flexibility of common controls, you'll still be able to OpenGLize whatever you want, and the look of your application will be more standard, thus friendlier.

Santiago Lezica
The trouble with these cross platform toolkits is that they always look like second class citizens.My core is pretty cross platform and standard. I guess the only real route here is to have native gui code! hmmmm
fleetMan
Are you sure? I know that some toolkits do look awful wherever you take them, but I think I recall wxWidgets (by the way it's Widgets, no Windows as I said above xD) looked native at least on Windows and Linux (through GTK).
Santiago Lezica
Yes i'm sure. You can tell from a distance of 10 meters that you aren't dealing with native controls.
fleetMan
Oh well :( don't think I can help you then. Sorry!
Santiago Lezica