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

#ifndef mainH
#define mainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
//---------------------------------------------------------------------------


//[2009.04.06.월][추가!!!]
#include  "vmos_def.h"
#include <ExtDlgs.hpp>



//[그림부품]
//{
    //[2010.01.25.월][추가!!!]{-------
    //[그림부품] 을 확인하기 위한 것.
    //}-------------------------------

    //전체 관리를 위한것.
    #include  "gui_part.h"

    //[모든것의 기본]{---
    #include  "GVmos.h"
    //}------------------

    #include  "GBalloonBox.h"
    #include  "GHint.h"
    #include  "GButton.h"
    #include  "GBmpButton.h"
    #include  "GLabel.h"
    #include  "GTabs.h"
    #include  "GProgress.h"
    #include  "GScrollH.h"
    #include  "GScrollV.h"
    #include  "GCheckButton.h"
    #include  "GRadioButton.h"
    #include  "GMsgBox.h"
    #include  "GForm.h"
    #include  "GFindDialog.h"
    #include  "GCaret.h"
    #include  "GEdit.h"
    #include  "GEdgeBox.h"
    #include  "GEditor.h"
    #include  "GList.h"
    #include  "GPrintBox.h"

    #include  "GDotMatrix.h"

    //[2018.06.11.월][추가!!!]
    #include  "GCover.h"

    #include <CheckLst.hpp>

    //[2020.09.30.수][추가]
    #include  "GProgressDialog.h"

    //[2021.03.29.월][추가]
    #include  "GImageBox.h"

//}



struct FILEOPEN
{
  int             handle;
  AnsiString      name;
  int             size;
  unsigned char  *buf;

};

class Tmain_Form : public TForm
{
__published:	// IDE-managed Components
        TOpenDialog *file_OpenDialog;
        TSaveDialog *file_SaveDialog;
        TTimer *timeOut_Timer;
    TTimer *debug_Timer;
    TTimer *btnQueue_Timer;
    TColorDialog *color_ColorDialog;
    TOpenPictureDialog *photo_OpenPictureDialog;
    TTimer *vmosApiTimeOut_Timer;
    TOpenDialog *vmos_OpenDialog;
    TSaveDialog *vmos_SaveDialog;
    TColorDialog *vmos_ColorDialog;
    TOpenPictureDialog *vmos_OpenPictureDialog;
    TTimer *autoSave_Timer;
    TTimer *ideShowTimer;
        void __fastcall timeOut_TimerTimer(TObject *Sender);
    void __fastcall debug_TimerTimer(TObject *Sender);
    void __fastcall btnQueue_TimerTimer(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall vmosApiTimeOut_TimerTimer(TObject *Sender);
    void __fastcall autoSave_TimerTimer(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall ideShowTimerTimer(TObject *Sender);
private:	// User declarations
public:		// User declarations

  __fastcall Tmain_Form(TComponent* Owner);
  __fastcall ~Tmain_Form(void);

  //[서브클래싱]
  //{
      void __fastcall WndProc(Messages::TMessage &Message);

  //}

  //[함수]
  //{
      //[2012.06.05.화][완료!!!]
      void __fastcall _Resize(void);
      //{
          //[2012.06.05.화][추가!!!]{---------------------------------------
          //<_Resize()> 함수 사용 유/무 결정.
          //[맷돌-통합개발환경] 크기 조정시 <Width>, <Height> 로 두번
          //조정되기 때문에 <IDE_ResizeForms()> 함수가 [두번씩] 호출되어
          //처리시간이 너무 느려지는 것을 막기 위한것.
          //실제로 <IDE_ResizeForms()> 함수가 처리시간이 많이 걸리기 때문에
          //단계적으로 처리되는 것이 모두 보여 보기 좋지 않다.
          //
          //<Tide_caption_Form::FormMouseUp()> 에서만 사용된다.
          //}---------------------------------------------------------------

          bool  _swResize; //(기본값:true)

      //}

  //}

  //[시험용 함수들]
  //{
      void __fastcall IDE_Test(void);

  //}

  //[통신포트]
  //{
      //[MODE:0]
      //{
          //[TXD]{-----------------------------------------------------
          DTU1  comM0_TxdBuf[1];  //[MODE:0] 는 1 Byte 만 [송신] 한다.
          DTU2  comM0_TxdCount;   //저장된 개수(1Byte 만 처리한다).
          //[RXD]------------------------------------------------------
          DTU1  comM0_RxdBuf[1];  //[MODE:0] 는 1 Byte 만 [수신] 한다.
          DTU2  comM0_RxdCount;   //저장된 개수(1Byte 만 처리한다).
          //}----------------------------------------------------------

          //[함수]
          //{
              //[2009.04.13.월][완료!!!]
              void __fastcall ComM0_Txd(void);

              //[2009.04.13.월][완료!!!]
              void __fastcall ComM0_Rxd(//대상 저장소.
                                        DTU1  *pBuf,
                                        //복사할 개수.
                                        DTU2   pCount);

          //}

      //}

      //[MODE:1]
      //{
          //[TXD]{------------------------------------------------
          DTU1  comM1_TxdBuf[2 + 0x400]; //통신 저장소(2 + 1024).
          DTU2  comM1_TxdCount;          //저장된 개수.
          //[RXD]-------------------------------------------------
          DTU1  comM1_RxdBuf[2 + 0x400]; //통신 저장소(2 + 1024).
          DTU2  comM1_RxdCount;          //저장된 개수.
          //}-----------------------------------------------------

          //[함수]
          //{
              //[2009.04.12.일][완료!!!]
              void __fastcall ComM1_Txd(void);

              //[2009.04.12.일][완료!!!]
              void __fastcall ComM1_Rxd(//대상 저장소.
                                        DTU1  *pBuf,
                                        //복사할 개수.
                                        DTU2   pCount);

          //}

      //}

      //[MODE:2]
      //{
          //[TXD]{------------------------------------------------
          DTU1  comM2_TxdBuf[2 + 0x400]; //통신 저장소(2 + 1024).
          DTU2  comM2_TxdCount;           //저장된 개수.
          //[RXD]-------------------------------------------------
          DTU1  comM2_RxdBuf[2 + 0x400]; //통신 저장소(2 + 1024).
          DTU2  comM2_RxdCount;           //저장된 개수.
          //}-----------------------------------------------------

          //[함수]
          //{
              void __fastcall ComM2_Txd(void);

              void __fastcall ComM2_Rxd(//대상 저장소.
                                        DTU1  *pBuf,
                                        //복사할 개수.
                                        DTU2   pCount);

          //}

      //}

  //}

  //[버튼 대기열 동작 관련]
  //{
      //[2009.04.18.토][완료!!!]
      void __fastcall (__closure * BtnQueue_Event)(void);

  //}

  

  //[그림부품 확인용]
  //{
      //[2010.01.25.월][추가!!!]{------
      //새로운 [그림부품] 을 확인한다.
      //}------------------------------

      //[전체관리]
      //{
          //[2010.02.04.목][추가!!!]{--------------------
          //모든 것의 [기본환경] 이 된다.
          //가장 먼저 생성돼고 반드시 1개만 있어야 한다.
          //}--------------------------------------------

          //[2021.03.29.월][주석처리]
          //TGVmos_Form  *_GVmos;

      //}

      //[그림부품]
      //{
          //[2021.03.29.월][주석처리]
          /*
          TGBalloonBox_Form    *_GBalloonBox;
          TGHint_Form          *_GHint;

          DTU1                 *_GPart_;

          TGButton_Form        *_GButton;
          TGBmpButton_Form     *_GBmpButton;
          TGLabel_Form         *_GLabel;
          TGTabs_Form          *_GTabs;
          TGProgress_Form      *_GProgress;
          TGScrollH_Form       *_GScrollH;
          TGScrollV_Form       *_GScrollV;
          TGCheckButton_Form   *_GCheckButton;
          TGRadioButton_Form   *_GRadioButton;
          TGMsgBox_Form        *_GMsgBox;
          TGForm_Form          *_GForm;
          TGFindDialog_Form    *_GFindDialog;
          TGCaret_Form         *_GCaret;
          TGEdit_Form          *_GEdit;
          TGEdgeBox_Form       *_GEdgeBox;
          TGEditor_Form        *_GEditor;
          TGList_Form          *_GList;
          TGPrintBox_Form      *_GPrintBox;

          //[2018.02.20.화][주석처리!!!]{---------------------------------
          //금일 사용하지 않는 것을 발견고 주석으로 처리한다.
          //[편집기] 에서 사용되는 것은 <ide_editor_Form> 에 선언돼 있음.
          //TGDotMatrix_Form     *_GDotMatrix;
          //}-------------------------------------------------------------

          //[2018.06.11.월][추가!!!]
          TGCover_Form           *_GCover;
          */

          //[2021.03.29.월][추가]
          //TGImageBox_Form  *_GImageBox;

      //}


      //[2010.02.10.수][완료!!!]
      void __fastcall GIGYENICS_GuiPart_Test0(void);
      void __fastcall GIGYENICS_GuiPart_Test1(void);

      //[2010.02.13.금][완료!!!]
      void __fastcall GIGYENICS_GuiPart_Event(void);

      void __fastcall GIGYENICS_GUI_Test(void);

      //[2021.03.29.월][생성]
      void __fastcall GIGYENICS_GUI_Test_Init(void);

      void __fastcall GImgBox_EVENT_Click(void);
      void __fastcall GImgBox_EVENT_Down(void);
      void __fastcall GImgBox_EVENT_Up(void);
      void __fastcall GImgBox_EVENT_MouseEnter(void);
      void __fastcall GImgBox_EVENT_MouseLeave(void);

  //}
       
};

//---------------------------------------------------------------------------
extern PACKAGE Tmain_Form *main_Form;
//---------------------------------------------------------------------------
#endif
