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

  1. //----------------------------------------------------------------------------
  2. // DBCGrids.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: DBCGrids.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DBCGridsHPP
  6. #define DBCGridsHPP
  7. //----------------------------------------------------------------------------
  8. #include <DB.hpp>
  9. #include <Menus.hpp>
  10. #include <Graphics.hpp>
  11. #include <Forms.hpp>
  12. #include <Controls.hpp>
  13. #include <Classes.hpp>
  14. #include <Messages.hpp>
  15. #include <Windows.hpp>
  16. #include <SysUtils.hpp>
  17. #include <System.hpp>
  18. #pragma warn -par
  19. #pragma warn -hid 
  20. #pragma warn -inl
  21.  
  22. namespace Dbcgrids
  23. {
  24. //-- type declarations -------------------------------------------------------
  25. class __declspec(delphiclass) TDBCtrlGridLink;
  26. class __declspec(delphiclass) TDBCtrlGrid;
  27. class __declspec(delphiclass) TDBCtrlPanel;
  28. class __declspec(pascalimplementation) TDBCtrlPanel : public Controls::TWinControl
  29. {
  30.     typedef Controls::TWinControl inherited;
  31.     
  32. private:
  33.     TDBCtrlGrid* FDBCtrlGrid;
  34.     HIDESBASE MESSAGE void __fastcall CMControlListChange(Controls::TCMControlListChange &Message);
  35.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  36.     HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
  37.     
  38. protected:
  39.     virtual void __fastcall PaintWindow(HDC DC);
  40.     
  41. public:
  42.     __fastcall TDBCtrlPanel(TDBCtrlGrid* DBCtrlGrid);
  43. public:
  44.     /* TWinControl.CreateParented */ __fastcall TDBCtrlPanel(HWND ParentWindow) : Controls::TWinControl(
  45.         ParentWindow) { }
  46.     /* TWinControl.Destroy */ __fastcall virtual ~TDBCtrlPanel(void) { }
  47.     
  48. };
  49.  
  50. enum TDBCtrlGridOrientation { goVertical, goHorizontal };
  51.  
  52. enum TDBCtrlGridBorder { gbNone, gbRaised };
  53.  
  54. typedef void __fastcall (__closure *TPaintPanelEvent)(TDBCtrlGrid* DBCtrlGrid, int Index);
  55.  
  56. enum TDBCtrlGridKey { gkNull, gkEditMode, gkPriorTab, gkNextTab, gkLeft, gkRight, gkUp, gkDown, gkScrollUp, 
  57.     gkScrollDown, gkPageUp, gkPageDown, gkHome, gkEnd, gkInsert, gkAppend, gkDelete, gkCancel };
  58.  
  59. class __declspec(pascalimplementation) TDBCtrlGrid : public Controls::TWinControl
  60. {
  61.     typedef Controls::TWinControl inherited;
  62.     
  63. private:
  64.     TDBCtrlGridLink* FDataLink;
  65.     TDBCtrlPanel* FPanel;
  66.     Graphics::TCanvas* FCanvas;
  67.     int FColCount;
  68.     int FRowCount;
  69.     int FPanelWidth;
  70.     int FPanelHeight;
  71.     int FPanelIndex;
  72.     int FPanelCount;
  73.     int FBitmapCount;
  74.     HBITMAP FPanelBitmap;
  75.     HBITMAP FSaveBitmap;
  76.     HDC FPanelDC;
  77.     TDBCtrlGridOrientation FOrientation;
  78.     TDBCtrlGridBorder FPanelBorder;
  79.     bool FAllowInsert;
  80.     bool FAllowDelete;
  81.     bool FShowFocus;
  82.     bool FFocused;
  83.     TPaintPanelEvent FOnPaintPanel;
  84.     bool __fastcall AcquireFocus(void);
  85.     void __fastcall AdjustSize(void);
  86.     void __fastcall CreatePanelBitmap(void);
  87.     void __fastcall DataSetChanged(bool Reset);
  88.     void __fastcall DestroyPanelBitmap(void);
  89.     void __fastcall DrawPanel(HDC DC, int Index);
  90.     void __fastcall DrawPanelBackground(HDC DC, const Windows::TRect &R, bool Erase);
  91.     Db::TDataSource* __fastcall GetDataSource(void);
  92.     bool __fastcall GetEditMode(void);
  93.     Windows::TRect __fastcall GetPanelBounds(int Index);
  94.     bool __fastcall PointInPanel(const Windows::TSmallPoint P);
  95.     void __fastcall Reset(void);
  96.     void __fastcall Scroll(int Inc, bool ScrollLock);
  97.     void __fastcall ScrollMessage(Messages::TWMScroll &Message);
  98.     HIDESBASE void __fastcall SelectNext(bool GoForward);
  99.     void __fastcall SetColCount(int Value);
  100.     void __fastcall SetDataSource(Db::TDataSource* Value);
  101.     void __fastcall SetEditMode(bool Value);
  102.     void __fastcall SetOrientation(TDBCtrlGridOrientation Value);
  103.     void __fastcall SetPanelBorder(TDBCtrlGridBorder Value);
  104.     void __fastcall SetPanelHeight(int Value);
  105.     void __fastcall SetPanelIndex(int Value);
  106.     void __fastcall SetPanelWidth(int Value);
  107.     void __fastcall SetRowCount(int Value);
  108.     void __fastcall UpdateDataLinks(Controls::TControl* Control, bool Inserting);
  109.     HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  110.     HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
  111.     HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Message);
  112.     HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
  113.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  114.     HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
  115.     HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
  116.     MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
  117.     HIDESBASE MESSAGE void __fastcall CMChildKey(Controls::TCMChildKey &Message);
  118.     
  119. protected:
  120.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  121.     virtual void __fastcall CreateWnd(void);
  122.     virtual Classes::TComponent* __fastcall GetChildParent(void);
  123.     virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
  124.     virtual void __fastcall PaintPanel(int Index);
  125.     virtual void __fastcall PaintWindow(HDC DC);
  126.     virtual void __fastcall ReadState(Classes::TReader* Reader);
  127.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  128.     
  129. public:
  130.     __fastcall virtual TDBCtrlGrid(Classes::TComponent* AOwner);
  131.     __fastcall virtual ~TDBCtrlGrid(void);
  132.     void __fastcall DoKey(TDBCtrlGridKey Key);
  133.     virtual void __fastcall GetTabOrderList(Classes::TList* List);
  134.     virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
  135.     __property Graphics::TCanvas* Canvas = {read=FCanvas, nodefault};
  136.     __property bool EditMode = {read=GetEditMode, write=SetEditMode, nodefault};
  137.     __property int PanelCount = {read=FPanelCount, nodefault};
  138.     __property int PanelIndex = {read=FPanelIndex, write=SetPanelIndex, nodefault};
  139.     
  140. __published:
  141.     __property bool AllowDelete = {read=FAllowDelete, write=FAllowDelete, default=1};
  142.     __property bool AllowInsert = {read=FAllowInsert, write=FAllowInsert, default=1};
  143.     __property int ColCount = {read=FColCount, write=SetColCount, nodefault};
  144.     __property Color ;
  145.     __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
  146.     __property DragCursor ;
  147.     __property DragMode ;
  148.     __property Enabled ;
  149.     __property Font ;
  150.     __property TDBCtrlGridOrientation Orientation = {read=FOrientation, write=SetOrientation, default=0
  151.         };
  152.     __property TDBCtrlGridBorder PanelBorder = {read=FPanelBorder, write=SetPanelBorder, default=1};
  153.     __property int PanelHeight = {read=FPanelHeight, write=SetPanelHeight, nodefault};
  154.     __property int PanelWidth = {read=FPanelWidth, write=SetPanelWidth, nodefault};
  155.     __property ParentColor ;
  156.     __property ParentFont ;
  157.     __property ParentShowHint ;
  158.     __property PopupMenu ;
  159.     __property TabOrder ;
  160.     __property TabStop ;
  161.     __property int RowCount = {read=FRowCount, write=SetRowCount, nodefault};
  162.     __property bool ShowFocus = {read=FShowFocus, write=FShowFocus, default=1};
  163.     __property ShowHint ;
  164.     __property Visible ;
  165.     __property OnClick ;
  166.     __property OnDblClick ;
  167.     __property OnDragDrop ;
  168.     __property OnDragOver ;
  169.     __property OnEndDrag ;
  170.     __property OnEnter ;
  171.     __property OnExit ;
  172.     __property OnKeyDown ;
  173.     __property OnKeyPress ;
  174.     __property OnKeyUp ;
  175.     __property OnMouseDown ;
  176.     __property OnMouseMove ;
  177.     __property OnMouseUp ;
  178.     __property TPaintPanelEvent OnPaintPanel = {read=FOnPaintPanel, write=FOnPaintPanel};
  179.     __property OnStartDrag ;
  180. public:
  181.     /* TWinControl.CreateParented */ __fastcall TDBCtrlGrid(HWND ParentWindow) : Controls::TWinControl(
  182.         ParentWindow) { }
  183.     
  184. };
  185.  
  186. class __declspec(pascalimplementation) TDBCtrlGridLink : public Db::TDataLink
  187. {
  188.     typedef Db::TDataLink inherited;
  189.     
  190. private:
  191.     TDBCtrlGrid* FDBCtrlGrid;
  192.     
  193. protected:
  194.     virtual void __fastcall ActiveChanged(void);
  195.     virtual void __fastcall DataSetChanged(void);
  196.     
  197. public:
  198.     __fastcall TDBCtrlGridLink(TDBCtrlGrid* DBCtrlGrid);
  199. public:
  200.     /* TDataLink.Destroy */ __fastcall virtual ~TDBCtrlGridLink(void) { }
  201.     
  202. };
  203.  
  204. //-- var, const, procedure ---------------------------------------------------
  205.  
  206. }    /* namespace Dbcgrids */
  207.  
  208. #pragma warn .par
  209. #pragma warn .hid 
  210. #pragma warn .inl
  211.  
  212. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  213. using namespace Dbcgrids;
  214. #endif
  215. //-- end unit ----------------------------------------------------------------
  216. #endif    // DBCGrids
  217.