home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / rcs / filesel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.9 KB  |  246 lines

  1. head    1.3;
  2. access;
  3. symbols;
  4. locks
  5.     dlorre:1.3; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.3
  10. date    97.07.14.04.26.02;    author dlorre;    state Exp;
  11. branches;
  12. next    1.2;
  13.  
  14. 1.2
  15. date    96.08.28.20.07.42;    author dlorre;    state Exp;
  16. branches;
  17. next    1.1;
  18.  
  19. 1.1
  20. date    96.08.22.02.05.49;    author dlorre;    state Exp;
  21. branches;
  22. next    ;
  23.  
  24.  
  25. desc
  26. @Oui.lib -- Object User Interface
  27. Projet créé en 1994
  28. Auteur: Dominique Lorre
  29. @
  30.  
  31.  
  32. 1.3
  33. log
  34. @now more used
  35. @
  36. text
  37. @#include <exec/types.h>
  38. #include <exec/io.h>
  39. #include <exec/memory.h>
  40. #include <dos/dos.h>
  41. #include <dos/dosextens.h>
  42. #include <dos/exall.h>
  43. #include <graphics/gfx.h>
  44. #include <graphics/gfxbase.h>
  45. #include <intuition/intuition.h>
  46. #include <intuition/classes.h>
  47. #include <intuition/gadgetclass.h>
  48. #include <intuition/icclass.h>
  49. #include <libraries/gadtools.h>
  50. #include <workbench/workbench.h>
  51. #include <string.h>
  52. #include <stdio.h>
  53. #include <stdlib.h>
  54.  
  55. #include <proto/exec.h>
  56. #include <proto/dos.h>
  57. #include <proto/graphics.h>
  58. #include <proto/layers.h>
  59. #include <proto/intuition.h>
  60. #include <proto/gadtools.h>
  61. #include <proto/icon.h>
  62. #include <proto/console.h>
  63. #include <proto/utility.h>
  64. #include <clib/macros.h>
  65. #include <clib/alib_protos.h>
  66. #include <mydebug.h>
  67.  
  68. #include "screen.h"
  69. #include "window.h"
  70. #include "gadgetlist.h"
  71. #include "gadgets/string.h"
  72. #include "gadgets/cstring.h"
  73. #include "gadgets/eprop.h"
  74. #include "gadgets/fbutton.h"
  75. #include "slist.h"
  76. #include "locale.h"
  77.  
  78. #define FILE    gfile->curstring
  79. #define DRAWER  gdrawer->curstring
  80. #define COMMENT gcom->curstring
  81.  
  82. #define DISPLAY_FILES   0
  83. #define DISPLAY_DIRS    1
  84. #define MAXLEN          255
  85. #define MAXENTRIES      100
  86.  
  87. static WORD TOT_DISPLAY ;
  88.  
  89. static WORD FONTHEIGHT ;
  90. static WORD LEFTBOX ;
  91. static WORD TOPDBOX ;
  92. static WORD TOPFBOX ;
  93. static WORD WIDTHBOX ;
  94. static WORD HEIGHTBOX ;
  95.  
  96. static WORD LEFTSEL ;
  97. static WORD TOPSEL ;
  98. static WORD WIDTHSEL ;
  99. static WORD HEIGHTSEL ;
  100.  
  101. struct DClick {
  102.     ULONG s;
  103.     ULONG m;
  104. } ;
  105.  
  106. class filesel : public window
  107. {
  108. public:
  109.     void fparent(gadget *g, unsigned long classe, unsigned short code) ;
  110.     void fdrawer(gadget *g, unsigned long classe, unsigned short code) ;
  111.     void fprop(gadget *g, unsigned long classe, unsigned short code) ;
  112.     char title[80] ;
  113.     BOOL clipok ;
  114.     filesel(short l, short t, short w, short h) : window(l, t, w, h) {}
  115.     void open(screen *) ;
  116.     void simpleevent(IntuiMessage *msg) ;
  117.     void handlevkey(USHORT code) ;
  118. };
  119.  
  120. static IntuiMessage     *message;       // the message the IDCMP sends us
  121. static BPTR             clef, oldkey;
  122.  
  123. static UWORD            code;       // IDCMP stuff
  124. static ULONG            classe;
  125.  
  126. static APTR             object;
  127. static List             *RepList;
  128. static Node             *RepNode, *Garage = NULL;
  129. static ULONG            nbfics = 0;
  130. static LONG             topentry = 0;
  131. static char             chemin[MAXLEN];
  132. static char             DTEMP[MAXLEN] = "";
  133. static TextAttr         **Style;
  134. static char             stemp[MAXLEN], stemp2[MAXLEN], tmp[MAXLEN];
  135. static FileInfoBlock    *bloc;
  136. static WORD             indsel, numsel ;
  137. static char             pat[MAXLEN] ;
  138. static char             RexxCmd[MAXLEN] ;
  139. static DClick           declic = {0, 0};
  140. static Region           *clipregion ;
  141. static Rectangle        cliprect ;
  142. static char             comstring[80] = "" ;
  143.  
  144. static LONG             lm ;
  145.  
  146. static char name[MAXLEN];
  147. static BOOL Mode = DISPLAY_FILES;
  148. static BOOL clickon ;
  149.  
  150. static TextAttr ITALIC80 = {
  151.         (STRPTR)"topaz.font",
  152.         TOPAZ_EIGHTY,FSF_ITALIC,0
  153. };
  154.  
  155. static struct TextAttr Plain, Italic ;
  156.  
  157. static BOOL Saver ;
  158. static IntuiText *listetext ;
  159.  
  160. IMPORT ULONG rexxsig ;
  161. IMPORT MsgPort *RexxPort ;
  162.  
  163. static string   *gdrawer ;      // Répertoire
  164. static string   *gfile ;        // Nom du fichier
  165. static eprop    *gprop ;        // Scroller
  166. static string   *gcom ;         // Commentaire Lecture/Ecriture
  167. static cstring  *cgcom ;        // Commentaire Lecture Seule
  168.  
  169. static UBYTE    fpen ;
  170. static UBYTE    bpen ;
  171.  
  172. IMPORT lstring  ok ;
  173. IMPORT lstring  cancel ;
  174. IMPORT lstring  parent ;
  175. IMPORT lstring  drawer ;
  176. IMPORT lstring  file ;
  177. IMPORT lstring  comment ;
  178. @
  179.  
  180.  
  181. 1.2
  182. log
  183. @*** empty log message ***
  184. @
  185. text
  186. @d19 12
  187. a30 47
  188. #include <cxxproto/exec.h>
  189. #include <cxxproto/dos.h>
  190. #include <cxxproto/graphics.h>
  191. #include <cxxproto/intuition.h>
  192. #include <cclib/macros.h>
  193. #include <cclib/debug_protos.h>
  194.  
  195. extern "C" {
  196. extern struct Library *LayersBase ;
  197. struct Region *InstallClipRegion( struct Layer *layer,
  198.         struct Region *region );
  199. #include <pragmas/layers_pragmas.h>
  200.  
  201. extern struct Library *GadToolsBase ;
  202. struct IntuiMessage *GT_GetIMsg( struct MsgPort *iport );
  203. void GT_ReplyIMsg( struct IntuiMessage *imsg );
  204. void GT_RefreshWindow( struct Window *win, struct Requester *req );
  205. void GT_SetGadgetAttrs( struct Gadget *gad, struct Window *win,
  206.         struct Requester *req, Tag tag1, ... );
  207. struct Gadget *CreateGadget( unsigned long kind, struct Gadget *gad,
  208.         struct NewGadget *ng, Tag tag1, ... );
  209. void FreeGadgets( struct Gadget *gad );
  210. struct Gadget *CreateContext( struct Gadget **glistptr );
  211. void DrawBevelBox( struct RastPort *rport, long left, long top, long width,
  212.         long height, Tag tag1, ... );
  213. APTR GetVisualInfo( struct Screen *screen, Tag tag1, ... );
  214. void FreeVisualInfo( APTR vi );
  215. #include <pragmas/gadtools_pragmas.h>
  216.  
  217. extern struct Library *IconBase ;
  218. struct DiskObject *GetDiskObject( STRPTR name );
  219. void FreeDiskObject( struct DiskObject *diskobj );
  220. struct DiskObject *GetDefDiskObject( long type );
  221. #include <pragmas/icon_pragmas.h>
  222.  
  223. extern struct Library *ConsoleDevice ;
  224. LONG RawKeyConvert( struct InputEvent *events, UBYTE *buffer, long length,
  225.         struct KeyMap *keyMap );
  226. #include <pragmas/console_pragmas.h>
  227.  
  228. extern struct Library *UtilityBase ;
  229. struct TagItem *FindTagItem( Tag tagVal, struct TagItem *tagList );
  230. ULONG GetTagData( Tag tagValue, unsigned long defaultVal,
  231.         struct TagItem *tagList );
  232. #include <pragmas/utility_pragmas.h>
  233. void NewList( struct List *list );
  234. }
  235. d77 1
  236. @
  237.  
  238.  
  239. 1.1
  240. log
  241. @Initial revision
  242. @
  243. text
  244. @d69 1
  245. @
  246.