Voices That Matter C O N F E R E N C E Google Web Toolkit

Total Page:16

File Type:pdf, Size:1020Kb

Voices That Matter C O N F E R E N C E Google Web Toolkit PALACE HOTEL SAN FRANCISCO DECEMBER 3-6, 2007 VOICES THAT MATTER CON F ERENCE GOOGLE WEB TOOLKIT The Premiere Google Web Toolkit FREE eBook Conference World Class Speakers including GWT co-creators Bruce Johnson and Joel Webber Network with the community using GWT to build dynamic, feature-rich Ajax Gold Sponsor applications Don’t miss this chance to learn from the best. Media Sponsors Register by October 27 and save $200! www.VoicesThatMatter.com/GWT2007 VOICES THAT MATTER C ONFEREN C E GOOGLE WEB TOOLKIT 2007 eBOOK CONTAINING EXCERPTS FROM THE FOLLOWING BOOKS: GOOGLE WEB TOOLKIT SOLUTIONS by David Geary and Rob Gordon GOOGLE WEB TOOLKIT APPLICATIONS by Ryan Dewsbury ScRIPTING IN JAVA by Dejan Bosanac AjAX SECURITY by Billy Hoffman and Bryan Sullivan ENTERPRISE AJAX by David Johnson, Alexei White, and Andre Charland THE DESIGN OF SITES by Douglas K. van Duyne, James A. Landay and Jason I. Hong EcLIPSE WEB TOOLS PLATFORM by Naci Dai, Lawrence Mandel and Arthur Ryman VOICES THAT MAttER: Google Web Toolkit Conference eBook Copyright 2008 Pearson Education, Inc. Published by: Pearson Education 800 East 96th Street Indianapolis, IN 46240 USA Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison- Wesley and Prentice Hall were aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. NOT FOR RESALE ISBN: 0-13-2344815 BUY THE BOOK TODAY DRAFT MANUSCRIPT Books Available December 2007 This manuscript has been provided by Pearson Education at this early stage to create awareness for this upcoming book. IT HAS NOT BEEN COPYEdiTED OR PROOFREAD YET; we trust that you will judge this book on technical merit, not on grammatical and punctuation errors that will be fixed at a later stage. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. All Pearson Education books are available at a discount for corporate bulk purchases. For information on bulk discounts, please call (800) 428-5531. 00_0132344815_FM.qxd 6/19/07 8:59 AM Page iii Google Web Toolkit Solutions More Cool & Useful Stuff David Geary with Rob Gordon Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City 00_0132344815_FM.qxd 6/19/07 8:59 AM Page xviii xviii Google Web Toolkit Solutions About the Authors David Geary is the author of eight books on Java technology, including the best- selling Graphic Java 2 Series, Advanced JavaServer Pages, and Core JavaServer Faces (all from Prentice-Hall). David was a member of Sun’s Expert Groups for the JavaServer Pages Standard Template Library (JSTL), and JavaServer Faces (JSF) 1.0. He also was the second Apache Struts committer and the inventor of the Struts Template Library, the precursor to the popular Tiles open-source framework for composing web pages from JSP fragments. David wrote questions for Sun’s Web Developer Certification Exam and is the president of Clarity Training Inc., a training and consulting company focusing on server-side Java technology. Rob Gordon is an independent consultant specializing in the design and implementa- tion of enterprise systems. He is a former Sun developer and author of Essential JNI and coauthor of Essential JMF. 04_0132344815_ch04.qxd 6/18/07 3:13 PM Page 103 SolutionSolution 1: Drag and Drop 103 4 Viewports and Maps When you start working with GWT, it doesn’t take long before you realize that the possibilities are endless. Pretty much anything you can implement in a desktop appli- cation with frameworks like Swing or the SWT is also possible with GWT. Swing provides a handy component known as a viewport, which serves as a port onto a larger view; thus the name. Viewports are handy for all sorts of things. For example, if you wanted to create a game with a scrolling background, you might use a viewport to show a portion of your background. As the game’s characters approach the edges of the viewport, you could scroll the underlying background to let those characters explore other portions of your game’s landscape. Another use for viewports is an increasingly popular component of many websites: mapping. Google led the way with Google Maps, and nowadays many websites incor- porate mapping; in fact, you can even create your own maps and share them with other web denizens at http://www.discovermachine.com. Games and maps are only two examples of the usefulness of viewports. Unfortunately, GWT does not provide a viewport out of the box, but fortunately GWT provides all of the necessary ingredients so that you can easily write your own basic viewport class in a 100 or so lines of pure Java code. That’s exactly what we’re going to do in this chapter. But that’s not all. Starting on page xxx, we show you how to incorporate user gestures in a viewport to animate the underlying view, similar to the scrolling lists found in Apple’s iPhone. Features such as that are typically reserved for desktop developer wizards (or cell phones from Apple), but when you’re done with this chapter, you’ll see that anyone can do the same with just a little math and GWT. Stuff You’re Gonna Learn This solution explores the following aspects of GWT: • Using the AbsolutePanel class to place widgets by pixel location (page xxx) • Dragging one widget inside another (page xxx) • Using an event preview to inhibit browser reactions to events (page xxx) 04_0132344815_ch04.qxd 6/18/07 3:13 PM Page 104 104 Google Web Toolkit Solutions • Capturing and releasing events for a specific widget (page xxx) • Changing cursors with CSS styles (page xxx) • Incorporating gestures in a viewport (page xxx) • Using GWT timers (page xxx) The final version of our Viewport class, listed in Listing 4.5 on page xxx, weighs in at close to 350 lines of heavily commented code. In that class, we pack a lot of GWT stuff; in fact, everything listed previously is contained in our Viewport class. Viewports Figure 4.1 illustrates a viewport. The top picture shows a viewport and a portion of the viewport’s underlying view. The bottom picture demonstrates viewport clipping, whereby the underlying view is clipped to the confines of the viewport, meaning that only the portion of the view contained in the viewport is visible. Figure 4.1 Viewports show a portion of a component that is larger than the viewport Figure 4.2 shows our example application, which implements an actual viewport with the map shown in Figure 4.1 as the underlying view. Figure 4.2 also shows a user dragging the map toward the top-left corner inside the viewport. 04_0132344815_ch04.qxd 6/18/07 3:13 PM Page 105 Solution 4: Viewports and Maps 105 Figure 4.2 Dragging a map contained in a viewport Mouse Cursors and Operating Systems Different operating systems use different representations of the pointer and move cursors, so when you run the sample application, the cursors may look a little different than what you see in Figure 4.2. Now that we’ve seen the example application for this solution, let’s see how it’s put Solution 4: Viewports and Maps together. A General-Purpose Viewport Widget The application shown in Figure 4.2, which is listed in Listing 4.1, is ridiculously sim- ple because we’ve encapsulated all the complexity in our viewport widget. Listing 4.1 com.gwtsolutions.client.Maps 1.package com.gwtsolutions.client; 2. 3.import com.google.gwt.core.client.EntryPoint; continues 04_0132344815_ch04.qxd 6/18/07 3:13 PM Page 106 106 Google Web Toolkit Solutions Listing 4.1 com.gwtsolutions.client.Maps continued 4.import com.google.gwt.user.client.ui.*; 5.import com.gwtsolutions.components.client.ui.Viewport; 6. 7.public class Maps implements EntryPoint { 8. 9. public void onModuleLoad() { 10. final Viewport mapViewport = new Viewport(); 11. 12. mapViewport.setView( 13. new Image(“images/land_ocean_ice.jpg”)); 14. 15. RootPanel.get().add(mapViewport); 16. } 17.} In the preceding listing, we create a viewport and set the view to an image showing land, water, and ice on planet Earth. Then we add the viewport to the application’s root panel, and we’re done. Before we look at the Viewport class, let’s briefly look at the files and directories con- tained in our application. The Map Application’s Files and Directories Our application’s associated files and directories are shown in Figure 4.3. Figure 4.3 The map application’s files and directories 04_0132344815_ch04.qxd 6/18/07 3:13 PM Page 107 Solution 4: Viewports and Maps 107 Notice that this application does not contain many files. We have the Maps class, which is our application, listed in Listing 4.1 on page xxx, a CSS stylesheet, and the map image. The Viewport class is not shown in Figure 4.3, because it resides in our Components module, which contains the custom components we developed for this book. The Viewport Implementation Now that we’ve seen the implementation of the example application and its accompa- nying files, let’s look at a first cut of the Viewport class, listed in Listing 4.2. Later on, in “A Viewport’s View with Animated Gestures” on page xxx, we discuss the final ver- sion of the Viewport class, which incorporates user gestures and view animation.
Recommended publications
  • Eagle: Tcl Implementation in C
    Eagle: Tcl Implementation in C# Joe Mistachkin <[email protected]> 1. Abstract Eagle [1], Extensible Adaptable Generalized Logic Engine, is an implementation of the Tcl [2] scripting language for the Microsoft Common Language Runtime (CLR) [3]. It is designed to be a universal scripting solution for any CLR based language, and is written completely in C# [4]. Su- perficially, it is similar to Jacl [5], but it was written from scratch based on the design and imple- mentation of Tcl 8.4 [6]. It provides most of the functionality of the Tcl 8.4 interpreter while bor- rowing selected features from Tcl 8.5 [7] and the upcoming Tcl 8.6 [8] in addition to adding en- tirely new features. This paper explains how Eagle adds value to both Tcl/Tk and CLR-based applications and how it differs from other “dynamic languages” hosted by the CLR and its cousin, the Microsoft Dy- namic Language Runtime (DLR) [9]. It then describes how to use, integrate with, and extend Ea- gle effectively. It also covers some important implementation details and the overall design phi- losophy behind them. 2. Introduction This paper presents Eagle, which is an open-source [10] implementation of Tcl for the Microsoft CLR written entirely in C#. The goal of this project was to create a dynamic scripting language that could be used to automate any host application running on the CLR. 3. Rationale and Motivation Tcl makes it relatively easy to script applications written in C [11] and/or C++ [12] and so can also script applications written in many other languages (e.g.
    [Show full text]
  • Preview Tcl-Tk Tutorial (PDF Version)
    Tcl/Tk About the Tutorial Tcl is a general purpose multi-paradigm system programming language. It is a scripting language that aims at providing the ability for applications to communicate with each other. On the other hand, Tk is a cross platform widget toolkit used for building GUI in many languages. This tutorial covers various topics ranging from the basics of the Tcl/ Tk to its scope in various applications. Audience This tutorial is designed for all those individuals who are looking for a starting point of learning Tcl/ Tk. Therefore, we cover all those topics that are required for a beginner and an advanced user. Prerequisites Before proceeding with this tutorial, it is advisable for you to understand the basic concepts of computer programming. This tutorial is self-contained and you will be able to learn various concepts of Tcl/Tk even if you are a beginner. You just need to have a basic understanding of working with a simple text editor and command line. Disclaimer & Copyright Copyright 2015 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute, or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
    [Show full text]
  • Python and Epics: Channel Access Interface to Python
    Python and Epics: Channel Access Interface to Python Matthew Newville Consortium for Advanced Radiation Sciences University of Chicago October 12, 2010 http://cars9.uchicago.edu/software/python/pyepics3/ Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Python? The Standard Answers Clean Syntax Easy to learn, remember, and read High Level Language No pointers, dynamic memory, automatic memory Cross Platform code portable to Unix, Windows, Mac. Object Oriented full object model, name spaces. Also: procedural! Extensible with C, C++, Fortran, Java, .NET Many Libraries GUIs, Databases, Web, Image Processing, Array math Free Both senses of the word. No, really: completely free. Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Python? The Real Answer Scientists use Python. Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 All of these tools use the C implementation of Python. NOT Jython (Python in Java) or IronPython (Python in .NET): I am not talking about Jython. Why Do Scientists Use Python? Python is great. The tools are even better: numpy Fast arrays. matplotlib Excellent Plotting library scipy Numerical Algorithms (FFT, lapack, fitting, . ) f2py Wrapping Fortran for Python sage Symbolic math (ala Maple, Mathematica) GUI Choices Tk, wxWidgets, Qt, . Free Python is Free. All these tools are Free (BSD). Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Do Scientists Use Python? Python is great. The tools are even better: numpy Fast arrays. matplotlib Excellent Plotting library scipy Numerical Algorithms (FFT, lapack, fitting, . ) f2py Wrapping Fortran for Python sage Symbolic math (ala Maple, Mathematica) GUI Choices Tk, wxWidgets, Qt, .
    [Show full text]
  • RAND Suicide Prevention Program Evaluation TOOLKIT
    CHILDREN AND FAMILIES The RAND Corporation is a nonprofit institution that helps improve policy and EDUCATION AND THE ARTS decisionmaking through research and analysis. ENERGY AND ENVIRONMENT HEALTH AND HEALTH CARE This electronic document was made available from www.rand.org as a public service INFRASTRUCTURE AND of the RAND Corporation. TRANSPORTATION INTERNATIONAL AFFAIRS LAW AND BUSINESS Skip all front matter: Jump to Page 16 NATIONAL SECURITY POPULATION AND AGING PUBLIC SAFETY Support RAND SCIENCE AND TECHNOLOGY Purchase this document TERRORISM AND Browse Reports & Bookstore HOMELAND SECURITY Make a charitable contribution For More Information Visit RAND at www.rand.org Explore the RAND National Defense Research Institute View document details Limited Electronic Distribution Rights This document and trademark(s) contained herein are protected by law as indicated in a notice appearing later in this work. This electronic representation of RAND intellectual property is provided for non- commercial use only. Unauthorized posting of RAND electronic documents to a non-RAND website is prohibited. RAND electronic documents are protected under copyright law. Permission is required from RAND to reproduce, or reuse in another form, any of our research documents for commercial use. For information on reprint and linking permissions, please see RAND Permissions. This report is part of the RAND Corporation tool series. RAND tools may include models, databases, calculators, computer code, GIS mapping tools, practitioner guide- lines, web applications, and various toolkits. All RAND tools undergo rigorous peer review to ensure both high data standards and appropriate methodology in keeping with RAND’s commitment to quality and objectivity. RAND Suicide Prevention Program Evaluation TOOLKIT Joie D.
    [Show full text]
  • Multi-Platform User Interface Construction – a Challenge for Software Engineering-In-The-Small
    Multi-platform User Interface Construction – A Challenge for Software Engineering-in-the-Small Judith Bishop Department of Computer Science University of Pretoria Pretoria 0002 South Africa [email protected] ABSTRACT The popular view of software engineering focuses on managing 1. INTRODUCTION teams of people to produce large systems. This paper addresses a 1.1 Software engineering different angle of software engineering, that of development for Software engineering as a discipline is perceived as tackling re-use and portability. We consider how an essential part of computing in-the-large. It elevates tools and techniques from the most software products – the user interface – can be successfully level of a craft, to where they can be efficiently and reproducibly engineered so that it can be portable across multiple platforms harnessed for the successful completion of large projects. and on multiple devices. Our research has identified the structure of the problem domain, and we have filled in some of Thirty years ago in 1975, Fred Brooks introduced us to the the answers. We investigate promising solutions from the mythical man month of software development [Brooks 1975] model-driven frameworks of the 1990s, to modern XML-based and followed this with the “no silver bullet” paper, in which he specification notations (Views, XUL, XIML, XAML), multi- talked about software engineering as being a process of building platform toolkits (Qt and Gtk), and our new work, Mirrors software with “specifications, assembly of components, and which pioneers reflective libraries. The methodology on which scaffolding” [Brooks 1987]. Boehm, too, found in 1976 that Views and Mirrors is based enables existing GUI libraries to be software engineering was, encouragingly, concentrating on the transported to new operating systems.
    [Show full text]
  • FOSDEM 2006 – Saturday 25Th February (Part 1) 1/6
    FOSDEM 2006 – Saturday 25th February (part 1) 1/6 10:00 OpenGroupware ▼ Opening Talks Tutorials KDE openSUSE Embedded Mozilla Tcl/Tk 13:00 (Janson) (H2215/Ferrer) (H.1301) (H.1302) (H.1308) (H.1309) +GNUstep (H.2111) (AW1.105) 13:00 lunch break 13:00 Movitation, 13:00 Opening and GNUstep devtools: Goals and 13:15 13:15 introduction GORM, StepTalk Opportunities Axel Hecht Nicolas Roard Systems VoIP 13:30 DTrace S. Krause-Harder, SETR LiveCD 13:30 M. Loeffler (Janson) (Lameere) 13:45 Jon Haslam Hector Oron 13:45 Mozilla 14:00 14:00 Kubuntu openSUSE Build 14:00 Foundation CoreData Intro to Plan9 SER Service Intro 14:15 14:15 Jonathan 14:15 G. Markham Sašo Kiselkov Tcl/Tk Uriel M. Jan Janak A. Schroeter, 14:30 Pereira 14:30 Ridell C. Schumacher, Optimizing 14:30 Mozilla Clif Flynt A. Bauer 14:45 14:45 Linux kernel 14:45 Europe 15:00 15:00 Open SUSE Linux and apps 15:00 Tristan Nitot Web applicationsGUI for DTrace Asterisk M.Opdenacker 15:15 Jon Haslam Mark 15:15 Key Devroom Power Mngmt 15:15 SeaMonkey with SOPE ASIC 15:30 Spencer 15:30 Signing Timo Hoenig, Lock-free data 15:30 Project Marcus Mueller verification 15:45 15:45 Holger Macht exchange for 15:45 Robert Kaiser Karel Nijs Real-Time apps 16:00 16:00 SUSE Linux 16:00 Xen Speex Asterisk Marketing Peter Soetens Flock GNUstep on the Hecl: 10.2: 16:15 Ian Pratt J.-M. Valin 16:15 Mark KDE 16:15 Z. Braniecki Zaurus PDA scripting Quo vadis ? 16:30 16:30 Spencer Sebastian Alsa SoC layer16:30 Nicolaus Schaller for mobiles Kügler M.Loeffler,C.Thiel D.N.Welton 16:45 16:45 Liam Girdwood 16:45 Mozilla 17:00 Closing Talks (Janson) 17:00 17:00 Project BOF 17:15 17:15 17:15 FOSDEM Donators Return 17:30 17:30 17:45 17:45 17:30 FSF Europe Opening Talks (Janson) Hacker Rooms LPI Exam Sessions 10:00 FOSDEM Core Staff Welcome Speech Building H: H2213 Saturday 13:00-14:30 10:30 Keynote Building AW: AW1.117 (H2214) 15:00-16:30 Richard M.
    [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]
  • "ESF Load Sequencer Software Verification & Validation Rept."
    ' ESF LOAD SEQUENCER SOFTWARE VERIFICATION AND VALIDATION REPORT prepared by: SIMPACT ASSOCIATES'NC. 5520 Ruffin Road San Diego, CA 92123 September 9, 1982 ESF LOAD SEQUENCER SOFTWARE VERIFICATION AND VALIDATION REPORT TABLE OF CONTENTS Pacae ~ 1 OB JECTIVE ~ o ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ 1 2. STUDY PROCEDURE AND RESULTS SUMMARY ~ ~ ~ ~ ~ ~ ~ t 0 4 I ~ 0 ~ 2 3. SPECIFICATION REQUIREMENTS ~ ~ ~ ~ ~ 0 ~ ~ ~ ~ 0 t I ~ 4 4 SOFTWARE STRUCTURE ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 5 5. SYSTEM ~ ~ ~ ROUTINES ... .... ....... .... ~ ... ~ ... 7 6. UNDERVOLTAGE MONITORING ~ 0 ~ ~ ~ ~ ~ ~ ~ ~ 0 ~ ~ ~ 9 7. ESF BUS LOAD SEQUENCING o ~ ~ ~ ~ ~ ~ o ~ ~ ~ ~ e ~ 10 8. AUTOTESTING ............................... 12 9. PERFORMANCE/DESIGN DEMONSTRATION TEST RESULTS . 16 10. CONCLUSION ~ ....... ........ .. ~ .. ~ ~ .. .. ~ .; ~ . 17 APPENDIX A ~ ~ ~ ~ ~ ~ ~ ~ .. ... ... ~ ~ ... ~ ~ ~ ~ ~ .. ~ . ~ . ~ . ~ ~ .A-1 ESF LOAD SEQUENCER SOFTWARE VERIFICATION AND VALIDATION REPORT 1 OBJECTIVE The objective of the Software Verification and Validation Study is to verify that the software of the ESF Load Sequencer meets the requirements of the design specification, and that no sneak software paths (circuits) exist that would render the system inoperable. The ESF Load Sequencer is a module in the Balance of Plant (BOP) Engineered Safety Features Actuation System (ESFAS) supplied by General Atomic Company (GA) to the Palo Verde Nuclear Generating Station under Arizona Public Service Company Purchase Order 10407-13-JM-104 and Bechtel Power Corporation Speci fication 13-JM-104. This module controls loading of the station ESF bus and diesel generators under loss of power conditions or if an accident signal is present. The purpose of this report is to outline the methods used to perform this study and to detail the findings of the study. 2. STUDY PROCEDURE AND RESULTS SUMMARY The following steps were taken to per form the study: a ~ Review of Bechtel Specification (13-JM-104).
    [Show full text]
  • 13A04806 LINUX PROGRAMMING and SCRIPTING UNIT 4 TCL/ TK SCRIPTING:Tcl Fundamentals, String and Pattern Matching, Tcl Data Struct
    13A04806 LINUX PROGRAMMING AND SCRIPTING UNIT 4 TCL/ TK SCRIPTING:Tcl Fundamentals, String and Pattern Matching, Tcl Data Structures ,Control Flow Commands, Procedures and Scope , Evel, Working With UNIX, Reflection and Debugging, Script Libraries, Tk Fundamentals ,Tk by Examples, The Pack Geometry Manager, Binding Commands to X Events, Buttons and Menus, Simple Tk Widgets, Entry and Listbox Widgets Focus, Grabs and Dialogs 13A04806 LINUX PROGRAMMING AND SCRIPTING Tcl - Overview Tcl is shortened form of Tool Command Language. John Ousterhout of the University of California, Berkeley, designed it. It is a combination of a scripting language and its own interpreter that gets embedded to the application, we develop with it. Tcl was developed initially for Unix. It was then ported to Windows, DOS, OS/2, and Mac OSX. Tcl is much similar to other unix shell languages like Bourne Shell (Sh), the C Shell (csh), the Korn Shell (sh), and Perl. It aims at providing ability for programs to interact with other programs and also for acting as an embeddable interpreter. Even though, the original aim was to enable programs to interact, you can find full-fledged applications written in Tcl/Tk. Features of Tcl The features of Tcl are as follows − ∑ Reduced development time. ∑ Powerful and simple user interface kit with integration of TK. ∑ Write once, run anywhere. It runs on Windows, Mac OS X, and almost on every Unix platform. ∑ Quite easy to get started for experienced programmers; since, the language is so simple that they can learn Tcl in a few hours or days. ∑ You can easily extend existing applications with Tcl.
    [Show full text]
  • Proximal Junctional Kyphosis in Lenke 5 AIS Patients
    Zhou et al. BMC Musculoskeletal Disorders (2021) 22:185 https://doi.org/10.1186/s12891-021-04052-8 RESEARCH ARTICLE Open Access Proximal junctional kyphosis in Lenke 5 AIS patients: the important factor of pelvic incidence Quan Zhou†, Bowen Hu†, Xi Yang*, Yueming Song, Limin Liu, Linnan Wang, Lei Wang, Chunguang Zhou, Zhongjie Zhou, Peng Xiu and Liang Wang Abstract Background: The purpose of the study was to investigate whether pelvic incidence (PI) will affect the occurrence of PJK in Lenke 5 AIS patients after correction surgery and try to explore a better surgical scheme based on PI. Methods: Lenke 5C AIS patients that underwent correction surgery with a minimum of a 2-year follow-up were identified. Demographic and radiographic data were collected preoperatively, postoperatively, and at the final follow-up. The comparison between the PJK and the Non-PJK group was conducted and the subgroup analysis was performed based on the preoperative value of PI to investigate the potential mechanism of PJK. Clinical assessments were performed using the Scoliosis Research Society (SRS)-22 questionnaire. Results: The mean preoperative Cobb angle of the TL/L curve was 53.4°±8.6. At the final follow-up, the mean TL/L Cobb angle was drastically decreased to 7.3°±6.8 (P < 0.001). The incidence of PJK in Lenke 5 AIS was 18.6 %, 21.9 % (7/32) in the low PI group (PI < 45°) and 15.8 % (6/38) in the high PI group (PI ≥ 45°), and there was no statistical difference between the two groups (χ2 = 0.425, P = 0.514).
    [Show full text]
  • A Tcl/Tk Widget for Display of Medm Screens* R
    Proceedings of 2005 Particle Accelerator Conference, Knoxville, Tennessee A TCL/TK WIDGET FOR DISPLAY OF MEDM SCREENS* R. Soliday, ANL, Argonne, IL 60439, U.S.A. Abstract (ADL) file is passed to the widget, which in turn parses A new Tcl/Tk widget has been created to display the file using native Tcl code. Then the appropriate child MEDM screens inside a Tcl/Tk application. Tcl/Tk parses widgets are created to look and behave identically to how the MEDM input files and the appropriate widgets are they would have had MEDM been used to display the created and linked to the associated process variables. screen instead of OAG Tcl/Tk. Not every last feature of One advantage of this approach is that an X-Windows MEDM has been mimicked, but most of it has been, and emulator is not required to view and manipulate the additions can be made relatively quickly. While this MEDM screen under a Windows operating system. widget was not intended to replace well-tested code such Another benefit is that the MEDM screen can now be as MEDM, there is one important scenario where this tightly integrated into a scripting language to attach approach has a clear advantage. Unlike MEDM, no higher-level logic to various process variable installations of the Exceed X-server and X libraries [4] are manipulations. Further details and examples of the new required to display the screens on Windows computers widget will be discussed. using OAG Tcl/Tk. INTRODUCTION TCL CHANNEL ACCESS EXTENSION While preparing for a presentation at the Getting Bob Daly wrote the original version of the Tcl CA Started with EPICS (Experimental Physics and Industrial extension.
    [Show full text]
  • Panorama of GUI Toolkits on Haiku
    Panorama of GUI toolkits on Haiku From ncurses to Qt5 François Revol [email protected] Haiku ● Free Software rewrite of BeOS ● An Operating System for the desktop ● A lot of POSIX – But we don't claim to be Unix® ● Some more funny things – Typed & indexable xattrs Native GUI ● InterfaceKit – C++ API (similar to Qt) – BMessage objects ● Multithreaded – 1 message loop / window + 1 app main thread ● Few bindings – yab (yabasic port) Toolkit Pros/Cons ✔ More apps, less work ✗ Never completely ✔ More potential users native ✔ More devs? ✗ No Scripting support ✗ hey Foo get Frame ✔ It can be done right of View … ✗ Screen reader… ✗ Less incentive for native apps Toolkit usage in Debian GNU/Linux ● for t in $(debtags cat | tr ' ,' '\n\n' | grep uitoolkit:: | sort | uniq); do echo -en "$t\t"; debtags search $t | wc -l; ● done Whatever TODO uitoolkit::athena 92 means uitoolkit::fltk 25 uitoolkit::glut 23 ● uitoolkit::gnustep 41 Probably not the best uitoolkit::gtk 2024 metric anyway uitoolkit::motif 53 uitoolkit::ncurses 757 uitoolkit::qt 965 uitoolkit::sdl 488 uitoolkit::tk 135 uitoolkit::TODO 52 uitoolkit::wxwidgets 117 uitoolkit::xlib 254 ncurses █████ ● So what, it's a toolkit � ● Works not too bad hdialog ████▒ ● Native implementation of [x]dialog ● Some missing features ● Shanty is a similar app (Zenity clone) SDL 1.2 █████ ● Of course! SDL 2 █████ ● What Else?™ nativefiledialog █████ ● Native file selectors for Win32, GTK+3, OSX ● Ported during GCI 2014 ● For use with SDL/SDL2/… LibreOffice (VCL) █▒▒▒▒ ● Visual Class Libraries ● LibreOffice / OpenOffice's own GUI toolkit – Is it used anywhere else? IUP █▒▒▒▒ ● Multi-platform GUI toolkit – GTK+, Motif and Windows – “Bindings for C, Lua and LED – Uses native interface elements – Simplicity of its API” ● WIP port by Adrien Destugues (PulkoMandy) wxWidget ▒▒▒▒▒ ● Is this still in use? ● Oh, I need it for KiCAD! ● Port started long ago, nothing usable yet.
    [Show full text]