Connecting Tech Pros Worldwide Forums | Help | Site Map

PIGUI

Trevor Lango
Guest
 
Posts: n/a
#1: Jul 22 '05
Is it possible to write C++ GUI that is platform-independent? I just
started a class where the teacher's assignments are heavily entrenched in
the Windows API but I want to learn how to do such things with just the
language and nothing os-specific.


Victor Bazarov
Guest
 
Posts: n/a
#2: Jul 22 '05

re: PIGUI


"Trevor Lango" <tmlango@member.aiche.org> wrote...[color=blue]
> Is it possible to write C++ GUI that is platform-independent?[/color]

No.
[color=blue]
> I just
> started a class where the teacher's assignments are heavily entrenched in
> the Windows API but I want to learn how to do such things with just the
> language and nothing os-specific.[/color]

No such things in just the language. However, learning the language
and learning how to develop GUI are two different things. See if you
can separate them in what your teacher's providing. If you seem lost
in GUI stuff and don't recognise the language, ask him to devote some
time to explaining the language separately from platform-specific GUI.

Victor


Le Géant Vert
Guest
 
Posts: n/a
#3: Jul 22 '05

re: PIGUI


Victor Bazarov wrote:

"Trevor Lango" &lt;tmlango@member.aiche.org&gt; wrote...



Is it possible to write C++ GUI that is platform-independent?



No.

Ain't there any portable GUI API, like SDL ? I also know that Qt&nbsp; from Trolltech can be used to produce portable GUI (read carefully the license for personal development : free of charges, but your work can then be used by Trolltech as their own)
Brian Genisio
Guest
 
Posts: n/a
#4: Jul 22 '05

re: PIGUI


Trevor Lango wrote:
[color=blue]
> Is it possible to write C++ GUI that is platform-independent? I just
> started a class where the teacher's assignments are heavily entrenched in
> the Windows API but I want to learn how to do such things with just the
> language and nothing os-specific.
>[/color]

Not many languages build GUI directly into the language. It is usually
an API that surrounds the language. Tk is an add-on to the TCL
language, and Java's AWT is an API to the language... it is just
standardized. C++ does not have anything GUI based.

Take a look at wxWindows. It is a cross-platform graphics API, similar
to MFC. It works on a number of platforms, but it does not work on all.
It also has interfaces for Python and Perl.

Also, you might look into X Windows. Though it is not natively
supported on every system, just about every OS these days (Except for
MS) ships an X server with their OS (including Mac in 10.3, so I
understand). With this limitation, there are plenty of 3rd party X
servers for Windows, including the widely popular XFree86. I have yet
to run into a user-based OS that does not have a port of XFree86.

So in short, you have options that are much more cross-platform than
MFC, but no perfect solution. The only way there would be a perfect
solution, is if all OS vendors agreed to a standard, and that will
_never_ happen :)

Bravo on trying to think about cross-platform issues. It will make you
a better programmer... hands down.
Brian

Jeff Schwab
Guest
 
Posts: n/a
#5: Jul 22 '05

re: PIGUI


Le Géant Vert wrote:[color=blue]
> Victor Bazarov wrote:
>[color=green]
>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
>>
>>[color=darkred]
>>>Is it possible to write C++ GUI that is platform-independent?
>>>
>>>[/color]
>>
>>No.
>>
>>[/color]
> Ain't there any portable GUI API, like SDL ? I also know that Qt from
> Trolltech can be used to produce portable GUI (read carefully the
> license for personal development : free of charges, but your work can
> then be used by Trolltech as their own)[/color]

It certainly is possible to write a GUI with a long list of supported
platforms. However, that doesn't make it "platform independent." The
closest thing I know to a "platform independent" GUI library is Java Swing.


Christopher Benson-Manica
Guest
 
Posts: n/a
#6: Jul 22 '05

re: PIGUI


Le Géant Vert <_NOSPAM_legeantvert@tiscali.fr> spoke thus:
[color=blue]
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">[/color]

If there's a way for you to avoid posting in HTML, by all means please
avail yourself of it. I for one will thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Victor Bazarov
Guest
 
Posts: n/a
#7: Jul 22 '05

re: PIGUI


(a) Please don't post HTML
(b) The ones you mentioned are _portable_, not platform-independent.

Victor
--
Please remove capital A's from my address when replying by mail

"Le Géant Vert" <_NOSPAM_legeantvert@tiscali.fr> wrote in message
news:bu8jj4$h9c$1@news.tiscali.fr...
Victor Bazarov wrote:
"Trevor Lango" <tmlango@member.aiche.org> wrote...

Is it possible to write C++ GUI that is platform-independent?


No.

Ain't there any portable GUI API, like SDL ? I also know that Qt from
Trolltech can be used to produce portable GUI (read carefully the license
for personal development : free of charges, but your work can then be used
by Trolltech as their own)


Victor Bazarov
Guest
 
Posts: n/a
#8: Jul 22 '05

re: PIGUI


"Jeff Schwab" <jeffplus@comcast.net> wrote...[color=blue]
> Le Géant Vert wrote:[color=green]
> > Victor Bazarov wrote:
> >[color=darkred]
> >>"Trevor Lango" <tmlango@member.aiche.org> wrote...
> >>
> >>
> >>>Is it possible to write C++ GUI that is platform-independent?
> >>>
> >>>
> >>
> >>No.
> >>
> >>[/color]
> > Ain't there any portable GUI API, like SDL ? I also know that Qt from
> > Trolltech can be used to produce portable GUI (read carefully the
> > license for personal development : free of charges, but your work can
> > then be used by Trolltech as their own)[/color]
>
> It certainly is possible to write a GUI with a long list of supported
> platforms. However, that doesn't make it "platform independent." The
> closest thing I know to a "platform independent" GUI library is Java[/color]
Swing.

Wrong. Java Swing is a single-platform GUI. The platform is Java.

Victor


Trevor Lango
Guest
 
Posts: n/a
#9: Jul 22 '05

re: PIGUI


"Le Géant Vert" <_NOSPAM_legeantvert@tiscali.fr> wrote in message
news:bu8jj4$h9c$1@news.tiscali.fr...[color=blue]
> Victor Bazarov wrote:
> "Trevor Lango" <tmlango@member.aiche.org> wrote...
> Is it possible to write C++ GUI that is platform-independent?
>
> No.
> Ain't there any portable GUI API, like SDL ? I also know that Qt from[/color]
Trolltech can be used to produce portable GUI (read carefully the license
for personal development : free of charges, but your work can then be used
by Trolltech as their own)[color=blue]
>[/color]


I have been teaching myself some Qt, unfortunately, my assignments are then
not coded how my teacher expects. Regards to Trolltech licensing, I don't
think they're going to be too interested in my "hello world" programs... ;-)


Wolfgang Kaufmann
Guest
 
Posts: n/a
#10: Jul 22 '05

re: PIGUI


* Thus spoke Trevor Lango <tmlango@member.aiche.org>:

Hallo,
[color=blue]
> Is it possible to write C++ GUI that is platform-independent? I just
> started a class where the teacher's assignments are heavily entrenched in
> the Windows API but I want to learn how to do such things with just the
> language and nothing os-specific.[/color]

- <http://www.atai.org/guitool/>.


Wolfgang.
--
"Erfahrungen -- das sind die vernarbten Wunden unserer Dummheit."
-- John Osborne
Jeff Schwab
Guest
 
Posts: n/a
#11: Jul 22 '05

re: PIGUI


Victor Bazarov wrote:[color=blue]
> "Jeff Schwab" <jeffplus@comcast.net> wrote...
>[color=green]
>>Le Géant Vert wrote:
>>[color=darkred]
>>>Victor Bazarov wrote:
>>>
>>>
>>>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
>>>>
>>>>
>>>>
>>>>>Is it possible to write C++ GUI that is platform-independent?
>>>>>
>>>>>
>>>>
>>>>No.
>>>>
>>>>
>>>
>>>Ain't there any portable GUI API, like SDL ? I also know that Qt from
>>>Trolltech can be used to produce portable GUI (read carefully the
>>>license for personal development : free of charges, but your work can
>>>then be used by Trolltech as their own)[/color]
>>
>>It certainly is possible to write a GUI with a long list of supported
>>platforms. However, that doesn't make it "platform independent." The
>>closest thing I know to a "platform independent" GUI library is Java[/color]
>
> Swing.
>
> Wrong. Java Swing is a single-platform GUI. The platform is Java.
>
> Victor
>
>[/color]

In what way does that make me wrong? I didn't say Swing was a
cross-platform, I said "the closest thing I know to a platform
independent GUI library is Java swing." The Java platform is supported
on a number of different hardware/OS configurations.


Btw, Swing isn't a GUI, it's a set of classes for building GUI's.

Victor Bazarov
Guest
 
Posts: n/a
#12: Jul 22 '05

re: PIGUI


"Jeff Schwab" <jeffplus@comcast.net> wrote...[color=blue]
> Victor Bazarov wrote:[color=green]
> > "Jeff Schwab" <jeffplus@comcast.net> wrote...
> >[color=darkred]
> >>Le Géant Vert wrote:
> >>
> >>>Victor Bazarov wrote:
> >>>
> >>>
> >>>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
> >>>>
> >>>>
> >>>>
> >>>>>Is it possible to write C++ GUI that is platform-independent?
> >>>>>
> >>>>>
> >>>>
> >>>>No.
> >>>>
> >>>>
> >>>
> >>>Ain't there any portable GUI API, like SDL ? I also know that Qt from
> >>>Trolltech can be used to produce portable GUI (read carefully the
> >>>license for personal development : free of charges, but your work can
> >>>then be used by Trolltech as their own)
> >>
> >>It certainly is possible to write a GUI with a long list of supported
> >>platforms. However, that doesn't make it "platform independent." The
> >>closest thing I know to a "platform independent" GUI library is Java[/color]
> >
> > Swing.
> >
> > Wrong. Java Swing is a single-platform GUI. The platform is Java.
> >
> > Victor
> >
> >[/color]
>
> In what way does that make me wrong? I didn't say Swing was a
> cross-platform, I said "the closest thing I know to a platform
> independent GUI library is Java swing." The Java platform is supported
> on a number of different hardware/OS configurations.
>
>
> Btw, Swing isn't a GUI, it's a set of classes for building GUI's.[/color]

I apologise for sounding harsh. However, if Java Swing only exists on
(or for) one platform (which you don't deny), how can it be "the closest
thing" to a "platform independent" GUI library? Think about it.

Victor


Jeff Schwab
Guest
 
Posts: n/a
#13: Jul 22 '05

re: PIGUI


Victor Bazarov wrote:[color=blue]
> "Jeff Schwab" <jeffplus@comcast.net> wrote...
>[color=green]
>>Victor Bazarov wrote:
>>[color=darkred]
>>>"Jeff Schwab" <jeffplus@comcast.net> wrote...
>>>
>>>
>>>>Le Géant Vert wrote:
>>>>
>>>>
>>>>>Victor Bazarov wrote:
>>>>>
>>>>>
>>>>>
>>>>>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Is it possible to write C++ GUI that is platform-independent?
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>No.
>>>>>>
>>>>>>
>>>>>
>>>>>Ain't there any portable GUI API, like SDL ? I also know that Qt from
>>>>>Trolltech can be used to produce portable GUI (read carefully the
>>>>>license for personal development : free of charges, but your work can
>>>>>then be used by Trolltech as their own)
>>>>
>>>>It certainly is possible to write a GUI with a long list of supported
>>>>platforms. However, that doesn't make it "platform independent." The
>>>>closest thing I know to a "platform independent" GUI library is Java
>>>
>>>Swing.
>>>
>>>Wrong. Java Swing is a single-platform GUI. The platform is Java.
>>>
>>>Victor
>>>
>>>[/color]
>>
>>In what way does that make me wrong? I didn't say Swing was a
>>cross-platform, I said "the closest thing I know to a platform
>>independent GUI library is Java swing." The Java platform is supported
>>on a number of different hardware/OS configurations.
>>
>>
>>Btw, Swing isn't a GUI, it's a set of classes for building GUI's.[/color]
>
>
> I apologise for sounding harsh. However, if Java Swing only exists on
> (or for) one platform (which you don't deny), how can it be "the closest
> thing" to a "platform independent" GUI library? Think about it.[/color]

Swing's platform lives on top of other platforms. Swing is largely
independent of the underlying platform. The fact that it drags a
secondary platform (Java) around with it doesn't change that, it just
makes Swing a very heavy-weight solution to the need for a GUI library.

Victor Bazarov
Guest
 
Posts: n/a
#14: Jul 22 '05

re: PIGUI


"Jeff Schwab" <jeffplus@comcast.net> wrote...[color=blue]
> Victor Bazarov wrote:[color=green]
> > "Jeff Schwab" <jeffplus@comcast.net> wrote...
> >[color=darkred]
> >>Victor Bazarov wrote:
> >>
> >>>"Jeff Schwab" <jeffplus@comcast.net> wrote...
> >>>
> >>>
> >>>>Le Géant Vert wrote:
> >>>>
> >>>>
> >>>>>Victor Bazarov wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Is it possible to write C++ GUI that is platform-independent?
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>No.
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>Ain't there any portable GUI API, like SDL ? I also know that Qt[/color][/color][/color]
from[color=blue][color=green][color=darkred]
> >>>>>Trolltech can be used to produce portable GUI (read carefully the
> >>>>>license for personal development : free of charges, but your work can
> >>>>>then be used by Trolltech as their own)
> >>>>
> >>>>It certainly is possible to write a GUI with a long list of supported
> >>>>platforms. However, that doesn't make it "platform independent." The
> >>>>closest thing I know to a "platform independent" GUI library is Java
> >>>
> >>>Swing.
> >>>
> >>>Wrong. Java Swing is a single-platform GUI. The platform is Java.
> >>>
> >>>Victor
> >>>
> >>>
> >>
> >>In what way does that make me wrong? I didn't say Swing was a
> >>cross-platform, I said "the closest thing I know to a platform
> >>independent GUI library is Java swing." The Java platform is supported
> >>on a number of different hardware/OS configurations.
> >>
> >>
> >>Btw, Swing isn't a GUI, it's a set of classes for building GUI's.[/color]
> >
> >
> > I apologise for sounding harsh. However, if Java Swing only exists on
> > (or for) one platform (which you don't deny), how can it be "the closest
> > thing" to a "platform independent" GUI library? Think about it.[/color]
>
> Swing's platform lives on top of other platforms. Swing is largely
> independent of the underlying platform. The fact that it drags a
> secondary platform (Java) around with it doesn't change that, it just
> makes Swing a very heavy-weight solution to the need for a GUI library.
>[/color]

Well, excuuuuse me, but then MFC is just as good a solution, you only
need a Windows simulator to exist on your "underlying" platform, don't
you? That's not platform independence.

Victor


Jeff Schwab
Guest
 
Posts: n/a
#15: Jul 22 '05

re: PIGUI


Victor Bazarov wrote:[color=blue]
> "Jeff Schwab" <jeffplus@comcast.net> wrote...
>[color=green]
>>Victor Bazarov wrote:
>>[color=darkred]
>>>"Jeff Schwab" <jeffplus@comcast.net> wrote...
>>>
>>>
>>>>Victor Bazarov wrote:
>>>>
>>>>
>>>>>"Jeff Schwab" <jeffplus@comcast.net> wrote...
>>>>>
>>>>>
>>>>>
>>>>>>Le Géant Vert wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Victor Bazarov wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>"Trevor Lango" <tmlango@member.aiche.org> wrote...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Is it possible to write C++ GUI that is platform-independent?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>No.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>Ain't there any portable GUI API, like SDL ? I also know that Qt[/color][/color]
>
> from
>[color=green][color=darkred]
>>>>>>>Trolltech can be used to produce portable GUI (read carefully the
>>>>>>>license for personal development : free of charges, but your work can
>>>>>>>then be used by Trolltech as their own)
>>>>>>
>>>>>>It certainly is possible to write a GUI with a long list of supported
>>>>>>platforms. However, that doesn't make it "platform independent." The
>>>>>>closest thing I know to a "platform independent" GUI library is Java
>>>>>
>>>>>Swing.
>>>>>
>>>>>Wrong. Java Swing is a single-platform GUI. The platform is Java.
>>>>>
>>>>>Victor
>>>>>
>>>>>
>>>>
>>>>In what way does that make me wrong? I didn't say Swing was a
>>>>cross-platform, I said "the closest thing I know to a platform
>>>>independent GUI library is Java swing." The Java platform is supported
>>>>on a number of different hardware/OS configurations.
>>>>
>>>>
>>>>Btw, Swing isn't a GUI, it's a set of classes for building GUI's.
>>>
>>>
>>>I apologise for sounding harsh. However, if Java Swing only exists on
>>>(or for) one platform (which you don't deny), how can it be "the closest
>>>thing" to a "platform independent" GUI library? Think about it.[/color]
>>
>>Swing's platform lives on top of other platforms. Swing is largely
>>independent of the underlying platform. The fact that it drags a
>>secondary platform (Java) around with it doesn't change that, it just
>>makes Swing a very heavy-weight solution to the need for a GUI library.
>>[/color]
>
>
> Well, excuuuuse me, but then MFC is just as good a solution, you only
> need a Windows simulator to exist on your "underlying" platform, don't
> you? That's not platform independence.
>
> Victor[/color]

Java VM's are a good deal more plentiful and portable than "Windows
simulators supporting MFC." :)

Jeff Schwab
Guest
 
Posts: n/a
#16: Jul 22 '05

re: PIGUI


>>>>>>>>>> Is it possible to write C++ GUI that is platform-independent?

<snip/>
[color=blue][color=green][color=darkred]
>>>>>>> It certainly is possible to write a GUI with a long list of
>>>>>>> supported platforms. However, that doesn't make it "platform independent."
>>>>>>> The closest thing I know to a "platform independent" GUI library is Java
>>>>>>> Swing.[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>>>>> Wrong. Java Swing is a single-platform GUI. The platform is Java.[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>>>> In what way does that make me wrong? I didn't say Swing was a
>>>>> cross-platform, I said "the closest thing I know to a platform
>>>>> independent GUI library is Java swing." The Java platform is
>>>>> supported
>>>>> on a number of different hardware/OS configurations.
>>>>>
>>>>>
>>>>> Btw, Swing isn't a GUI, it's a set of classes for building GUI's.[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>>> I apologise for sounding harsh. However, if Java Swing only exists on
>>>> (or for) one platform (which you don't deny), how can it be "the
>>>> closest thing" to a "platform independent" GUI library? Think about it.[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>> Swing's platform lives on top of other platforms. Swing is largely
>>> independent of the underlying platform. The fact that it drags a
>>> secondary platform (Java) around with it doesn't change that, it just
>>> makes Swing a very heavy-weight solution to the need for a GUI library.[/color][/color][/color]
[color=blue][color=green]
>> Well, excuuuuse me, but then MFC is just as good a solution, you only
>> need a Windows simulator to exist on your "underlying" platform, don't
>> you? That's not platform independence.[/color][/color]
[color=blue]
> Java VM's are a good deal more plentiful and portable than "Windows
> simulators supporting MFC." :)[/color]

In fact, you could just create native objects to represent GUI code
built from Swing. There are plenty of native compilers now. That's
about as close as one can get to platform indepence, I think.

Closed Thread