home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / THSORT.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  2KB  |  61 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //----------------------------------------------------------------------------
  6. #ifndef ThSortH
  7. #define ThSortH
  8. //----------------------------------------------------------------------------
  9. #include <StdCtrls.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <Dialogs.hpp>
  12. #include <Forms.hpp>
  13. #include <Controls.hpp>
  14. #include <Graphics.hpp>
  15. #include <Classes.hpp>
  16. #include <SysUtils.hpp>
  17. #include <Messages.hpp>
  18. #include <Windows.hpp>
  19. #include <System.hpp>
  20. //----------------------------------------------------------------------------
  21. class TThreadSortForm : public TForm
  22. {
  23. __published:
  24.     TButton *StartBtn;
  25.     TPaintBox *BubbleSortBox;
  26.     TPaintBox *SelectionSortBox;
  27.     TPaintBox *QuickSortBox;
  28.     TLabel *Label1;
  29.     TBevel *Bevel1;
  30.     TBevel *Bevel2;
  31.     TBevel *Bevel3;
  32.     TLabel *Label2;
  33.     TLabel *Label3;
  34.     void __fastcall BubbleSortBoxPaint(TObject *Sender);
  35.     void __fastcall SelectionSortBoxPaint(TObject *Sender);
  36.     void __fastcall QuickSortBoxPaint(TObject *Sender);
  37.     void __fastcall FormCreate(TObject *Sender);
  38.     void __fastcall StartBtnClick(TObject *Sender);
  39.     
  40. private: 
  41.     int ThreadsRunning;
  42.     void __fastcall RandomizeArrays(void);
  43.     void __fastcall ThreadDone(TObject *Sender);
  44.     
  45. public:
  46.     void __fastcall PaintArray(TPaintBox *Box, const int *A, const int A_Size);
  47.     virtual __fastcall TThreadSortForm(TComponent *Owner);
  48. };
  49. //----------------------------------------------------------------------------
  50. typedef int TSortArray[115];
  51.  
  52. typedef TSortArray *PSortArray;
  53. //----------------------------------------------------------------------------
  54. extern TThreadSortForm *ThreadSortForm;
  55. extern bool ArraysRandom;
  56. extern int BubbleSortArray[115];
  57. extern int SelectionSortArray[115];
  58. extern int QuickSortArray[115];
  59. //----------------------------------------------------------------------------
  60. #endif    
  61.