home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / PowerPlant / 3D Additions 1.7 / About 3D Additions < prev   
Encoding:
Text File  |  1995-10-24  |  8.2 KB  |  179 lines  |  [TEXT/CWIE]

  1. About 3D Additions Library
  2. ==========================
  3.  
  4. Version 1.7
  5. October 24, 1995
  6.  
  7. ©1994-95 J.Rodden, DD/MF & Associates. All rights reserved.
  8.  
  9. This source code is loosely based on and heavily inspired by source code
  10. by James W. Osborne, copyright (c) 1993, Apple Computer.
  11.  
  12. The accompanying source code is released as 'freeware'. And as such you
  13. are free to use it in any way that you see fit. The only exception is
  14. that you cannot sell for profit, the source on its own. It is ok to use
  15. the source in other products which are then sold for profit.
  16.  
  17. 3D Buttons CDEF by Zig Zichterman is public domain. See associated ReadMe files.
  18.  
  19.  
  20. Description
  21. -----------
  22. The classes in this archive provide a simple 3D interface as described in
  23. Develop issue 15. Subclasses of LAttachment, LPane, and LEditField are
  24. available plus stand-alone drawing routines. Lines, rectangles and ovals
  25. are supported, all elements can be drawn either raised or inset and use 
  26. either a global color scheme or individualized (per routine) colors.
  27. 3D Buttons CDEF by Zig Zichterman is also included for drawing push
  28. buttons, checkboxes, radio buttons, and icon buttons. (Two radio button
  29. styles are provided.) Low level drawing is done by ANSI C routines so
  30. C++ and PowerPlant are not needed. Higher level (PP/C++ dependent)
  31. routines are fully bit depth smart.
  32.  
  33. The differences between these classes and those in Develop are 1) these use 
  34. PowerPlant rather than MacApp, and 2) these are much simpler.
  35.  
  36. Most of the functionality is contained in 3DUtilities.cp.  It contains the actual
  37. drawing routines used by the other files. You can use these on their own, or in
  38. concert with the pane and attachment classes in the other two .cp files. There is
  39. also a wrapper class for the basic drawing routines which automatically takes care
  40. of different bit depths.
  41.  
  42. I've included comments that should help you get started using these classes
  43. quickly. Also included is a demo program and corresponding project and source files.
  44.  
  45.  
  46. Important Notes
  47. ---------------
  48. *** WARNING: Naming scheme changed for panes (new in V1.4).
  49.              Default color and resource defined panes had their names swapped.
  50.  
  51. The 3D Buttons CDEF package included is NOT the same as that distributed by Zig
  52. Zichterman (though I hope he'll incorporate my changes in his release :)
  53.  
  54. There are TWO radio button styles: that described in Develop 15 with convex/concave
  55. buttons, and a circular version of the embedded checkbox. The latter style is very 
  56. similar (if not the same) as that used on other platforms (Motif, OS/2, Windows), and 
  57. I simply like it better. See CDEF Notes below for more information.
  58.  
  59.  
  60. Library summary
  61. ---------------
  62. 3DGrays.h    :    Defines 16 shades of gray for using with the drawing routines.
  63.  
  64. 3DUtilities :    Actual drawing routines. ANSI C procedures designed to be usable 
  65.                 as a stand alone library (it requires 3DGrays.h) with an API 
  66.                 style similar to Mac Toolbox managers complete with state and 
  67.                 accessor functions.
  68.                 
  69.                 There are four basic types of 3D elements: lines, frames (outlines), 
  70.                 borders, and panels. Each type can be rendered to appear raised or 
  71.                 inset, rectangular or oval. Panels draw and entire area raised or inset.
  72.                 Frames only draw an outline, but the outline lines are inset or raised.
  73.                 The only difference between borders and panels is whether an outline only
  74.                 is drawn or the area is filled as well. This distinction was made to
  75.                 eliminate excessive screen flashing in some cases.
  76.  
  77. 3DAttachments:    Attachment classes for frame, border, and panel 3D interface elements.
  78.  
  79. 3DPanes:        Pane subclasses for automatic frame and panel 3D elements.
  80.  
  81. 3DDrawingUtils:    Provides a wrapper class for the procedures in 3DUtilities. Handles
  82.                 multiple bit depths automatically.
  83.  
  84. 3DTextFields:    Factory classes for creating inset text fields (both editable and captions).
  85.  
  86. LStdCDEFControl:Provides 3D versions of LStdButton, LStdCheckBox, and LStdRadioButton.
  87.                 Uses 3D Buttons CDEF by Zig Zichterman and modified by J.Rodden.
  88.  
  89.  
  90. There are two pane implementations for each type of 3D element. The differences are in 
  91. how much programmer control and flexibility there is over color usage and appearance.
  92.  
  93. The first implementation uses the 3DUtilities color settings to determine the colors chosen
  94. and makes the most effecient usage of memory. The second implementation allows each instance to
  95. have a unique color combination controlled by PPob resources.
  96.  
  97. Both implementations use Constructor templates. You will need to copy the CLSS resource into
  98. your project resource file from the demo project resource file or from the 3D Constructor Tmpls
  99. file in the 3D Additions folder.
  100.  
  101. *** Make sure to put the 3D Additions folder in your CW directory tree.
  102.  
  103.  
  104. CDEF Notes
  105. ----------
  106. The CDEF has a resource id of 1000. In order to use it from PowerPlant you must change the
  107. Control Kind value in Constructor's StdControl window. To determine what value to enter use 
  108. the equation N * 16 + V where N is the resource id (1000) and V is the variation code as 
  109. described in Inside Macintosh. The basic variation codes built into the Toolbox work the 
  110. same (pushButProc(0), checkBoxProc(1), radioButProc(2), & useWFont(8)). An additional 
  111. variation code (indentHighlighted(4)) is also available and works the same as useWFont--it 
  112. modifies the control type when ORed with the basic control typecodes. When ORed with 
  113. pushButProc, the button's title will indented when the button is pressed. When ORed with
  114. radioButProc, the radio button will be drawn as an embedded circle instead of the default
  115. convex/concave style. Currently, indentHighlighted has no effect when ORed with checkBoxProc,
  116. but I'm open to suggestions. (Perhaps a stylized checkmark).
  117.  
  118.  
  119. Problems and Future Work
  120. ------------------------
  121.  
  122. • Refine B&W "Pseudo-3D" Drawing routines.
  123. • Determine why the top radio button in the PPC version of the demo doesn't draw properly.
  124.  
  125.  
  126. Contact Address
  127. ---------------
  128.  
  129. EMail:    rodden@cse.ucsc.edu or rodden@alumni.cse.ucsc.edu (not in effect yet)
  130.  
  131. SMail:    James Rodden
  132.         2071 Robinhood Lane
  133.         Los Altos, CA 94024 
  134.  
  135.  
  136. Change History
  137. --------------
  138. Oct. 24 '95:    V1.7
  139. Added inspirational copyright credit to James W. Osborne and Apple Computer, Inc.
  140. Added setter and getter for resource defined 3D panel color schemes, fixed a bug in
  141. constructing resource defined panes' color settings, and changed resource color definitions
  142. to read real RGBColors now that Constructor 2.0 supports this.
  143. Made all low level routines deal strictly with consts (except getters).
  144. Made U3DDrawingUtils routines more C++ like by overloading with call-by-reference versions.
  145. Updated for CW7, incl. Constructor 2.0 style custom pane template resources.
  146. Dropped PPC-based demo app to speed and simplify releases--not really necessary anyway.
  147. Made 3DPanes and 3DStdControls self-registering with URegistrar (PP should adopt this, IMHO).
  148.  
  149. Jul.  9 '95:    V1.6  (released on Celestin's Apprentice CD)
  150. Fixed compiler type checking errors from CW6. Added text field factory classes.
  151. Attempted to implement "Pseudo-3D" drawing routines to get shaded effect in B&W modes.
  152. I think I made some other changes/improvements, but frankly I don't remember--school
  153. got in the way of documenting them promptly :)
  154.  
  155. Jan. 31 '95:    V1.5
  156. Fixed problem when drawing to 4 bit color screens by defaulting to B&W. Made 3D pen
  157. state saving class public. Optimized U3DDrawingUtils routines for minimal code bloat
  158. while retaining maximum speed.
  159.  
  160. Jan. 19 '95:    V1.4
  161. Added oval drawing routines. Added push button, check box, and radio button controls
  162. via 3D Buttons CDEF by Zig Zichterman (thanks Zig!). Performance tuning for panes. 
  163. Normalized class naming scheme. RegisterAll3DClasses routine available for stream 
  164. (resource) definable classes.
  165.  
  166. Dec. 12 '94:    V1.3
  167. Added wrapper class to utility drawing procedures which handles different bit depths.
  168.  
  169. Dec. 11 '94:    V1.2
  170. Added device loop to panes and attachments, handles different bit depths correctly.
  171.  
  172. Dec.  3 '94:    V1.1
  173. Mixture of resource and programatic control over color usage and appearance. Pane
  174. subclasses optimized to use minimal memory and use 3D drawing routines directly to
  175. minimize drawing stack usage. 3D drawing routines packaged to mimick Mac Toolbox 
  176. Manager style API and written to ANSI C.
  177.  
  178. Nov. 30 '94:    V1.0
  179. First release. All appearence control from code. Pane subclasses used attachments.