
Programming with gtkmm Murray Cumming Bernhard Rieder Jonathon Jongsma Jason M’Sadoques Ole Laursen Gene Ruebsamen Cedric Gustin Marko Anastasov Alan Ott Programming with gtkmm by Murray Cumming, Bernhard Rieder, Jonathon Jongsma, Jason M’Sadoques, Ole Laursen, Gene Ruebsamen, Cedric Gustin, Marko Anastasov, and Alan Ott Copyright © 2002-2006 Murray Cumming We very much appreciate any reports of inaccuracies or other errors in this document. Contributions are also most welcome. Post your suggestions, critiques or addenda to the gtkmm mailing list (mailto:[email protected]) -- The gtkmm Development Team Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Table of Contents 1. Introduction............................................................................................................................................1 1.1. This book.....................................................................................................................................1 1.2. gtkmm.........................................................................................................................................1 1.2.1. Why use gtkmm instead of GTK+?................................................................................1 1.2.2. gtkmm compared to QT..................................................................................................2 1.2.3. gtkmm is a wrapper........................................................................................................2 2. Installation..............................................................................................................................................3 2.1. Dependencies..............................................................................................................................3 2.2. Unix and Linux...........................................................................................................................3 2.2.1. Prebuilt Packages............................................................................................................3 2.2.2. Installing From Source...................................................................................................3 2.3. Microsoft Windows.....................................................................................................................4 3. Basics.......................................................................................................................................................6 3.1. Simple Example..........................................................................................................................6 3.2. Headers and Linking...................................................................................................................7 3.3. Widgets........................................................................................................................................8 3.4. Signals.........................................................................................................................................9 3.5. Glib::ustring................................................................................................................................9 3.6. Intermediate types.....................................................................................................................10 3.7. Hello World in gtkmm..............................................................................................................10 4. Buttons..................................................................................................................................................15 4.1. Button........................................................................................................................................15 4.1.1. Constructors..................................................................................................................15 4.1.2. Example........................................................................................................................16 4.1.3. Signals..........................................................................................................................17 4.2. ToggleButton.............................................................................................................................18 4.3. CheckButton..............................................................................................................................18 4.3.1. Example........................................................................................................................19 4.4. RadioButton..............................................................................................................................20 4.4.1. Groups..........................................................................................................................21 4.4.2. Methods........................................................................................................................22 4.4.3. Example........................................................................................................................22 5. Range Widgets.....................................................................................................................................26 5.1. Scrollbar Widgets......................................................................................................................26 5.2. Scale Widgets............................................................................................................................26 5.2.1. Useful methods.............................................................................................................26 5.3. Update Policies.........................................................................................................................27 5.4. Example....................................................................................................................................27 6. Miscellaneous Widgets........................................................................................................................35 6.1. Label..........................................................................................................................................35 6.1.1. Example........................................................................................................................35 6.2. Entry..........................................................................................................................................39 6.2.1. Example........................................................................................................................39 6.3. SpinButton................................................................................................................................40 iii 6.3.1. Methods........................................................................................................................41 6.3.2. Example........................................................................................................................41 6.4. ProgressBar...............................................................................................................................47 6.4.1. Activity Mode...............................................................................................................47 6.4.2. Example........................................................................................................................47 6.5. Tooltips......................................................................................................................................51 7. Container Widgets...............................................................................................................................53 7.1. Single-item Containers..............................................................................................................53 7.1.1. Frame............................................................................................................................53 7.1.2. Paned............................................................................................................................56 7.1.3. ScrolledWindow...........................................................................................................61 7.1.4. AspectFrame.................................................................................................................64 7.1.5. Alignment.....................................................................................................................67 7.2. Multiple-item widgets...............................................................................................................69 7.2.1. Packing.........................................................................................................................69 7.2.2. An improved Hello World............................................................................................70
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages379 Page
-
File Size-