1、GTK+? (Gtkmm)
GTK+基礎
GTK+最初是GIMP的專用開發庫,后來發展為Linux下開發圖形界面的應用程序的主流開發工具之一。GTK+2.0是自由軟件,并且是GNU工程的一部分。GTK+2.0的許可協議是LGPL。
GTK+使用C語言開發,但是其設計者使用面向對象技術。 在GNOME平臺上提供了C++(gtkmm)、Perl、Ruby、Java和Python(PyGTK)綁定,其他的綁定有Ada、 D、 Haskell、PHP和所有的.NET編程語言。
與其他很多部件工具箱不同,GTK+并不基于Xt。這一決策優劣互見:優點是GTK+可以應用于其他系統,其靈活性也很強;而缺點就是它無法利用以傳統方法為X11定制的X資源數據庫。
Glade是一個界面設計工具,但是它也包含了一種描述GUI界面的XML語言,它和libglade一起工作就可以直接使用GTK和GNOME控件。
2、Qt
Qt簡介
Qt是Trolltech公司的一個產品。
Qt是一個多平臺的C++圖形用戶界面應用程序框架。它提供給應用程序開發者建立藝術級的圖形用戶界面所需的所用功能。Qt是完全面向對象的很容易擴展,并且 允許真正地組件編程。
自從1996年早些時候,Qt進入商業領域,它已經成為全世界范圍內數千種成功的應用 程序的基礎。Qt也是流行的Linux桌面環境KDE 的基礎,KDE是所有主要的Linux發行版的一個標準組件。
Qt支持下述平臺: MS/Windows - 95、98、NT 4.0、ME、和2000
Unix/X11 - Linux、Sun Solaris、HP-UX、Compaq Tru64 UNIX、IBM AIX、SGI IRIX和其它很多X11平臺
Macintosh - Mac OS X
Embedded - 有幀緩沖(framebuffer)支持的Linux平臺。
3、wxWidgets
開源軟件(LGPL),針對C++、Python以及Perl的跨平臺工具集。
詳細介紹,參見細述 wxWindows
wxWidget作為一個C++ GUI Library從1992發展到現在,已經在全球范圍內產生了極大的影響力,利用這個類庫進行GUI開發的軟件更是不計其數。
wxWidgets原名wxWindows,是由Julian Smart于1992年還在英國愛丁堡大學人工智能應用研究所開始的一個項目。Julian Smart現在是Anthemion軟件公司的技術總監。
簡單地說,wxWidgets提供了用于可在多平臺上開發GUI應用程序的一整套簡單易學易用的API。wxWidgets支持的多平臺包括
Windows 3.1/95/98/NT/2000/XP、帶有Motif
1.2版本以上的Unix、帶有GTK+的Unix/Linux/*BSD、Mac等等。開發者只需要用自己使用的系統平臺的編譯器編譯源程序,并鏈接上
相應的庫文件,生成的程序代碼即具有該平臺的外觀和界面。在這些GUI之上,wxWidgets還提供了在線幫助、網絡編程、流處理、多種常用圖形格式支
持、數據庫支持、HTML察看和打印,等等各種強大的功能。
wxWidgets支持的Windows上的多種流行編譯器包括:
Visual C++ 1.5, 4.0, 5.0, 6.0
Borland C++ 4.5, 5.0
Borland C++ Builder 1.0, 3.0
Watcom C++ 10.6 (Win32)
Cygwin
MinGW32
Metrowerks CodeWarrior 4
4、Fox
What is FOX?
FOX is a C++ based Toolkit for developing Graphical User Interfaces easily and
effectively. It offers a wide, and growing, collection of Controls, and provides
state of the art facilities such as drag and drop, selection, as well as OpenGL
widgets for 3D graphical manipulation. FOX also implements icons, images, and
user-convenience features such as status line help, and tooltips.
Tooltips may even be used for 3D objects!
Considerable importance has been placed on making FOX one of the fastest
toolkits around, and to minimize memory use:- FOX uses a number of techniques
to speed up drawing and spatial layout of the GUI. Memory is conserved by
allowing programmers to create and destroy GUI elements on the fly.
Even though FOX offers a large collection of Controls already, FOX leverages C++
to allow programmers to easily build additional Controls and GUI elements,
simply by taking existing controls, and creating a derived class which simply
adds or redefines the desired behavior.
One of the prime design goals of FOX is the ease of programming; thus, most
controls can be created using a single line of C++ code; most parameters have
sensible default values, so that they may be omitted, and layout managers ensure
that designers of GUI's do not have to worry about precise alignments.
Another nice feature of FOX which significantly reduces the number of lines of
code which have to be written is FOX's ability to have widgets connect to each
other, and passing certain commands between them; for example, a menu entry Hide
Toolbar can be directly connected to the Toolbar, and cause it to hide.
Finally, FOX makes it easy to maintain the state of the GUI in an application
by having the GUI elements automatically updating themselves by interrogating
the application's state. This feature eliminates the large amount of effort that
may go into sensitizing, graying out, checking/unchecking etc. depending on
the application state.
FOX is Platform Independence!
|
The list of platforms is growing! Currently, we have FOX
running on a large number of operating systems, ranging from Linux,
FreeBSD, SGI IRIX, HP-UX, IBM AIX, SUN Solaris, DEC/Compaq Tru64 UNIX,
to MS-Window operating systems like Windows 9x, Windows NT, Windows ME
and Windows 2000. Since most of the FOX implementation is completely
oblivious to the underlying platform (in many cases it is not even
including header files), applications work virtually identically on all
these platforms.
For example, here is the FOX textedit sample application running under Windows NT.? And here is the same application running on a Silicon
GraphicsOctane system.
個人比較喜歡Gtkmm,代碼比較干凈,只有GUI,但在Windows下的效果似乎沒有原生的Window控件好
Features
- Use inheritance to derive custom widgets.
- Type-safe signal handlers, in standard C++.
- Polymorphism.
- Use of Standard C++ Library, including strings, containers, and iterators.
- Full internationalisation with UTF8.
- Complete C++ memory management
- Object composition
- Automatic deallocation of dynamically allocated widgets.
- Full use of C++ namespaces.
- No macros.
- Cross-platform:
Linux (gcc), FreeBSD (gcc), NetBSD (gcc), Solaris (gcc, Forte), Win32
(gcc, MSVC++ .Net 2003), MacOS X (gcc), others
- Free software and free of cost for both Open Source and
proprietary development.
- Discussed, designed and implemented in public.