// XTPTaskPanelDefines.h // // This file is a part of the XTREME TASKPANEL MFC class library. // (c)1998-2012 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN // CONSENT OF CODEJOCK SOFTWARE. // // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A // SINGLE COMPUTER. // // CONTACT INFORMATION: // support@codejock.com // http://www.codejock.com // ///////////////////////////////////////////////////////////////////////////// //{{AFX_CODEJOCK_PRIVATE #if !defined(__XTPTASKPANELDEFINES_H__) #define __XTPTASKPANELDEFINES_H__ //}}AFX_CODEJOCK_PRIVATE #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CXTPTaskPanelGroup; class CXTPTaskPanelItem; //----------------------------------------------------------------------- // Summary: // This structure passed as parameter when XTP_TPN_GROUPEXPANDING event occur. //----------------------------------------------------------------------- struct XTP_TPNGROUPEXPANDING { CXTPTaskPanelGroup* pGroup; // Group that is about to be expanded. BOOL bExpanding; // TRUE if group must be expanded. }; //----------------------------------------------------------------------- // Summary: // This structure passed as parameter when XTP_TPN_ENDLABELEDIT event occur. //----------------------------------------------------------------------- struct XTP_TPNENDLABELEDIT { CXTPTaskPanelItem* pItem; // Item that caption is will be changed CString strNewString; // New Caption of the item }; //----------------------------------------------------------------------- // Summary: // 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); // ASSERT(pGroupSystem->GetType() == xtpTaskItemTypeLink); // // See Also: CXTPTaskPanelItem::SetType, CXTPTaskPanelItem::GetType // // //----------------------------------------------------------------------- enum XTPTaskPanelItemType { xtpTaskItemTypeGroup, // Item is group. xtpTaskItemTypeLink, // Item is link. xtpTaskItemTypeText, // Item is text. xtpTaskItemTypeControl // Item is control. }; //----------------------------------------------------------------------- // Summary: // XTPTaskPanelItemAllowDrag is an enumeration used by CXTPTaskPanel to // specify the drag options // Example: // // m_wndTaskPanel.AllowDrag(xtpTaskItemAllowDragCopyWithinGroup); // // See Also: CXTPTaskPanel::AllowDrag // // //----------------------------------------------------------------------- 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 }; //----------------------------------------------------------------------- // Summary: // 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 Also: // CXTPTaskPanel::SetItemLayout, CXTPTaskPanel::GetItemLayout, // CXTPTaskPanelGroup::SetItemLayout, CXTPTaskPanelGroup::GetItemLayout // // //----------------------------------------------------------------------- enum XTPTaskPanelItemLayout { xtpTaskItemLayoutDefault, // Default Layout. xtpTaskItemLayoutImages, // Only images are shown. xtpTaskItemLayoutImagesWithText, // Both images and text are shown. xtpTaskItemLayoutImagesWithTextBelow// Images with the text shown below the image. }; //----------------------------------------------------------------------- // Summary: // 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 Also: // CXTPTaskPanel::SetHotTrackStyle, CXTPTaskPanel::GetHotTrackStyle, CXTPTaskPanelItem::IsItemHot // // //----------------------------------------------------------------------- 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. }; //----------------------------------------------------------------------- // Summary: // 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 Also: // CXTPTaskPanel::SetBehaviour, CXTPTaskPanelGroup::GetBehaviour. // // //----------------------------------------------------------------------- enum XTPTaskPanelBehaviour { xtpTaskPanelBehaviourExplorer, // TaskPanel will behave like Windows Explorer. xtpTaskPanelBehaviourList, // TaskPanel will behave like Windows List Box. xtpTaskPanelBehaviourToolbox // TaskPanel will behave like VS. NET Toolbox. }; //----------------------------------------------------------------------- // Summary: // XTPTaskPanelPaintTheme is an enumeration used by CXTPTaskPanel to set // the theme of the control. // Example: // m_wndTaskPanel.SetTheme(xtpTaskPanelThemeOffice2000Plain); // See Also: // CXTPTaskPanel::SetTheme, CXTPTaskPanel::GetCurrentTheme // // //----------------------------------------------------------------------- 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 xtpTaskPanelThemeToolbox, // VS.NET style Toolbox theme. xtpTaskPanelThemeToolboxWhidbey, // Whidbey VS 2005 style Toolbox theme. xtpTaskPanelThemeListView, // Standard List View theme. xtpTaskPanelThemeListViewOfficeXP, // Office XP List View theme. xtpTaskPanelThemeListViewOffice2003, // Office 2003 List View theme. xtpTaskPanelThemeShortcutBarOffice2003, // ShortcutBar Office 2003 theme. xtpTaskPanelThemeResource, // ShortcutBar Office 2007/2010 theme. xtpTaskPanelThemeVisualStudio2010, // VS 2010 style Toolbox theme. xtpTaskPanelThemeCustom // User defined Custom theme is used. }; #define xtpTaskPanelThemeShortcutBarOffice2007 xtpTaskPanelThemeResource //----------------------------------------------------------------------- // Summary: // XTPTaskPanelAnimation is an enumeration used by CXTPTaskPanel to set // the animation of the control. // Example: // m_wndTaskPanel.SetAnimation(xtpTaskPanelAnimationYes); // See Also: CXTPTaskPanel::SetAnimation, CXTPTaskPanel::GetAnimation // // //----------------------------------------------------------------------- enum XTPTaskPanelAnimation { xtpTaskPanelAnimationYes, // Enable animation xtpTaskPanelAnimationNo, // Disable animation xtpTaskPanelAnimationSystem // Use system settings to determine animation }; //----------------------------------------------------------------------- // Summary: // The XTPWM_TASKPANEL_NOTIFY message is sent to the CXTPTaskPanel owner window // whenever an action occurs within the CXTPTaskPanel // Parameters: // nAction - Value of wParam specifies a TaskPanel value that indicates the user's // request. // pItem - The value of lParam points to an CXTPTaskPanelItem object that contains information for the // specified item. This pointer should never be NULL. // Remarks: // 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 the user click TaskPanel item. // * XTP_TPN_RCLICK Indicates the user presses the right mouse button on the TaskPanel item. // * XTP_TPN_STARTDRAG Indicates the user start dragging item. // * XTP_TPN_ENDLABELEDIT Indicates the user apply item rename. // * XTP_TPN_ITEMDROP Indicates the user dropped item to task panel // * XTP_TPN_GROUPEXPANDING Indicates the group is about to be expanded. // lParam contains XTP_TPNGROUPEXPANDING pointer. // You can return XTP_ACTION_CANCEL to ignore expanding. // * XTP_TPN_GROUPEXPANDED Indicates the user expand group. // * XTP_TPN_DBLCLICK Indicates the user double-clicks TaskPanel item. // * XTP_TPN_FOCUSEDITEMCHANGED Focused item of control changed. // Returns: // If the application is to process this message, the return value should be TRUE, otherwise the // return value is 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 Also: // CXTPTaskPanel::NotifyOwner //----------------------------------------------------------------------- const UINT XTPWM_TASKPANEL_NOTIFY = (WM_USER + 9195 + 1); const UINT XTP_TPN_CLICK = 1; // const UINT XTP_TPN_RCLICK = 2; // const UINT XTP_TPN_STARTDRAG = 3; // const UINT XTP_TPN_ENDLABELEDIT = 4; // const UINT XTP_TPN_ITEMDROP = 5; // const UINT XTP_TPN_GROUPEXPANDING = 6; // const UINT XTP_TPN_GROUPEXPANDED = 7; // const UINT XTP_TPN_DBLCLICK = 8; // const UINT XTP_TPN_FOCUSEDITEMCHANGED = 9; // const UINT XTP_TPN_ITEMREMOVED = 10; // const UINT XTP_TPN_HOTITEMCHANGED = 11; // const UINT XTP_TPN_GROUPMOVE = 12; // const int XTP_ACTION_CANCEL = -1; // #endif // !defined(__XTPTASKPANELDEFINES_H__)