Programming with Clutter

Programming with Clutter

Programming with Clutter Murray Cumming Programming with Clutter by Murray Cumming Copyright © 2007, 2008 Openismus GmbH 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 team (mailto:[email protected]). 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. Clutter..........................................................................................................................................1 2. Installation..............................................................................................................................................3 2.1. Prebuilt Packages........................................................................................................................3 2.2. Installing From Source................................................................................................................3 2.2.1. Dependencies..................................................................................................................3 3. Header Files And Linking.....................................................................................................................4 4. The Stage................................................................................................................................................5 4.1. Stage Basics................................................................................................................................5 4.1.1. Example..........................................................................................................................5 4.2. Stage Widget...............................................................................................................................7 4.2.1. Example..........................................................................................................................7 5. Actors....................................................................................................................................................11 5.1. Actor Basics..............................................................................................................................11 5.1.1. Example........................................................................................................................11 5.2. Transformations........................................................................................................................13 5.2.1. Scaling..........................................................................................................................13 5.2.2. Rotation........................................................................................................................13 5.2.3. Clipping........................................................................................................................14 5.2.4. Movement.....................................................................................................................14 5.2.5. Example........................................................................................................................14 5.3. Containers.................................................................................................................................16 5.3.1. Example........................................................................................................................17 5.4. Events........................................................................................................................................18 5.4.1. Example........................................................................................................................19 6. Timelines...............................................................................................................................................24 6.1. Using Timelines........................................................................................................................24 6.2. Example....................................................................................................................................24 6.3. Grouping TimeLines in a Score................................................................................................27 6.4. Example....................................................................................................................................27 7. Effects....................................................................................................................................................31 7.1. Using Effects.............................................................................................................................31 7.2. Example....................................................................................................................................32 8. Behaviours............................................................................................................................................35 8.1. Using Behaviours......................................................................................................................35 8.2. Example....................................................................................................................................37 9. Full Example........................................................................................................................................41 A. Implementing Actors..........................................................................................................................52 A.1. Implementing Simple Actors...................................................................................................52 A.2. Example....................................................................................................................................53 A.3. Implementing Container Actors...............................................................................................60 A.3.1. ClutterActor virtual functions to implement...............................................................61 iii A.3.2. ClutterContainer virtual functions to implement.........................................................61 A.4. Example....................................................................................................................................62 B. Implementing Scrolling in a Window-like Actor.............................................................................73 B.1. The Technique..........................................................................................................................73 B.2. Example....................................................................................................................................73 C. Implementing Text Editing................................................................................................................84 C.1. The Technique..........................................................................................................................84 C.2. Example....................................................................................................................................84 10. Contributing.....................................................................................................................................109 iv List of Figures 4-1. Stage.....................................................................................................................................................5 4-2. Stage Widget........................................................................................................................................8 5-1. Actor...................................................................................................................................................12 5-2. Actor...................................................................................................................................................14 5-3. Group..................................................................................................................................................17 5-4. Actor Events.......................................................................................................................................20 6-1. Timeline..............................................................................................................................................24 6-2. Score...................................................................................................................................................27

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    114 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us