Main.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //---------------------------------------------------------------------------
  2. #ifndef MainH
  3. #define MainH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <Dialogs.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <Menus.hpp>
  12. #include <ComCtrls.hpp>
  13. //---------------------------------------------------------------------------
  14. // These MUST be defined before we include "Libmng.h
  15. # define MNG_SUPPORT_READ
  16. # define MNG_ACCESS_CHUNKS
  17. # define MNG_STORE_CHUNKS
  18. # define MNG_NO_CMS
  19. # define MNG_USE_DLL
  20. # define MNG_SUPPORT_DISPLAY
  21. # define MNG_SKIP_ZLIB // we don't need the zlib definitions here
  22. # define MNG_SKIP_IJG6B // we don't need the IJG definitions here
  23. #include "libmng.h"
  24. //---------------------------------------------------------------------------
  25. class TMainForm : public TForm
  26. {
  27. __published: // IDE-managed Components
  28. TMainMenu *OFMainMenu;
  29. TMenuItem *OFMenuFile;
  30. TMenuItem *OFMenuFileOpen;
  31. TMenuItem *OFMenuFileProfile;
  32. TMenuItem *OFMenuFileN1;
  33. TMenuItem *OFMenuFileExit;
  34. TMenuItem *OFMenuOptions;
  35. TMenuItem *OFMenuOptionsModemSpeed;
  36. TMenuItem *OFMenuOptionsModem28k8;
  37. TMenuItem *OFMenuOptionsModem33k6;
  38. TMenuItem *OFMenuOptionsModem56k;
  39. TMenuItem *OFMenuOptionsModemISDN64;
  40. TMenuItem *OFMenuOptionsModemISDN128;
  41. TMenuItem *OFMenuOptionsModemCable512;
  42. TMenuItem *OFMenuOptionsModemUnlimited;
  43. TOpenDialog *OFOpenDialog;
  44. TTimer *OFTimer;
  45. TOpenDialog *OFOpenDialogProfile;
  46. TImage *OFImage;
  47. TPanel *Panel1;
  48. TProgressBar *ProgressBar1;
  49. void __fastcall FormCreate(TObject *Sender);
  50. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  51. void __fastcall FormShow(TObject *Sender);
  52. void __fastcall FormResize(TObject *Sender);
  53. void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
  54. TShiftState Shift);
  55. void __fastcall OFTimerTimer(TObject *Sender);
  56. void __fastcall OFMenuFileOpenClick(TObject *Sender);
  57. void __fastcall OFMenuFileProfileClick(TObject *Sender);
  58. void __fastcall OFMenuFileExitClick(TObject *Sender);
  59. void __fastcall OFMenuOptionsModemSpeedClick(TObject *Sender);
  60. void __fastcall OFMenuOptionsModemXClick(TObject *Sender);
  61. private: // User declarations
  62. public :
  63. // Data - was private in the pascal version
  64. String SFFileName; /* filename of the input stream */
  65. TFileStream *OFFile; /* input stream */
  66. mng_handle IFHandle; /* the libray handle */
  67. Graphics::TBitmap *OFBitmap; /* drawing canvas */
  68. # ifdef TEST_RGB8_A8
  69. void *OFAlpha;
  70. # endif
  71. bool BFCancelled; /* <esc> or app-exit */
  72. unsigned int IFTicks; /* used to fake slow connections */
  73. unsigned int IFBytes;
  74. unsigned int IFBytesPerSec;
  75. // Methods
  76. void MNGerror( String SHMsg );
  77. public: // User declarations
  78. __fastcall TMainForm(TComponent* Owner);
  79. };
  80. //---------------------------------------------------------------------------
  81. extern PACKAGE TMainForm *MainForm;
  82. //---------------------------------------------------------------------------
  83. #endif