home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / PBAPI10.ZIP / APIDOCS.ZIP / MENU.DOC < prev    next >
Text File  |  1998-02-21  |  5KB  |  106 lines

  1. Author....... : Gary Price
  2. Copyrighted by: Freejack's Software 1997-98
  3.  
  4. MENU API for TriBBS v10.x/11.x written in PowerBasic v3.5
  5. ---------------------------------------------------------------------------
  6.  
  7. NOTE:
  8.  In order to save on documentation, I have supplied a Demo for the Menu API
  9.  Unit called "DEMOMENU.BAS". This should give a good example of how to build
  10.  your own menus and use these sub's below.
  11.  
  12.  To calculate a color number for the Attr, select a color from 1 to 15, then
  13.  mulptiply x 16. If you want to do forground, then add the number of color to
  14.  the sum of the multiplied answer like so: 1 x 16 = 16 for Blue Background,
  15.  add 15 for a total of 31 to give you Blue background with White forground.
  16.  
  17. ---------------------------------------------------------------------------
  18. The MENU unit is supplied as an effort to help programmers design better
  19. looking GUI's and Better control for their Main Program Design. The MENU
  20. unit is declared in PBAPI10.INC as follows:
  21.  
  22. SUB HorizontalMenu(Choices() AS STRING, _
  23.                    BarSave   AS STRING, _
  24.                    HiLight   AS INTEGER, _
  25.                    Mouse     AS INTEGER, _
  26.                    HPointer  AS INTEGER, _
  27.                    HotKey    AS INTEGER, _
  28.                    BarAttr   AS INTEGER, _
  29.                    HiAttr    AS INTEGER, _
  30.                    MenuRow   AS INTEGER, _
  31.                    Gap       AS INTEGER, _
  32.                    Marker    AS INTEGER)
  33.  
  34. SUB VerticalMenu(Choices()     AS STRING, _
  35.                  Infoline()    AS STRING, _
  36.                  Rtrn          AS STRING, _
  37.                  BarSave       AS STRING, _
  38.                  Mouse         AS INTEGER, _
  39.                  HotKey        AS INTEGER, _
  40.                  HelpTextColor AS INTEGER, _
  41.                  HelpAttr      AS INTEGER, _
  42.                  HiAttr        AS INTEGER, _
  43.                  MenuRow       AS INTEGER, _
  44.                  Marker        AS INTEGER, _
  45.                  HPointer      AS INTEGER, _
  46.                  Attr          AS INTEGER, _
  47.                  Shadow        AS INTEGER, _
  48.                  Border        AS INTEGER)
  49.  
  50. SUB MGInset(TRow AS INTEGER, _
  51.             LCol AS INTEGER, _
  52.             BRow AS INTEGER, _
  53.             RCol AS INTEGER, _
  54.             Attr AS INTEGER)
  55.  
  56. ---------------------------------------------------------------------------
  57. SUB HorizontalMenu(Choices() AS STRING, _
  58.                    BarSave   AS STRING, _
  59.                    HiLight   AS INTEGER, _
  60.                    Mouse     AS INTEGER, _
  61.                    HPointer  AS INTEGER, _
  62.                    HotKey    AS INTEGER, _
  63.                    BarAttr   AS INTEGER, _
  64.                    HiAttr    AS INTEGER, _
  65.                    MenuRow   AS INTEGER, _
  66.                    Gap       AS INTEGER, _
  67.                    Marker    AS INTEGER)
  68.  
  69.  This sub will allow you to create and control menu control item across the
  70.  top portion of your Menu. Please see the DemoMenu.bas to see how to setup.
  71.  
  72. ---------------------------------------------------------------------------
  73. SUB VerticalMenu(Choices()     AS STRING, _
  74.                  Infoline()    AS STRING, _
  75.                  Rtrn          AS STRING, _
  76.                  BarSave       AS STRING, _
  77.                  Mouse         AS INTEGER, _
  78.                  HotKey        AS INTEGER, _
  79.                  HelpTextColor AS INTEGER, _
  80.                  HelpAttr      AS INTEGER, _
  81.                  HiAttr        AS INTEGER, _
  82.                  MenuRow       AS INTEGER, _
  83.                  Marker        AS INTEGER, _
  84.                  HPointer      AS INTEGER, _
  85.                  Attr          AS INTEGER, _
  86.                  Shadow        AS INTEGER, _
  87.                  Border        AS INTEGER)
  88.  
  89.  This will allow Vertical Menu controls pop down windows from the Horizontal
  90.  Menu after a selection is made. Depending on the tag such as "@" sign, the
  91.  Vertical Menu will search a select case statement base on your selection,
  92.  then perform any Sub, or Gosub routines that you define. Pleae view the
  93.  DemoMenu.bas for a better understanding of this setup.
  94.  
  95. ---------------------------------------------------------------------------
  96. SUB MGInset(TRow AS INTEGER, _
  97.             LCol AS INTEGER, _
  98.             BRow AS INTEGER, _
  99.             RCol AS INTEGER, _
  100.             Attr AS INTEGER)
  101.  
  102.  This sub will create a background screen for your Menu allow you to pass a
  103.  color Attribute to the sub for background and foreground colors that will
  104.  give a inset windowed effect.
  105.  
  106.