/** * @file XTPCalendarMonthViewEvent.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 * */ #if !defined(_XTPCALENDARMONTHVIEWEVENT_H__) # define _XTPCALENDARMONTHVIEWEVENT_H__ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPCalendarEvent; class CXTPCalendarControl; class CXTPCalendarMonthViewDay; class CXTPCalendarMonthViewGroup; struct XTP_CALENDAR_HITTESTINFO; /** * @brief * This class represents an event view portion of the CalendarMonthViewDay. * * @details * It represents a specific view of the event associated data according * to various view types and display settings and provides basic * functionality on this data using user input through keyboard and mouse. * * CXTPCalendarMonthViewEvent is based on the CXTPCalendarViewEventT template * class. It inherits basic behavior from the CXTPCalendarViewEventT template * class. Furthermore, CXTPCalendarMonthViewEvent overlaps and adds some * new functionality to get its own behavior and appearance. * * @see CXTPCalendarViewEvent * @see CXTPCalendarViewEventT */ class _XTP_EXT_CLASS CXTPCalendarMonthViewEvent : public CXTPCalendarViewEventT { // friend class CXTPCalendarPaintManager::CMonthViewEventPart; friend class CXTPCalendarMonthViewDay; /** @cond */ DECLARE_DYNAMIC(CXTPCalendarMonthViewEvent) /** @endcond */ public: /** * @details * Base class type definition. */ typedef CXTPCalendarViewEventT TBase; /** * @brief * Default object constructor. * * @param pEvent Pointer to CXTPCalendarEvent. * @param pViewGroup Pointer to CXTPCalendarMonthViewGroup object. * * @see ~CXTPCalendarWeekViewDay() */ CXTPCalendarMonthViewEvent(CXTPCalendarEvent* pEvent, CXTPCalendarMonthViewGroup* pViewGroup); /** * @brief * Default class destructor. */ virtual ~CXTPCalendarMonthViewEvent(); /** * @brief * This member function is used to draw the view content using * the specified device context. * * @param pDC Pointer to a valid device context. * * @details * Call AdjustLayout() before Draw() * * @see AdjustLayout(CRect rcDay) */ virtual void Draw(CDC* pDC); /** * @brief * This member function is used to fill a * XTP_CALENDAR_HITTESTINFO structure. * * @param point A CPoint that contains the point to test. * @param pInfo A pointer to a XTP_CALENDAR_HITTESTINFO structure. * * @return TRUE if the test is successful, FALSE else. * * @details * Call this member function to gather hit test information from * the day view. * * @see XTP_CALENDAR_HITTESTINFO */ virtual BOOL HitTestEx(CPoint point, XTP_CALENDAR_HITTESTINFO* pInfo) const; /** * @brief * This member function is used to adjust the view's layout * depending on the provided bounding rectangle and then calls * AdjustLayout() for all sub-items. * * @param pDC Pointer to a valid device context. * @param rcEventMax A CRect object that contains the coordinates * for drawing the view. * @param nEventPlaceNumber An int that contains the sequential place number. * * @details * Call Populate(COleDateTime dtDayDate) prior to calling AdjustLayout(). * AdjustLayout2 is called by calendar control instead of AdjustLayout * when theme is set. */ virtual void AdjustLayout(CDC* pDC, const CRect& rcEventMax, int nEventPlaceNumber); /** * @brief * This member function is used to adjust the view's layout * depending on the provided bounding rectangle and then calls * AdjustLayout() for all sub-items. * * @param pDC Pointer to a valid device context. * @param rcEventMax A CRect object that contains the coordinates * for drawing the view. * @param nEventPlaceNumber An int that contains the sequential place number. * * @details * Call Populate(COleDateTime dtDayDate) prior to calling AdjustLayout(). * AdjustLayout2 is called by calendar control instead of AdjustLayout * when theme is set. */ virtual void AdjustLayout2(CDC* pDC, const CRect& rcEventMax, int nEventPlaceNumber); /** * @brief * This member function is used to obtain the value of the view * visible flag. * * @details * Call this member function to determine the value of the visible flag. * * @return A BOOL. TRUE if the view is visible. FALSE otherwise. */ virtual BOOL IsVisible() const; /** * @brief * This member function is used to obtain the value of the * "show end time" flag. * * @details * Call this member function to determine the value of the * "show end time" flag. * * @return A BOOL. TRUE if the view shows the end time value. FALSE otherwise. */ BOOL IsShowEndTime() const; /** * @brief * This member function is used to obtain the value of the * "show time as clock" flag. * * @details * Call this member function to determine the value of the * "show time as clock" flag. * * @return A BOOL. TRUE if the view shows the time as a clock. FALSE otherwise. */ BOOL IsTimeAsClock() const; /** * @brief * This member function is used to perform additional adjustments. * * @details * Call this member function to perform additional adjustments after * all adjustment activities are completed. */ virtual void OnPostAdjustLayout(); protected: /** * @brief * This member function is used to obtain the editor window font. * * @return A pointer to a CFont object that contains the editor window font. */ virtual CFont* GetSubjectEditorFont() const; private: }; //=========================================================================== ///////////////////////////////////////////////////////////////////////////// # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(_XTPCALENDARMONTHVIEWEVENT_H__)