Talk:Window creation/X11: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Too many GUI libraries)
Line 8: Line 8:
:::: OK, but you should admit that creating a window with GTK or the Xlib are 2 things very different. The area of use are even at the opposite! [[User:Blue Prawn|Blue Prawn]] 20:48, 18 November 2008 (UTC)
:::: OK, but you should admit that creating a window with GTK or the Xlib are 2 things very different. The area of use are even at the opposite! [[User:Blue Prawn|Blue Prawn]] 20:48, 18 November 2008 (UTC)
:::::They should probably be in different examples if they're so different (I've never used either...Java programmers have Swing and AWT), but if they accomplish the same task they should be in the same task.--[[User:Mwn3d|Mwn3d]] 20:59, 18 November 2008 (UTC)
:::::They should probably be in different examples if they're so different (I've never used either...Java programmers have Swing and AWT), but if they accomplish the same task they should be in the same task.--[[User:Mwn3d|Mwn3d]] 20:59, 18 November 2008 (UTC)
:::::: The problem is caused by the fact that for C and C++, unlike for Java, there's no standard library for GUI, anf there's a large set of different GUI libraries, which all differ in supported operating systems, supported desktop environments, license, ...
:::::: To just give a "short", non-comprehensive list of GUI toolkits usable from C++: raw Windows API, Xlib, Carbon, MFC, Xt, Motif, Gtk+, Qt, wxWidgets, Ultimate++, ...
:::::: Of course, one could restrict to the basic GUI facility of the corresponding platform, i.e. raw Windows API for Windows, Xlib for Linux/Unix (AFAIK X is the only relevant windowing system on Unix-type systems) etc. But then, most non-trivial programs are not written using those low-level APIs (well, for X, in principle one could even go one level lower and explicitly use the X protocol to communicate with the server, but that's even more unlikely to be used in any serious program). --[[User:Ce|Ce]] 13:46, 19 November 2008 (UTC)

Revision as of 13:46, 19 November 2008

These examples should be included under User Output - graphical. --Short Circuit 01:59, 18 November 2008 (UTC)

They should also (obviously) be changed to display "Goodbye, World!"--Mwn3d 02:27, 18 November 2008 (UTC)
Currently there is a problem with the page User Output - graphical, for most languages you can fill the task with GTK or Qt or Tk or Xlib or still other things so if each lib was filled for each language the page would become too large.
Also as the task does not tell to give one example by available GUI lib, the contributors have chose one or two, but don't provide something exhaustive.
So IMO, the page User Output - graphical should be split by GUI libs, and if you wish to keep this page around, for each language give a link until the available sub-examples, for example for OCaml I would give a link to this current page Xlib_simple_window#OCaml and also Tk_simple_window#OCaml and GTK_simple_window#OCaml...
Blue Prawn 18:42, 18 November 2008 (UTC)
That page is too simple a task to split up by library I think. If I just want to know how to make a window in a language, I don't care what library I use. Splitting it by library might also make the pages too small if one language has a library available to it that another doesn't. I think it works fine to have the examples marked with the libraries they use just so that all of the examples for one language are in one place. --Mwn3d 20:08, 18 November 2008 (UTC)
OK, but you should admit that creating a window with GTK or the Xlib are 2 things very different. The area of use are even at the opposite! Blue Prawn 20:48, 18 November 2008 (UTC)
They should probably be in different examples if they're so different (I've never used either...Java programmers have Swing and AWT), but if they accomplish the same task they should be in the same task.--Mwn3d 20:59, 18 November 2008 (UTC)
The problem is caused by the fact that for C and C++, unlike for Java, there's no standard library for GUI, anf there's a large set of different GUI libraries, which all differ in supported operating systems, supported desktop environments, license, ...
To just give a "short", non-comprehensive list of GUI toolkits usable from C++: raw Windows API, Xlib, Carbon, MFC, Xt, Motif, Gtk+, Qt, wxWidgets, Ultimate++, ...
Of course, one could restrict to the basic GUI facility of the corresponding platform, i.e. raw Windows API for Windows, Xlib for Linux/Unix (AFAIK X is the only relevant windowing system on Unix-type systems) etc. But then, most non-trivial programs are not written using those low-level APIs (well, for X, in principle one could even go one level lower and explicitly use the X protocol to communicate with the server, but that's even more unlikely to be used in any serious program). --Ce 13:46, 19 November 2008 (UTC)