home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-24 | 14.2 KB | 430 lines | [TEXT/ttxt] |
- Contents
- ````````
-
- 1 Introduction to Tools Plus
- What is Tools Plus
- An Overview of Tools Plus
- The Tools Plus Advantage
- Who can benefit from Tools Plus
- What kind of applications can be written with Tools Plus
- What is Tools Plus not suitable for
- System Requirements
- Assumptions made when writing this manual
- Convensions used throughout this manual
- Software Updates
- For your information (recommended reading)
-
- 2 Installing Tools Plus
- Installing Tools Plus in THINK C
- Adding Tools Plus to a THINK C Project
- Tools Plus Segments
- Installing Tools Plus in THINK Pascal
- Adding Tools Plus to a THINK Pascal Project
- After Compiling
- Tools Plus Segments
- Compiling The C Demo Application
- Compiling The Pascal Demo Application
-
- 3 Designing Your Application
- Overview
- A Macintosh Event, in Brief
- Macintosh Event Queue
- Key Up Events
- Tools Plus Events
- The Main Event Loop
- System 5 and 6’s Finder and MultiFinder, and System 7
- Finder
- MultiFinder
- System 7
- The C Header file (ToolsPlus.h)
- Range Checking
- What to read next
-
- 4 Initialization
- Initializing Tools Plus
- Initialization Failure
- Other Initialization
- The Cursor
-
- 5 Windows
- Overview
- Window Types
- Title Bar, Close box, and Zoom box
- Size Box
- Maximum Number of Open Windows
- Tool Bar and Floating Palettes
- Standard Windows
- Active Window
- Work Window
- Current Window
- Editing Field Window
- Modal Windows
- Window Layers
- Global and Local Co-ordinates
- Handling Windows
- Opening a window
- Floating Palettes
- Opening a tool bar
- Closing a window, tool bar, or palette
- Changing a window’s size
- Moving a window
- Hiding/showing a window
- Activating a window
- Making a window current without activating it
- Making the active window current
- Changing a window’s title
- Setting a window’s size limits
- Setting the “standard” and “user” co-ordinates for zooming
- Getting the “standard” and “user” co-ordinates for zooming
- Getting a window’s status information
- Getting your app’s active window number
- Getting your app’s current window number
- Getting your app’s front most window number
- Getting your app’s tool bar number
- Getting your app’s front most floating palette’s number
- Getting your app’s front most standard window number
- Getting your app’s work window number
- Getting the window number of your app’s active edit field
- Determining if a window is open
- Determining if a window is visible
- Determining a window’s type
- Getting a window’s pointer
-
- 6 Buttons
- Overview
- Button Types
- Button States
- Button Titles
- Fonts
- Default Button
- Handling Buttons
- Creating a new button
- Fonts
- Default Button
- Deleting a button
- Enabling/Disabling a button
- Selecting/Deselecting a button
- Determining if a button is enabled
- Determining if a button is selected
- Changing a button’s title
- Flashing a button (simulating selection)
- Setting a default button
- Removing the “default button” status from a window
-
- 7 Picture Buttons
- Overview
- Button Types
- Button Behavior
- Selection Effects
- Disabling Effects
- Button’s Value and Stages
- Handling Picture Buttons
- Creating a new picture button
- Resource IDs
- Icon Resource IDs
- 3D SICN Buttons
- PICT Resource IDs
- Behavior and Appearance Specification
- Rate of Repeating Events
- Deleting a picture button
- Enabling/Disabling a picture button
- Selecting/Deselecting a picture button
- Getting a picture button’s minimum value limit
- Setting a picture button’s minimum value limit
- Getting a picture button’s maximum value limit
- Setting a picture button’s maximum value limit
- Getting a picture button’s current value
- Setting a picture button’s current value
- Setting a picture button’s value and selection state
- Setting a picture button’s value change rate
- Setting a picture button’s value change speed
- Determining if a picture button is enabled
- Determining if a picture button is selected
- Flashing a picture button (simulating selection)
-
- 8 Scroll Bars
- Overview
- Scroll Bar States
- Handling Scroll Bars
- Creating a new scroll bar
- Deleting a scroll bar
- Enabling/disabling a scroll bar
- Getting a scroll bar’s minimum value limit
- Setting a scroll bar’s minimum value limit
- Getting a scroll bar’s maximum value limit
- Setting a scroll bar’s maximum value limit
- Getting a scroll bar’s current value
- Setting a scroll bar’s current value
-
- 9 Editing Fields
- Overview
- Field Capacity
- Alignment of text in a field
- The Window’s Active Field
- Activating a Field
- Editing Field Window
- The Field’s String & Edited Text
- Fonts
- Length Limited Fields
- Word Wrap
- Clicking and Tabbing in fields
- Using Fields
- Mac 512KE and Mac Plus keyboard with numeric pad
- The Edit Menu
- Handling Fields
- Special Handling of Fields
- Creating a new field
- Fonts
- Deleting a field
- Activating a field
- Deactivating a field
- Clicking in an inactive field
- Getting the active field’s edited text
- Saving the active field’s edited text as the field’s string
- Getting the window number of your app’s active edit field
- Getting the active field’s number
- Turning field length limiting on/off
- Repositioning a field
- Scrolling fields
- Pasting into a field under your application’s control
-
- 10 List Boxes
- Overview
- Fonts
- Handling List Boxes
- Creating a new list box
- Selection Methods
- Fonts
- Deleting a list box
- Adding a new line / replacing an existing line in a list box
- Getting a line’s text
- Searching lines for specific text (alphabetic order)
- Selecting/Deselecting a line
- Determine if a line is selected
- Determine the next selected line number
- Inserting a blank line into a list box
- Deleting a line
- Turning a list box’s drawing on/off
-
- 11 Pop-Up Menus
- Overview
- Command Keys & Hierarchical Pop-Up Menus
- Handling Pop-Up Menus
- Creating a new pop-up menu
- Appearance and Behavior
- Pop-Up Menus on Color Backgrounds
- Adding, changing or renaming a pop-up menu item
- Metacharacters
- Inserting a pop-up menu item
- Deleting a pop-up menu or pop-up menu item
- Getting a pop-up menu item’s text
- Renaming a pop-up menu item
- Enabling or disabling a pop-up menu or pop-up menu item
- Determine if a pop-up menu is enabled
- Displaying or hiding the Check mark
- Displaying or hiding special marks
- Geting a pop-up menu item’s special mark
- Setting a pop-up menu item’s icon
- Geting a pop-up menu item’s icon
- Changing a pop-up menu item’s style
- Determining the number of items in a pop-up menu
- Determining the selected item in a pop-up menu
-
- 12 Menus
- Overview
- Menus Accessed by MultiFinder and System 7
- Edit Menu
- Desk Accessories
- Menus and Editing Fields
- Menus and Desk Accessories
- Command Key Equivalents
- Handling Menus
- Creating the Apple menu
- Creating and renaming a menu or menu item
- Metacharacters
- Attaching or detaching a hierarchical menu
- Inserting a menu item
- Deleting a menu or menu item
- Updating the menu bar (redrawing it)
- Getting a menu item’s text
- Renaming a menu item
- Enabling or disabling a menu or menu item
- Displaying or hiding the Check mark
- Displaying or hiding special marks
- Getting a menu item’s special mark
- Setting a menu item’s Command-key equivalent
- Getting a menu item’s Command-key equivalent
- Setting a menu item’s icon
- Getting a menu item’s icon
- Changing a menu item’s style
- Determining the number of items in a menu
- Determining a menu’s parent menu
- Determining a menu item’s submenu
- Highlight or unhighlight a menu
-
- 13 Cursors
- Overview
- Automatic Cursor Changes
- The Watch Cursor
- Starting your application
- The Cursor Table
- Advanced Features
- Cursor Animation
- Handling Cursors
- Changing the cursor’s shape
- Resetting cursor shape according to window orientation
- Creating a new cursor table
- Deleting a cursor table
- Creating/replacing a cursor zone (using a rectangle)
- Creating/replacing a cursor zone (using a region)
- Deleting a cursor zone
- Getting a cursor zone’s bounding rectangle
- Getting a cursor zone’s region
- Indicate that cursor zone regions have been altered
- Making a window use a cursor table (or stop using one)
- Determining which cursor zone contains a specified point
- Enabling/disabling button clicks during a watch cursor
-
- 14 System Polling
- Overview
- What Is Polling?
- Task Switching
- Background Processing
- Macintosh Events
- Watch Cursor -- a busy system
- The Event Queue
- Tools Plus Event Record
- Event Record Fields
- Event Modifiers
- Event Modifiers Using C
- Event Modifiers Using Pascal
- PollSystem (System polling)
- Tools Plus Event Codes
- What Does PollSystem Do?
- Internally Processed Events
- Externally Processed Events
- Inside PollSystem
- Translating Toolbox events to Tools Plus events
- Responding to Events
- doNothing
- doChgWindow
- doRefresh
- doGoAway
- doButton
- doMenu
- doKeyDown
- doAutoKey
- doKeyUp
- doClickField
- doScrollBar
- doListBox
- doClick
- doPopUpMenu
- doPictButton
- doClickControl
- doManual
- doMoveWindow
- doGrowWindow
- doClickDesk
- doZoomWindow
- doSuspend
- doResume
- Scheduling background processing
- Determining if "scheduling processing" is supported
- Discontinuing multiple clicks or drags
- Determining if your application is suspended
- “Field to Event” Cross reference
-
- 15 Color Drawing & Multiple Monitors
- Overview
- Using One Monitor
- Using Multiple Monitors
- Changing Screen Settings
- Determining if Color QuickDraw is used
- Determining the number of logical screens
- Beginning color-dependent drawing on a window
- Ending color-dependent drawing on a window
- Determining the number of colors on a screen
- Determining if the screen is set to draw in color
- Resetting the current window’s pen to default values
- Getting the current window’s pen settings
- Setting the current window’s pen settings
-
- 16 User Notification
- Overview
- Notifying the User
- Define settings for notifying the user
- Notifying the user that your application needs attention
-
- 17 Dynamic Alerts
- Overview
- Icons
- Text
- Buttons
- Function’s Value
- Automatic User Notification
- Alerts Samples
- Displaying a Dynamic Alert
- Custom Button Combinations
- Changing button titles on Dynamic Alerts
-
- 18 Miscellaneous Routines
- Overview
- Drawing an icon
- Intelligent Icon Drawing
- Icon Family
- Icon Selection
- Drawing the Icon, Selecting, Disabling, and Masking
- Creating Your Own Icons
- Set the default appearance for disabled icons
- Default Appearance for Disabled Icons
- Determining the System version
- Play the System Error sound
- Wait for a specified time
- Drawing “Zoom Lines”
- Drawing a standard Macintosh progress thermometer
- Determining the minimum value of two numbers
- Determining the maximum value of two numbers
-
- 19 Other Macintosh Features
- Overview
- Alerts
- Dialogs
- Custom Controls
- Lists
-
- 20 Memory
- Overview
- Editing Fields
- Measurements
- Routines that consume heap space (by category)
- Routines that consume heap space (alphabetic)
- The Style Table
- Good memory habits
-
- 21 Font Heights
- Font heights table
-
- 22 Special Routines
- Use these routines with caution, or don’t use them!
-
- 23 Completing Your Application
- Overview
- Application’s Icons
- Icon Family
- File Types, Creators, and the Application Signature
- Signature (the Creator code)
- Bundle
- Version
- mstr Resources
- SIZE Resource
- Cloned SIZE resources
-
- 24 Technical Support
- What does Technical Support do?
- What doesn’t Technical Support do?
- Electronic Mail (E-mail) Support
- Mail Support
- Software Updates
- Software Upgrades
-