home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / dataflex / menu.pkg < prev    next >
Encoding:
Text File  |  1993-10-27  |  1.4 KB  |  60 lines

  1. // MENU.PKG
  2. // December 21, 1990
  3. // LS
  4. //
  5. // package for creating action bar menus with pull down menus; supports
  6. // cascading pull down menus
  7.  
  8. #CHKSUB 1 1 // Verify the UI subsystem.
  9.  
  10. use UI
  11. use Action
  12. use Pulldown
  13.  
  14. //
  15. // create_menu syntax for Action_Bar_Menu
  16. //
  17. //             !1     !2       !3       !4     !5       !6
  18. // CREATE_MENU Object
  19. // CREATE_MENU Object Image
  20. // CREATE_MENU Object Image    LOCATION Row    Column
  21. // CREATE_MENU Object Image    LOCATION Row    Column   RELATIVE
  22. // CREATE_MENU Object LOCATION Row      Column
  23. // CREATE_MENU Object LOCATION Row      Column RELATIVE
  24.  
  25. // create_menu syntax for Pull_Down_Menu ( -- xxx-- )
  26. //
  27. //             !1     !2           !3
  28. // CREATE_MENU Object SUB_LOCATION
  29. // CREATE_MENU Object SUB_LOCATION Img
  30.  
  31. #COMMAND CREATE_MENU R
  32.   #IF (!0<4)
  33.     #IFSAME !2 SUB_LOCATION
  34.       object !1 is a Pull_Down_Menu !3
  35.     #ELSE
  36.       object !1 is an Action_Bar_Menu !2 !3
  37.     #ENDIF
  38.   #ELSE
  39.     #IFSAME !2 LOCATION
  40.       object !1 is an Action_Bar_Menu
  41.       #IF (!0>4)
  42.         set Location to !3 !4 !5
  43.       #ELSE
  44.         set Location to !3 !4 Absolute
  45.       #ENDIF
  46.     #ELSE
  47.       object !1 is an Action_Bar_Menu !2
  48.       #CHECK !3 LOCATION
  49.       #IF (!0>5)
  50.         set Location to !4 !5 !6
  51.       #ELSE
  52.         set Location to !4 !5 Absolute
  53.       #ENDIF
  54.     #ENDIF
  55.   #ENDIF
  56.   item_list
  57. #ENDCOMMAND
  58.  
  59. #REPLACE END_MENU END_PULL_DOWN
  60.