Programmer's Reference


Contents

Notices

  • Trademarks
  • About this book

  • What this book includes
  • Who this book is for
  • About this product or feature
  • Conventions used in this book
  • References
  • Common Language Data Types, Common Language Implementation, and Common Process Model
  • Common File System
  • Common Graphics
  • Common Widgets
  • Common Printing
  • Dynamic Data Exchange
  • National Language Support
  • Tell us what you think
  • IBM Smalltalk overview

  • Base subsystems
  • Common Language Data Types
  • Common Language Implementation
  • Common Process Model
  • Common File System
  • Common Graphics
  • Common Widgets
  • Extended Widgets
  • Drag and Drop
  • Common Printing
  • Design intent
  • Architecture
  • Industry-standard support
  • Platform support
  • Common Language Data Types

  • Object behavior
  • Basic dependents mechanism
  • Behavior testing
  • Class identity testing
  • Copying
  • Printing and storing
  • Performing
  • Error handling
  • Primitive accessing
  • Mutating
  • Testing object equality or identity
  • Boolean classes
  • Boolean messages
  • Collection classes
  • Collection protocols
  • Common collection protocols
  • Unique collection protocol
  • Magnitude classes
  • Magnitude comparing
  • Association
  • Character
  • Date
  • Time
  • Number
  • Integer
  • Fraction
  • Float
  • ScaledDecimal
  • Graphical classes
  • Point
  • Rectangle
  • Stream classes
  • Accessing
  • Copying
  • Enumerating
  • Positioning
  • Reading
  • Testing
  • Truncating
  • Writing
  • Creating instances
  • Support classes
  • UndefinedObject
  • Message and DirectedMessage
  • Block
  • Exception handling classes
  • ExceptionalEvent
  • Signal
  • Creating new exceptions
  • Signaling an exception
  • Handling of exceptions
  • ExceptionalEvent collections
  • Completion blocks
  • Default exception handler
  • System exceptions
  • Examples of exception handling
  • Common Language Implementation

  • Behavior messages
  • Class queries
  • Compiling
  • Creating instances
  • Enumeration
  • Instance accessing
  • Instance structure testing
  • Method accessing
  • Method adding and deleting
  • Method queries
  • Class messages
  • Class variable accessing
  • Instance variable accessing
  • Shared pool accessing
  • Class accessing
  • Initializing and removing
  • Superclass accessing
  • Metaclass messages
  • Accessing
  • Creating new classes
  • Creating fixed classes
  • Creating variable classes
  • Creating variable byte classes
  • Extended classes
  • Multiple instance accessing
  • String converting
  • Compiling and evaluating code
  • Compiling
  • Evaluating
  • CompiledMethod
  • Accessing
  • Testing
  • EmSystemConfiguration
  • Common Process Model

  • Creating a process
  • Suspending, resuming, and ending a process
  • Setting and modifying process priorities
  • Synchronization using semaphore and delay
  • Block evaluation methods
  • Process-related block methods
  • Process methods
  • ProcessorScheduler methods
  • Delay class and instance methods
  • Semaphore class and instance methods
  • Common File System

  • Accessing the capabilities of the Common File System
  • Basic file protocols
  • Stream protocols
  • Portability protocols
  • Error handling protocols
  • CfsConstants pool dictionary
  • Basic classes
  • Specifying file names and paths
  • Portable file names
  • File system roots
  • Path separators
  • Managing files and directories
  • Current working directory
  • Creating and removing directories
  • Deleting files
  • Renaming files
  • Copying files
  • Startup directory
  • Obtaining volume information
  • Volume name and type
  • File names and directory path case
  • File name length
  • Volumes with different file name lengths
  • Searching directories
  • Opening a directory for searching
  • Reading directory entries
  • Closing the directory descriptor
  • Using file streams
  • File stream classes
  • Opening and closing file streams
  • Reading and writing file streams
  • Characters versus bytes
  • Line delimiters
  • Using low-level file operations
  • Opening files
  • Closing file descriptors
  • Reading and writing data
  • Changing the file offset
  • Other low-level operations
  • Mixing streams and file descriptors
  • Using access modes and flags with file streams
  • Performing low-level file operations on streams
  • File locking and share modes
  • File locking
  • Share modes
  • Handling errors
  • Suppressing system error dialogs
  • Testing existence and obtaining other file properties
  • Obtaining a CfsStat instance
  • Mixing platform-specific and Common File System operations
  • Performing a platform-specific call with a CfsFileDescriptor
  • Converting a platform file descriptor into a CfsFileDescriptor
  • Obtaining platform-specific error information
  • Common Graphics

  • X Window system graphics library compatibility
  • Core Common Graphics class hierarchy
  • Seldom-used and abstract classes
  • A simplified drawing process overview
  • Before drawing
  • During drawing
  • After drawing
  • A simple example of the drawing process
  • CgConstants pool dictionary
  • Using graphics contexts
  • Basic graphics context methods
  • Creating graphics contexts
  • Copying graphics contexts
  • Changing graphics contexts
  • Freeing graphics contexts
  • Using graphics contexts with other drawables
  • Drawing operations
  • Drawing points
  • Drawing lines
  • Drawing rectangles
  • Drawing polygons
  • Drawing arcs and circles
  • Drawing pie slices and chords using filled arcs
  • Using fonts
  • A simplified view of the font process
  • Querying the system for fonts
  • Loading fonts
  • Assigning fonts for use in drawing operations
  • String drawing operations with fonts
  • Releasing CgFonts and CgFontStructs from memory
  • Obtaining the current font from a graphics context
  • Using cursors
  • The process for using cursors
  • Font cursors
  • Glyph cursors
  • Pixmap cursors
  • Changing the color of a cursor
  • Platform cursors
  • Using pixmaps
  • Creating a pixmap using createPixmap:
  • Creating a pixmap using createPixmapFromBitmapData:
  • Copying pixmaps to and from windows
  • Getting pixmap geometry
  • Creating a bitmap from bitmap data
  • Creating stipples using bitmaps
  • Writing bitmaps to files
  • Reading bitmaps from files
  • Displaying bitmaps
  • Common Graphics image support
  • Specifying colors
  • Specifying colors as RGB intensities
  • Specifying colors by name
  • Parsing a color-specification string
  • Using palettes
  • The default palette
  • Creating indexed palettes
  • From pixel values to colors and back
  • Selecting and drawing with palettes
  • Direct palettes
  • Device-independent images
  • Creating and manipulating images
  • Displaying images
  • Direct color images
  • Copying images from a drawable
  • Icons
  • Creating icons
  • Drawing icons
  • Loading icons from DLLs
  • Using operating system icons
  • Image and icon file formats
  • Loading images from files
  • Handling errors
  • Loading icons from files
  • Unloading images into files
  • Unloading icons into files
  • Unloading images and icons into ByteArrays
  • Loading images and icons from ByteArrays
  • Determining the format of a file
  • Extra file format information
  • Resource management summary
  • Common Widgets

  • OSF/Motif compatibility
  • Common Widgets class hierarchy
  • Overview of Common Widgets user interface concepts
  • The parent-child widget tree
  • The widget lifecycle
  • Mapping and unmapping widgets
  • Managing and unmanaging widgets
  • Widget resources and functions
  • CwConstants pool dictionary
  • Example code to create a widget tree
  • Widget event handling and callbacks
  • Example of using an event handler and a callback
  • Creating and using widgets
  • Widget creation convenience methods
  • Callbacks
  • Event handlers
  • Shell widgets
  • Top-level shell widgets
  • Scrolled-window widgets
  • Main-window widgets
  • Main windows and geometry management
  • Text widgets
  • Drawing area widgets
  • Adding an event handler to a drawing area
  • Layout widgets
  • Form widgets
  • Row-column widgets
  • Button and label widgets
  • Static label widgets
  • Push-button widgets
  • Toggle-button widgets
  • Radio-button groups
  • Check boxes
  • Icon and pixmap label and button widgets
  • Application-drawn buttons
  • Menus
  • Greying out buttons
  • Simple menus and menu bars
  • Creating a menu bar and pull-down menu using simple menu protocol
  • Creating a secondary menu using simple menu protocol
  • Creating a pop-up menu using simple menu protocol
  • Non-simple menus and menu bars
  • Non-simple menu example
  • List widgets
  • Single selection lists
  • Multiple selection lists
  • Scrolled lists
  • Combo-box widgets
  • Composite-box widgets
  • MessageBox widgets
  • SelectionBox widgets
  • Dialog convenience methods
  • Creating and using prompters
  • Message prompter
  • Text prompter
  • File selection prompter
  • Extended widgets
  • Writing an extended widget
  • Example: a primitive extended widget
  • Example: a composite extended widget
  • Fonts
  • Using the system browser font
  • Colors
  • Clipboard operations
  • Examples for using the clipboard
  • Platform-integrated drag and drop
  • Target types
  • Transferring data
  • Drag and drop objects
  • Procs
  • Common Widgets drag and drop classes
  • Drag source widgets and the CwDragContext object
  • Drop site widgets and CwDropSite objects
  • Data transfer and the CwDropTransfer object
  • The user interface process model
  • The system view
  • The application programmer's view
  • Examples of applications with long-running operations
  • Extended Widgets

  • Extended Widgets class hierarchy
  • EwConstants pool dictionary
  • Creation convenience methods
  • Extended list widgets
  • Common resources
  • Scrolled lists
  • Drawn list widget
  • Icon list widgets
  • Renderables
  • Direct editing of labels
  • Flowed icon list widget
  • Icon area widget
  • Table list widget
  • Table list resources
  • Table columns
  • Direct editing of cell values
  • Edit policies
  • Tree widgets
  • Icon trees
  • Table trees
  • Notebook widgets
  • Creating pages
  • Callbacks
  • PM notebook widget
  • WIN notebook widget
  • Progress bar widget
  • Slider widget
  • Spin button widget
  • Split window widget
  • Tool bar widget
  • Creating tools
  • Using tools
  • Drag and Drop

  • Drag and drop adapters
  • Sequence of events
  • Voting and cursors
  • Source vote and image changes
  • Leaving a target
  • Dropping
  • Canceling a drag
  • System configuration
  • Simple drag and drop
  • Widget limitations
  • Common Printing

  • Common Printing classes
  • Printing process overview
  • Selecting a printer
  • Configuring print job attributes
  • Creating a print job
  • Using the printer prompter
  • Print job attributes
  • Using a printer shell
  • Creating a shell
  • Adding callbacks
  • Starting a job
  • Producing a page
  • Ending a job
  • CwPrinterShell resources and convenience methods
  • Printing with Common Graphics
  • A complete example
  • Setting up printers and queues on UNIX platforms
  • Configuring printer setup options
  • Printer configuration information
  • IBM Smalltalk Virtual Machine API

  • Who should read this chapter
  • Conventions
  • IBM Smalltalk C programming model
  • Defined types
  • Object types
  • Macros versus functions
  • External language interface
  • Parameter types
  • Calling a PlatformFunction
  • Inline external function calls
  • PlatformFunction protocols
  • PlatformLibrary protocols
  • Entry points
  • Parameter types and return types
  • Calling an EsEntryPoint
  • EsEntryPoint protocols
  • Asynchronous callouts
  • Calling a Platform Function asynchronously
  • Locking resources for an asynchronous call
  • ACO errors and error cases
  • Walkbacks
  • ACO errors
  • Parameter types and return types
  • Managing resources
  • Extensions to platform function protocols
  • ACO resource manager protocols
  • Resource future protocols
  • Static future protocols
  • ACO error protocols
  • OSObjects
  • OSObject subclasses
  • OSObject protocols
  • OSImmediate protocols
  • OSBaseType, OSObjectPointer, and OSStructure protocols
  • OSStructure protocols
  • OSVariableStructure protocols
  • OSBaseType protocols
  • ObjectPointer protocols
  • Methods available in other classes
  • User primitives
  • User primitive tables
  • Functions available in user primitives
  • Asynchronous messages (interrupts)
  • Using user primitive functions outside user primitives
  • Sample user primitives for IBM Smalltalk
  • Sample callback for OS/2 and Microsoft Windows
  • Example callback code
  • Smalltalk code that uses the primitive above
  • Platform requirements
  • OS/2
  • Microsoft Windows 95, Windows 98, and Windows NT
  • Pascal16 and cdecl16 PlatformFunctions
  • Pascal16 and cdecl16 pointer conversion
  • UNIX platforms
  • Solaris platforms
  • Primitive error codes
  • Dynamic data exchange

  • Introduction
  • DDE concepts and definitions
  • DDE classes
  • DdeClient class
  • DdeServer class
  • DdeServerManager class
  • DdeCallbackData class
  • Building a DDE server
  • Building a DDE server that uses default processing
  • Building a DDE server that does not use default processing
  • Discussion of the DdeServerManager
  • Building a DDE client
  • An example DDE client
  • Discussion of the DdeClient
  • Formats of data transferred between DDE servers and clients
  • Callbacks for handling DDE events
  • Return values
  • DDE protocols
  • DdeServerManager public class methods
  • DdeServerManager public instance methods
  • DdeClass public instance methods
  • DdeServer public instance methods
  • DdeClient public instance methods
  • Protocols common to DdeServer and DdeClient
  • Converting Smalltalk objects to a ByteArray and back
  • Test cases
  • Spreadsheet
  • Spreadsheet window coordinates
  • Two windows exchanging data
  • Updating time and date
  • Updating time in the String format
  • Platform-specific support
  • National Language Support

  • Overview of IBM Smalltalk National Language Support
  • NLS concepts and definitions
  • The POSIX locale model
  • Overview of internationalization
  • Overview of localized messages
  • Overview of message catalogs
  • Locating message catalogs
  • National Language Support classes
  • Support for double-byte characters
  • Obtaining Locale, LCCType, and LCCollate objects
  • Obtaining LCMessages, LCMonetary, LCNumeric, and LCTime objects
  • NLS-enabled classes
  • Locale-specific sorting
  • Number formatting
  • Locale change notification and the image startup sequence
  • Tools for developing international software
  • Loading externalization tools
  • Using message templates
  • Referencing and initializing localized messages
  • Overview of the message localization process
  • Using message catalogs
  • Using external message dictionaries
  • Using indexed external messages
  • Deleting locales from a message catalog file
  • Support for extended locales
  • Compatibilities
  • Compression
  • Limitations
  • Error detection and description
  • Support for platform resource formats
  • Localization support API
  • IBM Smalltalk locale names
  • Manual localization
  • LCCollate
  • LCMessages
  • LCMonetary
  • LCNumeric
  • LCTime
  • Locale
  • Locales and platform representation
  • OS/2 Presentation Manager
  • Microsoft Windows
  • AIX, HP-UX, and Solaris
  • Inter-process communication

  • UNIX environment
  • Method specification
  • Usage example
  • UNIX process
  • Method specification
  • Usage example
  • UNIX pipe stream
  • UNIX read pipe stream method specification
  • UNIX write pipe stream method specification
  • Object Linking and Embedding (OLE)

  • OLE concepts and definitions
  • OLE classes
  • OleMainWindow
  • OlePrimitive
  • OleClient
  • OleControl
  • OleAutomationObject
  • OleFile
  • Building an OLE document container
  • Creating an OLE main window
  • Creating OLE clients
  • Enabling clipboard operations
  • Creating an object verb menu
  • Invoking the Links dialog
  • Saving and retrieving an OLE client
  • Using OLE automation
  • Creating OLE Automation Objects
  • Invoking methods of OLE automation objects
  • Getting and setting properties
  • Releasing an OLE automation object
  • Using OLE custom controls (OCXs)
  • Creating the OLE main window
  • Creating OCXs
  • Implementing an ambient-property handler
  • Using automation aspects of an OCX
  • Implementing event handlers
  • Wrapping OCXs with extended widgets
  • Using licensed OCXs
  • Appendix A. Widget resources and callbacks

    Appendix B. Extended widgets resources and callbacks

    Appendix C. Drag and drop resources and callbacks

    Appendix D. Common graphics platform differences

    Appendix E. Common widgets platform differences

    Index


    [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]