/** * @file XTPSyntaxEditGoToLineDlg.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPSYNTAXEDITGOTOLINEDLG_H__) # define __XTPSYNTAXEDITGOTOLINEDLG_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * This class implements the "GoToLine" dialog for a SyntaxEdit control. */ class _XTP_EXT_CLASS CXTPSyntaxEditGoToLineDlg : public CDialog { public: /** * @brief * Default object constructor. * @param pParent Pointer to a parent window. */ CXTPSyntaxEditGoToLineDlg(CWnd* pParent = NULL); /** @cond */ enum { IDD = XTP_IDD_EDIT_GOTOLINE }; CEdit m_wndEditLineNo; int m_iLineNo; CString m_csLineNo; /** @endcond */ /** * @brief * Shows the "GoToLine" dialog. If a window has not been * created, then this method will load a dialog template * from resources and create a modeless dialog. * @param pEditCtrl Pointer to a CXTPSyntaxEditCtrl object. * @param bSelectLine Select Line option. * @param bHideOnFind Hide On Find option. * @return * TRUE if successful, otherwise FALSE. * @see * ShowWindow */ BOOL ShowDialog(CXTPSyntaxEditCtrl* pEditCtrl, BOOL bSelectLine = FALSE, BOOL bHideOnFind = FALSE); /** @cond */ public: virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void DoDataExchange(CDataExchange* pDX); /**< DDX/DDV support */ /** @endcond */ protected: /** * @brief * Loads window position from the application profile. * @return * TRUE if successful, otherwise FALSE. */ virtual BOOL LoadPos(); /** * @brief * Saves window position to the application profile. * @return * TRUE if successful, otherwise FALSE. */ virtual BOOL SavePos(); /** @cond */ afx_msg void OnChangeEditLineNo(); virtual BOOL OnInitDialog(); afx_msg void OnBtnGoTo(); virtual void OnCancel(); DECLARE_MESSAGE_MAP() /** @endcond */ int m_iMaxLineNo; /**< Maximum line number. */ BOOL m_bHideOnFind; /**< Hide On Find option. */ BOOL m_bSelectLine; /**< Select Line option. */ CPoint m_ptWndPos; /**< Window position. */ CXTPSyntaxEditCtrl* m_pEditCtrl; /**< Pointer to the attached edit control. */ }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSYNTAXEDITGOTOLINEDLG_H__) /** @endcond */