Foundations of GTK+ Development (eBook)

eBook Download: PDF
2007 | 1st ed.
XXIV, 630 Seiten
Apress (Verlag)
978-1-4302-0386-5 (ISBN)

Lese- und Medienproben

Foundations of GTK+ Development -  Andrew Krause
Systemvoraussetzungen
52,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

There are only two mainstream solutions for building the graphical interface of Linux-based desktop applications, and GTK+ (GIMP Toolkit) is one of them. It is a necessary technology for all Linux programmers. This book guides the reader through the complexities of GTK+, laying the groundwork that allows the reader to make the leap from novice to professional. Beginning with an overview of key topics such as widget choice, placement, and behavior, readers move on to learn about more advanced issues. Replete with real-world examples, the developer can quickly take advantages of the concepts presented within to begin building his own projects.



Andrew Krause is the creator of OpenLDev, an integrated development environment that focuses on C, C++, Gtk+, and Gtkmm project management. He is attending Pennsylvania State University with a major in computer engineering. Andrew has eight years of experience with many computer and web programming languages such as C, C++, Perl, PHP, and others. He also designs flight hardware for the Low Ionosphere Measurement Satellite project at Penn State.
GTK+ is one of the most influential graphical toolkits for the Linux operating system. It is the technology upon which the GNOME and XFCE desktop environments are based, and its crucial to have clear understanding of its complexities to build even a simple Linux desktop application. Foundations of GTK+ Development guides you through these complexities, laying the foundation that will allow you to cross from novice to professional.Foundations of GTK+ Development is aimed at C programmers and presents numerous real-life examples that you can immediately put to use in your projects. Some familiarity with C programming is assumed, as the book delves into new topics from the beginning. Topics like object inheritance are covered early on to allow for complete understanding of code examples later. And the provided examples are real-life situations that can help you get a head start on your own applications.

Andrew Krause is the creator of OpenLDev, an integrated development environment that focuses on C, C++, Gtk+, and Gtkmm project management. He is attending Pennsylvania State University with a major in computer engineering. Andrew has eight years of experience with many computer and web programming languages such as C, C++, Perl, PHP, and others. He also designs flight hardware for the Low Ionosphere Measurement Satellite project at Penn State.

Contents at a Glance 5
Contents 6
About the Author 16
Acknowledgments 17
Introduction 18
Who Should Read This Book 18
How This Book Is Organized 19
Conventions 20
What You Need 20
Official Web Site 21
Getting Started 22
A Brief History of GTK+ 23
The X Window System 23
GTK+ and Supporting Libraries 24
Language Bindings 30
Installing GTK+ 31
Summary 33
Your First GTK+ Applications 35
Hello World 35
Using GCC and pkg-config to Compile 41
Extending “Hello World” 43
Signals and Callbacks 47
Events 49
Further GTK+ Functions 52
Buttons 56
Widget Properties 58
Test Your Understanding 60
Summary 61
Container Widgets 62
GtkContainer 62
Horizontal and Vertical Boxes 65
Horizontal and Vertical Panes 69
Tables 72
Fixed Containers 76
Expanders 79
Handle Boxes 81
Notebooks 83
Event Boxes 87
Test Your Understanding 91
Summary 92
Basic Widgets 93
Using Stock Items 93
Toggle Buttons 95
Text Entries 102
Spin Buttons 106
Horizontal and Vertical Scales 109
Widget Styles 111
Additional Buttons 115
Test Your Understanding 126
Summary 128
Dialogs 129
Creating Your Own Dialogs 129
Built-in Dialogs 140
Dialogs with Multiple Pages 164
Test Your Understanding 174
Summary 174
Using GLib 176
GLib Basics 177
Message Logging 181
Memory Management 182
Utility Functions 188
The Main Loop 196
Data Types 201
Input-Output Channels 218
Dynamic Modules 229
Test Your Understanding 232
Summary 234
The Text View Widget 236
Scrolled Windows 236
Text Views 241
Text Iterators and Marks 248
Text Tags 263
Inserting Images 269
Inserting Child Widgets 271
GtkSourceView 273
Test Your Understanding 275
Summary 276
The Tree View Widget 277
Parts of a Tree View 278
Using GtkListStore 282
Using GtkTreeStore 290
Referencing Rows 294
Adding Rows and Handling Selections 298
Editable Text Renderers 308
Cell Data Functions 311
Cell Renderers 315
Test Your Understanding 329
Summary 330
Menus and Toolbars 331
Pop-up Menus 331
Keyboard Accelerators 337
Status Bar Hints 339
Menu Items 344
Menu Bars 346
Toolbars 349
Toolbar Items 351
Dynamic Menu Creation 355
Custom Stock Items 364
Test Your Understanding 368
Summary 368
Dynamic User Interfaces 370
User Interface Design 370
The Glade User Interface Builder 374
Using Libglade 387
Test Your Understanding 393
Summary 393
Creating Custom Widgets 395
Deriving New Widgets 395
Creating a Widget from Scratch 421
Implementing Interfaces 439
Test Your Understanding 443
Summary 444
Additional GTK+ Widgets 445
Drawing Widgets 445
Calendars 451
Status Icons 453
Printing Support 455
Cairo Drawing Context 466
Recent Files 469
Automatic Completion 480
Test Your Understanding 482
Summary 483
Putting It All Together 484
File Browser 484
Calculator 485
Hangman 486
Ping Utility 487
Calendar 488
Further Resources 490
Summary 492
GTK+ Properties 493
GTK+ Properties 493
Child Widget Properties 537
GTK+ Signals 541
Events 541
Widget Signals 545
GTK+ Styles 576
Default RC File Styles 576
Pango Text Markup Language 578
GtkTextTag Styles 580
Widget Style Properties 583
GTK+ Stock Items 593
GError Types 597
Exercise Solutions and Hints 604
Exercise 2-1. Using Events and Properties 604
Exercise 2-2. GObject Property System 605
Exercise 3-1. Using Multiple Containers 605
Exercise 3-2. Even More Containers 606
Exercise 4-1. Renaming Files 606
Exercise 4-2. Spin Buttons and Scales 607
Exercise 5-1. Implementing File Chooser Dialogs 607
Exercise 6-1. Working with Files 607
Exercise 6-2. Timeout Functions 608
Exercise 7-1. Text Editor 608
Exercise 8-1. File Browser 609
Exercise 9-1. Toolbars 610
Exercise 9-2. Menu Bars 610
Exercise 10-1. Glade Text Editor 611
Exercise 10-2. Glade Text Editor with Menus 611
Exercise 11-1. Expanding MyMarquee 612
Exercise 12-1. Full Text Editor 613
Index 614

Erscheint lt. Verlag 9.9.2007
Zusatzinfo XXIV, 630 p.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Betriebssysteme / Server
Schlagworte Development • interaction • Interface • interfaces • Linux • operating system • programming • User Experience • user interface • User Interfaces
ISBN-10 1-4302-0386-2 / 1430203862
ISBN-13 978-1-4302-0386-5 / 9781430203865
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 4,6 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Das Praxisbuch für Administratoren und DevOps-Teams

von Axel Miesen

eBook Download (2022)
Rheinwerk Computing (Verlag)
39,90