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

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


#include "font.h"

#include "gui_bmpbutton.h"
#include "gui_button.h"
#include "gui_check_button.h"
#include "gui_Label.h"
#include "gui_edit.h"
#include <ExtCtrls.hpp>

//[2019.02.22.금][추가]
#include "GProgress.h"

//[2019.02.27.수][추가]
#include "GBmpButton.h"
#include "GList.h"



class Tfind_DialogBox_Form : public TForm
{
__published:	// IDE-managed Components
    TTimer *captionMoveTimer;
        void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
        void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall FormHide(TObject *Sender);
    void __fastcall captionMoveTimerTimer(TObject *Sender);
private:	// User declarations
public:		// User declarations

        __fastcall Tfind_DialogBox_Form(TComponent* Owner);

        //[2012.04.30.월][완료!!!]
        __fastcall ~Tfind_DialogBox_Form(void);

        //[서브클래싱]
        //{
            //[2012.05.20.일][완료!!!]
            void __fastcall WndProc(Messages::TMessage &Message);

        //}

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

            //}

            //[실제 그리는 영역]
            //{
                Graphics::TBitmap    *_bmp_;

            //}

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

            //}

            //caption 에 표시할 문자열을 기록한다.
            char               _caption[100];

            int                _caption_height;
            int                _caption_width;

            //caption 을 마우스로 끄는 경우 true.
            bool               _caption_selected;

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

            //}

            //[기본 부품]
            //{
                //닫기 버튼.
                Tgui_bmpbutton_Form   *_close_bmpbtns;

            //}

            //[내부 부품들]
            //{
                Tgui_Label_Form          *_find_Label;
                Tgui_edit_Form           *_find_Edit;
                //{
                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_Change_find_Edit(void);

                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_KeyDown_Left_find_Edit(void);

                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_KeyDown_Right_find_Edit(void);

                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_KeyDown_Up_find_Edit(void);

                    //[2019.03.02.토][완료]
                    void __fastcall _EVENT_KeyDown_Down_find_Edit(void);

                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_KeyDown_Home_find_Edit(void);

                    //[2019.03.03.일][완료]
                    void __fastcall _EVENT_KeyDown_End_find_Edit(void);

                //}

                Tgui_Label_Form          *_replace_Label;
                Tgui_edit_Form           *_replace_Edit;

                Tgui_check_button_Form   *_word_CheckBtn;
                Tgui_Label_Form          *_word_Label;

                Tgui_check_button_Form   *_case_CheckBtn;
                Tgui_Label_Form          *_case_Label;

                //[2019.02.22.금][추가]{---------------------
                Tgui_check_button_Form   *_allFind_CheckBtn;
                Tgui_Label_Form          *_allFind_Label;

                //[2019.02.16.토][추가]{---------------------
                Tgui_button_Form         *_pageAllFind_Btn;
                //{
                    //[2019.02.23.토][추가]{---
                    //내부 [반복문] 켜기/끄기.
                    //}------------------------

                    bool  _pageAllFind_Ing;

                //}
                Tgui_button_Form         *_gprjAllFind_Btn;
                //{
                    //[2019.02.23.토][추가]{---
                    //내부 [반복문] 켜기/끄기.
                    //}------------------------

                    bool  _gprjAllFind_Ing;
                    
                //}
                //}------------------------------------------

                Tgui_button_Form         *_find_Btn;
                Tgui_button_Form         *_replace_Btn;
                Tgui_button_Form         *_replaceAll_Btn;

                //[진행막대]
                //{
                    //[2019.02.22.금][추가]{-------------
                    //[전체찾기] 진행정도를 알기 위한것.
                    //}----------------------------------
                    
                    TGProgress_Form  *_search_Progress;

                //}

                //[찾은목록]
                //{
                    //[찾은목록]
                    //{
                        //[2019.02.27.수][추가]
                        TGList_Form  *_findList_List;
                        //{
                            //[2019.02.27.수][완료]
                            void __fastcall _EVENT_ItemSelect_findList_List(void);

                            void __fastcall _EVENT_ItemReSelect_findList_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_ItemMouseSelect_findList_List(void);

                            //[2019.03.03.일][완료]
                            void __fastcall _EVENT_KeyDown_Esc_findList_List(void);

                            //[2019.02.27.수][완료]
                            void __fastcall _EVENT_MouseUp_R_findList_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_KeyDown_PreUp_findList_List(void);

                        //}

                    //}

                    //[근접단어 정렬]
                    //{
                        //[2019.03.02.토][추가]{----------------------------------
                        //<_findList_List> 와 [크기/색/위치] 등 모든 것이 동일.
                        //항상 [근접단어 정렬] 시에 <_findList_List> 위에 나온다.
                        //}-------------------------------------------------------
                        
                        TGList_Form  *_findAlign_List;
                        //{
                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_ItemSelect_findAlign_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_KeyDown_PreUp_findAlign_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_MouseUp_R_findAlign_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_ItemMouseSelect_findAlign_List(void);

                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_KeyDown_Esc_findAlign_List(void);

                        //}

                    //}

                    //[목록 펼침 버튼]
                    //{
                        TGBmpButton_Form  *_findList_BmpBtn;
                        //{
                            //[2019.02.27.수][완료]
                            void __fastcall _EVENT_Click_findList_BmpBtn(void);

                        //}

                    //}

                    //[빠른항목]
                    //{
                        //<GList> 를 [빠른목록] 으로 사용설정.
                        TGList_Form   *_findList_PopupMenu;
                        //{
                            //[2019.03.02.토][완료]
                            void __fastcall _EVENT_ItemSelect_findList_PopupMenu(void);

                        //}

                    //}

                //}

            //}

            //[변수]
            //{
                //<true> 이면 반복.
                bool   loop;

            //}

        //}

        //[FUNCTION]
        //{
            void __fastcall _FormCut(void);

            void __fastcall _Draw(void);

            void __fastcall _Border(void);

            void __fastcall _Shape(void);


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

            //[2007.12.14.금][완료!!!]
            void __fastcall _Width(int  pWidth);

            //[2007.12.14.금][완료!!!]
            void __fastcall _Height(int  pHeight);

            //[2012.05.07.월][완료!!!]
            void __fastcall _Show(void);

        //}

        //[찾기관련 함수]
        //{
            //[2009.05.07.목][완료!!!]
            bool __fastcall _Find(//선택 된것 항상 보이기.
                                  bool  pSelectView,
                                  //다시 그릴 것인가.
                                  bool  pReDraw,
                                  //찾을수 없는 경우 대화상자 보여주려면 true.
                                  bool  pMsgView,
                                  //[2009.05.08.금][추가!!!]
                                  //[입력지정자] 위쪽 보기 설정.
                                  bool  pAlwaysTopMiddle,
                                  //[입력지정자] 아래쪽 보기 설정.
                                  bool  pAlwaysBottomMiddle);

            //[2019.02.14.목][완료]
            bool __fastcall _Find_ReplaceStr(//선택 된것 항상 보이기.
                                             bool  pSelectView,
                                             //다시 그릴 것인가.
                                             bool  pReDraw,
                                             //찾을수 없는 경우 대화상자 보여주려면 true.
                                             bool  pMsgView,
                                             //[입력지정자] 위쪽 보기 설정.
                                             bool  pAlwaysTopMiddle,
                                             //[입력지정자] 아래쪽 보기 설정.
                                             bool  pAlwaysBottomMiddle);

            //[2018.05.06.일][완료!!!]
            bool __fastcall _Find2(//찾을 문자열.
                                   char  *pStr);

        //}

        //[전체 찾기 관련]
        //{
            //[2019.02.23.토][완료]
            bool __fastcall _TreeFind_EditorViewDoc(void);

            //[2019.02.23.토][완료]
            bool __fastcall _TreeFind_All(void);

            //[동작함수]
            //{
                //[2019.03.03.일][완료]
                void __fastcall _EVENT_Click_pageAllFind_Btn(void);

                //[2019.03.03.일][완료]
                void __fastcall _EVENT_Click_gprjAllFind_Btn(void);

            //}

        //}

        //[찾은 목록 관련]
        //{
            //[2019.03.03.일][완료]
            void __fastcall _FindList_Add(//[2019.03.03.일][추가]
                                          //[형광문자] 반영을 즉시 하는 경우는 <true>.
                                          bool  pEditorReDraw);

            //[2019.03.03.일][완료]
            bool __fastcall _FindList_Align(void);

        //}

        //[제어함수]
        //{
            //[2012.02.28.화][완료!!!]
            void __fastcall _ExFindStrAdd(//[찾기} 에 등록할 문자열.
                                          char  *pStr,
                                          //[단어] 구분 여부.
                                          bool   pOptWord,
                                          //[대소문자] 구분 여부.
                                          bool   pOptCase,
                                          //[편집기] 를 다시 그릴 것인가?
                                          bool   pReDraw);

        //}

        //[동작홤수들]
        //{
            void __fastcall _EVENT_CloseButton_Click(void);


            //[2019.03.03.일][완료]
            void __fastcall _EVENT_Click_find_Btn(void);

            //[2019.03.03.일][완료]
            void __fastcall _EVENT_Click_replace_Btn(void);

            //[2019.03.03.일][완료]
            void __fastcall _EVENT_Click_replaceAll_Btn(void);

            //[2009.05.09.토][완료!!!]
            //[2019.03.03.일][완료!!!]
            void __fastcall _EVENT_KeyEnter_find_Edit(void);

            //[2009.05.09.토][완료!!!]
            void __fastcall _EVENT_Click_word_CheckBtn(void);

            //[2009.05.09.토][완료!!!]
            void __fastcall _EVENT_Click_case_CheckBtn(void);

            //[2012.05.20.일][완료!!!]
            void __fastcall _EVENT_KeyDown_Esc_All(void);

        //}

};
//---------------------------------------------------------------------------
extern PACKAGE Tfind_DialogBox_Form *find_DialogBox_Form;
//---------------------------------------------------------------------------
#endif
