CEGUI Unified Editor
Total Page:16
File Type:pdf, Size:1020Kb
Charles University in Prague Faculty of Mathematics and Physics BACHELOR THESIS Martin Preisler <[email protected]> Unified Editor for CEGUI Department of Software and Computer Science Education Supervisor of the bachelor thesis: Martin Babka Study programme: Computer Science Specialization: Programming Prague 2012 Many thanks to my supervisor, Mgr. Martin Babka, for helpful advices and mentoring through the development. I would also like to thank contributors who provided feedback, bugfixes and valuable features. I declare that I carried out this bachelor thesis independently, and only with the cited sources, literature and other professional sources. I understand that my work relates to the rights and obliga- tions under the Act No. 121/2000 Coll., the Copyright Act, as amended, in particular the fact that the Charles University in Prague has the right to conclude a license agreement on the use of this work as a school work pursuant to Section 60 paragraph 1 of the Copyright Act. In date TITLE: Unified Editor for CEGUI AUTHOR: Martin Preisler DEPARTMENT: Katedra teoretické informatiky a matematické logiky SUPERVISOR: Mgr. Martin Babka ABSTRACT: This thesis presents a free software GUI application called the CEGUI Unified Editor. The application is mainly writ- ten in Python and is licensed under GPLv3. Its purpose is to create and modify assets of graphical interfaces made with the CEGUI library. Features include project management, imageset editing and layout editing. Data for older versions of CEGUI are transparently converted using compatibility layers. Big empha- sis is put on ease of use, collaboration between multiple content authors and portability. KEYWORDS: CEGUI, editor, imageset, layout, GUI design NÁZEV PRÁCE: Unified Editor pro CEGUI AUTOR: Martin Preisler KATEDRA: Katedra teoretické informatiky a matematické logiky VEDOUCÍ BAKALÁRSKɡ PRÁCE: Mgr. Martin Babka ABSTRAKT: Cílem této práce je vytvoˇritGUI aplikaci zvanou CEGUI Unified Editor. Aplikace je z pˇrevážnéˇcástipsaná v Pythonu a li- cencovaná pod GPLv3. Jejím cílem je tvorba a zmˇenagrafických rozhraní realizovaných knihovnou CEGUI. Podporovány jsou mimo jiné management projekt ˚u,editace imageset ˚ua editace layout ˚u. Data pro starší verze CEGUI jsou pˇrevádˇenaza bˇehupomocí vrstev kompatibility. Velký d ˚urazje kladen na jednoduchost používání, možnosti kolaborace mezi více autory a portabilitu. KLÍCOVÁˇ SLOVA: CEGUI, editor, imageset, layout, tvorba GUI rozhraní Contents I Introduction 1 1 Why editing tools? 2 2 What is CEGUI? 3 2.1 History . .3 2.2 Philosophy . .3 2.3 Resources . .4 2.3.1 Imageset . .4 2.3.2 Font . .5 2.3.3 Layout . .6 2.3.4 Animation . .8 2.3.5 Scheme . .9 2.4 Widgets . .9 2.4.1 Foundation . .9 2.4.2 Widgets are named elements . 11 2.4.3 Every tree starts with a root . 11 2.4.4 Unified dimensions (UDim) . 11 2.4.5 Positioning . 13 2.4.6 Sizing . 14 II Development 15 3 Planning phase 16 3.1 Previous CEGUI tools . 16 3.1.1 CEImagesetEditor . 17 3.1.2 CELayoutEditor . 18 3.2 Related non-CEGUI tools . 19 3.2.1 Qt designer . 19 3.2.2 Glade . 19 3.2.3 MyGUI Layout Editor . 20 3.3 Design goals . 20 3.3.1 Target audience . 20 3.3.2 Cornerstone requirements . 21 3.3.3 Relaxed requirements . 22 4 Programming phase 24 4.1 Technologies used . 24 4.2 Tools . 25 4.2.1 Version control . 25 4.2.2 Code editing . 25 4.2.3 Bug tracking and planning . 25 4.2.4 Static analysis . 25 4.3 Initial stages . 26 4.4 Engaging the community . 26 4.4.1 List of contributors . 27 4.5 Release early, release often . 28 4.6 Early adopters . 28 III User Manual 29 5 Prerequisites 30 5.1 Hardware and software requirements . 30 5.2 Knowledge prerequisites . 31 5.3 Installation . 31 5.3.1 Source tarball . 31 5.3.2 Standalone executable (Win32) . 31 5.3.3 .app bundle (MacOS X) . 32 6 Working with the application 33 6.1 The basics . 33 6.1.1 Main interface . 33 6.1.2 Multi tab editing . 33 6.1.3 Multi mode editing . 34 6.1.4 Copy / Paste . 34 6.1.5 Project manager . 34 6.1.6 File manager . 35 6.1.7 Resizable rectangle . 35 6.1.8 Zooming . 36 6.1.9 Undo and Redo functionality . 36 6.1.10 Compatibility layers . 37 6.2 Creating a project . 38 6.2.1 Creating a project file . 38 6.2.2 Project settings . 38 6.3 Imageset editing . 40 6.3.1 Overview . 40 6.3.2 Imageset properties . 41 6.3.3 Moving and resizing image definitions . 41 6.3.4 Deleting image definitions . 42 6.3.5 The property box . 42 6.3.6 Editing image definition offsets . 42 6.3.7 Selecting overlapping image definitions . 43 6.3.8 The code mode . 43 6.4 Layout editing . 44 6.4.1 Overview . 44 6.4.2 Moving and sizing widgets . 45 6.4.3 Deleting widgets . 47 6.4.4 Property editing . 47 6.4.5 Reparenting widgets . 48 6.4.6 Live preview . 48 6.4.7 Custom widgets . 48 6.4.8 The code mode . 48 6.5 Command line . 50 6.5.1 ceed-gui . 50 6.5.2 ceed-migrate . 50 6.5.3 ceed-mic . 50 6.6 Settings . 51 6.6.1 Applying changes . 51 6.6.2 Back to default . 51 6.6.3 Shortcuts . 52 7 Further help 53 7.1 Common issues . 53 7.2 Getting support . 54 7.3 Help CEED . 55 7.3.1 Report bugs . 55 7.3.2 Help with documentation . 55 7.3.3 Help with development . 55 7.3.4 Donate money . 55 IV Developer Manual 56 8 Prerequisites 57 8.1 Knowledge requirements . 57 8.2 Getting the source code . 57 8.2.1 Branches and Tags . 57 8.3 Starting without installation . 57 9 Directory structure 59 9.1 Top directory . 59 9.1.1 maintenance script . 59 9.1.2 perform-pylint . 59 9.1.3 setup.py . 59 9.1.4 cx_Freezer.py . 59 9.1.5 copyright related . 60 9.2 bin directory . 60 9.2.1 ceed-gui . 60 9.2.2 ceed-mic . 60 9.2.3 ceed-migrate . 60 9.2.4 runwrapper.sh . 60 9.3 build directory . 60 9.4 ceed directory . 61 9.4.1 action subpackage . 61 9.4.2 cegui subpackage . 61 9.4.3 compatibility subpackage . 61 9.4.4 editors subpackage . 61 9.4.5 metaimageset subpackage . 61 9.4.6 propertytree subpackage . ..