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

#ifndef qfsaddressH
#define qfsaddressH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <DBGrids.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <Menus.hpp>
#define CLOSE4 DM1->SQLQuery4->Close();DM1->SQLConnection1->CloseDataSets()
const AD_VIEW=0,AD_SELECT=1;

//---------------------------------------------------------------------------
class TFrmAddress : public TForm
{
__published:	// IDE 管理のコンポーネント
        TTreeView *TreeView1;
        TDBGrid *DBGrid1;
        TSplitter *Splitter1;
        TPanel *Panel1;
        TPopupMenu *PopupMenu1;
        TMenuItem *popNewdir;
        TMenuItem *popDeldir;
        TMenuItem *popRendir;
        TMenuItem *popToroot;
        TPopupMenu *PopupMenu2;
        TMenuItem *popCut;
        TMenuItem *popPaste;
        TMenuItem *mnSelectall;
        TMenuItem *popNew;
        TMenuItem *popEdit;
        TMenuItem *popDel;
        TButton *Button1;
        TMenuItem *N1;
        TMenuItem *popEditAdCol;
        TMenuItem *popPaste2;
        void __fastcall FormShow(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall TreeView1Edited(TObject *Sender, TTreeNode *Node,
          AnsiString &S);
        void __fastcall TreeView1DragOver(TObject *Sender, TObject *Source,
          int X, int Y, TDragState State, bool &Accept);
        void __fastcall TreeView1DragDrop(TObject *Sender, TObject *Source,
          int X, int Y);
        void __fastcall TreeView1Change(TObject *Sender, TTreeNode *Node);
        void __fastcall popNewdirClick(TObject *Sender);
        void __fastcall popDeldirClick(TObject *Sender);
        void __fastcall popRendirClick(TObject *Sender);
        void __fastcall popTorootClick(TObject *Sender);
        void __fastcall popNewClick(TObject *Sender);
        void __fastcall popEditClick(TObject *Sender);
        void __fastcall popDelClick(TObject *Sender);
        void __fastcall DBGrid1DblClick(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall FormResize(TObject *Sender);
        void __fastcall popEditAdColClick(TObject *Sender);
        void __fastcall popCutClick(TObject *Sender);
        void __fastcall popPasteClick(TObject *Sender);
        void __fastcall TreeView1MouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall mnSelectallClick(TObject *Sender);
private:	// ユーザー宣言
        void __fastcall RefreshAddressCol(void);
        void __fastcall RefreshAddress(void);
        bool __fastcall GetNode(int d_id);
        void __fastcall RefreshDir(void);
        TTreeNode *gnd;

public:		// ユーザー宣言
        __fastcall TFrmAddress(TComponent* Owner);
        char mo;//mode
        AnsiString SelMails;
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmAddress *FrmAddress;
//---------------------------------------------------------------------------
#endif
