home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
DSDESIGN.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
7KB
|
173 lines
//----------------------------------------------------------------------------
// DSDesign.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: DSDesign.pas
//----------------------------------------------------------------------------
#ifndef DSDesignHPP
#define DSDesignHPP
//----------------------------------------------------------------------------
#include <DRIntf.hpp>
#include <Menus.hpp>
#include <DsgnWnds.hpp>
#include <libconst.hpp>
#include <LibIntf.hpp>
#include <DsgnIntf.hpp>
#include <DBTables.hpp>
#include <DBCtrls.hpp>
#include <DB.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.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 Dsdesign
{
//-- type declarations -------------------------------------------------------
typedef bool __fastcall (__closure *TSelectionProc)(Db::TField* Field);
class __declspec(delphiclass) TDatasetEditor;
class __declspec(pascalimplementation) TDatasetEditor : public Dsgnwnds::TDesignWindow
{
typedef Dsgnwnds::TDesignWindow inherited;
__published:
Extctrls::TPanel* Panel1;
Db::TDataSource* DataSource;
Menus::TPopupMenu* LocalMenu;
Menus::TMenuItem* AddItem;
Menus::TMenuItem* NewItem;
Menus::TMenuItem* N1;
Menus::TMenuItem* CutItem;
Menus::TMenuItem* CopyItem;
Menus::TMenuItem* PasteItem;
Menus::TMenuItem* DeleteItem;
Menus::TMenuItem* SelectAllItem;
Menus::TMenuItem* N2;
Menus::TMenuItem* RetrieveItem;
Menus::TMenuItem* UpdateItem;
Menus::TMenuItem* SaveAttributesAsItem;
Menus::TMenuItem* AssociateItem;
Menus::TMenuItem* Unassociate;
Stdctrls::TListBox* FieldListBox;
Dbctrls::TDBNavigator* DBNavigator;
void __fastcall FormCreate(System::TObject* Sender);
void __fastcall FormDestroy(System::TObject* Sender);
void __fastcall AddItemClick(System::TObject* Sender);
void __fastcall DeleteItemClick(System::TObject* Sender);
void __fastcall FieldListBoxDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y
, Controls::TDragState State, bool &Accept);
void __fastcall FieldListBoxDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y
);
void __fastcall FieldListBoxKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift)
;
void __fastcall NewItemClick(System::TObject* Sender);
void __fastcall SelectTable(System::TObject* Sender);
void __fastcall FieldListBoxClick(System::TObject* Sender);
void __fastcall FieldListBoxKeyPress(System::TObject* Sender, char &Key);
void __fastcall ClearAllClick(System::TObject* Sender);
void __fastcall FieldListBoxStartDrag(System::TObject* Sender, Controls::TDragObject* &DragObject);
void __fastcall SelectAllItemClick(System::TObject* Sender);
void __fastcall CutItemClick(System::TObject* Sender);
void __fastcall CopyItemClick(System::TObject* Sender);
void __fastcall PasteItemClick(System::TObject* Sender);
void __fastcall LocalMenuPopup(System::TObject* Sender);
void __fastcall RetrieveItemClick(System::TObject* Sender);
void __fastcall UpdateItemClick(System::TObject* Sender);
void __fastcall SaveAttributesAsItemClick(System::TObject* Sender);
void __fastcall AssociateItemClick(System::TObject* Sender);
void __fastcall UnassociateClick(System::TObject* Sender);
private:
Db::TDataSetDesigner* FDSDesigner;
Forms::TForm* FForm;
Db::TDataSet* FDataset;
int FFocusRectItem;
int FMinWidth;
int FMinHeight;
bool FUpdating;
void __fastcall Copy(void);
void __fastcall CreateFields(Stdctrls::TListBox* FieldsList);
void __fastcall Cut(void);
void __fastcall MoveFields(int Offset);
void __fastcall Paste(void);
void __fastcall RemoveFields(void);
void __fastcall SelectAll(void);
void __fastcall RestoreSelection(Stdctrls::TListBox* List, Classes::TStringList* &Selection, int ItemIndex
, int TopIndex, bool RestoreUpdate);
void __fastcall SaveSelection(Stdctrls::TListBox* List, Classes::TStringList* &Selection, int &ItemIndex
, int &TopIndex, bool NoUpdate);
void __fastcall SetDataset(Db::TDataSet* Value);
HIDESBASE void __fastcall Update(void);
void __fastcall UpdateCaption(void);
void __fastcall UpdateFieldList(void);
void __fastcall UpdateSelection(void);
bool __fastcall ForEachSelection(TSelectionProc Proc);
void __fastcall GetTableDesc( System::AnsiString &ADatabase, System::AnsiString &ATable);
bool __fastcall FindFieldInfo(Db::TField* Field, Drintf::TFieldID &FieldID, Drintf::TAttrID &AttrID
);
void __fastcall GetFieldInfo(Db::TField* Field, Drintf::TFieldID &FieldID, Drintf::TAttrID &AttrID)
;
bool __fastcall RetrieveAttributes(Db::TField* Field);
bool __fastcall SaveAttributes(Db::TField* Field);
bool __fastcall SaveAttributesAs(Db::TField* Field);
bool __fastcall AssociateAttributes(Db::TField* Field);
bool __fastcall UnassociateAttributes(Db::TField* Field);
bool __fastcall CheckAttribute(Db::TField* Field);
System::AnsiString __fastcall QualifyTableName( System::AnsiString DatabaseName, Db::TDatabase* Database
, const System::AnsiString TableName);
MESSAGE void __fastcall WMGetMinMaxInfo(Messages::TWMGetMinMaxInfo &Message);
protected:
virtual void __fastcall Activated(void);
virtual System::AnsiString __fastcall UniqueName(Classes::TComponent* Component);
public:
virtual void __fastcall ComponentDeleted(Classes::TComponent* Component);
virtual Libintf::TEditState __fastcall GetEditState(void);
virtual void __fastcall EditAction(Libintf::TEditAction Action);
virtual void __fastcall FormModified(void);
virtual void __fastcall SelectionChanged(Dsgnintf::TComponentList* ASelection);
__property Forms::TForm* Form = {read=FForm, write=FForm, nodefault};
__property Db::TDataSet* Dataset = {read=FDataset, write=SetDataset, nodefault};
public:
/* TDesignWindow.Create */ __fastcall virtual TDatasetEditor(Classes::TComponent* AOwner) : Dsgnwnds::
TDesignWindow(AOwner) { }
/* TDesignWindow.Destroy */ __fastcall virtual ~TDatasetEditor(void) { }
public:
/* TForm.CreateNew */ __fastcall TDatasetEditor(Classes::TComponent* AOwner, int Dummy) : Dsgnwnds::
TDesignWindow(AOwner, Dummy) { }
public:
/* TWinControl.CreateParented */ __fastcall TDatasetEditor(HWND ParentWindow) : Dsgnwnds::TDesignWindow(
ParentWindow) { }
};
//-- var, const, procedure ---------------------------------------------------
extern void __fastcall ShowDatasetDesigner(Dsgnintf::TFormDesigner* Designer, Db::TDataSet* ADataset
);
extern System::AnsiString __fastcall CreateUniqueName(Db::TDataSet* Dataset, const System::AnsiString
FieldName, System::TMetaClass* FieldClass);
} /* namespace Dsdesign */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Dsdesign;
#endif
//-- end unit ----------------------------------------------------------------
#endif // DSDesign