Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > e40b0b2b839eccdb3c85993a7b738115 > files > 184

gtkmm-documentation-3.24.0-1.mga7.noarch.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gtkmm</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Programming with gtkmm 3">
<link rel="up" href="chapter-introduction.html" title="Chapter 1. Introduction">
<link rel="prev" href="chapter-introduction.html" title="Chapter 1. Introduction">
<link rel="next" href="chapter-installation.html" title="Chapter 2. Installation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">gtkmm</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="chapter-introduction.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<th width="60%" align="center">Chapter 1. Introduction</th>
<td width="20%" align="right"> <a accesskey="n" href="chapter-installation.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sec-gtkmm"></a>gtkmm</h2></div></div></div>
<p>
<span class="application">gtkmm</span> is a C++ wrapper for
<a class="ulink" href="http://www.gtk.org/" target="_top">GTK+</a>,
a library used to create graphical user
interfaces. It is licensed using the LGPL license, so you can develop
open software, free software, or even commercial non-free software
using <span class="application">gtkmm</span> without purchasing licenses.
</p>
<p><span class="application">gtkmm</span> was originally named gtk-- because GTK+ already has a + in the name. However, as -- is not easily indexed by search engines the package generally went by the name <span class="application">gtkmm</span>, and that's what we stuck with.</p>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="why-use-gtkmm"></a>Why use <span class="application">gtkmm</span> instead of GTK+?</h3></div></div></div>
<p><span class="application">gtkmm</span> allows you to write code using normal C++ techniques such as encapsulation, derivation, and polymorphism. As a C++ programmer you probably already realise that this leads to clearer and better organized code.</p>
<p><span class="application">gtkmm</span> is more type-safe, so the compiler can detect errors that would only be detected at run time when using C. This use of specific types also makes the API clearer because you can see what types should be used just by looking at a method's declaration.</p>
<p>Inheritance can be used to derive new widgets. The derivation of new widgets in GTK+ C code is so complicated and error prone that almost no C coders do it. As a C++ developer you know that derivation is an essential Object Orientated technique.</p>
<p>Member instances can be used, simplifying memory management. All GTK+ C widgets are dealt with by use of pointers. As a C++ coder you know that pointers should be avoided where possible.</p>
<p><span class="application">gtkmm</span> involves less code compared to GTK+, which uses prefixed function names and lots of cast macros.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="gtkmm-vs-qt"></a><span class="application">gtkmm</span> compared to Qt</h3></div></div></div>
<p>Trolltech's Qt is the closest competition to <span class="application">gtkmm</span>, so it deserves discussion.</p>
<p><span class="application">gtkmm</span> developers tend to prefer <span class="application">gtkmm</span> to Qt because <span class="application">gtkmm</span> does things in a more C++ way. Qt originates from a time when C++ and the standard library were not standardised or well supported by compilers. It therefore duplicates a lot of stuff that is now in the standard library, such as containers and type information. Most significantly, Trolltech modified the C++ language to provide signals, so that Qt classes cannot be used easily with non-Qt classes. <span class="application">gtkmm</span> was able to use standard C++ to provide signals without changing the C++ language.
See the <a class="ulink" href="https://wiki.gnome.org/Projects/gtkmm/FAQ" target="_top">FAQ</a> for more detailed differences.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="gtkmm-is-a-wrapper"></a><span class="application">gtkmm</span> is a wrapper</h3></div></div></div>
<p>
<span class="application">gtkmm</span> is not a native C++ toolkit, but a C++ wrapper of a C toolkit. This separation of interface and implementation has advantages. The <span class="application">gtkmm</span> developers spend most of their time talking about how <span class="application">gtkmm</span> can present the clearest API, without awkward compromises due to obscure technical details. We contribute a little to the underlying GTK+ code base, but so do the C coders, and the Perl coders and the Python coders, etc. Therefore GTK+ benefits from a broader user base than language-specific toolkits - there are more implementers, more developers, more testers, and more users.</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="chapter-introduction.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<td width="20%" align="center"><a accesskey="u" href="chapter-introduction.html"><img src="icons/up.png" alt="Up"></a></td>
<td width="40%" align="right"> <a accesskey="n" href="chapter-installation.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 1. Introduction </td>
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td>
<td width="40%" align="right" valign="top"> Chapter 2. Installation</td>
</tr>
</table>
</div>
</body>
</html>