/** * @file XTPMarkupListBox.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(__MARKUPLISTBOX_H__) && defined(_XTP_INCLUDE_MARKUP) # define __MARKUPLISTBOX_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupUIElement; class CXTPMarkupContext; struct _XTP_EXT_CLASS XTP_MARKUP_LISTITEM { public: XTP_MARKUP_LISTITEM(CXTPMarkupContext* pContext); virtual ~XTP_MARKUP_LISTITEM(); public: void Resolve(LPCTSTR lpszMarkup); CString strMarkup; CXTPMarkupUIElement* pItem; CXTPMarkupContext* pContext; }; class _XTP_EXT_CLASS CXTPMarkupListBox : public CXTPListBox , public CXTPMarkupContext { public: CXTPMarkupListBox(); virtual ~CXTPMarkupListBox(); //{{AFX_VIRTUAL(CXTPMarkupListBox) virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct); virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult); using CXTPMarkupContext::OnWndMsg; //}}AFX_VIRTUAL public: CXTPMarkupContext* GetMarkupContext() { return this; } void Init(); void ItemChanged(XTP_MARKUP_LISTITEM* pItem); void AddMarkupString(LPCTSTR lpszMarkup); protected: //{{AFX_MSG(CXTPMarkupListBox) afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__MARKUPLISTBOX_H__) /** @endcond */