没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Programming with Clutter
Murray Cumming
Programming with Clutter
by Murray Cumming
Copyright © 2007 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:murrayc@openismus.com).
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. The Stage ................................................................................................................................................4
3.1. Stage Basics ................................................................................................................................4
3.1.1. Example..........................................................................................................................4
3.2. Stage Widget ...............................................................................................................................6
3.2.1. Example..........................................................................................................................6
4. Actors....................................................................................................................................................10
4.1. Actor Basics ..............................................................................................................................10
4.1.1. Example........................................................................................................................10
4.2. Transformations ........................................................................................................................12
4.2.1. Scaling ..........................................................................................................................12
4.2.2. Rotation ........................................................................................................................12
4.2.3. Clipping ........................................................................................................................13
4.2.4. Movement .....................................................................................................................13
4.2.5. Example........................................................................................................................13
4.3. Containers .................................................................................................................................15
4.3.1. Example........................................................................................................................16
4.4. Events........................................................................................................................................17
4.4.1. Example........................................................................................................................18
5. Timelines...............................................................................................................................................23
5.1. Using Timelines ........................................................................................................................23
5.2. Example ....................................................................................................................................23
5.3. Grouping TimeLines in a Score ................................................................................................26
5.4. Example ....................................................................................................................................26
6. Effects....................................................................................................................................................30
6.1. Using Effects.............................................................................................................................30
6.2. Example ....................................................................................................................................31
7. Behaviours ............................................................................................................................................34
7.1. Using Behaviours......................................................................................................................34
7.2. Example ....................................................................................................................................36
8. Full Example ........................................................................................................................................40
A. Implementing Actors ..........................................................................................................................51
A.1. Implementing Simple Actors ...................................................................................................51
A.2. Example....................................................................................................................................52
A.3. Implementing Container Actors...............................................................................................59
A.3.1. ClutterActor virtual functions to implement ...............................................................60
A.3.2. ClutterContainer virtual functions to implement.........................................................60
iii
A.4. Example....................................................................................................................................61
B. Implementing Scrolling in a Window-like Actor .............................................................................72
B.1. The Technique ..........................................................................................................................72
B.2. Example....................................................................................................................................72
C. Implementing Text Editing ................................................................................................................84
C.1. The Technique ..........................................................................................................................84
C.2. Example....................................................................................................................................84
9. Contributing .......................................................................................................................................109
iv
List of Figures
3-1. Stage .....................................................................................................................................................4
3-2. Stage Widget ........................................................................................................................................6
4-1. Actor...................................................................................................................................................11
4-2. Actor...................................................................................................................................................13
4-3. Group..................................................................................................................................................16
4-4. Actor Events .......................................................................................................................................19
5-1. Timeline..............................................................................................................................................23
5-2. Score...................................................................................................................................................26
6-1. Graphic representation of some alpha functions. ...............................................................................30
6-2. Behaviour ...........................................................................................................................................31
7-1. Effects of alpha functions on a path. ..................................................................................................34
7-2. Behaviour ...........................................................................................................................................36
8-1. Full Example ......................................................................................................................................40
A-1. Behaviour ..........................................................................................................................................52
A-2. Behaviour ..........................................................................................................................................61
B-1. Scrolling Container............................................................................................................................72
C-1. Multiline Text Entry...........................................................................................................................84
v
剩余113页未读,继续阅读
资源评论
Computer123
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功