//---------------------------------------------------------------------------

#ifndef MultiBase_PRJH
#define MultiBase_PRJH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include "coolform.hpp"
#include <Graphics.hpp>
#include "coolform.hpp"
#include <DBCtrls.hpp>
#include <Mask.hpp>
#include "CoolForm.hpp"
#include <Buttons.hpp>
#include "AdvGrid.hpp"
#include <Menus.hpp>
//---------------------------------------------------------------------------
typedef struct 
{
  int Columna;
  AnsiString Clave;
} LookUpTable;

class TMultiBase : public TForm
{
__published:	// IDE-managed Components
        TCoolForm *CoolForm1;
        TPanel *Panel2;
        TStatusBar *StatusBar1;
        TSpeedButton *SpeedButton1;
        TAdvStringGrid *Visualizador;
        TPopupMenu *Mcolumnas;
        TMenuItem *ColumnasVisibles1;
        TMenuItem *N1;
        TSpeedButton *SpeedButton2;
        TSpeedButton *bColumnas;
        TSpeedButton *bFiltros;
        TPopupMenu *Mfiltros;
        TMenuItem *MenuItem1;
        TMenuItem *MenuItem2;
        TMenuItem *SinFiltros1;
        TSpeedButton *SpeedButton3;
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall SpeedButton1Click(TObject *Sender);
        void __fastcall SpeedButton2Click(TObject *Sender);
        void __fastcall bColumnasClick(TObject *Sender);
        void __fastcall VisualizadorGetEditorType(TObject *Sender,
          int ACol, int ARow, TEditorType &aEditor);
        void __fastcall VisualizadorCellsChanged(TObject *Sender,
          TRect &R);
        void __fastcall bFiltrosClick(TObject *Sender);
        void __fastcall SeleccionDeFiltroClick(TObject *Sender);
        void __fastcall SpeedButton3Click(TObject *Sender);
private:	// User declarations
        void __fastcall LoadData(AnsiString File);
        int __fastcall Analiza( AnsiString Registro );
        int __fastcall Almacena( AnsiString Registro, int Numero, TIniFile *ini );
        int RegAnt, RegSig;
        AnsiString delimitador;

        bool anyLookUp;
        LookUpTable *luTable;
        TStringList **LookUp;

        bool filtrando;
        bool modificado;int columnas;

        int LookABLEcolumns;
        void __fastcall VisibilidadColumnas(void);
        void __fastcall McolumnasClick(TObject *Sender);
        bool __fastcall TMultiBase::GuardarCambios(void);
        AnsiString __fastcall CompactaTexto( int Columna, AnsiString Texto );

public:		// User declarations
        __fastcall TMultiBase(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMultiBase *MultiBase;
//---------------------------------------------------------------------------
#endif
