The Fast Light Toolkit Extension for Tcl/Tk Version 1.0.1 Iain B. Findleton Tue Nov 18 12:35:33 EST 2008 This document describes the binding between the Fast Light Tool Kit (FLTK) and the Tcl/Tk programming language. The language binding enables the creation of graphical user interface based applications that are built using the widget set provided by the FLTK library. Both the FLTK library and the Tcl/Tk application development language are distributed under various flavours of the GNU Public License. The Fltk Extension for Tcl/Tk is a dynamically loadable extension to the Tcl/Tk application development environment. The extension is distributed freely under the license terms described in the software distribution. All of the materials of the Fltk extension package for Tcl/Tk, including this documentation, are Copyright (C) I.B.Findleton, 2001-2007, All Rights Reserved. Neither this document nor any part thereof may be reproduced and distributed for any commercial purpose without the express written permission of the author. Reproduction and distribution for non-commercial purposes is allowed. 11/18/2008 Table of Contents 1 Introduction.....................................................................................................................................................1 1.1 Features of the FLTK Tool Kit..........................................................................................................1 1.2 Limitations of the FLTK Tool Kit.....................................................................................................1 1.3 FLTK and TCL/TK............................................................................................................................2 1.4 FLTK and Other Extensions..............................................................................................................2 2 Acquiring and Installing the FLTK Extension for TCL..............................................................................3 2.1 TCL/TK Distributions........................................................................................................................3 2.2 FLTK Distributions............................................................................................................................3 2.3 Distributions of the FLTK Extension for TCL/TK............................................................................3 3 Introduction to Tcl Programming..................................................................................................................5 3.1 Writing Tcl Programs........................................................................................................................5 3.2 Tcl Language Syntax.........................................................................................................................6 3.3 Variables............................................................................................................................................7 3.4 Tcl Lists ............................................................................................................................................8 3.5 Command Evaluation........................................................................................................................8 3.6 Expressions......................................................................................................................................10 3.7 Procedures........................................................................................................................................10 3.8 Control of Statement Execution.......................................................................................................11 3.9 Error Handling.................................................................................................................................13 3.10 Input and Output............................................................................................................................13 3.11 Events.............................................................................................................................................14 3.12 Library Code and Extensions.........................................................................................................15 3.13 Introspection..................................................................................................................................16 3.14 Summary........................................................................................................................................16 4 How to Write Applications Using the Fltk Extension.................................................................................18 4.1 Designing User Interfaces................................................................................................................18 4.2 Creating Custom Mega-Widgets......................................................................................................21 4.3 Binding Tcl Procedures to Widgets.................................................................................................22 4.4 Using Options and Application Data...............................................................................................23 4.5 The Fltk Global Array......................................................................................................................23 4.6 Running the Application using the fltkwish Interpreter..................................................................24 5 Fltk Command List.......................................................................................................................................26 6 Widgets - Standard configurable widget options......................................................................................29 6.1 Getting and Setting Widget Option Values....................................................................................30 6.2 Qualified Option Names.................................................................................................................30 6.2.1 alignment...............................................................................................................................31 6.2.2 anchor....................................................................................................................................32 6.2.3 autoscale.................................................................................................................................32 6.2.4 background............................................................................................................................32 6.2.5 borderwidth...........................................................................................................................33 6.2.6 class.......................................................................................................................................33 6.2.7 command...............................................................................................................................33 6.2.8 cursor.....................................................................................................................................34 i 7 Alert - Display an alert message 11/18/2008 Table of Contents 6 Widgets - Standard configurable widget options 6.2.9 damage....................................................................................................................................34 6.2.10 ..............................................................................................................................................34 6.2.11 data......................................................................................................................................34 6.2.12 defaultbehaviour...................................................................................................................35 6.2.13 font.......................................................................................................................................35 6.2.14 fontsize................................................................................................................................35 6.2.15 fontstyle...............................................................................................................................35 6.2.16 foreground...........................................................................................................................35 6.2.17 highlightbackground............................................................................................................35 6.2.18 highlightforeground.............................................................................................................36 6.2.19 highlightthickness................................................................................................................36 6.2.20 height,width,x,y...................................................................................................................36 6.2.21 imageorder............................................................................................................................37 6.2.22 invertstate............................................................................................................................37 6.2.23 keepaspect............................................................................................................................37
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages303 Page
-
File Size-