Introduction to the C ++ GUI Library

Source: Internet
Author: User
Tags gtk wxwidgets

From: http://www.ithao123.com/cpluspluslib/0003.html

In C ++, the database status is very high. Mr. Bjarne stroustrup, father of C ++, has repeatedly said that designing libraries to Expand functions is better than designing more syntaxes. In reality, C ++ has a wide variety of database categories and has a wide range of solutions, from lightweight to heavyweight. Many of them are the masterpiece of thinking that opens your eyes or sighs with hope. Because the number of databases is very large and limited to the author's level, many of them do not know. Therefore, some libraries mentioned in this article are well-known large databases.

Introduction to major libraries in C ++-Gui

Among the many c ++ libraries, the GUI library is prosperous and attractive. In actual development, the selection of GUI Libraries is also very important. Next we will summarize the available GUI Libraries, their respective features, and the support of related tools.

1. MFC

The well-known Microsoft Foundation Class Library ). Anyone who has studied VC ++ should know this library. Although from a technical point of view, MFC is not very beautiful, but it is built on Windows API, can makeProgramEasier work and high programming efficiency, which reduces the numberCodeIt also provides all the advantages of General C ++ programming, such as inheritance and encapsulation. The program compiled by MFC can be transplanted on Windows operating systems of various versions. For example, the code written in Windows 3.1 can be easily transplanted to Windows NT or Windows 95. However, the recent development and official support have become increasingly weak.

2. QT

Reference: http://www.trolltech.com

QT is a multi-platform C ++ graphical user interface application framework of trolltech. It provides the functions required for application developers to create an artistic graphical user interface. QT is fully object-oriented and easily scalable, and allows true component programming. Since the beginning of 1996, QT has entered the business field and has become the basis for thousands of successful applications around the world. QT is also the basis for the popular Linux Desktop Environment KDE. It also supports windows, Macintosh, UNIX/X11, and other platforms.

3. wxwindows

Reference: http://www.wxwindows.org

Cross-platform GUI library. Because its class level is very similar to MFCArticleThis article introduces how to port code from MFC to wxwindows to implement cross-platform functions. After years of development, it is also an increasingly sophisticated GUI library, supporting the same two libraries. And is completely openSource code. The recent C ++ builder x GUI designer is based on this library.

4. Fox

Reference Site: http://www.fox-toolkit.org/

Open-source GUI library. From my own development experience, the author has come up with a feeling of what an ideal GUI library should look like and started development of this library. If you are interested, try it.

5. wtl

A library based on ATL. Because a large number of lightweight ATL techniques, templates, and other technologies are used, they are well positioned in terms of code size and speed optimization. The main target audience is the developer who develops com lightweight visual controls for download from the network.

6. GTK

Reference Site: http://gtkmm.sourceforge.net/

GTK is a well-known C open-source GUI library. There are killer applications like gnome in the Linux World. QT is the c ++ package version of the library.

 

1. GTK +

GTK + Basics

GTK + was initially a dedicated gimp Development Library and later developed as one of the mainstream development tools for developing graphic interfaces in Linux. GTK + 2.0 is a free software and part of the GNU project. The GTK + 2.0 license agreement is lgpl.

GTK + is developed in C language, but its designers use object-oriented technology. C ++ (gtkmm), Perl, Ruby, Java, and Python (pygtk) bindings are provided on the gnome platform. Other bindings include Ada, D, Haskell, PHP, and all. netProgramming Language.

Unlike many other component toolboxes, GTK + is not based on XT. Advantages and disadvantages of this decision: GTK + can be applied to other systems, and its flexibility is strong. However, GTK + cannot use the x resource database customized for X11 using the traditional method.

Glade is an interface design tool, but it also contains an XML language that describes the GUI. It works with libglade to directly use GTK and gnome controls.

2. QT

Qt Introduction

QT is a product of trolltech.
QT is a multi-platform C ++ graphical user interface application framework. It provides the functions required for application developers to create an artistic graphical user interface. QT is fully object-oriented and easily scalable, and allows true component programming.

Since the beginning of 1996, QT has entered the business field and has become the basis for thousands of successful applications around the world. QT is also the basis for the popular Linux Desktop Environment Kde, which is a standard component of all major Linux distributions.

Qt supports the following platforms: MS/Windows-95, 98, NT 4.0, me, and 2000
UNIX/X11-Linux, Sun Solaris, HP-UX, Compaq Tru64 UNIX, ibm aix, sgi irix, and many other X11 platforms
Macintosh-Mac OS X
Embedded-a linux Platform Supported by framebuffer.

3. wxWidgets

Open-Source Software (lgpl) is a cross-platform tool set for C ++, Python, and Perl.

For more information, see wxwindows
As a C ++ GUI library, wxwidget has been developing from 1992 to the present, and has had a great influence in the world. There are countless pieces of software that uses this class library for GUI development.

WxWidgets, formerly known as wxwindows, is a project started by Julian smart in 1992 at the University of Edinburgh Artificial Intelligence Application Research Institute. Julian smart is now the technical director of anthemion software.

To put it simply, wxWidgets provides a complete set of easy-to-use APIs for developing GUI applications on multiple platforms. WxWidgets supports multiple platforms including
Windows 3.1/95/98/NT/2000/XP, with Motif
Unix of version 1.2 or later, Unix/Linux/* BSD with GTK +, and Mac. Developers only need to use the compiler of their own system platform to compile the source program and link it
The generated program code has the appearance and interface of the platform. Based on these guis, wxWidgets also provides online help, network programming, stream processing, and support for multiple Common graphic formats.
Support, database support, HTML viewing and printing, and other powerful functions.

WxWidgets supports a variety of popular compilers on Windows, including:
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

 

A major attraction of wxWidgets and GTK + is that its wxWidgets 2 Licence type belongs to lgpl (lesser
General Public License
), That is to say, the software used for development does not necessarily have to make the source code public. In this way, both free software developers, GPL software developers, and pure commercial software developers are free to use.
This package.

In contrast, trolltech's QT seems to be affected by this factor because the cost paid by the person who develops the commercial software using QT
Developers are still relatively expensive, and the platform is divided into single platforms, two platforms, and three platforms (that is, QT/X11, QT/windows, and QT/MAC are included) three different product packages
Different Editions of professional and enterprise are also priced at different prices, and the number of developers varies.

From this point, wxWidgets is absolutely advantageous.In addition, QT originated from the development on Linux and was later promoted to other platforms such as Windows and Mac. wxWidgets, on the contrary, started in windows and then transplanted to other platforms such as UNIX.

 

For lgpl (lesser General Public License) license, this is GNU
A non-strict license in the license family. Lgpl allows anyone to use the functions provided by the library
The user is required to publish the application code. (This is very important for many industrial applications, because the previous protocol may be acceptable. In this case, it is obviously unrealistic not to open code or public code .) Enable
With lgpl license, you can be either open source codeCommunityA good partner can also be a good citizen.

See http://gnu.freehostingguru.com/lgpl/ for informal Chinese Translation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.