// XTPDockingPanePaintManager.h : interface for the CXTPDockingPanePaintManager class. // // This file is a part of the XTREME DOCKINGPANE 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(__XTPDOCKINGPANEPAINTMANAGER_H__) #define __XTPDOCKINGPANEPAINTMANAGER_H__ //}}AFX_CODEJOCK_PRIVATE #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 class CXTPDockingPaneTabsArray; class CXTPDockingPaneTabbedContainer; class CXTPDockingPaneAutoHidePanel; class CXTPTabPaintManager; class CXTPDockingPaneMiniWnd; class CXTPDockingPaneSplitterWnd; class CXTPDockingPaneCaptionButtons; class CXTPDockingPaneSidePanel; class CXTPWinThemeWrapper; //----------------------------------------------------------------------- // Summary: // Enumeration of the pin button state // See Also: // CXTPDockingPaneCaptionButton::GetState, // CXTPDockingPaneCaptionButton::SetState // // //----------------------------------------------------------------------- enum XTPDockingPanePinState { xtpPanePinVisible = 1, // Pin button is visible. xtpPanePinPushed = 2 // Pin button is pushed. }; //----------------------------------------------------------------------- // Summary: // Enumeration of the splitter styles // Example: // m_paneManager.GetPaintManager()->SetSplitterStyle(xtpPaneSplitterSoft3D + xtpPaneSplitterGripperOffice2003); // See Also: // CXTPDockingPanePaintManager::SetSplitterStyle // // //----------------------------------------------------------------------- enum XTPDockingPaneSplitterStyle { xtpPaneSplitterFlat = 0, // Flat splitter style xtpPaneSplitter3D = 1, // 3D splitter style xtpPaneSplitterSoft3D = 2, // Soft splitter style xtpPaneSplitterGradient = 4, // Gradient splitter style xtpPaneSplitterGradientVert = 8, // Gradient splitter style xtpPaneSplitterGripperOfficeXP = 0x100, // Splitter has OfficeXP gripper xtpPaneSplitterGripperOffice2003 = 0x200 // Splitter has Office2003 gripper }; //----------------------------------------------------------------------- // Summary: // Enumeration of the caption button styles // Example: // m_paneManager.GetPaintManager()->SetCaptionButtonStyle(xtpPaneCaptionButtonThemedExplorerBar); // See Also: // CXTPDockingPanePaintManager::SetCaptionButtonStyle //----------------------------------------------------------------------- enum XTPDockingPaneCaptionButtonStyle { xtpPaneCaptionButtonDefault, // Default caption button style xtpPaneCaptionButtonOffice, // Office XP caption button style xtpPaneCaptionButtonOffice2003, // Office 2003 caption button style xtpPaneCaptionButtonThemedExplorerBar, // Explorer button style xtpPaneCaptionButtonThemedButton, // Windows XP Button style xtpPaneCaptionButtonThemedToolBar, // Windows XP Toolbar style xtpPaneCaptionButtonThemedToolWindow, // Window XP Tool Window style }; //=========================================================================== // Summary: // CXTPDockingPaneCaptionButton is a stand alone internal class. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneCaptionButton { public: //----------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneCaptionButton object // Parameters: // nID - If of the caption button. // pPane - Pane that the caption button controls. //----------------------------------------------------------------------- CXTPDockingPaneCaptionButton (int nID, CXTPDockingPaneBase* pPane) { m_nID = nID; m_pPane = pPane; m_bPressed = m_bSelected = FALSE; m_dwState = 0; m_rcButton.SetRectEmpty(); } //----------------------------------------------------------------------- // Summary: // Call this member to set the button's rectangle. // Parameters: // rc - Button's rectangle. //----------------------------------------------------------------------- void SetRect (CRect rc); //----------------------------------------------------------------------- // Summary: // Call this member to draw a pin button. // Parameters: // pDC - Pointer to the device context in which to draw. // pt - Center point. // bPinned - TRUE if the button is pinned. //----------------------------------------------------------------------- static void AFX_CDECL DrawPinnButton(CDC* pDC, CPoint pt, BOOL bPinned); //----------------------------------------------------------------------- // Summary: // Call this member to draw the maximize\restore button. // Parameters: // pDC - Pointer to the device context in which to draw. // pt - Center point. // bMaximize - TRUE if the button is to be drawn maximized, FALSE to // draw restore button. // clr - Color of button. //----------------------------------------------------------------------- static void AFX_CDECL DrawMaximizeRestoreButton(CDC* pDC, CPoint pt, BOOL bMaximize, COLORREF clr); //----------------------------------------------------------------------- // Summary: // Call this method to click button. // Parameters: // pWnd - Parent window of button. // pt - Initial mouse position. // bClient - TRUE if pt belongs client area of window. //----------------------------------------------------------------------- DWORD Click (CWnd* pWnd, CPoint pt, BOOL bClient = TRUE); //----------------------------------------------------------------------- // Summary: // Call this member to get the bounding rectangle // Returns: // A CRect object //----------------------------------------------------------------------- CRect GetRect() { return m_rcButton;} //----------------------------------------------------------------------- // Summary: // Call this member to determine the state of the caption button. // This will tell you if the pin caption button is visible or // if it is pushed. // Returns: // 1 if the the button is visible, 2 if it is pushed, 3 if it // is both visible and pushed. // See Also: XTPDockingPanePinState //----------------------------------------------------------------------- DWORD GetState() const { return m_dwState; } //----------------------------------------------------------------------- // Summary: // Call this member to set the state of the pin caption button. // Parameters: // dwState - XTPDockingPanePinState of pin button. // See Also: XTPDockingPanePinState //----------------------------------------------------------------------- void SetState(DWORD dwState) { m_dwState = dwState; } //----------------------------------------------------------------------- // Summary: // Retrieves button identifier // Returns: // Button identifier. Standard values are // * XTP_IDS_DOCKINGPANE_CLOSE Close button // * XTP_IDS_DOCKINGPANE_AUTOHIDE Auto-hide button //----------------------------------------------------------------------- int GetID() const { return m_nID; } //----------------------------------------------------------------------- // Summary: // Call this member to retrieve the pane that the pin button controls. // Returns: // Pane that the pin button controls. //----------------------------------------------------------------------- CXTPDockingPaneBase* GetPane() const { return m_pPane; } //----------------------------------------------------------------------- // Summary: // Call this member to determine if the point belongs to button. // Parameters: // pt - Point to test. // Returns: // TRUE if point belongs to the button; otherwise returns FALSE //----------------------------------------------------------------------- BOOL PtInRect (POINT pt) const {return m_rcButton.PtInRect (pt) != 0; } //----------------------------------------------------------------------- // Summary: // Call this member to refresh styles of the button. // Parameters: // pt - Mouse cursor pointer. //----------------------------------------------------------------------- BOOL CheckForMouseOver (CPoint pt); //----------------------------------------------------------------------- // Summary: // Call this method to redraw button //----------------------------------------------------------------------- void InvalidateRect(); //----------------------------------------------------------------------- // Summary: // Call this member to determine if the button is pushed. // Returns: // TRUE is the button is pushed, FALSE otherwise. //----------------------------------------------------------------------- BOOL IsPressed() const { return m_bPressed; } //----------------------------------------------------------------------- // Summary: // Call this member to determine if the button mouse hover the button // Returns: // TRUE if mouse hover the button. //----------------------------------------------------------------------- BOOL IsSelected() const { return m_bSelected; } //----------------------------------------------------------------------- // Summary: // Call this member to determine if the pin caption button is visible. // Returns: // TRUE if the pin button is visible, FALSE otherwise. //----------------------------------------------------------------------- BOOL IsVisible(); //----------------------------------------------------------------------- // Summary: // Determines if button is enabled // Returns: // TRUE if button is enabled //----------------------------------------------------------------------- BOOL IsEnabled() const; protected: CRect m_rcButton; // Bounding rectangle of the button CXTPDockingPaneBase* m_pPane; // Parent pane int m_nID; // Identifier of the button. BOOL m_bPressed; // TRUE if button is pressed by user. BOOL m_bSelected; // TRUE if user move mouse cursor inside button rectangle DWORD m_dwState; // XTPDockingPanePinState of caption button. friend class CXTPDockingPaneTabbedContainer; friend class CXTPDockingPaneMiniWnd; }; //=========================================================================== // Summary: // CXTPDockingPanePaintManager is a stand alone class. // Override some virtual functions to get a new visual theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPanePaintManager : public CXTPCmdTarget { protected: //----------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPanePaintManager object //----------------------------------------------------------------------- CXTPDockingPanePaintManager(); //----------------------------------------------------------------------- // Summary: // Destroys a CXTPDockingPanePaintManager object, handles cleanup // and deallocation //----------------------------------------------------------------------- virtual ~CXTPDockingPanePaintManager(); public: //----------------------------------------------------------------------- // Summary: // Override this member function to draw a tabbed container. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- virtual void DrawPane(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member function to draw the side panel. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the side panel. // rc - Client rectangle of the side panel. //----------------------------------------------------------------------- virtual void DrawSidePanel(CDC* pDC, CXTPDockingPaneSidePanel* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Call this method to get pane's caption rectangle. // Parameters: // pPane - Side Panel container to get caption CRECT. // Returns: // Bounding rectangle of the side panel's caption. //----------------------------------------------------------------------- virtual CRect GetPaneCaptionRect(const CXTPDockingPaneSidePanel* pPane); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc) = 0; //----------------------------------------------------------------------- // Summary: // Override this member function to draw buttons of tabbed caption. // Parameters: // pDC - Pointer to a valid device context // pButtons - Collection of buttons to draw. // rcCaption - Caption rectangle // clr - Color of button text. // nButtonSize - Size of button // nButtonGap - Distance between buttons. // bVertical - TRUE if caption drawn vertically //----------------------------------------------------------------------- virtual void DrawCaptionButtons(CDC* pDC, CXTPDockingPaneCaptionButtons* pButtons, CRect& rcCaption, COLORREF clr, int nButtonSize, int nButtonGap, BOOL bVertical = FALSE); //----------------------------------------------------------------------- // Summary: // Override this member function to draw button of tabbed caption. // Parameters: // pDC - Pointer to a valid device context // pButton - Button pointer need to draw. // clrButton - Color of button text. //----------------------------------------------------------------------- virtual void DrawCaptionButton(CDC* pDC, CXTPDockingPaneCaptionButton* pButton, COLORREF clrButton); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of manager. //----------------------------------------------------------------------- virtual void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member to change the client rectangle of the child // docking pane. // Parameters: // pPane - Pointer to the tabbed container or side panel. // rect - Client rectangle to be changed. // bApply - TRUE to update tabs inside client area. //----------------------------------------------------------------------- virtual void AdjustClientRect(CXTPDockingPaneSidePanel* pPane, CRect& rect); virtual void AdjustClientRect(CXTPDockingPaneTabbedContainer* pPane, CRect& rect, BOOL bApply); //----------------------------------------------------------------------- // Summary: // Override this member to change the caption rectangle of the child // docking pane. // Parameters: // pPane - Pointer to a CXTPDockingPaneTabbedContainer object or CXTPDockingPaneSidePanel object. // rc - Caption rectangle to be changed. //----------------------------------------------------------------------- virtual void AdjustCaptionRect(const CXTPDockingPaneSidePanel* pPane, CRect& rc); virtual void AdjustCaptionRect(const CXTPDockingPaneTabbedContainer* pPane, CRect& rc); //----------------------------------------------------------------------- // Summary: // Call this method to get caption rectangle. // Parameters: // pPane - Tabbed container to get caption CRECT. // rc - Caption rectangle to store caption CRECT. //----------------------------------------------------------------------- virtual void GetCaptionRect(const CXTPDockingPaneTabbedContainer* pPane, CRect& rc); //----------------------------------------------------------------------- // Summary: // Call this method to get caption gripper for tabbed container // Parameters: // pPane - Tabbed container to test // Returns: Bounding rectangle of gripper to set size cursor //----------------------------------------------------------------------- virtual CRect GetCaptionGripperRect(const CXTPDockingPaneTabbedContainer* pPane); public: //----------------------------------------------------------------------- // Summary: // Draws a line. // Parameters: // pDC - Pointer to a valid device context // x0 - Specifies the logical x-coordinate of the start position. // y0 - Specifies the logical y-coordinate of the start position. // x1 - Specifies the logical x-coordinate of the endpoint for the line. // y1 - Specifies the logical y-coordinate of the endpoint for the line. // nPen - Specifies the color used to paint the line. //----------------------------------------------------------------------- void Line(CDC* pDC, int x0, int y0, int x1, int y1, int nPen); void Line(CDC* pDC, int x0, int y0, int x1, int y1); // //----------------------------------------------------------------------- // Summary: // Draws the text of a pane caption. // Parameters: // pDC - Reference to a valid device context // strTitle - Text to draw in caption. // rc - Client rectangle of the tabbed container // bVertical - TRUE to draw caption vertically // bCalcWidth - TRUE to calculate width // Returns: // The width of the text that was drawn in the pane caption bar. //----------------------------------------------------------------------- int DrawCaptionText(CDC* pDC, const CString& strTitle, CRect rc, BOOL bVertical, BOOL bCalcWidth = FALSE); //----------------------------------------------------------------------- // Summary: // Sets the pixel at the point. // Parameters: // pDC - Pointer to a valid device context // xPos - Specifies the logical x-coordinate of the point to be set. // yPos - Specifies the logical y-coordinate of the point to be set. // nPen - Specifies the color used to paint the point //----------------------------------------------------------------------- void Pixel(CDC* pDC, int xPos, int yPos, int nPen); //----------------------------------------------------------------------- // Summary: // Draws a rectangle. // Parameters: // pDC - Pointer to a valid device context // rc - Specifies the rectangle in logical units. // nPenEntry - Specifies the color used to paint the rectangle. // nPenBorder - Specifies the color used to fill the rectangle. //----------------------------------------------------------------------- void Rectangle(CDC* pDC, CRect rc, int nPenEntry, int nPenBorder); //----------------------------------------------------------------------- // Summary: // Call this member to use office (Tahoma) font. // Parameters: // bUseOfficeFont - TRUE to use office font. //----------------------------------------------------------------------- void UseOfficeFont(BOOL bUseOfficeFont); //----------------------------------------------------------------------- // Summary: // Call this method to change caption font // Parameters: // pLogFont - LOGFONT of caption to use // bUseStandardFont - Must be FALSE //----------------------------------------------------------------------- void SetCaptionFontIndirect(LOGFONT* pLogFont, BOOL bUseStandardFont = FALSE); //----------------------------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC - Pointer to a valid device context // pPane - Floating window pointer // rc - Client rectangle of floating frame //----------------------------------------------------------------------- virtual void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this method to draw splitter. // Parameters: // pDC - Pointer to a valid device context // pSplitter - Pointer to splitter window //----------------------------------------------------------------------- virtual void DrawSplitter(CDC* pDC, CXTPDockingPaneSplitterWnd* pSplitter); //----------------------------------------------------------------------- // Summary: // Call this method to set Paint manager used for tabs of tabbed container. // Parameters: // pManager - New CXTPTabPaintManager pointer // Returns: // CXTPTabPaintManager pointer that will be used. // See Also: GetTabPaintManager, SetPanelPaintManager //----------------------------------------------------------------------- CXTPTabPaintManager* SetTabPaintManager(CXTPTabPaintManager* pManager); //----------------------------------------------------------------------- // Summary: // Call this method to set Paint manager used for tabs of panel. // Parameters: // pManager - New CXTPTabPaintManager pointer // Returns: // CXTPTabPaintManager pointer that will be used. // See Also: GetPanelPaintManager, SetTabPaintManager //----------------------------------------------------------------------- CXTPTabPaintManager* SetPanelPaintManager(CXTPTabPaintManager* pManager); //----------------------------------------------------------------------- // Summary: // Retrieves pointer to CXTPTabPaintManager used to draw tabs of tabbed container. // Returns: // Pointer used to draw tabs of tabbed container. // See Also: SetTabPaintManager, GetPanelPaintManager //----------------------------------------------------------------------- CXTPTabPaintManager* GetTabPaintManager() const; //----------------------------------------------------------------------- // Summary: // Retrieves pointer to CXTPTabPaintManager used to draw tabs of panel. // Returns: // Pointer used to draw tabs of auto-hide panel. // See Also: SetPanelPaintManager, GetTabPaintManager //----------------------------------------------------------------------- CXTPTabPaintManager* GetPanelPaintManager() const; //----------------------------------------------------------------------- // Summary: // Retrieves the current color of the specified XP display element. // Parameters: // nIndex - Specifies the display element whose color is to be // retrieved. This parameter can be one of the // following values displayed in the table below: // Remarks: // Display elements are the parts of a window // and the display that appear on the system display screen. // The function returns the red, green, blue (RGB) color value // of the given element. To provide a consistent look to all // Windows applications, the operating system provides and // maintains global settings that define the colors of various // aspects of the display. These settings as a group are sometimes // referred to as a "color scheme." To view the current color // settings, click Control Panel, double-click the Display icon, // and then click the "Appearance" tab. // // ConstantValueDescription // -------------------------------- ============ ------------------------------------------------------------ // COLOR_SCROLLBAR 0 Scroll bar color // COLOR_BACKGROUND 1 Desktop color // COLOR_ACTIVECAPTION 2 Color of the title bar for the active window, Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled. // COLOR_INACTIVECAPTION 3 Color of the title bar for the inactive window, Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled. // COLOR_MENU 4 Menu background color // COLOR_WINDOW 5 Window background color // COLOR_WINDOWFRAME 6 Window frame color // COLOR_MENUTEXT 7 Color of text on menus // COLOR_WINDOWTEXT 8 Color of text in windows // COLOR_CAPTIONTEXT 9 Color of text in caption, size box, and scroll arrow // COLOR_ACTIVEBORDER 10 Border color of active window // COLOR_INACTIVEBORDER 11 Border color of inactive window // COLOR_APPWORKSPACE 12 Background color of multiple-document interface (MDI) applications // COLOR_HIGHLIGHT 13 Background color of items selected in a control // COLOR_HIGHLIGHTTEXT 14 Text color of items selected in a control // COLOR_BTNFACE 15 Face color for three-dimensional display elements and for dialog box backgrounds. // COLOR_BTNSHADOW 16 Color of shading on the edge of command buttons // COLOR_GRAYTEXT 17 Grayed (disabled) text // COLOR_BTNTEXT 18 Text color on push buttons // COLOR_INACTIVECAPTIONTEXT 19 Color of text in an inactive caption // COLOR_BTNHIGHLIGHT 20 Highlight color for 3-D display elements // COLOR_3DDKSHADOW 21 Darkest shadow color for 3-D display elements // COLOR_3DLIGHT 22 Second lightest 3-D color after 3DHighlight, Light color for three-dimensional display elements (for edges facing the light source.) // COLOR_INFOTEXT 23 Color of text in ToolTips // COLOR_INFOBK 24 Background color of ToolTips // COLOR_HOTLIGHT 26 Color for a hot-tracked item. Single clicking a hot-tracked item executes the item. // COLOR_GRADIENTACTIVECAPTION 27 Right side color in the color gradient of an active window's title bar. COLOR_ACTIVECAPTION specifies the left side color. // COLOR_GRADIENTINACTIVECAPTION 28 Right side color in the color gradient of an inactive window's title bar. COLOR_INACTIVECAPTION specifies the left side color. // XPCOLOR_TOOLBAR_FACE 30 XP toolbar background color. // XPCOLOR_HIGHLIGHT 31 XP menu item selected color. // XPCOLOR_HIGHLIGHT_BORDER 32 XP menu item selected border color. // XPCOLOR_HIGHLIGHT_PUSHED 33 XP menu item pushed color. // XPCOLOR_HIGHLIGHT_CHECKED 36 XP menu item checked color. // XPCOLOR_HIGHLIGHT_CHECKED_BORDER 37 An RGB value that represents the XP menu item checked border color. // XPCOLOR_ICONSHADDOW 34 XP menu item icon shadow. // XPCOLOR_GRAYTEXT 35 XP menu item disabled text color. // XPCOLOR_TOOLBAR_GRIPPER 38 XP toolbar gripper color. // XPCOLOR_SEPARATOR 39 XP toolbar separator color. // XPCOLOR_DISABLED 40 XP menu icon disabled color. // XPCOLOR_MENUBAR_FACE 41 XP menu item text background color. // XPCOLOR_MENUBAR_EXPANDED 42 XP hidden menu commands background color. // XPCOLOR_MENUBAR_BORDER 43 XP menu border color. // XPCOLOR_MENUBAR_TEXT 44 XP menu item text color. // XPCOLOR_HIGHLIGHT_TEXT 45 XP menu item selected text color. // XPCOLOR_TOOLBAR_TEXT 46 XP toolbar text color. // XPCOLOR_PUSHED_TEXT 47 XP toolbar pushed text color. // XPCOLOR_TAB_INACTIVE_BACK 48 XP inactive tab background color. // XPCOLOR_TAB_INACTIVE_TEXT 49 XP inactive tab text color. // XPCOLOR_HIGHLIGHT_PUSHED_BORDER 50 An RGB value that represents the XP border color for pushed in 3D elements. // XPCOLOR_CHECKED_TEXT 45 XP color for text displayed in a checked button. // XPCOLOR_3DFACE 51 XP face color for three- dimensional display elements and for dialog box backgrounds. // XPCOLOR_3DSHADOW 52 XP shadow color for three-dimensional display elements (for edges facing away from the light source). // XPCOLOR_EDITCTRLBORDER 53 XP color for the border color of edit controls. // XPCOLOR_FRAME 54 Office 2003 frame color. // XPCOLOR_SPLITTER_FACE 55 XP splitter face color. // XPCOLOR_LABEL 56 Color for label control (xtpControlLabel) // XPCOLOR_STATICFRAME 57 WinXP Static frame color //
// Returns: // The red, green, blue (RGB) color value of the given element. //----------------------------------------------------------------------- COLORREF GetXtremeColor(UINT nIndex); //----------------------------------------------------------------------- // Summary: // Call this member to set the colors for each element to the // color in the specified color array. // Parameters: // cElements - Number of elements in array. // lpaElements - Array of elements. // lpaRgbValues - Array of RGB values. // See Also: SetColor //----------------------------------------------------------------------- void SetColors(int cElements, CONST INT *lpaElements, CONST COLORREF* lpaRgbValues); //----------------------------------------------------------------------- // Summary: // Call this member to get caption height of tabbed container // See Also: GetTabsHeight //----------------------------------------------------------------------- int GetCaptionHeight() const; //----------------------------------------------------------------------- // Summary: // Call this member to get tabs height of tabbed container // See Also: GetCaptionHeight //----------------------------------------------------------------------- int GetTabsHeight() const; //----------------------------------------------------------------------- // Summary: // Call this member to set splitter style. // Parameters: // dwStyle - New style of splitters // Remarks: // dwStyle parameter can be one or more of the following: // * xtpPaneSplitterFlat // * xtpPaneSplitter3D // * xtpPaneSplitterSoft3D // * xtpPaneSplitterGripperOfficeXP // * xtpPaneSplitterGripperOffice2003 // Example: // m_paneManager.GetPaintManager()->SetSplitterStyle(xtpPaneSplitterSoft3D + xtpPaneSplitterGripperOffice2003); //----------------------------------------------------------------------- void SetSplitterStyle(DWORD dwStyle); //----------------------------------------------------------------------- // Summary: // Call this method to get splitter styles // See Also: XTPDockingPaneSplitterStyle, SetSplitterStyle //----------------------------------------------------------------------- DWORD GetSplitterStyle() const; //----------------------------------------------------------------------- // Summary: // Call this member to set caption buttons style. // Parameters: // nStyle - New style of caption buttons // Remarks: // dwStyle parameter can be one or more of the following: // * xtpPaneCaptionButtonDefault // * xtpPaneCaptionButtonOffice // * xtpPaneCaptionButtonOffice2003 // * xtpPaneCaptionButtonThemeExplorerBar // * xtpPaneCaptionButtonThemeButton // * xtpPaneCaptionButtonThemeToolBar // Example: // m_paneManager.GetPaintManager()->SetCaptionButtonStyle(xtpPaneCaptionButtonOffice2003); // See Also: XTPDockingPaneCaptionButtonStyle, GetCaptionButtonStyle //----------------------------------------------------------------------- void SetCaptionButtonStyle(XTPDockingPaneCaptionButtonStyle nStyle); //----------------------------------------------------------------------- // Summary: // Call this method to get caption button styles // See Also: XTPDockingPaneCaptionButtonStyle, SetCaptionButtonStyle //----------------------------------------------------------------------- XTPDockingPaneCaptionButtonStyle GetCaptionButtonStyle() const; //----------------------------------------------------------------------- // Summary: // Call this member function to determine the current Windows XP // theme in use. // Returns: // A XTPCurrentSystemTheme enumeration that represents the // current Windows theme in use, can be one of the following // values: // * xtpSystemThemeUnknown Indicates no known theme in use // * xtpSystemThemeBlue Indicates blue theme in use // * xtpSystemThemeOlive Indicates olive theme in use // * xtpSystemThemeSilver Indicates silver theme in use // See Also: SetLunaTheme, RefreshLunaColors //----------------------------------------------------------------------- XTPCurrentSystemTheme GetCurrentSystemTheme() const; //----------------------------------------------------------------------- // Summary: // Call this method to force system theme. // Parameters: // systemTheme - theme to use. Can be any of the values listed in the Remarks section. // Remarks: // theme can be one of the following: // * xtpSystemThemeUnknown Disables luna theme support. // * xtpSystemThemeBlue Enables blue theme // * xtpSystemThemeOlive Enables olive theme // * xtpSystemThemeSilver Enables silver theme //----------------------------------------------------------------------- void SetLunaTheme(XTPCurrentSystemTheme systemTheme); protected: //----------------------------------------------------------------------- // Summary: // Draws only the glyph of a button. For example, the cross of a Close Button. // Parameters: // pDC - Pointer to the device context in which to draw. // pButton - Button pointer need to draw. // pt - Center point. // clrButton - Color of glyph. //----------------------------------------------------------------------- virtual void DrawCaptionButtonEntry(CDC* pDC, CXTPDockingPaneCaptionButton* pButton, CPoint pt, COLORREF clrButton); //{{AFX_CODEJOCK_PRIVATE void DrawCaptionIcon(CDC* pDC, CXTPDockingPaneBase* pPane, CRect& rcCaption, BOOL bVertical); public: static CXTPDockingPane* AFX_CDECL GetSelectedPane(CXTPDockingPaneBase* pPane); BOOL IsCaptionEnabled(CXTPDockingPaneBase* pPane); //}}AFX_CODEJOCK_PRIVATE public: BOOL m_bUseBoldCaptionFont; // TRUE to use Bold font for caption BOOL m_bHighlightActiveCaption; // TRUE to highlight active caption. int m_nSplitterSize; // Splitter size BOOL m_bShowCaption; // TRUE to draw captions of tabbed containers BOOL m_bDrawSingleTab; // TRUE to draw single tab. BOOL m_bDrawCaptionIcon; // TRUE to draw caption icon. BOOL m_bAutoHidePanelHighlightSelected; int m_nSplitterIndent; // Size of splitter indent. CXTPPaintManagerColor m_clrSplitterGripper; // Splitter gripper color CXTPPaintManagerColor m_clrSplitter; // Splitter color CXTPPaintManagerColorGradient m_clrSplitterGradient; // Splitter color CXTPPaintManagerColorGradient m_clrNormalCaption; // Color of pane caption when inactive. CXTPPaintManagerColorGradient m_clrActiveCaption; // Color of pane caption when active. CXTPPaintManagerColor m_clrNormalCaptionText; // Color of pane caption text when the caption is inactive CXTPPaintManagerColor m_clrActiveCaptionText; // Active caption text CXTPPaintManagerColor m_clrDisabledCaptionText; // Disabled caption text protected: XTPDockingPaneCaptionButtonStyle m_nCaptionButtonStyle; // Caption button style DWORD m_dwSplitterStyle; // Splitter style int m_nTitleHeight; // Title's height. int m_nCaptionFontGap; // Additional gap of font. int m_nTabsHeight; // Tab bar's height. CFont m_fntTitle; // Title font. CFont m_fntTitleVertical; // Title vertical font. BOOL m_bUseOfficeFont; // TRUE to use Tahoma font. BOOL m_bUseStandardFont; // TRUE to use system icon font. protected: CXTPTabPaintManager* m_pTabPaintManager; // Paint Manager used to draw tabs for tabbed container CXTPTabPaintManager* m_pPanelPaintManager; // Paint Manager used to draw tabs for auto-hide panel COLORREF m_arrColor[XPCOLOR_LAST + 1]; // Self colors array. XTPDockingPanePaintTheme m_themeCurrent; // Current theme. CString m_strOfficeFont; // Office font name. CRect m_rcCaptionMargin; // Margins of caption. XTPCurrentSystemTheme m_systemTheme; // Current system theme. CXTPWinThemeWrapper* m_themeToolbar; // Toolbar theme helper CXTPWinThemeWrapper* m_themeExplorer; // WinXP Explorer theme helper CXTPWinThemeWrapper* m_themeButton; // WinXP Button theme helper CXTPWinThemeWrapper* m_themeWindow; // WinXP Window Theme helper. CXTPWinThemeWrapper* m_themeRebar; // Rebar theme helper BOOL m_bLunaTheme; // TRUE if luna colors user private: friend class CXTPDockingPaneManager; }; namespace XTPDockingPanePaintThemes { //=========================================================================== // Summary: // CXTPDockingPaneDefaultTheme is CXTPDockingPanePaintManager derived class, represents // classic theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeDefault); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneDefaultTheme : public CXTPDockingPanePaintManager { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneDefaultTheme object. //------------------------------------------------------------------------- CXTPDockingPaneDefaultTheme(); public: // ----------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC : Pointer to a valid device context // pPane : Floating window pointer // rc : CLient rectangle of floating frame // // ----------------------------------------------------- void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); // -------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC : Reference to the device context in which to draw. // pPane : Pointer to the tabbed container. // rc : Client rectangle of the tabbed container. // // -------------------------------------------------------------- virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); // -------------------------------------------------------------- // Summary: // Override this member function to draw the side panel. // Parameters: // pDC : Reference to the device context in which to draw. // pPane : Pointer to the side panel. // rc : Client rectangle of the side panel. // // -------------------------------------------------------------- virtual void DrawSidePanel(CDC* pDC, CXTPDockingPaneSidePanel* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); protected: // ------------------------------------------------------------------ // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC : Reference to the device context in which to draw. // pPane : Container which caption need to draw. // rcCaption : Caption bounding rectangle // strTitle : Caption text. // bActive : TRUE if caption is active. // bVertical : TRUE to draw caption vertically // // ------------------------------------------------------------------ virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); }; //=========================================================================== // Summary: // CXTPDockingPaneGripperedTheme is CXTPDockingPaneDefaultTheme derived class, represents // gripper theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeGrippered); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneGripperedTheme : public CXTPDockingPaneDefaultTheme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneGripperedTheme object. //------------------------------------------------------------------------- CXTPDockingPaneGripperedTheme(); public: // ----------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC : Pointer to a valid device context // pPane : Floating window pointer // rc : Client rectangle of floating frame // // ----------------------------------------------------- void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); protected: //----------------------------------------------------------------------- // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container which caption need to draw. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); }; //=========================================================================== // Summary: // CXTPDockingPaneWinExplorerTheme is CXTPDockingPaneDefaultTheme derived class, represents // explorer theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeWinExplorer); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneWinExplorerTheme : public CXTPDockingPaneGripperedTheme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneWinExplorerTheme object. //------------------------------------------------------------------------- CXTPDockingPaneWinExplorerTheme(); public: //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- void RefreshMetrics(); protected: // ------------------------------------------------------------------ // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC : Reference to the device context in which to draw. // pPane : Container which caption need to draw. // rcCaption : Caption bounding rectangle // strTitle : Caption text. // bActive : TRUE if caption is active. // bVertical : TRUE to draw caption vertically // // ------------------------------------------------------------------ virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio6Theme is CXTPDockingPaneGripperedTheme derived class, represents // Visual Studio 6 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio6); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio6Theme : public CXTPDockingPaneGripperedTheme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio6Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio6Theme(); protected: // ------------------------------------------------------------------ // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC : Reference to the device context in which to draw. // pPane : Container which caption need to draw. // rcCaption : Caption bounding rectangle // strTitle : Caption text. // bActive : TRUE if caption is active. // bVertical : TRUE to draw caption vertically // // ------------------------------------------------------------------ virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2003Theme is CXTPDockingPaneGripperedTheme derived class, represents // Office XP theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2003); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2003Theme : public CXTPDockingPaneGripperedTheme { class COfficePanelColorSet; public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2003Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2003Theme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); protected: //----------------------------------------------------------------------- // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container which caption need to draw. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); //----------------------------------------------------------------------- // Summary: // Draws the background of the pane caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container of the caption needs to draw the background. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual COLORREF FillCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, BOOL bActive, BOOL bVertical); protected: BOOL m_bGradientCaption; // TRUE to draw gradient caption. int m_nCaptionButtonSize; }; //=========================================================================== // Summary: // CXTPDockingPaneWinNativeTheme is CXTPDockingPaneVisualStudio2003Theme derived class, represents // Win XP theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeWinNative); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneWinNativeTheme : public CXTPDockingPaneVisualStudio2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneWinNativeTheme object. //------------------------------------------------------------------------- CXTPDockingPaneWinNativeTheme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC - Pointer to a valid device context // pPane - Floating window pointer // rc - CLient rectangle of floating frame //----------------------------------------------------------------------- void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member function to draw the side panel. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the side panel. // rc - Client rectangle of the side panel. //----------------------------------------------------------------------- void DrawSidePanel(CDC* pDC, CXTPDockingPaneSidePanel* pPane, CRect rc); protected: //----------------------------------------------------------------------- // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container which caption need to draw. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); protected: }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2002VisioTheme is CXTPDockingPaneVisualStudio2003Theme derived class, represents // Visio theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2002Visio); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2002VisioTheme : public CXTPDockingPaneVisualStudio2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2002VisioTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2002VisioTheme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a tabbed container. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawPane(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member to change the caption rectangle of the child // docking pane. // Parameters: // pPane - Pointer to a CXTPDockingPaneTabbedContainer object. // rc - Caption rectangle to be changed. //----------------------------------------------------------------------- void AdjustCaptionRect(const CXTPDockingPaneTabbedContainer* pPane, CRect& rc); //----------------------------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC - Pointer to a valid device context // pPane - Floating window pointer // rc - Client rectangle of floating frame //----------------------------------------------------------------------- void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2003VisioTheme is CXTPDockingPaneOffice2002VisioTheme // derived class, represents Office 2003 Visio theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2003Visio); to set // this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2003VisioTheme : public CXTPDockingPaneOffice2002VisioTheme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2003VisioTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2003VisioTheme(); }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2007VisioTheme is CXTPDockingPaneOffice2003VisioTheme // derived class, represents Office 2007 Visio theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2007Visio); to set // this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2007VisioTheme : public CXTPDockingPaneOffice2003VisioTheme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2007VisioTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2007VisioTheme(); }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2003Theme is CXTPDockingPaneVisualStudio2003Theme derived class, represents // Office 2003 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2003); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2003Theme : public CXTPDockingPaneVisualStudio2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2003Theme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2003Theme(); //------------------------------------------------------------------------- // Summary: // Destroys a CXTPDockingPaneOffice2003Theme object, handles cleanup and deallocation. //------------------------------------------------------------------------- virtual ~CXTPDockingPaneOffice2003Theme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Call this method to draw frame of floating window // Parameters: // pDC - Pointer to a valid device context // pPane - Floating window pointer // rc - Client rectangle of floating frame //----------------------------------------------------------------------- virtual void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Override this member function to draw the side panel. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the side panel. // rc - Client rectangle of the side panel. //----------------------------------------------------------------------- virtual void DrawSidePanel(CDC* pDC, CXTPDockingPaneSidePanel* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Call this method to get pane's caption rectangle. // Parameters: // pPane - Side Panel container to get caption CRECT. // Returns: // Bounding rectangle of the side panel's caption. //----------------------------------------------------------------------- virtual CRect GetPaneCaptionRect(const CXTPDockingPaneSidePanel* pPane); //----------------------------------------------------------------------- // Summary: // Call this method to get caption gripper for tabbed container // Parameters: // pPane - Tabbed container to test // Returns: Bounding rectangle of gripper to set size cursor //----------------------------------------------------------------------- virtual CRect GetCaptionGripperRect(const CXTPDockingPaneTabbedContainer* pPane); protected: //----------------------------------------------------------------------- // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container which caption need to draw. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); public: BOOL m_bDrawGripper; // TRUE to draw gripper protected: BOOL m_bRoundedCaption; // TRUE to draw rounded caption }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2007Theme is CXTPDockingPaneOffice2003Theme derived class, represents // Office 2007 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeResource); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2007Theme : public CXTPDockingPaneOffice2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2007Theme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2007Theme(); public: //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2007OutlookTheme is CXTPDockingPaneOffice2007Theme derived class, represents // Outlook 2007 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2007Outlook); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2007OutlookTheme : public CXTPDockingPaneOffice2007Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2007OutlookTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2007OutlookTheme(); public: //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2007WordTheme is CXTPDockingPaneOffice2003Theme derived class, represents // Office Word 2007 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2007Word); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2007WordTheme : public CXTPDockingPaneOffice2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2007WordTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2007WordTheme(); public: //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Draw common part of tabbed and floating caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container which caption need to draw. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- void DrawCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, const CString& strTitle, BOOL bActive, BOOL bVertical); //----------------------------------------------------------------------- // Summary: // Override this member to change the client rectangle of the child // docking pane. // Parameters: // pPane - Pointer to the tabbed container. // rect - Client rectangle to be changed. // bApply - TRUE to update tabs inside client area. //----------------------------------------------------------------------- void AdjustClientRect(CXTPDockingPaneTabbedContainer* pPane, CRect& rect, BOOL bApply); //----------------------------------------------------------------------- // Summary: // Override this member function to draw a tabbed container. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Pointer to the tabbed container. // rc - Client rectangle of the tabbed container. //----------------------------------------------------------------------- void DrawPane(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); //----------------------------------------------------------------------- // Summary: // Determines if a pane has borders (if title is visible). // Parameters: // pPane - Pointer to the tabbed container. // Returns: // TRUE if the pane has borders (title visible), FALSE otherwise. //----------------------------------------------------------------------- BOOL PaneHasBorders(CXTPDockingPaneTabbedContainer* pPane) const; protected: BOOL m_bOffice2010Style; }; //=========================================================================== // Summary: // CXTPDockingPaneOffice2003OutlookTheme is CXTPDockingPaneOffice2003Theme derived class, represents // Office 2003 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeOffice2003Outlook); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneOffice2003OutlookTheme : public CXTPDockingPaneOffice2003Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneOffice2003OutlookTheme object. //------------------------------------------------------------------------- CXTPDockingPaneOffice2003OutlookTheme(); //------------------------------------------------------------------------- // Summary: // Destroys a CXTPDockingPaneOffice2003OutlookTheme object, handles cleanup and deallocation. //------------------------------------------------------------------------- virtual ~CXTPDockingPaneOffice2003OutlookTheme(); public: //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //----------------------------------------------------------------------- virtual void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Call this method to get caption gripper for tabbed container // Parameters: // pPane - Tabbed container to test // Returns: Bounding rectangle of gripper to set size cursor //----------------------------------------------------------------------- virtual CRect GetCaptionGripperRect(const CXTPDockingPaneTabbedContainer* pPane); }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2005Beta1Theme is CXTPDockingPaneVisualStudio2003Theme derived class, represents // Visual Studio 2005 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2005Beta1); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2005Beta1Theme : public CXTPDockingPaneVisualStudio2003Theme { public: class CColorSetVisualStudio2005; class CColorSetVisualStudio2003; //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2005Beta1Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2005Beta1Theme(); public: //------------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //------------------------------------------------------------------------- void RefreshMetrics(); }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2005Beta2Theme is CXTPDockingPaneVisualStudio2005Beta1Theme derived class, represents // Visual Studio 2005 beta 2 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2005Beta1); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2005Beta2Theme : public CXTPDockingPaneVisualStudio2005Beta1Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2005Beta2Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2005Beta2Theme(); //------------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of the pane. //------------------------------------------------------------------------- void RefreshMetrics(); //----------------------------------------------------------------------- // Summary: // Draws the background of the pane caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container of the caption needs to draw the background. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual COLORREF FillCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, BOOL bActive, BOOL bVertical); protected: COLORREF m_clrCaptionBorder; //Color used to draw the border of the pane caption. }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2005Beta2Theme is CXTPDockingPaneVisualStudio2005Beta2Theme derived class, represents // Visual Studio 2005 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2005Beta1); to set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2005Theme : public CXTPDockingPaneVisualStudio2005Beta2Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2005Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2005Theme(); }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2008Theme is CXTPDockingPaneVisualStudio2005Theme // derived class, represents Visual Studio 2008 theme for docking panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2008); to set // this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2008Theme : public CXTPDockingPaneVisualStudio2005Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2008Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2008Theme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of manager. //----------------------------------------------------------------------- virtual void RefreshMetrics(); protected: }; //=========================================================================== // Summary: // CXTPDockingPaneVisualStudio2010Theme is CXTPDockingPaneVisualStudio2008Theme // derived class, represents Visual Studio 2010 Beta 1 theme for docking // panes. // Remarks: // Call CXTPDockingPaneManager::SetTheme(xtpPaneThemeVisualStudio2010); to // set this theme. //=========================================================================== class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2010Theme : public CXTPDockingPaneVisualStudio2008Theme { public: //------------------------------------------------------------------------- // Summary: // Constructs a CXTPDockingPaneVisualStudio2010Theme object. //------------------------------------------------------------------------- CXTPDockingPaneVisualStudio2010Theme(); //----------------------------------------------------------------------- // Summary: // This method is called to refresh the visual metrics of manager. //----------------------------------------------------------------------- virtual void RefreshMetrics(); protected: //----------------------------------------------------------------------- // Summary: // Draws the background of the pane caption. // Parameters: // pDC - Reference to the device context in which to draw. // pPane - Container of the caption needs to draw the background. // rcCaption - Caption bounding rectangle // strTitle - Caption text. // bActive - TRUE if caption is active. // bVertical - TRUE to draw caption vertically //----------------------------------------------------------------------- virtual COLORREF FillCaptionPart(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rcCaption, BOOL bActive, BOOL bVertical); void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); virtual void DrawCaptionButtonEntry(CDC* pDC, CXTPDockingPaneCaptionButton* pButton, CPoint pt, COLORREF clrButton); }; //{{AFX_CODEJOCK_PRIVATE // obsolete, for backward compatibility only. class _XTP_EXT_CLASS CXTPDockingPaneNativeXPTheme : public CXTPDockingPaneWinNativeTheme {}; class _XTP_EXT_CLASS CXTPDockingPaneExplorerTheme : public CXTPDockingPaneWinExplorerTheme {}; class _XTP_EXT_CLASS CXTPDockingPaneOfficeTheme : public CXTPDockingPaneVisualStudio2003Theme {}; class _XTP_EXT_CLASS CXTPDockingPaneWhidbeyTheme : public CXTPDockingPaneVisualStudio2005Beta1Theme {}; class _XTP_EXT_CLASS CXTPDockingPaneVisioTheme : public CXTPDockingPaneOffice2002VisioTheme {}; class _XTP_EXT_CLASS CXTPDockingPaneShortcutBar2003Theme : public CXTPDockingPaneOffice2003OutlookTheme {}; class _XTP_EXT_CLASS CXTPDockingPaneOutlook2007Theme : public CXTPDockingPaneOffice2007OutlookTheme {}; class _XTP_EXT_CLASS CXTPDockingPaneWord2007Theme : public CXTPDockingPaneOffice2007WordTheme {} ; class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2005SecondTheme : public CXTPDockingPaneVisualStudio2005Beta2Theme {}; //}}AFX_CODEJOCK_PRIVATE } using namespace XTPDockingPanePaintThemes; AFX_INLINE int CXTPDockingPanePaintManager::GetCaptionHeight() const { return m_nTitleHeight; } AFX_INLINE int CXTPDockingPanePaintManager::GetTabsHeight() const{ return m_nTabsHeight; } AFX_INLINE CXTPTabPaintManager* CXTPDockingPanePaintManager::GetTabPaintManager() const { return m_pTabPaintManager; } AFX_INLINE CXTPTabPaintManager* CXTPDockingPanePaintManager::GetPanelPaintManager() const { return m_pPanelPaintManager; } AFX_INLINE void CXTPDockingPanePaintManager::DrawFloatingFrame(CDC* /*pDC*/, CXTPDockingPaneMiniWnd* /*pPane*/, CRect /*rc*/) { } AFX_INLINE void CXTPDockingPanePaintManager::DrawSidePanel(CDC* /*pDC*/, CXTPDockingPaneSidePanel* /*pPane*/, CRect /*rc*/) { } AFX_INLINE void CXTPDockingPanePaintManager::SetCaptionButtonStyle(XTPDockingPaneCaptionButtonStyle nStyle) { m_nCaptionButtonStyle = nStyle; } AFX_INLINE XTPDockingPaneCaptionButtonStyle CXTPDockingPanePaintManager::GetCaptionButtonStyle() const { return m_nCaptionButtonStyle; } #endif // #if !defined(__XTPDOCKINGPANEPAINTMANAGER_H__)