home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / MENU.H < prev    next >
C/C++ Source or Header  |  1998-05-12  |  7KB  |  192 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #include "_ldefs.h"
  20. #include "collect.h"
  21.  
  22. #pragma pack(1)
  23. typedef struct {
  24.    USHORT Size;                  // Dimensioni della struttura
  25.    CHAR   MenuName[32];          // Nome del menu'
  26.    USHORT Items;                 // Numero di elementi presenti
  27.    UCHAR  Color;                 // Colore del testo normale
  28.    UCHAR  Hilight;               // Colore del testo evidenziato
  29.    CHAR   Prompt[128];           // Stringa da usare come prompt
  30. } HEADER;
  31.  
  32. #pragma pack(1)
  33. typedef struct {
  34.    USHORT Size;                  // Dimensioni della struttura
  35.    CHAR   Display[128];          // Testo da visualizzare all'utente
  36.    UCHAR  Color;                 // Colore del testo normale
  37.    UCHAR  Hilight;               // Colore del testo evidenziato
  38.    CHAR   Key[16];               // Comando per attivare l'opzione
  39.    USHORT Command;               // Tipo di comando da eseguire (vedi CMD_???)
  40.    CHAR   Argument[128];         // Argomenti al comando
  41.    USHORT Level;                 // Livello di accesso minimo
  42.    ULONG  AccessFlags;           // Flag di accesso
  43.    ULONG  DenyFlags;             // Flag di impedimento all'accesso
  44.    UCHAR  Automatic;
  45.    UCHAR  FirstTime;
  46. } ITEM;
  47.  
  48. #define MNU_NULL                 0
  49. #define MNU_LOGOFF               1
  50. #define MNU_GOTO                 2
  51. #define MNU_GOSUB                3
  52. #define MNU_RETURN               4
  53. #define MNU_ONLINEUSERS          5
  54. #define MNU_DISPLAY              6
  55. #define MNU_SETLANGUAGE          7
  56. #define MNU_SETPASSWORD          8
  57. #define MNU_RUNEXTERNAL          10
  58. #define MNU_FILEDOWNLOADANY      11
  59. #define MNU_MSGSELECT            13
  60. #define MNU_FILESELECT           14
  61. #define MNU_FILENAMELIST         15
  62. #define MNU_FILEDOWNLOAD         16
  63. #define MNU_FILEUPLOAD           17
  64. #define MNU_FILEDOWNLOADLIST     18
  65. #define MNU_FILEDATELIST         19
  66. #define MNU_FILENEWLIST          20
  67. #define MNU_FILEDELETE           21
  68. #define MNU_FILEKEYWORDLIST      22
  69. #define MNU_FILETEXTLIST         23
  70. #define MNU_SEARCHFILENAME       24
  71. #define MNU_MSGBRIEFLIST         25
  72. #define MNU_MSGTITLELIST         26
  73. #define MNU_MSGREAD              27
  74. #define MNU_MSGWRITE             28
  75. #define MNU_MSGMODIFY            29
  76. #define MNU_MSGUNRECEIVE         30
  77. #define MNU_MSGREADNONSTOP       31
  78. #define MNU_MSGDELETE            32
  79. #define MNU_MSGENTER             33
  80. #define MNU_MSGREPLY             34
  81. #define MNU_MSGINDIVIDUAL        35
  82. #define MNU_MSGLISTNEWAREAS      36
  83. #define MNU_PRESSENTER           37
  84. #define MNU_VERSION              38
  85. #define MNU_MSGFORWARD           39
  86. #define MNU_MSGREADORIGINAL      40
  87. #define MNU_MSGREADREPLY         41
  88. #define MNU_TOGGLEFULLED         42
  89. #define MNU_TOGGLEFULLREAD       43
  90. #define MNU_TOGGLENODISTURB      44
  91. #define MNU_TOGGLEMAILCHECK      45
  92. #define MNU_TOGGLEFILECHECK      46
  93. #define MNU_SETBIRTHDATE         47
  94. #define MNU_SETSCREENLENGTH      48
  95. #define MNU_TOGGLERIP            49
  96. #define MNU_TELNET               50
  97. #define MNU_FINGER               51
  98. #define MNU_FTP                  52
  99. #define MNU_GOPHER               53
  100. #define MNU_IRC                  54
  101. #define MNU_MAILNEXT             55
  102. #define MNU_MAILPREVIOUS         56
  103. #define MNU_MAILINDIVIDUAL       57
  104. #define MNU_MAILNONSTOP          58
  105. #define MNU_MAILREPLY            59
  106. #define MNU_OLRDOWNLOADASCII     60
  107. #define MNU_OLRDOWNLOADBW        61
  108. #define MNU_OLRDOWNLOADQWK       62
  109. #define MNU_OLRTAGAREA           63
  110. #define MNU_OLRREMOVEAREA        64
  111. #define MNU_OLRVIEWTAGGED        65
  112. #define MNU_OLRUPLOAD            66
  113. #define MNU_OLRDOWNLOADPNT       67
  114. #define MNU_OLRRESTRICTDATE      68
  115. #define MNU_INQUIREPERSONAL      70
  116. #define MNU_INQUIRETEXT          71
  117. #define MNU_MAILWRITELOCAL       78
  118. #define MNU_MAILWRITEINTERNET    79
  119. #define MNU_MAILREAD             80
  120. #define MNU_MAILDELETE           81
  121. #define MNU_MAILWRITEFIDONET     82
  122. #define MNU_MAILLIST             83
  123. #define MNU_MSGBACKWARD          84
  124. #define MNU_CLEARSTACK           85
  125. #define MNU_CLEARGOSUB           86
  126. #define MNU_CLEARGOTO            87
  127. #define MNU_RETURNMAIN           88
  128. #define MNU_TOGGLECOLOR          89
  129. #define MNU_TOGGLEANSI           90
  130. #define MNU_TOGGLEAVATAR         91
  131. #define MNU_TOGGLEHOTKEY         92
  132. #define MNU_MAILCHECK            93
  133. #define MNU_SETCOMPANY           94
  134. #define MNU_SETADDRESS           95
  135. #define MNU_SETCITY              96
  136. #define MNU_SETPHONE             97
  137. #define MNU_SETGENDER            98
  138. #define MNU_FILEUPLOADUSER       99
  139. #define MNU_FILEDISPLAY          100
  140. #define MNU_MSGREADCURRENT       101
  141. #define MNU_TOGGLEKLUDGES        102
  142. #define MNU_ADDTAGGED            103
  143. #define MNU_LISTTAGGED           104
  144. #define MNU_DELETETAGGED         105
  145. #define MNU_DELETEALLTAGGED      106
  146. #define MNU_TOGGLEFULLSCREEN     107
  147. #define MNU_TOGGLEIBMCHARS       108
  148. #define MNU_TOGGLEMOREPROMPT     109
  149. #define MNU_TOGGLESCREENCLEAR    110
  150. #define MNU_TOGGLEINUSERLIST     111
  151. #define MNU_SETARCHIVER          112
  152. #define MNU_SETPROTOCOL          113
  153. #define MNU_SETSIGNATURE         114
  154. #define MNU_SETVIDEOMODE         115
  155. #define MNU_APPENDMENU           116
  156.  
  157. class DLL_EXPORT TMenu
  158. {
  159. public:
  160.    TMenu (void);
  161.    ~TMenu (void);
  162.  
  163.    CHAR   Path[64], Name[32];
  164.    CHAR   AltPath[64];
  165.  
  166.    CHAR   Prompt[128];
  167.    UCHAR  PromptColor, PromptHilight;
  168.  
  169.    USHORT Command, Level;
  170.    CHAR   Display[128], Key[16], Argument[128];
  171.    UCHAR  Color, Hilight;
  172.    ULONG  AccessFlags, DenyFlags;
  173.    UCHAR  Automatic, FirstTime;
  174.  
  175.    VOID   Add (VOID);
  176.    USHORT Check (PSZ pszKey);
  177.    VOID   Delete (VOID);
  178.    USHORT First (VOID);
  179.    VOID   Insert (VOID);
  180.    USHORT Load (PSZ pszName, USHORT fAppend = FALSE);
  181.    VOID   New (USHORT usNewPrompt = FALSE);
  182.    USHORT Next (VOID);
  183.    USHORT Previous (VOID);
  184.    USHORT Save (PSZ pszName);
  185.    VOID   Update (VOID);
  186.  
  187. private:
  188.    HEADER Hdr;
  189.    ITEM   Item;
  190.    class  TCollection Items;
  191. };
  192.