home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / vptool.zip / vpbldobj.inf (.txt) < prev    next >
OS/2 Help File  |  1994-08-22  |  11KB  |  301 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Installation ΓòÉΓòÉΓòÉ
  3.  
  4. You should modify the ENVIRON file contained in the VPTOOLKT directory if it 
  5. does not already match the configuration of your development environment. 
  6.  
  7.  
  8. ΓòÉΓòÉΓòÉ 2. Introduction ΓòÉΓòÉΓòÉ
  9.  
  10. VisPro/Objects gives you a quick start when developing objects for VisPro/REXX, 
  11. VisPro/C and VisPro/C++. You simply fill out four notebook pages containing 
  12. information about about your object: 
  13.  
  14. General 
  15.    Fill in general information including the name of your object. 
  16.  
  17. Events 
  18.    Define the events that your object supports. 
  19.  
  20. Styles 
  21.    Define style flags for your object. 
  22.  
  23. Methods 
  24.    Define the methods for your object. 
  25.  
  26. Once all the information for your object has been defined, selecting the 
  27. generate  button will create all the source code files for your object. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 3. General Page ΓòÉΓòÉΓòÉ
  31.  
  32. The general page allows you to specify the following information for your 
  33. object: 
  34.  
  35. Object Name 
  36.    The contents of the object name field will define the name of your SOM 
  37.    object as well as the names of the generated source code files.  It should 
  38.    contain a maximum of 6 alpha-numeric characters and no spaces.  Use of mixed 
  39.    case characters are recommended. 
  40.  
  41. Descriptive name 
  42.    The contents of the descriptive name field will be used to describe your 
  43.    object within the VisPro development environment. 
  44.  
  45. Size 
  46.    The X Size and Y Size spin buttons allow you to define a default size for 
  47.    your objects.  This is the initial horizontal and vertical size of the the 
  48.    object when it is dragged from the tool bar and dropped on a VisPro canvas. 
  49.  
  50. Has Text 
  51.    This defines whether or not your objects has text associated with it.  For 
  52.    example, an entry field has text while a value set does not. Objects that 
  53.    have text will support direct editing of the text within the VisPro views. 
  54.  
  55.    Objects that have text will also respond to the VpGetItemValue and 
  56.    VpSetItemValue methods.  Help entries and method templates will be generated 
  57.    if the text attribute is selected. 
  58.  
  59. Default Text 
  60.    If your object has text, the value entered into the default text entry field 
  61.    will be the text the object will have when it is added to a VisPro canvas. 
  62.  
  63. Has Control Data 
  64.    Control data is a 'C' struct that allows you to store extra information 
  65.    about your object.  For example, the ENTRYFDATA structure for an OS/2 entry 
  66.    field allows you to specify the character limit of the entry field as well 
  67.    as the initial selection.  You can program the style page of your object so 
  68.    that VisPro users can set the control data visually using controls on your 
  69.    style page. 
  70.  
  71.    Note: Since VisPro stores the contents of your control data, the struct 
  72.    should only contain things that can be stored statically.  Integers, and 
  73.    fixed length strings are appropriate but pointers, PM handles and other 
  74.    runtime objects can not be stored in control data for there values can 
  75.    change from run to run. 
  76.  
  77. Generate Style Page 
  78.    If you select this check box, a style page will appear in the Settings View 
  79.    for your object.  All the elements of a style page will be generated for 
  80.    you.  This includes the dialog resource file as well as the shell of a 
  81.    dialog procedure.  The dialog will contain check boxes for the base styles: 
  82.    visible, tabstop, group, and disabled.  Checkboxes will also appear for any 
  83.    styles that you define for your object. 
  84.  
  85. Window Procedure Name 
  86.    If you do not select to have a window procedure generated for you, this 
  87.    entry field will contain than name of the window class for your object. 
  88.    Note that you can not use any of the window class names used by VisPro: 
  89.    WC_BUTTON, WC_STATIC, WC_COMBOBOX, WC_LISTBOX, WC_ENTRYFIELD, WC_MLE, 
  90.    WC_VALUESET, WC_NOTEBOOK, WC_SLIDER,  WC_CONTAINER, or WC_CIRCULARSLIDER. 
  91.  
  92. Include File 
  93.    If you do not select to have a window procedure generated for you, you 
  94.    should enter the name of the include file that contains the definitions for 
  95.    your window class. 
  96.  
  97. Lib File 
  98.    If you do not select to have a window procedure generated for you, you 
  99.    should enter the name of the LIB file that contains entry points for your PM 
  100.    window procedure. 
  101.  
  102.  
  103. ΓòÉΓòÉΓòÉ 4. Events Page ΓòÉΓòÉΓòÉ
  104.  
  105. You can add, change and delete events for your object using the Events Page. 
  106. Add a generic event by selecting the Add button.  Once a generic event is 
  107. added, change the event by direct editing each column <Alt-Click>. 
  108.  
  109. Descriptive Name 
  110.    This is the text that will appear in the Event menu for your object. 
  111.  
  112. Abbreviation 
  113.    This must be a unique alphabetic name of no more than 8 characters and no 
  114.    spaces.  It is a good convention to use uppercase characters. 
  115.  
  116. WM_CONTROL Symbol 
  117.    This is the WM_CONTROL notification symbol that will be used for your events 
  118.    PM message. 
  119.  
  120.    If you do not use a standard OS/2 symbol or it is not defined in an include 
  121.    file, you will have to use the #define statement in your object's .CSC file 
  122.    in order to define the symbol. Also, if you are defining your own PM window 
  123.    procedure , you will have to add statements of the following form in order 
  124.    to implement the event notification: 
  125.  
  126.    WinSendMsg(WinQueryWindow(hwnd,QW_OWNER), WM_CONTROL, 
  127.    MPFROM2SHORT(WinQueryWindowUShort(hwnd,QWS_ID),symbol ,0); 
  128.  
  129. C++ Override function 
  130.    This is the name of the virtual function that will be defined as a member 
  131.    function of this objects handler.  It must be a unique name. 
  132.  
  133. Description 
  134.    Fill in a short description of this event.  This description will appear as 
  135.    a comments in your objects .H and .HPP files for the C and C++ version 
  136.    respectively.  Also, it will be generated into the .IPF help file for this 
  137.    object. 
  138.  
  139. A .PTR pointer file will be created for each of your object's events.  The 
  140. Abbreviation will be used as the file name for each pointer.  These pointers 
  141. will be used to display each event in a form's Event Tree View and the 
  142. VisPro/REXX debugger.  Note that you can use the OS/2 icon editor to edit .PTR 
  143. files. 
  144.  
  145.  
  146. ΓòÉΓòÉΓòÉ 5. Styles Page ΓòÉΓòÉΓòÉ
  147.  
  148. You can add, change and delete style bits for your object using the Styles 
  149. Page. Add a generic style by selecting the Add button.  Once a generic style is 
  150. added, change the style by direct editing each column <Alt-Click>. 
  151.  
  152. Name 
  153.    This must be a unique alphabetic name with no spaces.  It is a good 
  154.    convention to use uppercase characters. 
  155.  
  156. Bit value 
  157.    Enter a unique hexadecimal value for the bit which is reserved for this 
  158.    style. 
  159.  
  160. C++ name 
  161.    This is the C++ name for the style.  This will be used in the enumeration of 
  162.    C++ styles for the object. 
  163.  
  164. Description 
  165.    Fill in a short description of this style.  This description will appear as 
  166.    a comments in your objects .H and .HPP files for the C and C++ version 
  167.    respectively.  Also, it will be generated into the .IPF help file for this 
  168.    object. 
  169.  
  170. MutEx 
  171.    This field indicates whether the style is mutually exclusive or not. 
  172.    Mutually exclusive styles mean that only one of a set of styles is valid at 
  173.    any one time.  Any value other than a zero lengthed string will indicate the 
  174.    style is mutually exclusive (use of an X is a recommend convention). 
  175.    Mutually exclusive styles will have a radio button generated on their styles 
  176.    page rather than a check box.  If a style is flagged as mutually exclusive, 
  177.    you will have to edit your files xxxxxxRS.C and VCxxxxxx.C files to replace 
  178.    the 0xFFFFFFFF values to contain all of the objects in the set. 
  179.  
  180. Static 
  181.    This field indicates whether the style is static or not.  Static styles can 
  182.    not be changed on the fly, rather they can only be set upon 
  183.    instansiation/creation. Any value in this field other than a zero length 
  184.    string will indicate that the style is static (use of an X is a recommend 
  185.    convention).  If a style is static, methods for setting/reseting and 
  186.    querying its state will not be generated. 
  187.  
  188. Note: Each style you add will have a corresponding check box on the object 
  189. settings view style page that is created for your object.  Also,  methods to 
  190. set and reset the style bits will be created for your object. 
  191.  
  192.  
  193. ΓòÉΓòÉΓòÉ 6. Methods Page ΓòÉΓòÉΓòÉ
  194.  
  195. You can add, change and delete methods for your object using the Methods Page. 
  196. Add a generic method by selecting the Add button.  Once a generic method is 
  197. added, change the method by direct editing each column <Alt-Click>. 
  198.  
  199. Description 
  200.    This is the textual description that will appear in the VisPro Create Link 
  201.    window for your method. 
  202.  
  203. Model 
  204.    This is the template for your method.  This template will be inserted into 
  205.    an event editor as a result of drag and drop programming.  Note that the %s 
  206.    statement is required. VisPro will use this as a marker to substitute the 
  207.    object id for an object. 
  208.  
  209. C Model 
  210.    This is the template for the C version of the method. 
  211.  
  212. C++ Model 
  213.    This is the template for the C++ method of the method. 
  214.  
  215. Description 
  216.    Fill in a short description of this method.  This description will appear as 
  217.    a comments in your objects .H and .HPP files for the C and C++ version 
  218.    respectively.  Also, it will be generated into the .IPF help file for this 
  219.    object. 
  220.  
  221.  
  222. ΓòÉΓòÉΓòÉ 7. Generate ΓòÉΓòÉΓòÉ
  223.  
  224. Selecting the generate button will create the following source code files.  The 
  225. files will be created in the same directory as your .VPJ file. 
  226.  
  227. M.CMD 
  228.    This is a macro file that will set up your environment and build your 
  229.    object. 
  230.  
  231. <object name>.MAK 
  232.    This is a make file that will define the components that are needed to build 
  233.    your object 
  234.  
  235. VP<object name>.CSC 
  236.    This is a SOM object definition file that contains all the SOM definitions 
  237.    required to build your object. 
  238.  
  239. VP<object name>.PTR 
  240.    This file contains the tool bar icon for your object.  It can be modified 
  241.    using the OS/2 Icon Editor. 
  242.  
  243. event icons 
  244.    An event icon is created for each event for your object.  It can be modified 
  245.    using the OS/2 Icon Editor. 
  246.  
  247. VP<object name>.RC 
  248.    This is the resource file that defines the icon/pointer files for your 
  249.    object.  These include icons for events as well as the tool bar icon for 
  250.    your object. 
  251.  
  252. VP<object name>.DLG 
  253.    If you chose to generate a style page dialog, the resources for the dialog 
  254.    will appear in this file.  Note that a check box will be generated for the 
  255.    base styles as well as for each style flag defined by you. 
  256.  
  257. VP<object name>.RCH 
  258.    This is an include file that contains and #define statements of symbols 
  259.    included in the resource and dialog files. 
  260.  
  261. VP<object name>.C 
  262.    This 'C' source file contains the SOM methods for your object. You only need 
  263.    to modify this file if you wish to modify the default style for your object 
  264.    or the PM WinRegisterClass statement for your objects window procedure. 
  265.    Note the the default style for your object will be initially set to 
  266.    WS_VISIBLE. 
  267.  
  268. <object name>RS.C 
  269.    This 'C' source file contains the dialog procedure for your objects style 
  270.    page (if applicable).  It also contains the templates for your objects 
  271.    methods.  You will need to modify the dialog procedure if your object 
  272.    supports control data information. 
  273.  
  274.    There will als be comments located in the file where you need to define 'C' 
  275.    statments to implement each of your object's methods. 
  276.  
  277. <object name>PM.C 
  278.    This 'C' source file contains the Presentation Manager window procedure for 
  279.    your object (if applicable).  You will need to modify this window procedure 
  280.    to define : 
  281.  
  282.    o Visual behavior (WM_PAINT) 
  283.  
  284.    o Mouse and mouse button behavior (WM_MOUSEMOVE, WM_BUTTONxDOWN, 
  285.      WM_BUTTONxUP, and WM_BUTTONxDBLCLK) 
  286.  
  287.    o Keyboard behavior (WM_CHAR) 
  288.  
  289. VP<object name>.DEF 
  290.    This is the linker definition file for your object. 
  291.  
  292. VP<object name>.IPF 
  293.    This is the shell of the help file for your object.  The shell of many help 
  294.    panels are created for you including panels for general help, events, 
  295.    methods, and the style page. 
  296.  
  297. After your source files have been generated, run the M macro to build your 
  298. object.  Copy the dynamic link library (.DLL)  and the help file (.HLP)  into 
  299. your VISPRORX directory.  Also add the object name to the VPRCLASS file located 
  300. in the VISPRORX directory.  The next time you open a VisPro form, your object 
  301. will appear on the tool bar.