PDA

View Full Version : platform independent ui controls


burrough
08-10-2006, 01:07 PM
Hi all,

Can any one let me know on how exactly we can develop a platform independent UI api's...
I just wanted to do without the wince or any other OS provided API.. how do i build an api family of my own similar to these ones..
any thoughts ???

smeagol
08-14-2006, 06:54 PM
Huh? Try rephrasing your question...I can't make any sense of what you're asking.

Phill
08-14-2006, 10:49 PM
What language are you using? Maybe you could use something like wxWidgets (http://www.wxwidgets.org/)?

rpgfan3233
08-14-2006, 11:32 PM
There are a few libraries (Phill pointed out one of the most common and one of the best), or if you are using Java, it should already be platform independent (assuming you are using the Sun JDK).

burrough
08-16-2006, 12:00 PM
Thanx for the response....
first of all language iam working on is "C" so java option is not there.I went thru Wxwidgets ,it is aking use of native controls to display onto the UI.
Can i get more primitive.... i mean some thing that can work for all platforms .. without using the native controls...

oracleguy
08-16-2006, 05:24 PM
... whats wrong with using the native controls of the platform you are running it on? Among other things it maintains consistency since your program will look like all the others on that platform.

Gox
08-17-2006, 05:49 AM
Well there is QT for C++ if you're willing to go that route. QT is basically a set of libraries for C++ which can be used to make cross-platform UI's. Note that only the QT UI will be (strictly) cross-platform. You're underlying code may very well need modification for different platforms, especially if you're making system calls etc. I have however carefully developed a QT project on a Windows machine and run it on a Unix machine without any problems.

The QT site: http://www.trolltech.com/ You'll find QT under the products listed. You'll want the open source version most likely.

Some other info. about QT:
Qt sets the standard for high-performance, cross-platform application development. It includes a C++ class library and tools for cross-platform development and internationalization.

Qt applications run natively - indistinguishable from native applications - compiled from a single source code on all major platforms:
Windows
MAC OS X
Linux/X11
Good Luck!

burrough
08-18-2006, 09:49 AM
I am not in a position to go the Qt or wx widgets way as they inturn use the native api's ... i was thinking beyond that which does not depend on native api and could implement its own UI controls... Is there any approach for this problem...

Phill
08-18-2006, 12:21 PM
I am not in a position to go the Qt or wx widgets way as they inturn use the native api's ... i was thinking beyond that which does not depend on native api and could implement its own UI controls... Is there any approach for this problem...

Perhaps if you were a bit more specific about why you don't want to use native controls we could help you better :confused:

burrough
08-18-2006, 01:16 PM
the whole point of not wanting to use a native graphic tool kit is to achieve the platform independent(feature)... I wish to support even the OS that provides bare minimum features...may be someting like tinyrtos... in that case i need to have some mechanism of catering to UI without the native support..
I hope i have made my intentions clear ..
thanx for those responses..:)

rpgfan3233
08-18-2006, 05:19 PM
The OS handles the UI stuff, no matter what platform you are on. You can't TRULY have platform independence, which is what you are basically pointing out. I understand why you are striving for platform independence, but what you are asking for is extremely hard to find, if it even exists.

Even Sun's Java Look-And-Feel for Swing (GUI) applications must change the code a bit between Linux and Windows. They may look the same, but they don't work the same way underneath.

The only other alternative I can offer is GTK+. I haven't developed apps using it, but it is one that exists on both Linux and Windows. I'm not sure whether it will satisfy your needs, or not, but the final option is to just create your own GUI library using platform dependent code. Sorry if I didn't help much. :(

oracleguy
08-18-2006, 05:27 PM
but the final option is to just create your own GUI library using platform dependent code.(

Thats pretty what you would have to do. At some point you'll have to use platform specific code and thus write multiple versions to accomodate each platform.

One easy way around this would be to not use a GUI. Make your program a console application. If you stick to mostly standard C/C++ you shouldn't have any trouble compiling it on any platform.