home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / PennyWise™ Framework / PennyView / Source / OpenFiles.c < prev    next >
Encoding:
Text File  |  1994-08-11  |  1.1 KB  |  38 lines  |  [TEXT/KAHL]

  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //                                                                                //
  3. //                                                                                //
  4. //                    Copyright PennyWise Software, 1994.                            //
  5. //                                                                                //
  6. //            Part of the PennyWise Software Application Framework                //
  7. //                                                                                //
  8. //                                                                                //
  9. //            OpenFiles.c                Written by Peter Kaplan                        //
  10. //                                                                                //
  11. //                                                                                //
  12. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  13. #include <Movies.h>
  14. #include "MovieWindow.h"
  15. #include "TextWindow.h"
  16. #include "OpenFiles.h"
  17. #include "PictWindow.h"
  18. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  19. void    AllWindowsGetFileOpen(void)
  20. {
  21. StandardFileReply    reply;
  22. SFTypeList            theTypeList;
  23.  
  24.     theTypeList[0] = 'TEXT';
  25.     theTypeList[1] = 'MooV';
  26.     theTypeList[2] = 'PICT';
  27.     
  28.     StandardGetFilePreview(NULL,3,theTypeList,&reply);
  29.     if (reply.sfGood) {
  30.         if (reply.sfType == 'TEXT')
  31.             TextWindowOpen(&reply.sfFile);
  32.         else if (reply.sfType == 'MooV')
  33.             MovieWindowOpen(&reply.sfFile);
  34.         else if (reply.sfType == 'PICT')
  35.             PictWindowOpen(&reply.sfFile);
  36.         }
  37. }
  38.