X Review Mac OS X Roots: Next

Total Page:16

File Type:pdf, Size:1020Kb

X Review Mac OS X Roots: Next X Review Application • Distributed window system Widget Set • Server is the user’s Terminal WM Xt Intrinsics • Client runs the application Xlib Xlib • Highly modular • (exchange WM, Widget Set) X Server BWS • Available for virtually every OS HW • Very successful in the UNIX world (with Motif) • Many Open Source implementations available • Xt intrinsics already allow OO GUI application programming Jan Borchers 1 media computing group Jan Borchers 2 media computing group Mac OS X Roots: NeXT • 1985 Apple kicks out Jobs, who founds NeXT • 1988 NeXTSTEP 0.8: 68k, Mach kernel, 4.3BSD, Display PostScript, new Objective-C, platform for first web browser at CERN • 1990 NeXTSTEP 2.0: Interface Builder (OO) • 1993 Intel, SPARC, HP PA-RISC support (fat binaries), NeXT hardware dead • NeXT&Sun: OPENSTEP, used by SunOS, HP-UX, MacOS, also on Windows NT, GNUstep Jan Borchers 3 media computing group Jan Borchers 4 media computing group Mac OS X Roots: It’s spelled “Ten” NeXT Mac OS X: Architecture Apps UITK Cocoa, Carbon, Java • 1996 Apple purchases NeXT, Jobs back at Apple, begins replacing Mac OS towards NeXTSTEP WM WindowServer (user-level process) • 1999 Apple releases Mac OS X Preview BWS ! Mac OS X is directly derived from NeXTSTEP/ OPENSTEP (Mach/BSD, Objective-C, Cocoa, Interface GEL Quartz 2D / Core Graphics, IOKit Builder, NetInfo), and combines this with other Apple HW technologies (UI, Multimedia) 6 Jan Borchers 5 media computing group Jan Borchers media computing group Base Operating System Graphics and Event Library • Quartz 2D / Core Graphics, Display PDF • Roots: NeWS, NeXTSTEP (Display PostScript) • Vector-based, resolution-independent • Darwin (Open Source for PowerPC+Intel) • Quartz Extreme: GPU-based compositing (pipe • Based on a Mach microkernel + BSD Unix entire screen through OpenGL if available) • Protected memory, preemptive multitasking • Quartz Extreme 2D / QuartzGL: GPU-based UI • Single application cannot corrupt/freeze entire system rendering (still experimental) • Vista’s XPS is similar to (Display) PDF • The Event Library is contained in IO Kit Jan Borchers 7 media computing group Jan Borchers 8 media computing group User Interface Toolkit Demo: Quartz Extreme • Cocoa AppKit, OO framework • Implements Aqua Look&Feel • Other part of Cocoa (Foundation framework) contains threads, sockets, etc. • Written in Objective-C Jan Borchers 9 media computing group Jan Borchers 10 media computing group Java Carbon Cocoa BSD (JDK) QuickTime Application Services * Multi-API Problems Core Services Kernel Environment • Mac OS X has tried to please everyone • Problem: High cost for supporting many APIs • Cocoa is the recommended API for Mac OS X • Consequences in 2006: • Can be used with Objective-C or Java* • No new Java bindings for new Cocoa features in Mac OS X 10.5 • Java SE 6 SDK is used for 100% Java/Swing applications and beyond (= “Use Objective-C!”) • Carbon is an updated version of the old Macintosh Toolbox • New Intel Macs do not support Classic Mac OS emulation anymore (= “Classic’s dead!”) • Used to easily port existing applications • Carbon apps run on Mac OS 9 and Mac OS X • But: New bridges for Ruby and Python since Leopard • BSD is used for existing standard Unix applications • WebObjects for web-based services Jan Borchers 11 media computing group Jan Borchers 12 media computing group Event Handling • Similar to our Reference Model • Window Server distributes events to per-application (really per- process) queues Steve Jobs burying Mac OS 9 at WWDC 2002 (personal photo) Jan Borchers 13 media computing group Jan Borchers 14 media computing group Objective-C: Objective-C New C Language Constructs • Implementation language of the Cocoa framework • Created in 1983 to combine OO principles with C • status = [socket connectToAddress:127.0.0.1 withPort:80] is analogous to Java’s • Inspired by Smalltalk status = socket.connectToAddressWithPort(127.0.0.1, 80) • In its concepts very similar to Java, unlike C++ • — for instance methods, + for class methods • Dynamic typing, binding, and loading • id corresponds to Object, self corresponds to this • Protocols are analogous to Java’s interfaces • @ compiler directives • Classes are objects of type Class • Reflection possible (not in C++) • @interface..@end, @implementation..@end,… • Introduces few new language constructs to C • Interface categories allow transparent subclassing Jan Borchers 15 media computing group Jan Borchers 16 media computing group Dynamic Typing/Binding/Loading • C++ is a static language, Java and Obj-C are dynamic • Calling known methods of a subclass • Example: Building objects from data read from a file • In C++, you cannot directly call a method defined in a subclass Demo: Dynamic Binding - You would have to do a dynamic_cast<> • Obj-C (and Java) move this check to run-time • Fragile Base Class Problem • To add a method to a superclass, all subclasses must be recompiled • In C++, a superclass must contain all methods any subclass will use • Dynamic Binding avoids bloated superclasses, and minimizes recompilation due to this problem Jan Borchers 17 media computing group Jan Borchers 18 media computing group Objective-C 2.0 (since Leopard) Manual Memory Management • Supports automatic accessor method generation for • Reference counting object properties • Each object stores how often it is referenced by other objects • Allows Java-like short-hand syntax to access • If it is not used anymore, call dealloc (free memory) properties • Only five methods affect reference counts • [object setName:newName]; • alloc—allocate object and set reference count to 1 object.name = newName; • copy—copy an object. Copy will have reference count 1 • Features an optional garbage collection • retain—increment reference count • only works for Objective-C Objects • release—decrement reference count • you still have to manage any C pointers yourself • autorelease—automatically decrement reference count sometime • Supports fast enumeration of collections after the current method • for (object in list) [object doSomething]; Jan Borchers 19 media computing group Jan Borchers 20 media computing group Cocoa Cocoa Class Hierarchy NSObject •! Fairly flat hierarchy • The UITK (and general toolkit) of Mac OS X NSEvent • Evolved out of NeXTSTEP NSResponder •! Reason: Delegates, and • Cocoa’s class names still give away its heritage (NSObject,…) NSWindow ! categories can be used to mix NSView ! in functionality • Two main parts NSControl • Foundation: Basic programming support NSButton etc. →!no deep subclassing NSApplication ! required - NSObject, values, strings, collections, OS services, notifications, archiving, NSCell (lightweight controls) Objective-C language services, scripting, distributed objects • Full hierarchy: NSMenu • AppKit: Aqua interface NSMenuItem ! see Online Help in Xcode - Interface, fonts, graphics, color, documents, printing, OS support, international support, InterfaceBuilder support etc. - Largest part (over 100) are interface widgets Jan Borchers 21 media computing group Jan Borchers 22 media computing group Example: NSTableView Delegate Methods Delegates Moving and resizing columns Editing a cell – tableView:didDragTableColumn: – tableView: shouldEditTableColumn:row: – tableViewColumnDidMove: Displaying a cell – tableViewColumnDidResize: • Similar to Listeners in Java – tableView: • A delegate is a class whose methods are called from Selecting in table willDisplayCell:forTableColumn:row: Displaying tooltips another class that wants to plan for extending its – selectionShouldChangeInTableView: – tableView:shouldSelectRow: – tableView: functionality toolTipForCell:rect:tableColumn: – tableView:shouldSelectTableColumn: row:mouseLocation: • E.g., you can write a delegate class for NSTableView that will get – tableViewSelectionIsChanging: Allowing variable height rows called when the user changes the width of a column – tableViewSelectionDidChange: – tableView:heightOfRow: • Delegates solve the fragile base class problem Responding to mouse events • If NSTableView is changed, the delegate class doesn’t need to be – tableView:didClickTableColumn: recompiled – tableView: mouseDownInHeaderOfTableColumn: Jan Borchers 23 media computing group Jan Borchers 24 media computing group Categories: Extending a class Protocols without subclassing • Example: Add a “find&replace” method to NSString • Could subclass “MyNSString”—but then have to change all code to use that new class • Could change NSString itself—but that would require access to the source code for that class (and recompiling, rebinding any code using it,…) • Similar to Java’s interfaces • Instead: Create a category “NSStringExtensions”: • Mostly replace the need for multiple inheritance @interface NSString (NSStringExtensions) - (NSString *)find:(NSString *)findString replaceWith:(NSString *)replaceString; @end • Any code using NSString can now use the find:replaceWith: method • An advantage of the Dynamic Loading possible with Objective-C Jan Borchers 25 media computing group Jan Borchers 26 media computing group Events and Actions • Events are generated by user or system (e.g., periodic events) Demo: Categories • Corresponds to input “I” from our formal widget model • Actions are generated by objects (e.g., menus) in response to lower-level events • Corresponds to actions “A” from our formal widget model • InterfaceBuilder lets developer connect actions to custom objects (e.g., from a button to a custom class), using “IBAction” constant in the source Jan Borchers 27 media computing group Jan Borchers 28
Recommended publications
  • Apple Software Design Guidelines
    Apple Software Design Guidelines May 27, 2004 Java and all Java-based trademarks are Apple Computer, Inc. trademarks or registered trademarks of Sun © 2004 Apple Computer, Inc. Microsystems, Inc. in the U.S. and other All rights reserved. countries. OpenGL is a trademark of Silicon Graphics, No part of this publication may be Inc. reproduced, stored in a retrieval system, or transmitted, in any form or by any means, PowerPC and and the PowerPC logo are mechanical, electronic, photocopying, trademarks of International Business recording, or otherwise, without prior Machines Corporation, used under license written permission of Apple Computer, Inc., therefrom. with the following exceptions: Any person Simultaneously published in the United is hereby authorized to store documentation States and Canada. on a single computer for personal use only Even though Apple has reviewed this manual, and to print copies of documentation for APPLE MAKES NO WARRANTY OR personal use provided that the REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, documentation contains Apple's copyright ITS QUALITY, ACCURACY, notice. MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS The Apple logo is a trademark of Apple MANUAL IS SOLD ªAS IS,º AND YOU, THE PURCHASER, ARE ASSUMING THE ENTIRE Computer, Inc. RISK AS TO ITS QUALITY AND ACCURACY. Use of the ªkeyboardº Apple logo IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, (Option-Shift-K) for commercial purposes OR CONSEQUENTIAL DAMAGES without the prior written consent of Apple RESULTING FROM ANY DEFECT OR may constitute trademark infringement and INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages.
    [Show full text]
  • Porting a Window Manager from Xlib to XCB
    Porting a Window Manager from Xlib to XCB Arnaud Fontaine (08090091) 16 May 2008 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version pub- lished by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Contents List of figures i List of listings ii Introduction 1 1 Backgrounds and Motivations 2 2 X Window System (X11) 6 2.1 Introduction . .6 2.2 History . .6 2.3 X Window Protocol . .7 2.3.1 Introduction . .7 2.3.2 Protocol overview . .8 2.3.3 Identifiers of resources . 10 2.3.4 Atoms . 10 2.3.5 Windows . 12 2.3.6 Pixmaps . 14 2.3.7 Events . 14 2.3.8 Keyboard and pointer . 15 2.3.9 Extensions . 17 2.4 X protocol client libraries . 18 2.4.1 Xlib . 18 2.4.1.1 Introduction . 18 2.4.1.2 Data types and functions . 18 2.4.1.3 Pros . 19 2.4.1.4 Cons . 19 2.4.1.5 Example . 20 2.4.2 XCB . 20 2.4.2.1 Introduction . 20 2.4.2.2 Data types and functions . 21 2.4.2.3 xcb-util library . 22 2.4.2.4 Pros . 22 2.4.2.5 Cons . 23 2.4.2.6 Example . 23 2.4.3 Xlib/XCB round-trip performance comparison .
    [Show full text]
  • Gtk Drawing Area Example C
    Gtk Drawing Area Example C Abyssinian Cary always Indianised his examination if Amadeus is lowest or marshalling skywards. Ornithischian Rudd overruled, his deportation backscatters remilitarizing proud. Zodiacal Udale alkalizing: he repay his ceorl jazzily and observantly. End angle bracket iter to indicates data to c gtk drawing area Programming with gtkmm 3. You should only grab from gtk drawing area widget draws with either create. These programmatically hidden from the properties are put there are created and executable program that all gtk app into boxes, i am doing. This locus the 'traits' of the GtkDrawingArea widget are inherited to this class. GtkDrawingArea gtk-30 Valadoc. M cm else return cm m xm def drawself ctx area tops the egg. Gmcs pkggtk-sharp-20 rusrlibmono20MonoCairodll simplecs Here saying how we compile the example DrawingArea darea new. This source code of examples have thrown me at least we will create a button click to retrieve them into those who must be updated. How to integrate those header-only libraries and uses Catch as an example. We just ugly cast. The error comes from C I over no danger about tablet to drift this drawingrb. Useful for detriment to extract multiple copies of chair same dialog. For example if most have created a dialog box for entering some personal information you. Drawing operation draws the examples are the interior of. Application runs the example draws some way to be used for single cell renderer to this will execute it! This is prominent example in object-oriented behavior enforced in C by GTK. GtkDrawingArea getDrawingAreaStructbool transferOwnership false.
    [Show full text]
  • Writing Applications with GTK+ 1 Introduction
    + Writing Applications with GTK Owen Taylor April Introduction Graphical user interfaces have b ecome almost universally familiar However it may b e worth saying a few words ab out how graphical user interfaces work in Linux and X from the p oint of view of the programmer The X server is resp onsible for only the simplest op erations of drawing graphics and text on the screen and for keeping track of the users mouse and keyboard actions Pro grams communicate with the server via the Xlib library However programming applications in straight Xlib would b e a tremendous chore Since Xlib provides only basic drawing commands each application would have to provide their own co de to user interface elements such as buttons or menus Such user interface elemenets are called widgets To avoid such a lab orious job and to provide consistancy b etween dierent applications the normal practice is to use a to olkit a library that builds on top of Xlib and handles the details of the user interface The traditional choices for such a to olkit have b een two libraries built up on X Intrinsics libXt library distributed with X the Athena Widgets which are distributed with X and Mo 1 tif However Xt is complicated to learn and use the Athena Widgets havent lo oked stylish since and Motif while somewhat more up to date is large slow has an app earance disliked by many p eople and most imp ortantly is a proprietary pro duct without freely available source co de For these reasons and others much recent development has fo cused on to olk its that build directly
    [Show full text]
  • Fundamentals of Xlib Programming by Examples
    Fundamentals of Xlib Programming by Examples by Ross Maloney Contents 1 Introduction 1 1.1 Critic of the available literature . 1 1.2 The Place of the X Protocol . 1 1.3 X Window Programming gotchas . 2 2 Getting started 4 2.1 Basic Xlib programming steps . 5 2.2 Creating a single window . 5 2.2.1 Open connection to the server . 6 2.2.2 Top-level window . 7 2.2.3 Exercises . 10 2.3 Smallest Xlib program to produce a window . 10 2.3.1 Exercises . 10 2.4 A simple but useful X Window program . 11 2.4.1 Exercises . 12 2.5 A moving window . 12 2.5.1 Exercises . 15 2.6 Parts of windows can disappear from view . 16 2.6.1 Testing overlay services available from an X server . 17 2.6.2 Consequences of no server overlay services . 17 2.6.3 Exercises . 23 2.7 Changing a window’s properties . 23 2.8 Content summary . 25 3 Windows and events produce menus 26 3.1 Colour . 26 3.1.1 Exercises . 27 i CONTENTS 3.2 A button to click . 29 3.3 Events . 33 3.3.1 Exercises . 37 3.4 Menus . 37 3.4.1 Text labelled menu buttons . 38 3.4.2 Exercises . 43 3.5 Some events of the mouse . 44 3.6 A mouse behaviour application . 55 3.6.1 Exercises . 58 3.7 Implementing hierarchical menus . 58 3.7.1 Exercises . 67 3.8 Content summary . 67 4 Pixmaps 68 4.1 The pixmap resource .
    [Show full text]
  • FLTK 1.1.8 Programming Manual Revision 8
    FLTK 1.1.8 Programming Manual Revision 8 Written by Michael Sweet, Craig P. Earls, Matthias Melcher, and Bill Spitzak Copyright 1998-2006 by Bill Spitzak and Others. FLTK 1.1.8 Programming Manual Table of Contents Preface..................................................................................................................................................................1 Organization.............................................................................................................................................1 Conventions.............................................................................................................................................2 Abbreviations...........................................................................................................................................2 Copyrights and Trademarks.....................................................................................................................2 1 - Introduction to FLTK...................................................................................................................................3 History of FLTK......................................................................................................................................3 Features....................................................................................................................................................4 Licensing..................................................................................................................................................5
    [Show full text]
  • Mac OS X and PDF: the Real Story
    Mac OS X and PDF The Real Story Leonard Rosenthol Lazerware, Inc. Copyright©1999-2001, Lazerware, Inc. Overview •Mac OS X •PDF • Where’s the overlap? Copyright©1999-2001, Lazerware, Inc. You are here because… • You’re currently working with Mac OS and are interested in what Mac OS X brings to the table. • You’re curious about what Apple’s latest hype is all about. • You’re already awake and had to find something to kill time. • You’re a friend of mine and wanted to heckle Copyright©1999-2001, Lazerware, Inc. How I do things • You should all have copies of the presentation that you received when you walked in. • There is also an electronic copy of this presentation (PDF format, of course!) on my website at http://www.lazerware.com/ • I’ve left time at the end for Q&A, but please feel free to ask questions at any time! Copyright©1999-2001, Lazerware, Inc. Mac OS X Overview Copyright©1999-2001, Lazerware, Inc. Darwin • “Core OS” (Kernel) – Solid Unix foundation • FreeBSD 3.2 & Mach 3.0 • Memory protection, preemptive multitasking, etc. – High performance I/O • Firewire, USB, etc. • Open source Copyright©1999-2001, Lazerware, Inc. Graphics •Quartz – Adobe Imaging Model (PDF) • Includes full anti-aliasing and opacity/transparency • OpenGL – Industry standard 3D engine used by Quake & Maya • QuickTime Copyright©1999-2001, Lazerware, Inc. Graphics Demos - Quartz Copyright©1999-2001, Lazerware, Inc. Graphics Demos – OpenGL Copyright©1999-2001, Lazerware, Inc. Application Frameworks • Classic – Compatibility “box” for existing Mac OS applications. • Carbon – Modern versions of Mac OS applications prepared for Mac OS X.
    [Show full text]
  • OCCT V.6.5.4 Release Notes
    Open CASCADE Technology & Products Products Version6. features, Highlights Technology CASCADE Open Overview , so applications linked against a previous version must berecompiled to run with this Version 6. Open CASCADE Technology & Products Technology Open CASCADE improvements and bug fixes over 6 Universal locale global current on independent made export / Import TKOpenGl libraries support plotter and viewer 2D obsolete of Removal Accelerated text visualization management texture of Redesign R and XCode Cocoa API with native visualization X, Mac OS On of support Official New automated testing system testing New automated and 3D graphics 2D both to way render unified the become input parameters and results and generation of data for bug rep bug for data of generation and results and parameters input . 0 efactored is binary incompatible withtheprevious versions CMake build scripts build CMake is nowis link Open CASCADE Open Boolean operations algorithm operations Boolean andProducts Mac OS X and Products Products and www. www. ed at build time, not at run time run at not time, build at ed opencascad Release Notes Notes Release opencascade M , Windows 8 and Visual Studio 2012 Studio Visual , and Windows 8 maintenance ; use of FTGL library is dropped FTGL of library ; use in version or e .co Release .org 6. m releas . Possibility to enable automatic check of of check automatic enable to Possibility . 6 . 0 ver. 6. ver. Technology is a Copyright © 2013 by OPEN CASCADE Page Copyright OPEN CASCADE 2013by © e 6. minor 5. 5 of . release, which includes 6 OpenCASCADE Technology . 0 4 project files files project ort . 3Dviewer over libraries 1 2 5 of 0 32 new 6 and and .
    [Show full text]
  • Mac OS X for UNIX Users the Power of UNIX with the Simplicity of Macintosh
    Mac OS X for UNIX Users The power of UNIX with the simplicity of Macintosh. Features Mac OS X version 10.3 “Panther” combines a robust and open UNIX-based foundation with the richness and usability of the Macintosh interface, bringing UNIX technology Open source, standards-based UNIX to the mass market. Apple has made open source and standards a key part of its foundation strategy and delivers an operating system built on a powerful UNIX-based foundation •Based on FreeBSD 5 and Mach 3.0 • Support for POSIX, Linux, and System V APIs that is innovative and easy to use. • High-performance math libraries, including There are over 8.5 million Mac OS X users, including scientists, animators, developers, vector/DSP and PowerPC G5 support and system administrators, making Mac OS X the most widely used UNIX-based desktop • Optimized X11 window server for UNIX GUIs operating system. In addition, Mac OS X is the only UNIX-based environment that •Open source code available via the natively runs Microsoft Office, Adobe Photoshop, and thousands of other consumer Darwin project applications—all side by side with traditional command-line, X11, and Java applications. Standards-based networking For notebook computer users, Mac OS X delivers full power management and mobility •Open source TCP/IP-based networking support for Apple’s award-winning PowerBook G4. architecture, including IPv4, IPv6, and L2TP/IPSec •Interoperability with NFS, AFP, and Windows (SMB/CIFS) file servers •Powerful web server (Apache) •Open Directory 2, an LDAP-based directory services
    [Show full text]
  • Pygtk GUI Programming Pygtk GUI Programming Table of Contents Pygtk GUI Programming
    PyGTK GUI programming PyGTK GUI programming Table of Contents PyGTK GUI programming...............................................................................................................................1 Chapter 1. Introduzione....................................................................................................................................2 1.1. Primo approccio...............................................................................................................................2 1.2. Il toolkit PyGTK..............................................................................................................................2 1.3. PyGTK e Glade................................................................................................................................2 1.4. IDE o editor......................................................................................................................................4 1.5. Installazione.....................................................................................................................................6 1.5.1. Installazione su piattaforma GNU/Linux...............................................................................6 1.5.2. Installazione su piattaforma Windows...................................................................................6 1.6. Supporto e help................................................................................................................................6 Chapter 2. I Widget, le classi ed un
    [Show full text]
  • Multiplatformní GUI Toolkity GTK+ a Qt
    Multiplatformní GUI toolkity GTK+ a Qt Jan Outrata KATEDRA INFORMATIKY UNIVERZITA PALACKÉHO V OLOMOUCI GUI toolkit (widget toolkit) (1) = programová knihovna (nebo kolekce knihoven) implementující prvky GUI = widgety (tlačítka, seznamy, menu, posuvník, bary, dialog, okno atd.) a umožňující tvorbu GUI (grafického uživatelského rozhraní) aplikace vlastní jednotný nebo nativní (pro platformu/systém) vzhled widgetů, možnost stylování nízkoúrovňové (Xt a Xlib v X Windows System a libwayland ve Waylandu na unixových systémech, GDI Windows API, Quartz a Carbon v Apple Mac OS) a vysokoúrovňové (MFC, WTL, WPF a Windows Forms v MS Windows, Cocoa v Apple Mac OS X, Motif/Lesstif, Xaw a XForms na unixových systémech) multiplatformní = pro více platforem (MS Windows, GNU/Linux, Apple Mac OS X, mobilní) nebo platformově nezávislé (Java) – aplikace může být také (většinou) událostmi řízené programování (event-driven programming) – toolkit v hlavní smyčce zachytává události (uživatelské od myši nebo klávesnice, od časovače, systému, aplikace samotné atd.) a umožňuje implementaci vlastních obsluh (even handler, callback function), objektově orientované programování (objekty = widgety aj.) – nevyžaduje OO programovací jazyk! Jan Outrata (Univerzita Palackého v Olomouci) Multiplatformní GUI toolkity duben 2015 1 / 10 GUI toolkit (widget toolkit) (2) language binding = API (aplikační programové rozhraní) toolkitu v jiném prog. jazyce než původní API a toolkit samotný GUI designer/builder = WYSIWYG nástroj pro tvorbu GUI s využitím toolkitu, hierarchicky skládáním prvků, z uloženého XML pak generuje kód nebo GUI vytvoří za běhu aplikace nekomerční (GNU (L)GPL, MIT, open source) i komerční licence např. GTK+ (C), Qt (C++), wxWidgets (C++), FLTK (C++), CEGUI (C++), Swing/JFC (Java), SWT (Java), JavaFX (Java), Tcl/Tk (Tcl), XUL (XML) aj.
    [Show full text]
  • Pygtk 2.0 Tutorial
    PyGTK 2.0 Tutorial John Finlay October 7, 2012 PyGTK 2.0 Tutorial by John Finlay Published March 2, 2006 ii Contents 1 Introduction 1 1.1 Exploring PyGTK . .2 2 Getting Started 5 2.1 Hello World in PyGTK . .7 2.2 Theory of Signals and Callbacks . .9 2.3 Events . 10 2.4 Stepping Through Hello World . 11 3 Moving On 15 3.1 More on Signal Handlers . 15 3.2 An Upgraded Hello World . 15 4 Packing Widgets 19 4.1 Theory of Packing Boxes . 19 4.2 Details of Boxes . 20 4.3 Packing Demonstration Program . 22 4.4 Packing Using Tables . 27 4.5 Table Packing Example . 28 5 Widget Overview 31 5.1 Widget Hierarchy . 31 5.2 Widgets Without Windows . 34 6 The Button Widget 35 6.1 Normal Buttons . 35 6.2 Toggle Buttons . 38 6.3 Check Buttons . 40 6.4 Radio Buttons . 42 7 Adjustments 45 7.1 Creating an Adjustment . 45 7.2 Using Adjustments the Easy Way . 45 7.3 Adjustment Internals . 46 8 Range Widgets 49 8.1 Scrollbar Widgets . 49 8.2 Scale Widgets . 49 8.2.1 Creating a Scale Widget . 49 8.2.2 Methods and Signals (well, methods, at least) . 50 8.3 Common Range Methods . 50 8.3.1 Setting the Update Policy . 50 8.3.2 Getting and Setting Adjustments . 51 8.4 Key and Mouse Bindings . 51 8.5 Range Widget Example . 51 9 Miscellaneous Widgets 57 9.1 Labels . 57 9.2 Arrows . 60 9.3 The Tooltips Object .
    [Show full text]