E-Book, Englisch, 630 Seiten
Krause Foundations of GTK+ Development
1. ed
ISBN: 978-1-4302-0386-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
E-Book, Englisch, 630 Seiten
ISBN: 978-1-4302-0386-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
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.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;5
2;Contents;6
3;About the Author;16
4;Acknowledgments;17
5;Introduction;18
5.1;Who Should Read This Book;18
5.2;How This Book Is Organized;19
5.3;Conventions;20
5.4;What You Need;20
5.5;Official Web Site;21
6;Getting Started;22
6.1;A Brief History of GTK+;23
6.2;The X Window System;23
6.3;GTK+ and Supporting Libraries;24
6.4;Language Bindings;30
6.5;Installing GTK+;31
6.6;Summary;33
7;Your First GTK+ Applications;35
7.1;Hello World;35
7.2;Using GCC and pkg-config to Compile;41
7.3;Extending “Hello World”;43
7.4;Signals and Callbacks;47
7.5;Events;49
7.6;Further GTK+ Functions;52
7.7;Buttons;56
7.8;Widget Properties;58
7.9;Test Your Understanding;60
7.10;Summary;61
8;Container Widgets;62
8.1;GtkContainer;62
8.2;Horizontal and Vertical Boxes;65
8.3;Horizontal and Vertical Panes;69
8.4;Tables;72
8.5;Fixed Containers;76
8.6;Expanders;79
8.7;Handle Boxes;81
8.8;Notebooks;83
8.9;Event Boxes;87
8.10;Test Your Understanding;91
8.11;Summary;92
9;Basic Widgets;93
9.1;Using Stock Items;93
9.2;Toggle Buttons;95
9.3;Text Entries;102
9.4;Spin Buttons;106
9.5;Horizontal and Vertical Scales;109
9.6;Widget Styles;111
9.7;Additional Buttons;115
9.8;Test Your Understanding;126
9.9;Summary;128
10;Dialogs;129
10.1;Creating Your Own Dialogs;129
10.2;Built-in Dialogs;140
10.3;Dialogs with Multiple Pages;164
10.4;Test Your Understanding;174
10.5;Summary;174
11;Using GLib;176
11.1;GLib Basics;177
11.2;Message Logging;181
11.3;Memory Management;182
11.4;Utility Functions;188
11.5;The Main Loop;196
11.6;Data Types;201
11.7;Input-Output Channels;218
11.8;Dynamic Modules;229
11.9;Test Your Understanding;232
11.10;Summary;234
12;The Text View Widget;236
12.1;Scrolled Windows;236
12.2;Text Views;241
12.3;Text Iterators and Marks;248
12.4;Text Tags;263
12.5;Inserting Images;269
12.6;Inserting Child Widgets;271
12.7;GtkSourceView;273
12.8;Test Your Understanding;275
12.9;Summary;276
13;The Tree View Widget;277
13.1;Parts of a Tree View;278
13.2;Using GtkListStore;282
13.3;Using GtkTreeStore;290
13.4;Referencing Rows;294
13.5;Adding Rows and Handling Selections;298
13.6;Editable Text Renderers;308
13.7;Cell Data Functions;311
13.8;Cell Renderers;315
13.9;Test Your Understanding;329
13.10;Summary;330
14;Menus and Toolbars;331
14.1;Pop-up Menus;331
14.2;Keyboard Accelerators;337
14.3;Status Bar Hints;339
14.4;Menu Items;344
14.5;Menu Bars;346
14.6;Toolbars;349
14.7;Toolbar Items;351
14.8;Dynamic Menu Creation;355
14.9;Custom Stock Items;364
14.10;Test Your Understanding;368
14.11;Summary;368
15;Dynamic User Interfaces;370
15.1;User Interface Design;370
15.2;The Glade User Interface Builder;374
15.3;Using Libglade;387
15.4;Test Your Understanding;393
15.5;Summary;393
16;Creating Custom Widgets;395
16.1;Deriving New Widgets;395
16.2;Creating a Widget from Scratch;421
16.3;Implementing Interfaces;439
16.4;Test Your Understanding;443
16.5;Summary;444
17;Additional GTK+ Widgets;445
17.1;Drawing Widgets;445
17.2;Calendars;451
17.3;Status Icons;453
17.4;Printing Support;455
17.5;Cairo Drawing Context;466
17.6;Recent Files;469
17.7;Automatic Completion;480
17.8;Test Your Understanding;482
17.9;Summary;483
18;Putting It All Together;484
18.1;File Browser;484
18.2;Calculator;485
18.3;Hangman;486
18.4;Ping Utility;487
18.5;Calendar;488
18.6;Further Resources;490
18.7;Summary;492
19;GTK+ Properties;493
19.1;GTK+ Properties;493
19.2;Child Widget Properties;537
20;GTK+ Signals;541
20.1;Events;541
20.2;Widget Signals;545
21;GTK+ Styles;576
21.1;Default RC File Styles;576
21.2;Pango Text Markup Language;578
21.3;GtkTextTag Styles;580
21.4;Widget Style Properties;583
22;GTK+ Stock Items;593
23;GError Types;597
24;Exercise Solutions and Hints;604
24.1;Exercise 2-1. Using Events and Properties;604
24.2;Exercise 2-2. GObject Property System;605
24.3;Exercise 3-1. Using Multiple Containers;605
24.4;Exercise 3-2. Even More Containers;606
24.5;Exercise 4-1. Renaming Files;606
24.6;Exercise 4-2. Spin Buttons and Scales;607
24.7;Exercise 5-1. Implementing File Chooser Dialogs;607
24.8;Exercise 6-1. Working with Files;607
24.9;Exercise 6-2. Timeout Functions;608
24.10;Exercise 7-1. Text Editor;608
24.11;Exercise 8-1. File Browser;609
24.12;Exercise 9-1. Toolbars;610
24.13;Exercise 9-2. Menu Bars;610
24.14;Exercise 10-1. Glade Text Editor;611
24.15;Exercise 10-2. Glade Text Editor with Menus;611
24.16;Exercise 11-1. Expanding MyMarquee;612
24.17;Exercise 12-1. Full Text Editor;613
25;Index;614




