home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / DSDESIGN.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  7.6 KB  |  218 lines

  1. //----------------------------------------------------------------------------
  2. // DSDesign.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: DSDesign.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DSDesignHPP
  6. #define DSDesignHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef DRIntfHPP
  9. #include <DRIntf.hpp>
  10. #endif
  11.  
  12. #ifndef MenusHPP
  13. #include <Menus.hpp>
  14. #endif
  15.  
  16. #ifndef DsgnWndsHPP
  17. #include <DsgnWnds.hpp>
  18. #endif
  19.  
  20. #ifndef libconstHPP
  21. #include <libconst.hpp>
  22. #endif
  23.  
  24. #ifndef LibIntfHPP
  25. #include <LibIntf.hpp>
  26. #endif
  27.  
  28. #ifndef DsgnIntfHPP
  29. #include <DsgnIntf.hpp>
  30. #endif
  31.  
  32. #ifndef DBTablesHPP
  33. #include <DBTables.hpp>
  34. #endif
  35.  
  36. #ifndef DBCtrlsHPP
  37. #include <DBCtrls.hpp>
  38. #endif
  39.  
  40. #ifndef DBHPP
  41. #include <DB.hpp>
  42. #endif
  43.  
  44. #ifndef ExtCtrlsHPP
  45. #include <ExtCtrls.hpp>
  46. #endif
  47.  
  48. #ifndef StdCtrlsHPP
  49. #include <StdCtrls.hpp>
  50. #endif
  51.  
  52. #ifndef FormsHPP
  53. #include <Forms.hpp>
  54. #endif
  55.  
  56. #ifndef ControlsHPP
  57. #include <Controls.hpp>
  58. #endif
  59.  
  60. #ifndef GraphicsHPP
  61. #include <Graphics.hpp>
  62. #endif
  63.  
  64. #ifndef ClassesHPP
  65. #include <Classes.hpp>
  66. #endif
  67.  
  68. #ifndef MessagesHPP
  69. #include <Messages.hpp>
  70. #endif
  71.  
  72. #ifndef WindowsHPP
  73. #include <Windows.hpp>
  74. #endif
  75.  
  76. #ifndef SysUtilsHPP
  77. #include <SysUtils.hpp>
  78. #endif
  79.  
  80. #ifndef SystemHPP
  81. #include <System.hpp>
  82. #endif
  83.  
  84. namespace Dsdesign
  85. {
  86. //-- type declarations -------------------------------------------------------
  87. typedef System::Boolean __fastcall (__closure *TSelectionProc)(Db::TField *Field);
  88.  
  89. class __declspec(delphiclass) TDatasetEditor;
  90. class __declspec(pascalimplementation) TDatasetEditor : public Dsgnwnds::TDesignWindow
  91. {
  92.     typedef TDatasetEditor ThisClass;
  93.     typedef Dsgnwnds::TDesignWindow inherited;
  94.     
  95. __published:
  96.     Extctrls::TPanel *Panel1;
  97.     Db::TDataSource *DataSource;
  98.     Menus::TPopupMenu *LocalMenu;
  99.     Menus::TMenuItem *AddItem;
  100.     Menus::TMenuItem *NewItem;
  101.     Menus::TMenuItem *N1;
  102.     Menus::TMenuItem *CutItem;
  103.     Menus::TMenuItem *CopyItem;
  104.     Menus::TMenuItem *PasteItem;
  105.     Menus::TMenuItem *DeleteItem;
  106.     Menus::TMenuItem *SelectAllItem;
  107.     Menus::TMenuItem *N2;
  108.     Menus::TMenuItem *RetrieveItem;
  109.     Menus::TMenuItem *UpdateItem;
  110.     Menus::TMenuItem *SaveAttributesAsItem;
  111.     Menus::TMenuItem *AssociateItem;
  112.     Menus::TMenuItem *Unassociate;
  113.     Stdctrls::TListBox *FieldListBox;
  114.     Dbctrls::TDBNavigator *DBNavigator;
  115.     void __fastcall FormCreate(System::TObject *Sender);
  116.     void __fastcall FormDestroy(System::TObject *Sender);
  117.     void __fastcall AddItemClick(System::TObject *Sender);
  118.     void __fastcall DeleteItemClick(System::TObject *Sender);
  119.     void __fastcall FieldListBoxDragOver(System::TObject *Sender, System::TObject *Source, System::Integer 
  120.         X, System::Integer Y, Controls::TDragState State, System::Boolean &Accept);
  121.     void __fastcall FieldListBoxDragDrop(System::TObject *Sender, System::TObject *Source, System::Integer 
  122.         X, System::Integer Y);
  123.     void __fastcall FieldListBoxKeyDown(System::TObject *Sender, System::Word &Key,  Classes::TShiftState 
  124.         Shift);
  125.     void __fastcall NewItemClick(System::TObject *Sender);
  126.     void __fastcall SelectTable(System::TObject *Sender);
  127.     void __fastcall FieldListBoxClick(System::TObject *Sender);
  128.     void __fastcall FieldListBoxKeyPress(System::TObject *Sender, System::Char &Key);
  129.     void __fastcall ClearAllClick(System::TObject *Sender);
  130.     void __fastcall FieldListBoxStartDrag(System::TObject *Sender, Controls::TDragObject *&DragObject);
  131.         
  132.     void __fastcall SelectAllItemClick(System::TObject *Sender);
  133.     void __fastcall CutItemClick(System::TObject *Sender);
  134.     void __fastcall CopyItemClick(System::TObject *Sender);
  135.     void __fastcall PasteItemClick(System::TObject *Sender);
  136.     void __fastcall LocalMenuPopup(System::TObject *Sender);
  137.     void __fastcall RetrieveItemClick(System::TObject *Sender);
  138.     void __fastcall UpdateItemClick(System::TObject *Sender);
  139.     void __fastcall SaveAttributesAsItemClick(System::TObject *Sender);
  140.     void __fastcall AssociateItemClick(System::TObject *Sender);
  141.     void __fastcall UnassociateClick(System::TObject *Sender);
  142.     
  143. private:
  144.     Db::TDataSetDesigner *FDSDesigner;
  145.     Forms::TForm *FForm;
  146.     Db::TDataSet *FDataset;
  147.     System::Integer FFocusRectItem;
  148.     System::Integer FMinWidth;
  149.     System::Integer FMinHeight;
  150.     System::Boolean FUpdating;
  151.     void __fastcall Copy(void);
  152.     void __fastcall CreateFields(Stdctrls::TListBox *FieldsList);
  153.     void __fastcall Cut(void);
  154.     void __fastcall MoveFields(System::Integer Offset);
  155.     void __fastcall Paste(void);
  156.     void __fastcall RemoveFields(void);
  157.     void __fastcall SelectAll(void);
  158.     void __fastcall RestoreSelection(Stdctrls::TListBox *List, Classes::TStringList *&Selection, System::Integer 
  159.         ItemIndex, System::Integer TopIndex, System::Boolean RestoreUpdate);
  160.     void __fastcall SaveSelection(Stdctrls::TListBox *List, Classes::TStringList *&Selection, System::Integer 
  161.         &ItemIndex, System::Integer &TopIndex, System::Boolean NoUpdate);
  162.     void __fastcall SetDataset(Db::TDataSet *Value);
  163.     void __fastcall Update(void);
  164.     void __fastcall UpdateCaption(void);
  165.     void __fastcall UpdateFieldList(void);
  166.     void __fastcall UpdateSelection(void);
  167.     System::Boolean __fastcall ForEachSelection(TSelectionProc Proc);
  168.     void __fastcall GetTableDesc( System::AnsiString &ADatabase,  System::AnsiString &ATable);
  169.     System::Boolean __fastcall FindFieldInfo(Db::TField *Field, Drintf::TFieldID &FieldID, Drintf::TAttrID 
  170.         &AttrID);
  171.     void __fastcall GetFieldInfo(Db::TField *Field, Drintf::TFieldID &FieldID, Drintf::TAttrID &AttrID)
  172.         ;
  173.     System::Boolean __fastcall RetrieveAttributes(Db::TField *Field);
  174.     System::Boolean __fastcall SaveAttributes(Db::TField *Field);
  175.     System::Boolean __fastcall SaveAttributesAs(Db::TField *Field);
  176.     System::Boolean __fastcall AssociateAttributes(Db::TField *Field);
  177.     System::Boolean __fastcall UnassociateAttributes(Db::TField *Field);
  178.     System::Boolean __fastcall CheckAttribute(Db::TField *Field);
  179.     System::AnsiString __fastcall QualifyTableName( System::AnsiString DatabaseName, Db::TDatabase *Database
  180.         , const System::AnsiString TableName);
  181.     MESSAGE void __fastcall WMGetMinMaxInfo(Messages::TWMGetMinMaxInfo &Message);
  182.     
  183. protected:
  184.     virtual void __fastcall Activated(void);
  185.     virtual System::AnsiString __fastcall UniqueName(Classes::TComponent *Component);
  186.     
  187. public:
  188.     virtual void __fastcall ComponentDeleted(Classes::TComponent *Component);
  189.     virtual Libintf::TEditState __fastcall GetEditState(void);
  190.     virtual void __fastcall EditAction(Libintf::TEditAction Action);
  191.     virtual void __fastcall FormModified(void);
  192.     virtual void __fastcall SelectionChanged(Dsgnintf::TComponentList *ASelection);
  193.     __property Forms::TForm * Form = {read=FForm, write=FForm, nodefault};
  194.     __property Db::TDataSet * Dataset = {read=FDataset, write=SetDataset, nodefault};
  195. public:
  196.     /* !! TDesignWindow.Create */ __fastcall virtual TDatasetEditor(Classes::TComponent *AOwner) : Dsgnwnds::TDesignWindow(
  197.         AOwner) { }
  198.     /* !! TDesignWindow.Destroy */ __fastcall virtual ~TDatasetEditor(void) { }
  199.     
  200. public:
  201.     /* !! TForm.CreateNew */ __fastcall TDatasetEditor(Classes::TComponent *AOwner, System::Integer Dummy
  202.         ) : Dsgnwnds::TDesignWindow(AOwner, Dummy) { }
  203.     
  204. };
  205.  
  206. //-- var, const, procedure ---------------------------------------------------
  207. extern void __fastcall ShowDatasetDesigner(Dsgnintf::TFormDesigner *Designer, Db::TDataSet *ADataset
  208.     );
  209. extern System::AnsiString __fastcall CreateUniqueName(Db::TDataSet *Dataset, const System::AnsiString 
  210.     FieldName, System::TMetaClass * FieldClass);
  211.  
  212. }    /* namespace Dsdesign */
  213. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  214. using namespace Dsdesign;
  215. #endif
  216. //-- end unit ----------------------------------------------------------------
  217. #endif    // DSDesign
  218.