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

#ifndef ide_captionH
#define ide_captionH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------


#include "font.h"
#include <ExtCtrls.hpp>



class Tide_caption_Form : public TForm
{
__published:	// IDE-managed Components
    TTimer *captionMoveTimer;

        void __fastcall FormDblClick(TObject *Sender);

        //[2018.02.20.화][완료!!!]
        void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button,
                                    TShiftState Shift, int X, int Y);

        //[2018.02.20.화][완료]
        void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
                                      int X, int Y);

        void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
                                      TShiftState Shift, int X, int Y);

        void __fastcall FormShow(TObject *Sender);
    void __fastcall captionMoveTimerTimer(TObject *Sender);

private:	// User declarations
public:		// User declarations

        __fastcall Tide_caption_Form(TComponent* Owner);

        //[2012.04.29.일][완료!!!]
        __fastcall ~Tide_caption_Form(void);

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

        //[VAR]
        //{
            //[환경변수]
            //{
                //[2007.10.02.화][추가!!!]
                struct  IDE_OPTION   *_ide_option;

            //}

            //[실제 그리는 영역]{----------------------------
            //[2018.02.25.일][설명!!!]
            //순수한 [제목줄] 영역만 해당(폼 전체가 아니다).
            //[폭] 은 항상 [화면전체폭] 과 같다.
            Graphics::TBitmap  *_bmp_;
            //}----------------------------------------------

            //[사용글꼴]{---------------
            struct FONTPACK    _font;
            //}-------------------------

            int                _caption_height;
            int                _caption_width;
            POINT              _mouse_down_point;

            //[제목줄 이동 관련]
            //{
                //[2018.03.17.토][추가!!!]
                int  deltaLeft;
                int  deltaTop;

            //}

            //caption 을 [더블클릭] 하는 경우 MouseMove-event 를 막기 위한 것이다.
            //[최대화] 상태인 경우는
            bool               _double_click;

            //[2009.03.32.화][추가!!!]
            //임의로 움직이는 것을 막기 위한 것이다.
            bool               _down;

            POINT              _mouse_down_point_resize;

            int                _formsize_kind;
            //{
                #define  d_formsize_NULL   0   //기본 값.
                #define  d_formsize_L      1   //왼쪽.
                #define  d_formsize_R      2   //오른쪽.
                #define  d_formsize_B      3   //아래.
                #define  d_formsize_LB     4   //왼쪽 아래.
                #define  d_formsize_RB     5   //오른쪽 아래.

                //[2018.02.25.일][추가!!!]
                #define  d_formsize_T      6   //위.
                #define  d_formsize_RT     7   //오른쪽 위.
                #define  d_formsize_LT     8   //왼쪽 위.

            //}

            //[2009.11.28.토][추가!!!]{------------------------------
            //해당 [동작함수] 가 동작중인지 아닌지를 구분한다.
            //이는 [동작함수] 의 [재귀호출] 을 방지하기 위한 것이다.
            bool  FormMouseMove_Running;
            //}------------------------------------------------------

        //}

        //[FUNCTION]
        //{
            //[2006.10.15.일][완료!!!]
            void __fastcall _Shape(void);

            //[2006.10.15.일][완료!!!]
            void __fastcall _Resize(void);

            //[2006.10.16.월][완료!!!]
            void __fastcall _FormCut_main(void);

            //[2006.10.17.화][완료!!!]
            void __fastcall _FormCut_caption(void);

            //[2007.03.18.일][완료!!!]
            void __fastcall _Border(void);

            void __fastcall _Draw(void);

            //[2010.07.07.수][완료!!!]
            void __fastcall _Caption(char  *pCaption);

        //}


};
//---------------------------------------------------------------------------
extern PACKAGE Tide_caption_Form *ide_caption_Form;
//---------------------------------------------------------------------------
#endif
