home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
prezent
/
cb
/
data.z
/
DBCGRIDS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-16
|
8KB
|
217 lines
//----------------------------------------------------------------------------
// DBCGrids.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: DBCGrids.pas
//----------------------------------------------------------------------------
#ifndef DBCGridsHPP
#define DBCGridsHPP
//----------------------------------------------------------------------------
#include <DB.hpp>
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Dbcgrids
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) TDBCtrlGridLink;
class __declspec(delphiclass) TDBCtrlGrid;
class __declspec(delphiclass) TDBCtrlPanel;
class __declspec(pascalimplementation) TDBCtrlPanel : public Controls::TWinControl
{
typedef Controls::TWinControl inherited;
private:
TDBCtrlGrid* FDBCtrlGrid;
HIDESBASE MESSAGE void __fastcall CMControlListChange(Controls::TCMControlListChange &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
protected:
virtual void __fastcall PaintWindow(HDC DC);
public:
__fastcall TDBCtrlPanel(TDBCtrlGrid* DBCtrlGrid);
public:
/* TWinControl.CreateParented */ __fastcall TDBCtrlPanel(HWND ParentWindow) : Controls::TWinControl(
ParentWindow) { }
/* TWinControl.Destroy */ __fastcall virtual ~TDBCtrlPanel(void) { }
};
enum TDBCtrlGridOrientation { goVertical, goHorizontal };
enum TDBCtrlGridBorder { gbNone, gbRaised };
typedef void __fastcall (__closure *TPaintPanelEvent)(TDBCtrlGrid* DBCtrlGrid, int Index);
enum TDBCtrlGridKey { gkNull, gkEditMode, gkPriorTab, gkNextTab, gkLeft, gkRight, gkUp, gkDown, gkScrollUp,
gkScrollDown, gkPageUp, gkPageDown, gkHome, gkEnd, gkInsert, gkAppend, gkDelete, gkCancel };
class __declspec(pascalimplementation) TDBCtrlGrid : public Controls::TWinControl
{
typedef Controls::TWinControl inherited;
private:
TDBCtrlGridLink* FDataLink;
TDBCtrlPanel* FPanel;
Graphics::TCanvas* FCanvas;
int FColCount;
int FRowCount;
int FPanelWidth;
int FPanelHeight;
int FPanelIndex;
int FPanelCount;
int FBitmapCount;
HBITMAP FPanelBitmap;
HBITMAP FSaveBitmap;
HDC FPanelDC;
TDBCtrlGridOrientation FOrientation;
TDBCtrlGridBorder FPanelBorder;
bool FAllowInsert;
bool FAllowDelete;
bool FShowFocus;
bool FFocused;
TPaintPanelEvent FOnPaintPanel;
bool __fastcall AcquireFocus(void);
void __fastcall AdjustSize(void);
void __fastcall CreatePanelBitmap(void);
void __fastcall DataSetChanged(bool Reset);
void __fastcall DestroyPanelBitmap(void);
void __fastcall DrawPanel(HDC DC, int Index);
void __fastcall DrawPanelBackground(HDC DC, const Windows::TRect &R, bool Erase);
Db::TDataSource* __fastcall GetDataSource(void);
bool __fastcall GetEditMode(void);
Windows::TRect __fastcall GetPanelBounds(int Index);
bool __fastcall PointInPanel(const Windows::TSmallPoint P);
void __fastcall Reset(void);
void __fastcall Scroll(int Inc, bool ScrollLock);
void __fastcall ScrollMessage(Messages::TWMScroll &Message);
HIDESBASE void __fastcall SelectNext(bool GoForward);
void __fastcall SetColCount(int Value);
void __fastcall SetDataSource(Db::TDataSource* Value);
void __fastcall SetEditMode(bool Value);
void __fastcall SetOrientation(TDBCtrlGridOrientation Value);
void __fastcall SetPanelBorder(TDBCtrlGridBorder Value);
void __fastcall SetPanelHeight(int Value);
void __fastcall SetPanelIndex(int Value);
void __fastcall SetPanelWidth(int Value);
void __fastcall SetRowCount(int Value);
void __fastcall UpdateDataLinks(Controls::TControl* Control, bool Inserting);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Message);
HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMChildKey(Controls::TCMChildKey &Message);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall CreateWnd(void);
virtual Classes::TComponent* __fastcall GetChildParent(void);
virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
virtual void __fastcall PaintPanel(int Index);
virtual void __fastcall PaintWindow(HDC DC);
virtual void __fastcall ReadState(Classes::TReader* Reader);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
public:
__fastcall virtual TDBCtrlGrid(Classes::TComponent* AOwner);
__fastcall virtual ~TDBCtrlGrid(void);
void __fastcall DoKey(TDBCtrlGridKey Key);
virtual void __fastcall GetTabOrderList(Classes::TList* List);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
__property Graphics::TCanvas* Canvas = {read=FCanvas, nodefault};
__property bool EditMode = {read=GetEditMode, write=SetEditMode, nodefault};
__property int PanelCount = {read=FPanelCount, nodefault};
__property int PanelIndex = {read=FPanelIndex, write=SetPanelIndex, nodefault};
__published:
__property bool AllowDelete = {read=FAllowDelete, write=FAllowDelete, default=1};
__property bool AllowInsert = {read=FAllowInsert, write=FAllowInsert, default=1};
__property int ColCount = {read=FColCount, write=SetColCount, nodefault};
__property Color ;
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
__property DragCursor ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property TDBCtrlGridOrientation Orientation = {read=FOrientation, write=SetOrientation, default=0
};
__property TDBCtrlGridBorder PanelBorder = {read=FPanelBorder, write=SetPanelBorder, default=1};
__property int PanelHeight = {read=FPanelHeight, write=SetPanelHeight, nodefault};
__property int PanelWidth = {read=FPanelWidth, write=SetPanelWidth, nodefault};
__property ParentColor ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property TabOrder ;
__property TabStop ;
__property int RowCount = {read=FRowCount, write=SetRowCount, nodefault};
__property bool ShowFocus = {read=FShowFocus, write=FShowFocus, default=1};
__property ShowHint ;
__property Visible ;
__property OnClick ;
__property OnDblClick ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property TPaintPanelEvent OnPaintPanel = {read=FOnPaintPanel, write=FOnPaintPanel};
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TDBCtrlGrid(HWND ParentWindow) : Controls::TWinControl(
ParentWindow) { }
};
class __declspec(pascalimplementation) TDBCtrlGridLink : public Db::TDataLink
{
typedef Db::TDataLink inherited;
private:
TDBCtrlGrid* FDBCtrlGrid;
protected:
virtual void __fastcall ActiveChanged(void);
virtual void __fastcall DataSetChanged(void);
public:
__fastcall TDBCtrlGridLink(TDBCtrlGrid* DBCtrlGrid);
public:
/* TDataLink.Destroy */ __fastcall virtual ~TDBCtrlGridLink(void) { }
};
//-- var, const, procedure ---------------------------------------------------
} /* namespace Dbcgrids */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Dbcgrids;
#endif
//-- end unit ----------------------------------------------------------------
#endif // DBCGrids