🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #38344

Re: [Q]: Can I write X window program using C++?

#38344
From: Christopher B. Browne
Date: Sun, 27 Sep 1998 00:00
71 lines
4314 bytes
On 26 Sep 1998 23:04:31 GMT, Patrick K. <patrick@boxsoft..NO_SPAM..com> posted:
>In article <906839739snz@vision25.demon.co.uk>,
>	philh@vision25.demon.co.uk (Phil Hunt) writes:
>> In article <36061a79.0@ruby.hknet.com> Doug@hotmail.com  writes:
>>> I guess the simple answer would be 'Yes'. Please give me some 
>>> advice on how and where to pay attension. Also are there any 
>>> site talk about this? Thanks.
>> 
>> Writing a program using low-level X calls is not a good idea, unless
>> you want to waste lots of time. It's better to use a more high-level
>> class library.  Two that spring to mind are Qt (made by Troll Tech,
>> www.troll.no), which is used by the KDE environment, and GTK--
>> (part of the GNU project), which is used by the GNOME project
>> (www.gnome.org IIRC).
>
>   Well, this seems to be just an opinion with no real
>   fact backing it up.  There are no real reasons for one not
>   to use the Xlib directly.  If this was a valid statement
>   then one could also argue:
>   
>      "programming in C/C++ is not a good idea unless you
>       want to waste lots of time.  It's better to use an
>       even more high-level language like VB(tm)" (gag!).
>
>   Though 3rd party libs might be a good idea if one could
>   find one with an intuitive interface.  One which I have
>   yet to find.  I personally find Qt to be a very ugly
>   implementation and would not consider using it.
>
>   What is wrong with Motif?  Though Motif does cost money
>   at least it is more supported.  And if one is not too
>   fussy about detail LessTif (http://www.lesstif.org/) is
>   an excellent free clone of it.

There are a number of different sets of libraries that point
somewhat different sets of abstractions at X.

Writing applications using Xlib obviously means that as it represents
the base X abstractions, you are working at that "raw" level.  If the
code is finely tuned, this should result in *highly* efficient code.

Unfortunately, this may come at the cost of the code you write being
somewhat more complex than it would be if you made use of libraries
providing higher level abstractions.

Qt is apparently fairly well regarded; some of the packages written
using it are reputed to be memory hogs, but that's more likely the
fault of programmers than it is of the library.  Gtk is also fairly
well regarded by many; it's a little early for it to have stabilized
which means that it's a little early to strongly recommend it in
general.

Motif has been widely used for many years; it represents the only
major library aside from Xlib and Xt that could be treated as truly
"standardized" from any official perspective.  Unfortunately, its quality
is not so well regarded; it suffers from the problem that it was:
a) A compromise between a whole lot of vendors, and
b) Not coded well during all of its history  (jwz could be queried on
this one...)

One *can* build standardized Motif-based apps; unfortunately it involves
significant effort, possibly more than required with other libraries,
and commonly results in somewhat "bloated" applications.

<http://www.rahul.net/kenton/index.shtml> lists a *whole lot* of
X-related resources, including probably more X libraries than anyone
else is likely to have located and listed...
-- 
Those who do not understand Unix are condemned to reinvent it, poorly. 	
-- Henry Spencer          <http://www.hex.net/~cbbrowne/xwindows.html>
cbbrowne@hex.net - "What have you contributed to Linux today?..."
Technical Details
Message-ID: <slrn70r4sd.1a.cbbrowne@godel.brownes.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36061a79.0@ruby.hknet.com> <906839739snz@vision25.demon.co.uk> <6ujrtv$pgb@dfw-ixnews8.ix.netcom.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103734,9c9c0b5f4aa004df
X-Google-Attributes: gid103734,public
X-Google-Thread: f65d0,9c9c0b5f4aa004df
X-Google-Attributes: gidf65d0,public
X-Google-Thread: 11038b,9c9c0b5f4aa004df
X-Google-Attributes: gid11038b,public
From: cbbrowne@news.brownes.org (Christopher B. Browne)
Subject: Re: [Q]: Can I write X window program using C++?
Date: 1998/09/27
Message-ID: <slrn70r4sd.1a.cbbrowne@godel.brownes.org>
X-Deja-AN: 395206665
References: <36061a79.0@ruby.hknet.com>    <906839739snz@vision25.demon.co.uk>  <6ujrtv$pgb@dfw-ixnews8.ix.netcom.com>
Organization: Hex.Net Superhighway, DFW Metroplex 817-329-3182
Reply-To: cbbrowne@hex.net
Newsgroups: comp.windows.x,comp.windows.x.intrinsics,gnu.gcc