/** * @file XTPTaskPanelDefines.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(__XTPTASKPANELDEFINES_H__) # define __XTPTASKPANELDEFINES_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPTaskPanelGroup; class CXTPTaskPanelItem; /** * @brief * This structure is passed as a parameter when * an XTP_TPN_GROUPEXPANDING event occurs. */ struct XTP_TPNGROUPEXPANDING { CXTPTaskPanelGroup* pGroup; /**< Group that is about to be expanded. */ BOOL bExpanding; /**< TRUE if the group must be expanded. */ }; /** * @brief * This structure is passed as a parameter when * an XTP_TPN_ENDLABELEDIT event occurs. */ struct XTP_TPNENDLABELEDIT { CXTPTaskPanelItem* pItem; /**< Item whose caption is about to be changed. */ CString strNewString; /**< New caption of the item. */ }; /** * @brief * XTPTaskPanelItemType is an enumeration used by CXTPTaskPanelItem to * specify the type of the item. * * Example: *
 * CXTPTaskPanelGroup* pGroupSystem = m_wndTaskPanel.AddGroup(ID_TASKGROUP_SYSTEM);
 * pGroupSystem->AddLinkItem(ID_TASKITEM_HIDECONTENTS, 0);
 * _ASSERTE(pGroupSystem->GetType() == xtpTaskItemTypeLink);
 * 
* @see * CXTPTaskPanelItem::SetType, CXTPTaskPanelItem::GetType, * xtpTaskItemTypeGroup, xtpTaskItemTypeLink, xtpTaskItemTypeText, xtpTaskItemTypeControl */ enum XTPTaskPanelItemType { xtpTaskItemTypeGroup, /**< Item is a group. */ xtpTaskItemTypeLink, /**< Item is a link. */ xtpTaskItemTypeText, /**< Item is a text. */ xtpTaskItemTypeControl /**< Item is a control.*/ }; /** * @brief * XTPTaskPanelItemAllowDrag is an enumeration used by CXTPTaskPanel to * specify the drag options * * Example: *
 * m_wndTaskPanel.AllowDrag(xtpTaskItemAllowDragCopyWithinGroup);
 * 
* @see * CXTPTaskPanel::AllowDrag, * xtpTaskItemAllowDragNone, xtpTaskItemAllowDragDefault, xtpTaskItemAllowDragCopy, * xtpTaskItemAllowDragMove, xtpTaskItemAllowDragAll */ enum XTPTaskPanelItemAllowDrag { xtpTaskItemAllowDragNone = 0x00, /**< Disable drag. */ xtpTaskItemAllowDragDefault = 0x01, /**< Default drag options (xtpTaskItemAllowDragAll). */ xtpTaskItemAllowDragCopyWithinGroup = 0x02, /**< Allow copy within group only. */ xtpTaskItemAllowDragCopyWithinControl = 0x04, /**< Allow copy within task panel only. */ xtpTaskItemAllowDragCopyOutsideControl = 0x08, /**< Allow copy outside task panel only. */ xtpTaskItemAllowDragCopy = 0x04 + 0x08, /**< Allow copy operation. */ xtpTaskItemAllowDragMoveWithinGroup = 0x20, /**< Allow move within group only. */ xtpTaskItemAllowDragMoveWithinControl = 0x40, /**< Allow move within task panel only. */ xtpTaskItemAllowDragMoveOutsideControl = 0x80, /**< Allow move outside task panel only. */ xtpTaskItemAllowDragMove = 0x40 + 0x80, /**< Allow move operation. */ xtpTaskItemAllowDragWithinGroup = 0x02 + 0x20, /**< Allow drag within group only. */ xtpTaskItemAllowDragWithinControl = 0x04 + 0x40, /**< Allow drag within task panel only. */ xtpTaskItemAllowDrag = 0x04 + 0x08 + 0x40 + 0x80 /**< Allow all drag operations. */ }; /** * @brief * XTPTaskPanelItemLayout is an enumeration used by CXTPTaskpanel and * CXTPTaskPanelGroup to set how the items are laid out in the group(s). * Each group can have a different layout or they can all be the same. * * Example: *
pGroup->SetItemLayout(xtpTaskItemLayoutImagesWithText);
* @see * CXTPTaskPanel::SetItemLayout, CXTPTaskPanel::GetItemLayout, * CXTPTaskPanelGroup::SetItemLayout, CXTPTaskPanelGroup::GetItemLayout, * xtpTaskItemLayoutDefault, xtpTaskItemLayoutImages, xtpTaskItemLayoutImagesWithText, * xtpTaskItemLayoutImagesWithTextBelow */ enum XTPTaskPanelItemLayout { xtpTaskItemLayoutDefault, /**< Default Layout. */ xtpTaskItemLayoutImages, /**< Only images are shown. */ xtpTaskItemLayoutImagesWithText, /**< Both images and text are shown. */ xtpTaskItemLayoutImagesWithTextBelow /**< Both images and text are shown, text is shown below images. */ }; /** * @brief * XTPTaskPanelHotTrackStyle is an enumeration used by CXTPTaskPanel * to set the hot tracking style used for CXTPTaskPanelItems. Hot tracking is * how the items look as you move the mouse pointer over them. * * Example: *
m_wndTaskPanel.SetHotTrackStyle(xtpTaskPanelHighlightItem);
* @see * CXTPTaskPanel::SetHotTrackStyle, CXTPTaskPanel::GetHotTrackStyle, * CXTPTaskPanelItem::IsItemHot, * xtpTaskPanelHighlightDefault, xtpTaskPanelHighlightText, xtpTaskPanelHighlightImage, * xtpTaskPanelHighlightItem, xtpTaskPanelHighlightNone */ enum XTPTaskPanelHotTrackStyle { xtpTaskPanelHighlightDefault, /**< Uses the default hot tracking style. */ xtpTaskPanelHighlightText, /**< Only text is highlighted on mouse over. */ xtpTaskPanelHighlightImage, /**< Only images are highlighted on mouse over. */ xtpTaskPanelHighlightItem, /**< The entire item is highlighted on mouse over. */ xtpTaskPanelHighlightNone /**< No hot tracking is used, nothing will happen on mouse over.*/ }; /** * @brief * XTPTaskPanelBehaviour is an enumeration used by CXTPTaskPanel and * CXTPTaskPanelGroup to set the behavior of the groups in the TaskPanel. * * Example: *
m_wndTaskPanel.SetBehaviour(xtpTaskPanelBehaviourToolbox);
* @see * CXTPTaskPanel::SetBehaviour, CXTPTaskPanelGroup::GetBehaviour, * xtpTaskPanelBehaviourExplorer, xtpTaskPanelBehaviourList, xtpTaskPanelBehaviourToolbox */ enum XTPTaskPanelBehaviour { xtpTaskPanelBehaviourExplorer, /**< Task Panel will behave like Windows Explorer.*/ xtpTaskPanelBehaviourList, /**< Task Panel will behave like Windows List Box.*/ xtpTaskPanelBehaviourToolbox /**< Task Panel will behave like VS. NET Toolbox. */ }; /** * @brief * XTPTaskPanelPaintTheme is an enumeration used by CXTPTaskPanel to set * the theme of the control. * * Example: *
m_wndTaskPanel.SetTheme(xtpTaskPanelThemeOffice2000Plain);
* @see * CXTPTaskPanel::SetTheme, CXTPTaskPanel::GetCurrentTheme, * xtpTaskPanelThemeOffice2000, xtpTaskPanelThemeOffice2003, xtpTaskPanelThemeNativeWinXP, * xtpTaskPanelThemeOffice2000Plain, xtpTaskPanelThemeOfficeXPPlain, * xtpTaskPanelThemeOffice2003Plain, xtpTaskPanelThemeNativeWinXPPlain, * xtpTaskPanelThemeVisualStudio2003, xtpTaskPanelThemeVisualStudio2005, xtpTaskPanelThemeListView, * xtpTaskPanelThemeListViewOfficeXP, xtpTaskPanelThemeListViewOffice2003, * xtpTaskPanelThemeShortcutBarOffice2003, xtpTaskPanelThemeCustom */ enum XTPTaskPanelPaintTheme { xtpTaskPanelThemeOffice2000, /**< Office 2000 theme. */ xtpTaskPanelThemeOffice2003, /**< Office 2003 theme. */ xtpTaskPanelThemeNativeWinXP, /**< Win XP theme. */ xtpTaskPanelThemeOffice2000Plain, /**< Office 2000 classic theme. */ xtpTaskPanelThemeOfficeXPPlain, /**< Office XP classic theme. */ xtpTaskPanelThemeOffice2003Plain, /**< Office 2003 classic theme. */ xtpTaskPanelThemeNativeWinXPPlain, /**< Win XP classic theme. */ xtpTaskPanelThemeVisualStudio2003, /**< VS 2003 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2005, /**< VS 2005 style Toolbox theme. */ xtpTaskPanelThemeListView, /**< Standard List View theme. */ xtpTaskPanelThemeListViewOfficeXP, /**< Office XP List View theme. */ xtpTaskPanelThemeListViewOffice2003, /**< Office 2003 List View theme. */ xtpTaskPanelThemeShortcutBarOffice2003, /**< Shortcut Bar Office 2003 theme. */ xtpTaskPanelThemeResource, /**< Shortcut Bar Office 2007/2010 theme.*/ xtpTaskPanelThemeVisualStudio2010, /**< VS 2010 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2012Light, /**< VS 2012 Light style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2012Dark, /**< VS 2012 Dark style Toolbox theme. */ xtpTaskPanelThemeOffice2013, /**< Office 2013 style Toolbox theme. */ xtpTaskPanelThemeOffice2016 = xtpTaskPanelThemeOffice2013, /**< Office 2016 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2015, /**< VS 2015 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2017, /**< VS 2017 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2019, /**< VS 2019 style Toolbox theme. */ xtpTaskPanelThemeVisualStudio2022, /**< VS 2022 style Toolbox theme. */ xtpTaskPanelThemeCustom, /**< User defined Custom theme is used.*/ xtpTaskPanelThemeNativeWindows10, /**< Win 10 theme. */ xtpTaskPanelThemeNativeWindows11, /**< Win 11 theme. */ }; /** @cond */ # define xtpTaskPanelThemeToolbox xtpTaskPanelThemeVisualStudio2003 # define xtpTaskPanelThemeToolboxWhidbey xtpTaskPanelThemeVisualStudio2005 # define xtpTaskPanelThemeShortcutBarOffice2007 xtpTaskPanelThemeResource /** @endcond */ /** * @brief * XTPTaskPanelAnimation is an enumeration used by CXTPTaskPanel to set * the animation of the control. * * Example: *
m_wndTaskPanel.SetAnimation(xtpTaskPanelAnimationYes);
* @see * CXTPTaskPanel::SetAnimation, CXTPTaskPanel::GetAnimation, * xtpTaskPanelAnimationYes, xtpTaskPanelAnimationNo, xtpTaskPanelAnimationSystem */ enum XTPTaskPanelAnimation { xtpTaskPanelAnimationYes, /**< Enable animation. */ xtpTaskPanelAnimationNo, /**< Disable animation. */ xtpTaskPanelAnimationSystem /**< Use system settings to determine animation. */ }; /** * @brief * The XTPWM_TASKPANEL_NOTIFY message is sent to the CXTPTaskPanel owner window * whenever an action occurs within the CXTPTaskPanel. * @param nAction wParam value that specifies a Task Panel value * that indicates the user's request. * @param pItem lParam value that points to an CXTPTaskPanelItem object * that contains information for the specified item. * This pointer should never be NULL. * @details *
XTPWM_SHORTCUTBAR_NOTIFY
 * nAction = (int) wParam;             // TaskPanel action
 * pItem = (CXTPTaskPanelItem*) lParam;  // pointer to an CXTPTaskPanelItem object
*

* * nAction parameter can be one of the following values: * XTP_TPN_CLICK: Indicates that the user clicked an item. * XTP_TPN_RCLICK: Indicates that the user pressed * the right mouse button on an item. * XTP_TPN_STARTDRAG: Indicates that the user started dragging an item. * XTP_TPN_ENDLABELEDIT: Indicates that the user applied an item rename. * XTP_TPN_ITEMDROP: Indicates that the user dropped an item to the Task Panel * XTP_TPN_GROUPEXPANDING: Indicates that a group is about to be expanded. * lParam contains an XTP_TPNGROUPEXPANDING pointer. * You can return XTP_ACTION_CANCEL to ignore expanding. * XTP_TPN_GROUPEXPANDED: Indicates that the user expanded a group. * XTP_TPN_DBLCLICK: Indicates that the user double-clicked an item. * XTP_TPN_FOCUSEDITEMCHANGED: Indicates that the focused item of * the control has changed. * @return * TRUE if the application should process this message, otherwise FALSE. * * Example: *

 * BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
 *     //{{AFX_MSG_MAP(CMainFrame)
 *     ON_MESSAGE(XTPWM_TASKPANEL_NOTIFY, OnTaskPanelNotify)
 *     //}}AFX_MSG_MAP
 * END_MESSAGE_MAP()
 *
 * LRESULT CMainFrame::OnTaskPanelNotify(WPARAM wParam, LPARAM lParam)
 * {
 *    switch (wParam)
 *    {
 *       case XTP_TPN_CLICK:
 *       {
 *          CXTPTaskPanelGroupItem* pItem = (CXTPTaskPanelGroupItem*)lParam;
 *          TRACE(_T("Click Event: pItem.Caption = %s, pItem.ID = %i\n"),
 *          pItem->GetCaption(), pItem->GetID());
 *
 *          if (IsToggleButtons())
 *          {
 *             pItem->SetItemSelected(!pItem->IsItemSelected());
 *          }
 *       }
 *       break;
 *
 *       case XTP_TPN_RCLICK:
 *
 *       OnTaskPanelRButtonDown((CXTPTaskPanelItem*)lParam);
 *       return TRUE;
 *
 *    }
 *    return 0;
 * }
 * 
* @see * CXTPTaskPanel::NotifyOwner */ const UINT XTPWM_TASKPANEL_NOTIFY = (WM_USER + 9195 + 1); const UINT XTP_TPN_CLICK = 1; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_RCLICK = 2; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_STARTDRAG = 3; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_ENDLABELEDIT = 4; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_ITEMDROP = 5; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_GROUPEXPANDING = 6; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_GROUPEXPANDED = 7; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_DBLCLICK = 8; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_FOCUSEDITEMCHANGED = 9; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_ITEMREMOVED = 10; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_HOTITEMCHANGED = 11; /**< @see XTPWM_TASKPANEL_NOTIFY */ const UINT XTP_TPN_GROUPMOVE = 12; /**< @see XTPWM_TASKPANEL_NOTIFY */ const int XTP_ACTION_CANCEL = -1; /**< @see XTPWM_TASKPANEL_NOTIFY */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTASKPANELDEFINES_H__) /** @endcond */