home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / Vcl / mxdssqry.hpp < prev    next >
C/C++ Source or Header  |  2000-02-01  |  14KB  |  346 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'mxdssqry.pas' rev: 5.00
  6.  
  7. #ifndef mxdssqryHPP
  8. #define mxdssqryHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #pragma option push -Vx
  13. #include <mxqparse.hpp>    // Pascal unit
  14. #include <mxtables.hpp>    // Pascal unit
  15. #include <mxstore.hpp>    // Pascal unit
  16. #include <mxcommon.hpp>    // Pascal unit
  17. #include <mxDB.hpp>    // Pascal unit
  18. #include <mxgrid.hpp>    // Pascal unit
  19. #include <mxConsts.hpp>    // Pascal unit
  20. #include <Menus.hpp>    // Pascal unit
  21. #include <ComCtrls.hpp>    // Pascal unit
  22. #include <Buttons.hpp>    // Pascal unit
  23. #include <ExtCtrls.hpp>    // Pascal unit
  24. #include <Forms.hpp>    // Pascal unit
  25. #include <Grids.hpp>    // Pascal unit
  26. #include <DBTables.hpp>    // Pascal unit
  27. #include <Db.hpp>    // Pascal unit
  28. #include <Graphics.hpp>    // Pascal unit
  29. #include <StdCtrls.hpp>    // Pascal unit
  30. #include <Controls.hpp>    // Pascal unit
  31. #include <Dialogs.hpp>    // Pascal unit
  32. #include <Classes.hpp>    // Pascal unit
  33. #include <SysUtils.hpp>    // Pascal unit
  34. #include <Messages.hpp>    // Pascal unit
  35. #include <Windows.hpp>    // Pascal unit
  36. #include <SysInit.hpp>    // Pascal unit
  37. #include <System.hpp>    // Pascal unit
  38.  
  39. //-- user supplied -----------------------------------------------------------
  40.  
  41. namespace Mxdssqry
  42. {
  43. //-- type declarations -------------------------------------------------------
  44. class DELPHICLASS ECubeDesignError;
  45. class PASCALIMPLEMENTATION ECubeDesignError : public Sysutils::Exception 
  46. {
  47.     typedef Sysutils::Exception inherited;
  48.     
  49. public:
  50.     #pragma option push -w-inl
  51.     /* Exception.Create */ inline __fastcall ECubeDesignError(const AnsiString Msg) : Sysutils::Exception(
  52.         Msg) { }
  53.     #pragma option pop
  54.     #pragma option push -w-inl
  55.     /* Exception.CreateFmt */ inline __fastcall ECubeDesignError(const AnsiString Msg, const System::TVarRec 
  56.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  57.     #pragma option pop
  58.     #pragma option push -w-inl
  59.     /* Exception.CreateRes */ inline __fastcall ECubeDesignError(int Ident)/* overload */ : Sysutils::Exception(
  60.         Ident) { }
  61.     #pragma option pop
  62.     #pragma option push -w-inl
  63.     /* Exception.CreateResFmt */ inline __fastcall ECubeDesignError(int Ident, const System::TVarRec * 
  64.         Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  65.     #pragma option pop
  66.     #pragma option push -w-inl
  67.     /* Exception.CreateHelp */ inline __fastcall ECubeDesignError(const AnsiString Msg, int AHelpContext
  68.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  69.     #pragma option pop
  70.     #pragma option push -w-inl
  71.     /* Exception.CreateFmtHelp */ inline __fastcall ECubeDesignError(const AnsiString Msg, const System::TVarRec 
  72.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  73.         ) { }
  74.     #pragma option pop
  75.     #pragma option push -w-inl
  76.     /* Exception.CreateResHelp */ inline __fastcall ECubeDesignError(int Ident, int AHelpContext)/* overload */
  77.          : Sysutils::Exception(Ident, AHelpContext) { }
  78.     #pragma option pop
  79.     #pragma option push -w-inl
  80.     /* Exception.CreateResFmtHelp */ inline __fastcall ECubeDesignError(System::PResStringRec ResStringRec
  81.         , const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
  82.         ResStringRec, Args, Args_Size, AHelpContext) { }
  83.     #pragma option pop
  84.     
  85. public:
  86.     #pragma option push -w-inl
  87.     /* TObject.Destroy */ inline __fastcall virtual ~ECubeDesignError(void) { }
  88.     #pragma option pop
  89.     
  90. };
  91.  
  92.  
  93. class DELPHICLASS EAddWarning;
  94. class PASCALIMPLEMENTATION EAddWarning : public Sysutils::Exception 
  95. {
  96.     typedef Sysutils::Exception inherited;
  97.     
  98. public:
  99.     #pragma option push -w-inl
  100.     /* Exception.Create */ inline __fastcall EAddWarning(const AnsiString Msg) : Sysutils::Exception(Msg
  101.         ) { }
  102.     #pragma option pop
  103.     #pragma option push -w-inl
  104.     /* Exception.CreateFmt */ inline __fastcall EAddWarning(const AnsiString Msg, const System::TVarRec 
  105.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  106.     #pragma option pop
  107.     #pragma option push -w-inl
  108.     /* Exception.CreateRes */ inline __fastcall EAddWarning(int Ident)/* overload */ : Sysutils::Exception(
  109.         Ident) { }
  110.     #pragma option pop
  111.     #pragma option push -w-inl
  112.     /* Exception.CreateResFmt */ inline __fastcall EAddWarning(int Ident, const System::TVarRec * Args, 
  113.         const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  114.     #pragma option pop
  115.     #pragma option push -w-inl
  116.     /* Exception.CreateHelp */ inline __fastcall EAddWarning(const AnsiString Msg, int AHelpContext) : 
  117.         Sysutils::Exception(Msg, AHelpContext) { }
  118.     #pragma option pop
  119.     #pragma option push -w-inl
  120.     /* Exception.CreateFmtHelp */ inline __fastcall EAddWarning(const AnsiString Msg, const System::TVarRec 
  121.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  122.         ) { }
  123.     #pragma option pop
  124.     #pragma option push -w-inl
  125.     /* Exception.CreateResHelp */ inline __fastcall EAddWarning(int Ident, int AHelpContext)/* overload */
  126.          : Sysutils::Exception(Ident, AHelpContext) { }
  127.     #pragma option pop
  128.     #pragma option push -w-inl
  129.     /* Exception.CreateResFmtHelp */ inline __fastcall EAddWarning(System::PResStringRec ResStringRec, 
  130.         const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
  131.         ResStringRec, Args, Args_Size, AHelpContext) { }
  132.     #pragma option pop
  133.     
  134. public:
  135.     #pragma option push -w-inl
  136.     /* TObject.Destroy */ inline __fastcall virtual ~EAddWarning(void) { }
  137.     #pragma option pop
  138.     
  139. };
  140.  
  141.  
  142. class DELPHICLASS EAddError;
  143. class PASCALIMPLEMENTATION EAddError : public Sysutils::Exception 
  144. {
  145.     typedef Sysutils::Exception inherited;
  146.     
  147. public:
  148.     #pragma option push -w-inl
  149.     /* Exception.Create */ inline __fastcall EAddError(const AnsiString Msg) : Sysutils::Exception(Msg)
  150.          { }
  151.     #pragma option pop
  152.     #pragma option push -w-inl
  153.     /* Exception.CreateFmt */ inline __fastcall EAddError(const AnsiString Msg, const System::TVarRec * 
  154.         Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  155.     #pragma option pop
  156.     #pragma option push -w-inl
  157.     /* Exception.CreateRes */ inline __fastcall EAddError(int Ident)/* overload */ : Sysutils::Exception(
  158.         Ident) { }
  159.     #pragma option pop
  160.     #pragma option push -w-inl
  161.     /* Exception.CreateResFmt */ inline __fastcall EAddError(int Ident, const System::TVarRec * Args, const 
  162.         int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  163.     #pragma option pop
  164.     #pragma option push -w-inl
  165.     /* Exception.CreateHelp */ inline __fastcall EAddError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(
  166.         Msg, AHelpContext) { }
  167.     #pragma option pop
  168.     #pragma option push -w-inl
  169.     /* Exception.CreateFmtHelp */ inline __fastcall EAddError(const AnsiString Msg, const System::TVarRec 
  170.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  171.         ) { }
  172.     #pragma option pop
  173.     #pragma option push -w-inl
  174.     /* Exception.CreateResHelp */ inline __fastcall EAddError(int Ident, int AHelpContext)/* overload */
  175.          : Sysutils::Exception(Ident, AHelpContext) { }
  176.     #pragma option pop
  177.     #pragma option push -w-inl
  178.     /* Exception.CreateResFmtHelp */ inline __fastcall EAddError(System::PResStringRec ResStringRec, const 
  179.         System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
  180.         ResStringRec, Args, Args_Size, AHelpContext) { }
  181.     #pragma option pop
  182.     
  183. public:
  184.     #pragma option push -w-inl
  185.     /* TObject.Destroy */ inline __fastcall virtual ~EAddError(void) { }
  186.     #pragma option pop
  187.     
  188. };
  189.  
  190.  
  191. class DELPHICLASS TDSSQueryEditor;
  192. class PASCALIMPLEMENTATION TDSSQueryEditor : public Forms::TForm 
  193. {
  194.     typedef Forms::TForm inherited;
  195.     
  196. __published:
  197.     Stdctrls::TListBox* FieldList;
  198.     Stdctrls::TListBox* ActiveDimList;
  199.     Stdctrls::TListBox* SummaryList;
  200.     Stdctrls::TLabel* Label2;
  201.     Stdctrls::TLabel* Label3;
  202.     Stdctrls::TMemo* ShowBox;
  203.     Menus::TPopupMenu* AggPopup;
  204.     Buttons::TBitBtn* Cancel;
  205.     Stdctrls::TButton* CancelQryMod;
  206.     Menus::TMenuItem* count1;
  207.     Menus::TMenuItem* count2;
  208.     Stdctrls::TButton* EditQry;
  209.     Stdctrls::TButton* VQB;
  210.     Stdctrls::TButton* SelectAllFields;
  211.     Stdctrls::TLabel* Label4;
  212.     Stdctrls::TButton* OKButton;
  213.     Menus::TMenuItem* average1;
  214.     Stdctrls::TButton* HelpButton;
  215.     Comctrls::TPageControl* Pager;
  216.     Comctrls::TTabSheet* Dimensions;
  217.     Comctrls::TTabSheet* Query;
  218.     Stdctrls::TLabel* Label1;
  219.     Stdctrls::TComboBox* TableCombo;
  220.     Stdctrls::TComboBox* DatabaseCombo;
  221.     Stdctrls::TLabel* Label5;
  222.     Stdctrls::TLabel* Label6;
  223.     Buttons::TBitBtn* AddButton;
  224.     Buttons::TBitBtn* AddAgg;
  225.     Buttons::TBitBtn* RemoveButton;
  226.     Buttons::TBitBtn* RemoveAgg;
  227.     Stdctrls::TLabel* Label7;
  228.     Stdctrls::TCheckBox* CountStarAvg;
  229.     void __fastcall AddButtonClick(System::TObject* Sender);
  230.     void __fastcall RemoveButtonClick(System::TObject* Sender);
  231.     void __fastcall FieldListClick(System::TObject* Sender);
  232.     void __fastcall ActiveDimListClick(System::TObject* Sender);
  233.     void __fastcall SummaryListClick(System::TObject* Sender);
  234.     void __fastcall AddAggClick(System::TObject* Sender);
  235.     void __fastcall RemoveAggClick(System::TObject* Sender);
  236.     void __fastcall Sum1Click(System::TObject* Sender);
  237.     void __fastcall Count1Click(System::TObject* Sender);
  238.     void __fastcall OKButtonClick(System::TObject* Sender);
  239.     void __fastcall CancelQryModClick(System::TObject* Sender);
  240.     void __fastcall ShowBoxChange(System::TObject* Sender);
  241.     void __fastcall EditQryClick(System::TObject* Sender);
  242.     void __fastcall VQBClick(System::TObject* Sender);
  243.     void __fastcall SelectAllFieldsClick(System::TObject* Sender);
  244.     void __fastcall FieldListDblClick(System::TObject* Sender);
  245.     void __fastcall average1Click(System::TObject* Sender);
  246.     void __fastcall ActiveDimListDragDrop(System::TObject* Sender, System::TObject* Source, int X, int 
  247.         Y);
  248.     void __fastcall ActiveDimListDragOver(System::TObject* Sender, System::TObject* Source, int X, int 
  249.         Y, Controls::TDragState State, bool &Accept);
  250.     void __fastcall FieldListDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, Controls::TDragState 
  251.         State, bool &Accept);
  252.     void __fastcall SummaryListDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, 
  253.         Controls::TDragState State, bool &Accept);
  254.     void __fastcall FieldListDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
  255.     void __fastcall SummaryListDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y)
  256.         ;
  257.     void __fastcall FieldListKeyPress(System::TObject* Sender, char &Key);
  258.     void __fastcall ShowBoxKeyPress(System::TObject* Sender, char &Key);
  259.     void __fastcall ActiveDimListKeyPress(System::TObject* Sender, char &Key);
  260.     void __fastcall SummaryListKeyPress(System::TObject* Sender, char &Key);
  261.     void __fastcall PagerChanging(System::TObject* Sender, bool &AllowChange);
  262.     void __fastcall TableComboChange(System::TObject* Sender);
  263.     void __fastcall DatabaseComboChange(System::TObject* Sender);
  264.     void __fastcall DatabaseComboExit(System::TObject* Sender);
  265.     void __fastcall DatabaseComboKeyPress(System::TObject* Sender, char &Key);
  266.     void __fastcall TableComboKeyPress(System::TObject* Sender, char &Key);
  267.     void __fastcall TableComboExit(System::TObject* Sender);
  268.     void __fastcall HelpButtonClick(System::TObject* Sender);
  269.     void __fastcall DatabaseComboKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift
  270.         );
  271.     void __fastcall TableComboKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
  272.     void __fastcall CountStarAvgClick(System::TObject* Sender);
  273.     
  274. private:
  275.     bool bEditEnabled;
  276.     bool bisOK;
  277.     bool bQueryLegal;
  278.     bool bAllFields;
  279.     bool bDataBaseEditing;
  280.     bool bDataBaseChanged;
  281.     bool bTableNameEditing;
  282.     bool bTableNameChanged;
  283.     bool bQueryEditing;
  284.     bool bSQLChangeOff;
  285.     bool bStarAvgChanging;
  286.     Mxtables::TQueryDims* myMap;
  287.     Mxtables::TQueryDims* fieldMap;
  288.     Dbtables::TQuery* myQuery;
  289.     Dbtables::TQuery* vqbQuery;
  290.     Dbtables::TDatabase* myDB;
  291.     AnsiString mySQL;
  292.     AnsiString myAlias;
  293.     Mxqparse::TXtabQuery* fQParse;
  294.     void __fastcall SetQueryEditState(bool State);
  295.     void __fastcall ListBoxUnSelect(Stdctrls::TListBox* aListBox);
  296.     bool __fastcall AddNewItem(Mxcommon::TDimFlags sType, Mxtables::TQueryDim* DM, AnsiString Name);
  297.     bool __fastcall AddSummary(Mxcommon::TDimFlags sType);
  298.     void __fastcall AddCountStar(void);
  299.     void __fastcall RemoveCountStar(void);
  300.     AnsiString __fastcall FieldListDisplay(Mxtables::TQueryDim* Map);
  301.     void __fastcall ProcessNewQuery(AnsiString newSQL);
  302.     void __fastcall ProcessNewQueryError(AnsiString newSQL);
  303.     void __fastcall SetDatabaseName(AnsiString tAlias);
  304.     void __fastcall SetTableName(AnsiString TableName);
  305.     void __fastcall UpdateLists(void);
  306.     void __fastcall UpdateTableList(void);
  307.     void __fastcall UpdateDataBaseList(void);
  308.     void __fastcall UpdateFieldList(void);
  309.     void __fastcall UpdateDimLists(void);
  310.     void __fastcall UpdateSQLBox(void);
  311.     void __fastcall UpdateTableName(void);
  312.     
  313. public:
  314.     bool __fastcall SInitialize(const Forms::_di_IDesigner Designer, Dbtables::TQuery* aQuery);
  315.     __fastcall virtual TDSSQueryEditor(Classes::TComponent* AOwner);
  316.     __fastcall virtual ~TDSSQueryEditor(void);
  317. public:
  318.     #pragma option push -w-inl
  319.     /* TCustomForm.CreateNew */ inline __fastcall virtual TDSSQueryEditor(Classes::TComponent* AOwner, 
  320.         int Dummy) : Forms::TForm(AOwner, Dummy) { }
  321.     #pragma option pop
  322.     
  323. public:
  324.     #pragma option push -w-inl
  325.     /* TWinControl.CreateParented */ inline __fastcall TDSSQueryEditor(HWND ParentWindow) : Forms::TForm(
  326.         ParentWindow) { }
  327.     #pragma option pop
  328.     
  329. };
  330.  
  331.  
  332. //-- var, const, procedure ---------------------------------------------------
  333. extern PACKAGE void __fastcall ShowDSSQueryEditor(const Forms::_di_IDesigner Designer, Dbtables::TQuery* 
  334.     aQuery);
  335.  
  336. }    /* namespace Mxdssqry */
  337. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  338. using namespace Mxdssqry;
  339. #endif
  340. #pragma option pop    // -w-
  341. #pragma option pop    // -Vx
  342.  
  343. #pragma delphiheader end.
  344. //-- end unit ----------------------------------------------------------------
  345. #endif    // mxdssqry
  346.