/** * @file XTPSyntaxEditBufferManager.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(__XTPSYNTAXEDITBUFFERMANAGER_H__) # define __XTPSYNTAXEDITBUFFERMANAGER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** @cond */ namespace XTPSyntaxEditLexAnalyser /** @endcond */ { class CXTPSyntaxEditLexTextSchema; class CXTPSyntaxEditLexParser; }; /**< namespace XTPSyntaxEditLexAnalyser */ typedef XTPSyntaxEditLexAnalyser::CXTPSyntaxEditLexTextSchema CXTPSyntaxEditTextSchema; class CXTPSyntaxEditLineMarksManager; class CXTPSyntaxEditUndoRedoManager; class CXTPNotifySink; class CXTPNotifyConnection; class CXTPSyntaxEditConfigurationManager; typedef CXTPSmartPtrInternalT CXTPSyntaxEditConfigurationManagerPtr; /** * @brief * This class is the main class for buffer management. One instance * of this class is attached with a CXTPSyntaxEditCtrl object. This class * contains a list of CBufferIndex classes which, in turn, contains * a position in the file (in case of un-modified index) or a CEditBuffer * pointer. */ class _XTP_EXT_CLASS CXTPSyntaxEditBufferManager : public CXTPCmdTarget { DECLARE_DYNCREATE(CXTPSyntaxEditBufferManager) friend class CXTPSyntaxEditCtrl; public: /** * @brief * Default object constructor. */ CXTPSyntaxEditBufferManager(); /** * @brief * Destroys a CXTPSyntaxEditBufferManager object, handles cleanup * and de-allocation. */ ~CXTPSyntaxEditBufferManager(); /** * @brief * Determines if the file has been modified. * @return * TRUE if the file has been modified, otherwise FALSE. */ BOOL IsModified() const; /** * @brief * Gets the CodePage for text conversion. * @return * The CodePage for text conversion. */ UINT GetCodePage() const; /** * @brief * Gets the tab size. * @return * The tab size. */ int GetTabSize() const; /** * @brief * Sets the tab size (must be between 1-64). * @param nTabSize [in] Tab size to set. * @param bUpdateReg [in] TRUE to update this setting in the registry, FALSE otherwise. * By default, this parameter is FALSE. * @return * TRUE if the operation was successful, otherwise FALSE. */ BOOL SetTabSize(int nTabSize, BOOL bUpdateReg = FALSE); /** * @brief * Gets the status of the overwrite flag. * @return * TRUE if OVR is set, otherwise FALSE. */ BOOL GetOverwriteFlag() const; /** * @brief * Sets the status for the overwrite flag. * @param bOverwrite [in] TRUE to set OVR, FALSE to set INS. */ void SetOverwriteFlag(BOOL bOverwrite); /** * @brief * Determines if the parser is enabled/disabled. * @return * TRUE if the parser is enabled, FALSE if the parser is disabled. */ BOOL IsParserEnabled() const; /** * @brief * Enables/disables the parser. * @param bEnable [in] TRUE to enable the parser, FALSE to disable the parser. */ void EnableParser(BOOL bEnable); /** * @brief * Gets the CRLF style of the current document. * @return * The CRLF style of the current document. */ int GetCurCRLFType() const; /** * @brief * Sets the CRLF style for the current document. * @param nStyle [in] CRLF style to be set. */ void SetCRLFStyle(int nStyle); /** * @brief * Gets the CRLF text of the current document. * @return * The CRLF text of the current document. */ CString GetCurCRLF() const; private: /** * @brief * Internal implementation to get the CRLF text of the current document. * @param nCRLFStyle [in] Index of the CRLF style string. * @return * The CRLF text of the current document. */ LPCTSTR GetCRLF(int nCRLFStyle = -1) const; public: /** * @brief * Determines if specified text is a CRLF. * @param szCompText [in] Text to be checked. * @param bMatchReverse [in] TRUE to match reverse, FALSE otherwise. * @return * TRUE if the specified text is a CRLF, otherwise FALSE. */ BOOL IsTextCRLF(LPCTSTR szCompText, BOOL bMatchReverse = FALSE) const; # ifdef _UNICODE /** * @brief * Determines if specified text (non-unicode string) is a CRLF. * @param szCompText [in] Text to be checked. * @param bMatchReverse [in] TRUE to match reverse, FALSE otherwise. * @return * TRUE if the specified text is a CRLF, otherwise FALSE. */ BOOL IsTextCRLF(LPCSTR szCompText, BOOL bMatchReverse = FALSE) const; # endif /** * @brief * Gets the number of rows in the document. * @return * The number of rows in the document. */ int GetRowCount() const; /** * @brief * Gets the associated Undo/Redo manager. * @return * A pointer to the associated Undo/Redo manager. */ CXTPSyntaxEditUndoRedoManager* GetUndoRedoManager() const; /** * @brief * Gets the associated line marks manager. * @return * A pointer to the associated line marks manager. */ CXTPSyntaxEditLineMarksManager* GetLineMarksManager() const; /** * @brief * Gets the associated lexical parser. * @return * A pointer to the associated lexical parser. */ XTPSyntaxEditLexAnalyser::CXTPSyntaxEditLexParser* GetLexParser() const; /** * @brief * Gets the associated configuration manager. * @return * A pointer to the associated configuration manager. */ CXTPSyntaxEditConfigurationManager* GetLexConfigurationManager() const; /** * @brief * Sets the associated configuration manager. * @param pMan [in] Pointer to the configuration manager to be set. */ void SetLexConfigurationManager(CXTPSyntaxEditConfigurationManager* pMan); /** * @brief * Gets the events connection object. * @return * A pointer to the events connection object. */ CXTPNotifyConnection* GetConnection() const; /** * @brief * Cleans up all internal objects. */ void Close(); /** * @brief * Serializes actual data. * @param ar [in, out] Reference to the archive to save/load text. */ virtual void Serialize(CArchive& ar); /** * @brief * Serializes actual data. * @param ar [in, out] Reference to the archive to save/load text. * @param bUnicode [in] TRUE to use UNICODE format for text in the archive. * @param bWriteUnicodeFilePrefix [in] TRUE to write Unicode File Prefix. * @param nCodePage [in] Text code page (or -1 to use default). * @param pcszFileExt [in] File extension to select appropriate parser schema. * @param nDataSizeLimit [in] The number of bytes to stop storing text to archive * (or -1 to store all). */ virtual void SerializeEx(CArchive& ar, BOOL bUnicode = -1, BOOL bWriteUnicodeFilePrefix = TRUE, UINT nCodePage = (UINT)-1, LPCTSTR pcszFileExt = NULL, int nDataSizeLimit = -1); /** * @brief * Set the file pointer for the buffer. * @param pFile [in] File pointer to be set. * @param pcszFileExt [in] Number of lines (Not used). * @see * SetFileExt() */ void Load(CFile* pFile, LPCTSTR pcszFileExt = NULL); /** * @brief * Sets the file extension. * @param strExt [in] Reference to the file extension to be set. * @see * CString GetFileExt() */ void SetFileExt(const CString& strExt); /** * @brief * Gets the file extension. * @return * The file extension. * @see * void SetFileExt(const CString& strExt); */ CString GetFileExt() const; /** * @brief * Retrieves a line of text from either a file or buffer. * @param iLine [in] Line for which to get the text. * @param strText [out] Reference to a CString object * to receive the line of text. * @param bAddCRLF [in] TRUE to add CRLF (if it exists), FALSE otherwise. * @param iCRLFStyle [in] CRLF style. */ void GetLineText(int iLine, CString& strText, BOOL bAddCRLF = FALSE, int iCRLFStyle = -1); /** * @brief * Retrieves a line of text from either a file or buffer. * @param iLine [in] Line for which to get the text. * @param bAddCRLF [in] TRUE to add CRLF (if it exists), FALSE otherwise. * @param iCRLFStyle [in] CRLF style. * @return * The line of text. */ CString GetLineText(int iLine, BOOL bAddCRLF = FALSE, int iCRLFStyle = -1) const; /** * @brief * Gets the length of a line of text in TCHARs/characters. * @param iLine [in] Line for which to get the text. * @param bAddCRLF [in] TRUE to add CRLF (if it exists), FALSE otherwise. * @param iCRLFStyle [in] CRLF style. * @return * The length of the line of text in TCHARs/characters. */ int GetLineTextLength(int iLine, BOOL bAddCRLF = FALSE, int iCRLFStyle = -1) const; /** * @brief * Gets the length of a line of text in TCHARs/characters. * @param iLine [in] Line for which to get the text. * @param bAddCRLF [in] TRUE to add CRLF (if it exists), FALSE otherwise. * @param iCRLFStyle [in] CRLF style. * @return * The length of the line of text in TCHARs/characters. */ int GetLineTextLengthC(int iLine, BOOL bAddCRLF = FALSE, int iCRLFStyle = -1) const; /** * @brief * Gets the maximum allowed length for a line of text. * @return * The maximum allowed length for a line of text. */ int GetMaxLineTextLength() const; /** * @brief * Gets the length of a line of text from either a file or buffer. * @param nLineFrom [in] Start line identifier. * @param nLineTo [in] End line identifier. * @param bExpandTabs [in] TRUE to expand tab characters, FALSE otherwise. * @return * The length of the line of text. */ int CalcMaxLineTextLength(int nLineFrom = -1, int nLineTo = -1, BOOL bExpandTabs = FALSE) const; /** * @brief * Retrieves the text from the buffer bounded between either * the row1/col1 and row2/col2 or the lcStart and lcEnd text coordinates. * @param row1 [in] Start line number. * @param col1 [in] Start column number. * @param row2 [in] End line number. * @param col2 [in] End column number. * @param file [out] Reference to a CMemFile object * to receive the text. * @param bColumnSelection [in] TRUE to copy the text block starting from * col1/lcStart and ending with * col2/lcEnd for each line between * row1/lcStart and row2/lcEnd, * FALSE to copy the full text between * row1/lcStart and row2/lcEnd. * @param bForceDOSStyleCRLF [in] TRUE to use DOS Style carriage return chars * to end each line, * FALSE to use the current carriage return style. * @return * TRUE if successful, otherwise FALSE. */ BOOL GetBuffer(int row1, int col1, int row2, int col2, CMemFile& file, BOOL bColumnSelection = FALSE, BOOL bForceDOSStyleCRLF = FALSE); /** * @brief * Retrieves the text from the buffer bounded between either * the row1/col1 and row2/col2 or the lcStart and lcEnd text coordinates. * @param lcStart [in] Start text position. * @param lcEnd [in] End text position. * @param file [out] Reference to a CMemFile object * to receive the text. * @param bColumnSelection [in] TRUE to copy the text block starting from * col1/lcStart and ending with * col2/lcEnd for each line between * row1/lcStart and row2/lcEnd, * FALSE to copy the full text between * row1/lcStart and row2/lcEnd. * @param bForceDOSStyleCRLF [in] TRUE to use DOS Style carriage return chars * to end each line, * FALSE to use the current carriage return style. * @return * TRUE if successful, otherwise FALSE. */ BOOL GetBuffer(const XTP_EDIT_LINECOL& lcStart, const XTP_EDIT_LINECOL& lcEnd, CMemFile& file, BOOL bColumnSelection = FALSE, BOOL bForceDOSStyleCRLF = FALSE); /** * @brief * Inserts either text or a text block. * @param szText [in] Text to be inserted. * @param iRow [in] Start row for delete. * @param iCol [in] Start column for delete. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @param pFinalLC [out] Pointer to an XTP_EDIT_LINECOL variable * to receive the operation final position * in the text (to set caret). * @return * TRUE if successful, otherwise FALSE. */ BOOL InsertText(LPCTSTR szText, int iRow, int iCol, BOOL bCanUndo = TRUE, XTP_EDIT_LINECOL* pFinalLC = NULL); /** * @brief * Inserts either text or a text block. * @param szText [in] Text to be inserted. * @param nRow [in] Start row for delete. * @param nCol [in] Start column for delete. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @param pFinalLC [out] Pointer to an XTP_EDIT_LINECOL variable * to receive the operation final position * in the text (to set caret). * @return * TRUE if successful, otherwise FALSE. */ BOOL InsertTextBlock(LPCTSTR szText, int nRow, int nCol, BOOL bCanUndo = TRUE, XTP_EDIT_LINECOL* pFinalLC = NULL); /** * @brief * Deletes a specified range of text. * @param iRowFrom [in] Start row for delete. * @param iColFrom [in] Start column for delete. * @param iRowTo [in] End row for delete. * @param iColTo [in] End column for delete. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @param bDispCol [in] TRUE if iColFrom and iColTo are display columns, * FALSE if iColFrom and iColTo are string columns. * @return * TRUE if successful, otherwise FALSE. */ BOOL DeleteText(int iRowFrom, int iColFrom, int iRowTo, int iColTo, BOOL bCanUndo = TRUE, BOOL bDispCol = FALSE); /** * @brief * Deletes a specified number of rows. * @param nRow [in] Start row for delete. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @param nRowsCount [in] Number of rows to delete. * @return * TRUE if successful, otherwise FALSE. */ BOOL RemoveLine(int nRow, BOOL bCanUndo = TRUE, int nRowsCount = 1); /** * @brief * Gets the name of the main configuration file. * @return * The name of the main configuration file. * @see * CXTPSyntaxEditBufferManager::SetConfigFile */ CString GetConfigFile() const; /** * @brief * Sets the the path to the main configuration file. * @param szPath [in] Path to be set. * @details * The configuration will be reloaded. * @return * TRUE if the path was found, otherwise FALSE. * @see * CXTPSyntaxEditBufferManager::GetConfigFile */ BOOL SetConfigFile(LPCTSTR szPath); void SetCodePage(UINT uCodePage); /** * @brief * Gets the master text schema. * @param strExt [in] Reference to the file extension to * the schema definition file. * @return * A pointer to the master text schema. */ CXTPSyntaxEditTextSchema* GetMasterTextSchema(const CString& strExt) const; /** * @brief * Changes the case of a specified character range in a specified row. * @param nRow [in] Row to change case in. * @param nDispFrom [in] Start visible position to change case from. * @param nDispTo [in] End visible position to change case to. * @param bUpper [in] TRUE to change case to upper, * FALSE to change case to lower. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @details * Configuration will be reloaded. */ void ChangeCase(int nRow, int nDispFrom, int nDispTo, BOOL bUpper, BOOL bCanUndo = TRUE); /** * @brief * Changes the tabification of a specified character range in a specified row. * @param nRow [in] Row to change tabification in. * @param nDispFrom [in] Start visible position to change tabification from. * @param nDispTo [in] End visible position to change tabification to. * @param bTabify [in] TRUE to change spaces to tabs, * FALSE to change tabs to spaces. * @param bCanUndo [in] TRUE if this operation can be undone, FALSE otherwise. * @details * Configuration will be reloaded. */ void ChangeTabification(int nRow, int nDispFrom, int nDispTo, BOOL bTabify, BOOL bCanUndo = TRUE); /** * @brief * Converts the column coordinates of text to string position. * @param nLine [in] Text line identifier. * @param nDispCol [in] Column coordinates. * @return * The converted string position. * @see * StrPosToCol */ virtual int ColToStrPos(int nLine, int nDispCol) const; /** * @brief * Converts the string position of text to column coordinates. * @param nLine [in] Text line identifier. * @param nStrPos [in] String position. * @return * The converted column coordinates. * @see * ColToStrPos */ virtual int StrPosToCol(int nLine, int nStrPos) const; protected: /** * @brief * Cleans up the buffer and all other allocated memories. */ void CleanUp(); /** * @brief * Calculates the average data size based on the average row length. * @param nRowStart [in] Start row identifier. * @param nRowEnd [in] End row identifier. * @return * The average data size. */ virtual UINT CalcAveDataSize(int nRowStart, int nRowEnd); int m_nAverageLineLen; /**< Average line length. */ CXTPNotifyConnection* m_pConnection; /**< Connection object to send notifications. */ protected: int m_nTabSize; /**< Tab size. */ int m_iCRLFStyle; /**< CRLF style 0 - DOS, 1 - UNIX, 2 - MAC. */ UINT m_nCodePage; /**< CodePage for text conversion. */ BOOL m_bUnicodeFileFormat; /**< Determine is file format Unicode or ASCII. */ BOOL m_bOverwrite; /**< Overwrite mode status. */ enum XTP_SYNTAXEDIT_FILE_ENCODING { XTP_SYNTAXEDIT_FILE_UTF_8 = 0, XTP_SYNTAXEDIT_FILE_UTF_8_BOM = 1, XTP_SYNTAXEDIT_FILE_UTF_16_LE = 2, XTP_SYNTAXEDIT_FILE_UTF_16_BE = 3, }; XTP_SYNTAXEDIT_FILE_ENCODING m_nFileEncoding; int GetFileEncoding(); // uploaded file encoding void SetFileEncoding(int val); // save file encoding CXTPSyntaxEditUndoRedoManager* m_pUndoRedoManager; /**< Pointer to the undo / redo manager. */ CXTPSyntaxEditLineMarksManager* m_pLineMarksManager; /**< Pointer to the line marks manager. */ XTPSyntaxEditLexAnalyser::CXTPSyntaxEditLexParser* m_pLexParser; /**< Pointer to the lexical parser. */ CXTPSyntaxEditConfigurationManagerPtr m_ptrLexConfigurationManager; /**< Pointer to the Lexical configuration manager */ CXTPSyntaxEditConfigurationManagerPtr m_ptrDefaultLexConfigurationManager; /**< Default Configuration Manager instance. */ CString m_strFileExt; /**< File extension. */ BOOL m_bIsParserEnabled; /**< TRUE if the parser is enabled, FALSE if the parser is disabled. */ /** @cond */ CXTPNotifySink* m_pLexConfigManSinkMT; virtual void OnLexConfigManEventHandler(XTP_NOTIFY_CODE Event, WPARAM wParam, LPARAM lParam); /** @endcond */ /** * @brief * This is helper class designed to manage a set of strings. */ class _XTP_EXT_CLASS CXTPSyntaxEditStringsManager { /** @cond */ friend class CXTPSyntaxEditBufferManager; /** @endcond */ public: /** * @brief * Default object constructor. */ CXTPSyntaxEditStringsManager(); /** * @brief * Default object destructor. Handles cleanup and deallocation */ virtual ~CXTPSyntaxEditStringsManager(); /** * @brief * Gets the number of managed strings. * @return * The number of managed strings. */ int GetCount() const; /** * @brief * Retrieves the string at a specified index. * @param nRow [in] Index of the string to retrieve. * @return * The string at the specified index. */ CString GetStr(int nRow) const; /** * @brief * Retrieves the length of the string at a specified index * in TCHARs/characters. * @param nRow [in] Index of the string to retrieve the length of. * @return * The length of the string at the specified index * in TCHARs/characters. */ int GetStrLen(int nRow) const; /** * @brief * Retrieves the length of the string at a specified index * in TCHARs/characters. * @param nRow [in] Index of the string to retrieve the length of. * @return * The length of the string at the specified index * in TCHARs/characters. */ int GetStrLenC(int nRow) const; /** * @brief * Sets the string at a specified index. * @param nRow [in] Index. * @param strText [in] Reference to the string to be set. * @details * If the specified index does not exist within the collection, * then this method will do nothing. */ void SetAtGrowStr(int nRow, const CString& strText); /** * @brief * Sets the string at a specified index. * @param nRow [in] Index. * @param pcszText [in] Pointer to the NULL-terminated string to be set. * @details * If the specified index does not exist within the collection, * then this method will do nothing. */ void SetAtGrowStr(int nRow, LPCTSTR pcszText); /** * @brief * Adds a specified string. * @param nRow [in] String identifier. * @param strText [in] Reference to the string to be added. * @details * If an existing identifier is used, then its string value will be updated. * @see * SetAtGrowStr */ void InsertStr(int nRow, const CString& strText); /** * @brief * Removes the string at a specified index. * @param nRow [in] Index of the string to be removed. * @return * TRUE if successful, FALSE if a string did not exist at the specified index. */ BOOL RemoveStr(int nRow); /** * @brief * Removes all strings from the collection. */ void RemoveAllStrs(); /** * @brief * Inserts text to the string at a specified index. * @param nRow [in] Index of the string to insert text to. * @param nPos [in] Start position in the string. * @param pcszText [in] Text to be inserted. * @param bGrowArrayIfNeed [in] TRUE to grow the strings array if nRow * is greater than the strings count, * FALSE to have this function do nothing * and return FALSE in this instance. * @param chLeftSpaceFiller [in] Character to be added to the left side * of the string to insert text to if * nPos is greater than the length of the * string. In this case, this character * will be added until the length of the * string is equal to nPos. * @return * TRUE if the text was successfully inserted, otherwise FALSE. * @see * DeleteText */ BOOL InsertText(int nRow, int nPos, LPCTSTR pcszText, BOOL bGrowArrayIfNeed = FALSE, TCHAR chLeftSpaceFiller = _T(' ')); /** * @brief * Deletes text from the string at a specified index. * @param nRow [in] Index of the string to delete text from. * @param nPos [in] Start position in the string. * @param nCount [in] Number of characters to remove. * @return * TRUE if the text was successfully deleted, otherwise FALSE. * @see * InsertText */ BOOL DeleteText(int nRow, int nPos, int nCount); /** * @brief * Retrieves the string at a specified index. * @param nRow [in] Index of the string to be retrieved. * @param bGrowArrayIfNeed [in] TRUE to grow the array of strings, FALSE otherwise. * The default value of this parameter is TRUE. * @return * A pointer to the string at the specified index. */ CString* GetStrData(int nRow, BOOL bGrowArrayIfNeed = TRUE); /** * @brief * Retrieves the string at a specified index. * @param nRow [in] Index of the string to be retrieved. * @return * A pointer to the string at the specified index. */ CString* GetStrDataC(int nRow) const; /** * @brief * Internal class, implements a collection of strings. */ class _XTP_EXT_CLASS CStringPtrArray : public CArray { /** @cond */ typedef CArray TBase; /** @endcond */ public: /** * @brief * Default object constructor. */ CStringPtrArray(); /** * @brief * Default object destructor. Handles cleanup and deallocation */ virtual ~CStringPtrArray(); /** * @brief * Deletes all string objects and removes them from the array. */ void RemoveAll(); }; CStringPtrArray m_arStrings; /**< String collection. */ }; CXTPSyntaxEditStringsManager m_Strings; /**< Strings manager helper object. */ protected: # ifdef _XTP_ACTIVEX /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPSyntaxEditBufferManager) afx_msg BSTR OleGetFileExt(); afx_msg void OleSetFileExt(LPCTSTR pcszFileExt); /** @endcond */ # endif }; //////////////////////////////////////////////////////////////////////////// AFX_INLINE CXTPSyntaxEditLineMarksManager* CXTPSyntaxEditBufferManager::GetLineMarksManager() const { return m_pLineMarksManager; } AFX_INLINE XTPSyntaxEditLexAnalyser::CXTPSyntaxEditLexParser* CXTPSyntaxEditBufferManager::GetLexParser() const { return m_pLexParser; } AFX_INLINE CXTPSyntaxEditConfigurationManager* CXTPSyntaxEditBufferManager::GetLexConfigurationManager() const { return m_ptrLexConfigurationManager; } AFX_INLINE CXTPNotifyConnection* CXTPSyntaxEditBufferManager::GetConnection() const { return m_pConnection; } AFX_INLINE CXTPSyntaxEditUndoRedoManager* CXTPSyntaxEditBufferManager::GetUndoRedoManager() const { return m_pUndoRedoManager; } AFX_INLINE int CXTPSyntaxEditBufferManager::GetTabSize() const { return m_nTabSize; } AFX_INLINE BOOL CXTPSyntaxEditBufferManager::GetBuffer(const XTP_EDIT_LINECOL& lcStart, const XTP_EDIT_LINECOL& lcEnd, CMemFile& file, BOOL bColumnSelection, BOOL bForceDOSStyleCRLF) { return GetBuffer(lcStart.nLine, lcStart.nCol, lcEnd.nLine, lcEnd.nCol, file, bColumnSelection, bForceDOSStyleCRLF); } AFX_INLINE BOOL CXTPSyntaxEditBufferManager::GetOverwriteFlag() const { return m_bOverwrite; } AFX_INLINE int CXTPSyntaxEditBufferManager::GetCurCRLFType() const { return m_iCRLFStyle; } AFX_INLINE UINT CXTPSyntaxEditBufferManager::GetCodePage() const { return m_nCodePage; } AFX_INLINE CString CXTPSyntaxEditBufferManager::GetFileExt() const { return m_strFileExt; } AFX_INLINE BOOL CXTPSyntaxEditBufferManager::IsParserEnabled() const { return m_bIsParserEnabled; } //////////////////////////////////////////////////////////////////////////// # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSYNTAXEDITBUFFERMANAGER_H__) /** @endcond */