1. Trang chủ
  2. » Công Nghệ Thông Tin

apress foundations_of gtk plus development 2007 phần 1 pot

77 304 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Table of Content

  • Chapter 1

  • Chapter 2

  • Chapter 3

Nội dung

this print for content only—size & color not accurate spine = 1.235" 656 page count Books for professionals By professionals ® Foundations of GTK+ Development Dear Reader, Maybe you have a great idea for the world’s next killer application. Or perhaps you just want to add a simple graphical interface to that clumsy command-line utility. No matter the goal, developers regularly look to the open source toolkit known as GTK+ to build sophisticated graphical interfaces. But learning how to effectively use GTK+ can be a daunting task. Some features can be difficult to understand, and online documentation is often scant. Figuring out where to begin may be even trickier, since GTK+ depends on so many libraries. For these reasons, I decided to write a practical guide to GTK+ development. Because so many newcomers struggle with simply getting started using GTK+, I thought it appropriate to dirty your hands as quickly as possible. After devoting Chapter 1 to an overview of key concepts, I will show you how to create, compile, and execute your first application. The chapters that follow introduce you to the wide variety of widgets and signals at your disposal, which embody your application’s look and behavior respectively. To cement your knowledge, along the way we will create several interesting applications such as a file browser and a text editor. By the time you complete the last chapter, you will be able to implement very complex GUI applications. I wrote this book to be not only a practical tutorial but also a reasonably complete reference. To that end, I’ve included an extensive array of appendixes covering object properties, widget signals, style properties, stock items, and GError types; the information they contain will become indispensable as you begin writing your own applications. Andrew Krause US $49.99 Shelve in Linux User level: Beginner–Intermediate Krause GTK+ Development The eXperT’s Voice ® in open source Foundations of GTK+ Development cyan MaGenTa yelloW Black panTone 123 c Andrew Krause Companion eBook Available THE APRESS ROADMAP Foundations of Qt ® Development Foundations of GTK+ Development Beginning C, Fourth Edition Beginning SUSE Linux, Second Edition Beginning Ubuntu Linux, Second Edition www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN-13: 978-1-59059-793-4 ISBN-10: 1-59059-793-1 9 781590 597934 5 4 9 9 9 Build sophisticated graphical applications using one of the world's most powerful cross-platform toolkits! Foundations of Foundations of GTK+ Development ■■■ Andrew Krause 7931.book Page i Wednesday, March 28, 2007 7:35 PM Foundations of GTK+ Development Copyright © 2007 by Andrew Krause All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-793-4 ISBN-10 (pbk): 1-59059-793-1 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editors: Jason Gilmore, Matt Wade Technical Reviewers: Christiana Evelyn Johnson, Micah Carrick Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Jeff Pepper, Paul Sarknas, Dominic Shakeshaft, Jim Sumser, Matt Wade Project Manager: Richard Dal Porto Copy Edit Manager: Nicole Flores Copy Editor: Heather Lang Assistant Production Director: Kari Brooks-Copony Production Editor: Katie Stence Compositor: Pat Christenson Proofreader: Elizabeth Berry Indexer: Ann Rogers Artist: April Milne Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.apress.com in the Source Code/ Download section or at the official book site, http://www.gtkbook.com. 7931.book Page ii Wednesday, March 28, 2007 7:35 PM I dedicate this book to Mrs. Kaminsky, for never allowing me to settle for anything but my best. I hope you can look at this book and see everything that you have done for me, even though I have yet to broaden the scope of my writing beyond technology. 7931.book Page iii Wednesday, March 28, 2007 7:35 PM 7931.book Page iv Wednesday, March 28, 2007 7:35 PM v Contents at a Glance About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvii Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi ■CHAPTER 1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 ■CHAPTER 2 Your First GTK+ Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 ■CHAPTER 3 Container Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 ■CHAPTER 4 Basic Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 ■CHAPTER 5 Dialogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 ■CHAPTER 6 Using GLib. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 ■CHAPTER 7 The Text View Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 ■CHAPTER 8 The Tree View Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 ■CHAPTER 9 Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 ■CHAPTER 10 Dynamic User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 ■CHAPTER 11 Creating Custom Widgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 ■CHAPTER 12 Additional GTK+ Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 ■CHAPTER 13 Putting It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 ■APPENDIX A GTK+ Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 ■APPENDIX B GTK+ Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 ■APPENDIX C GTK+ Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 ■APPENDIX D GTK+ Stock Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 ■APPENDIX E GError Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 ■APPENDIX F Exercise Solutions and Hints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 ■INDEX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 7931.book Page v Wednesday, March 28, 2007 7:35 PM 7931.book Page vi Wednesday, March 28, 2007 7:35 PM Contents vii About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi ■CHAPTER 1 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 A Brief History of GTK+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The X Window System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 GTK+ and Supporting Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 GLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 GObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 GDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 GdkPixbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Pango . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 ATK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Language Bindings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Installing GTK+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 ■CHAPTER 2 Your First GTK+ Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Hello World. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Initializing GTK+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Widget Hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 GTK+ Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 The Main Loop Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Using GCC and pkg-config to Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Extending “Hello World” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Signals and Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Connecting the Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Callback Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Emitting and Stopping Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Event Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Using Specific Event Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7931.book Page vii Wednesday, March 28, 2007 7:35 PM viii ■CONTENTS Further GTK+ Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 GtkWidget Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 GtkWindow Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Process Pending Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Widget Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Test Your Understanding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 ■CHAPTER 3 Container Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 GtkContainer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Decorator Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Layout Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Resizing Children. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Container Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Horizontal and Vertical Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Horizontal and Vertical Panes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Table Packing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Table Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Fixed Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Expanders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Handle Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Notebooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 GtkNotebook Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Tab Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Event Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Test Your Understanding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 ■CHAPTER 4 Basic Widgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Using Stock Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Toggle Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Managing Widget Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Check Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Radio Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 7931.book Page viii Wednesday, March 28, 2007 7:35 PM ■CONTENTS ix Text Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Entry Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Inserting Text into a GtkEntry Widget . . . . . . . . . . . . . . . . . . . . . . . . . 87 Manipulating GtkEntry Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Spin Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Adjustments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 A Spin Button Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Horizontal and Vertical Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Widget Styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 The GtkStyle Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Additional Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Color Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 File Chooser Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Font Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Test Your Understanding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 ■CHAPTER 5 Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Creating Your Own Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Creating a Message Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Nonmodal Message Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Another Dialog Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Built-in Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Message Dialogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 The About Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 File Chooser Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Color Selection Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Font Selection Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Dialogs with Multiple Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Creating GtkAssistant Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 GtkProgressBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Page Forward Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Test Your Understanding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 7931.book Page ix Wednesday, March 28, 2007 7:35 PM [...]... Summary 16 0 16 0 16 1 16 4 16 5 16 5 16 8 16 9 17 1 17 1 17 2 17 4 17 7 17 8 17 9 17 9 18 0 18 3 18 4 18 4 18 6 18 8 19 1 19 4 19 7 19 9 19 9 2 01 2 01 203 210 212 215 217 79 31. book Page xi Wednesday, March 28, 2007 7:35 PM ■C O N T E N T S ■CHAPTER 7 The Text View Widget 219 Scrolled Windows ... Exercise 7 -1 Text Editor Exercise 8 -1 File Browser Exercise 9 -1 Toolbars Exercise 9-2 Menu Bars 595 596 596 597 597 598 598 598 599 599 600 6 01 6 01 xv 79 31. book Page xvi Wednesday, March 28, 2007 7:35 PM xvi ■C O N T E N T S Exercise 10 -1 Glade... given in Chapter 2 or by running make sourcefile For example, to build exercise2 -1. c, you should type make exercise2 -1 79 31. book Page 1 Friday, February 2, 2007 8:28 PM CHAPTER 1 ■■■ Getting Started W elcome to Foundations of GTK+ Development! In this book, you will acquire a comprehensive understanding of GIMP Toolkit (GTK+ ) that can help you to become a proficient graphical programmer Before continuing,... available at www .gtk. org/bindings.html: • Gtkmm is the official set of C++ bindings You can use GTK+ with C++ because of backward compatibility, but Gtkmm provides all of the GTK+ features in a series of classes, the style of which will be familiar to all C++ programmers The sources for Gtkmm, GLibmm, Libglademm, and other dependencies are available at www.gtkmm.org • PyGTK, available at www.pygtk.org, provides... like Gtkmm, provides a true object-oriented platform for the GTK+ libraries Available at http://java-gnome.sf.net, it provides all of the essential libraries for developing GTK+ applications in Java • Gtk# provides GTK+ bindings for C# applications on a wide variety of operating systems It is provided by the Mono Project at www.mono-project.com 9 79 31. book Page 10 Friday, February 2, 2007 8:28 PM 10 ... for Linux, Windows, or Mac OS X 79 31. book Page 3 Friday, February 2, 2007 8:28 PM CHAPTER 1 ■ GETTING STARTED Returning to Linux, X 11 manages windows in their most basic and abstract form It draws windows on the screen and handles their movements X 11 also controls input devices, such as mice and keyboards, in graphical environments X 11 s basic programming interface, Xlib, provides the tools necessary... Exercise 10 -2 Glade Text Editor with Menus Exercise 11 -1 Expanding MyMarquee Exercise 12 -1 Full Text Editor 602 602 603 604 ■INDEX 605 79 31. book Page xvii Wednesday, March 28, 2007 7:35 PM About the Author ■ ANDREW... Items 315 316 319 3 21 323 324 325 328 328 329 329 330 330 333 335 336 337 337 339 339 3 41 345 347 348 79 31. book Page xiii Wednesday, March 28, 2007 7:35 PM ■C O N T E N T S Test Your Understanding 352 Summary 352 ■CHAPTER 10 355 User Interface Design ... Implementing Public Functions Testing the Widget 3 81 382 385 405 407 407 409 413 417 418 420 4 21 424 xiii 79 31. book Page xiv Wednesday, March 28, 2007 7:35 PM xiv ■C O N T E N T S Implementing Interfaces Implementing the Interface ... 4 71 472 473 474 475 476 477 79 31. book Page xv Wednesday, March 28, 2007 7:35 PM ■C O N T E N T S Further Resources 477 Summary 479 ■APPENDIX A GTK+ Properties 4 81 GTK+ Properties 4 81 Child Widget Properties . cross-platform toolkits! Foundations of Foundations of GTK+ Development ■■■ Andrew Krause 79 31. book Page i Wednesday, March 28, 2007 7:35 PM Foundations of GTK+ Development Copyright © 2007 by Andrew. APRESS ROADMAP Foundations of Qt ® Development Foundations of GTK+ Development Beginning C, Fourth Edition Beginning SUSE Linux, Second Edition Beginning Ubuntu Linux, Second Edition www .apress. com SOURCE CODE ONLINE Companion. page for details on $10 eBook version ISBN -13 : 978 -1- 59059-793-4 ISBN -10 : 1- 59059-793 -1 9 7 815 90 597934 5 4 9 9 9 Build sophisticated graphical applications using one of the world's most

Ngày đăng: 05/08/2014, 10:20

TỪ KHÓA LIÊN QUAN