Sujet : Re: 'Graphics' of libwy
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c++Date : 17. Dec 2024, 17:30:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjs8uq$1qgh4$1@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 17/12/2024 17:02,
Muttley@DastardlyHQ.org wrote:
On Tue, 17 Dec 2024 16:38:49 +0200
Paavo Helde <eesnimi@osa.pri.ee> wibbled:
On 17.12.2024 02:41, Lynn McGuire wrote:
On 12/15/2024 4:04 AM, wij wrote:
I had headache whenevr I think about graphics in C++. Why C++ does not
provide
a graphics library (lots complaint about this), not even a simplest
one for
demonstrating its 'power' of C++ itself? Then, I suddenly realized
that the
minimal answer is already there because the resolution of modern text
screen
(emulator) is barely enough (width can be >320).
...
>
I totally agree that C++ should have a graphics library and a user
interface library both.
>
Have you looked at
https://wxwidgets.org/
>
"wxWidgets is a C++ library that lets developers create applications for
Windows, macOS, Linux and other platforms with a single code base. It
has popular language bindings for Python, Ruby, Lua, Perl and several
other languages, and unlike other cross-platform toolkits, wxWidgets
gives applications a truly native look and feel because it uses the
platform's native API rather than emulating the GUI. It's also
extensive, free, open-source and mature."
>
wxWidgets does work and is better than MFC, but not extremely so. Also,
it is not exactly light-weight, a git checkout is 803 MB. Good luck for
the standards committee to standardize anything like that.
>
Also, wxWidgets would be only part of the solution, it would still need
a graphics back-end for actually drawing anything, plus some fonts for
rendering texts. On some platforms the graphics back-end is built into
the OS, on others it is not.
Does wx do 3D stuff? If not you'd need yet another library to do that too.
Personally I'd go with Qt. Its mature and cross platform and does what 99%
of most people need.
No, it doesn't come close to that. It's a solid gui library with lots of extra tools, and is useful to many people - but it's nothing remotely like you suggest.
It has a license that is totally unsuitable for standardisation. I'm not complaining about the license - the people that wrote the library get to pick the license. But a standard C++ gui library, if such a thing is ever made, has to have a very liberal license - BSD/MIT at most.
And Qt is hardly a lightweight choice either.
The other big issue I see with wx and Qt are that they are /old/ - very old. Maturity is not a benefit if there is to be a standard C++ gui library - it needs to be something that makes use of modern features of C++, not something that is grounded in C++98 and an API that is barely above a C-style library, with home-made classes for strings, lists, threads, and just about everything else.
I think if there is ever going to be a standard gui library for C++, it will be written specially for the purpose. That has some big advantages - if the designers decide they need extra language features for signals and slots, for example, then those can be added to the language rather than using an external tool.