ReactOS 0.4.15-dev-7998-gdb93cb1
CUIFTheme Class Reference

#include <cicuif.h>

Inheritance diagram for CUIFTheme:
Collaboration diagram for CUIFTheme:

Public Member Functions

HRESULT InternalOpenThemeData (HWND hWnd)
 
HRESULT EnsureThemeData (HWND hWnd)
 
HRESULT CloseThemeData ()
 
STDMETHOD() DrawThemeBackground (HDC hDC, int iStateId, LPCRECT pRect, LPCRECT pClipRect)
 
STDMETHOD() DrawThemeParentBackground (HWND hwnd, HDC hDC, LPRECT prc)
 
STDMETHOD() DrawThemeText (HDC hDC, int iStateId, LPCWSTR pszText, int cchText, DWORD dwTextFlags, DWORD dwTextFlags2, LPCRECT pRect)
 
STDMETHOD() DrawThemeIcon (HDC hDC, int iStateId, LPCRECT pRect, HIMAGELIST himl, int iImageIndex)
 
STDMETHOD() GetThemeBackgroundExtent (HDC hDC, int iStateId, LPCRECT pContentRect, LPRECT pExtentRect)
 
STDMETHOD() GetThemeBackgroundContentRect (HDC hDC, int iStateId, LPCRECT pBoundingRect, LPRECT pContentRect)
 
STDMETHOD() GetThemeTextExtent (HDC hDC, int iStateId, LPCWSTR pszText, int cchCharCount, DWORD dwTextFlags, LPCRECT pBoundingRect, LPRECT pExtentRect)
 
STDMETHOD() GetThemePartSize (HDC hDC, int iStateId, LPRECT prc, THEMESIZE eSize, SIZE *psz)
 
STDMETHOD() DrawThemeEdge (HDC hDC, int iStateId, LPCRECT pDestRect, UINT uEdge, UINT uFlags, LPRECT pContentRect)
 
STDMETHOD() GetThemeColor (int iStateId, int iPropId, COLORREF *pColor)
 
STDMETHOD() GetThemeMargins (HDC hDC, int iStateId, int iPropId, LPRECT prc, MARGINS *pMargins)
 
STDMETHOD() GetThemeFont (HDC hDC, int iStateId, int iPropId, LOGFONTW *pFont)
 
 STDMETHOD_ (COLORREF, GetThemeSysColor)(INT iColorId)
 
 STDMETHOD_ (int, GetThemeSysSize)(int iSizeId)
 
 STDMETHOD_ (void, SetActiveTheme)(LPCWSTR pszClassList
 

Public Attributes

LPCWSTR m_pszClassList
 
INT m_iPartId
 
INT m_iStateId
 
HTHEME m_hTheme
 
INT iPartId
 
INT INT iStateId
 

Static Public Attributes

static HINSTANCE s_hUXTHEME = NULL
 
static FN_OpenThemeData s_fnOpenThemeData = NULL
 
static FN_CloseThemeData s_fnCloseThemeData = NULL
 
static FN_DrawThemeBackground s_fnDrawThemeBackground = NULL
 
static FN_DrawThemeParentBackground s_fnDrawThemeParentBackground = NULL
 
static FN_DrawThemeText s_fnDrawThemeText = NULL
 
static FN_DrawThemeIcon s_fnDrawThemeIcon = NULL
 
static FN_GetThemeBackgroundExtent s_fnGetThemeBackgroundExtent = NULL
 
static FN_GetThemeBackgroundContentRect s_fnGetThemeBackgroundContentRect = NULL
 
static FN_GetThemeTextExtent s_fnGetThemeTextExtent = NULL
 
static FN_GetThemePartSize s_fnGetThemePartSize = NULL
 
static FN_DrawThemeEdge s_fnDrawThemeEdge = NULL
 
static FN_GetThemeColor s_fnGetThemeColor = NULL
 
static FN_GetThemeMargins s_fnGetThemeMargins = NULL
 
static FN_GetThemeFont s_fnGetThemeFont = NULL
 
static FN_GetThemeSysColor s_fnGetThemeSysColor = NULL
 
static FN_GetThemeSysSize s_fnGetThemeSysSize = NULL
 

Detailed Description

Definition at line 87 of file cicuif.h.

Member Function Documentation

◆ CloseThemeData()

HRESULT CUIFTheme::CloseThemeData ( )

Definition at line 84 of file cicuif.cpp.

85{
86 if (!m_hTheme)
87 return S_OK;
88
89 if (!cicGetFN(s_hUXTHEME, s_fnCloseThemeData, TEXT("uxtheme.dll"), "CloseThemeData"))
90 return E_FAIL;
91
93 m_hTheme = NULL;
94 return hr;
95}
HTHEME m_hTheme
Definition: cicuif.h:93
static HINSTANCE s_hUXTHEME
Definition: cicuif.h:94
static FN_CloseThemeData s_fnCloseThemeData
Definition: cicuif.h:96
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52
#define TEXT(s)
Definition: k32.h:26
HRESULT hr
Definition: shlfolder.c:183

Referenced by CTipbarWnd::InitThemeMargins(), CUIFButton2::~CUIFButton2(), and CUIFObject::~CUIFObject().

◆ DrawThemeBackground()

STDMETHODIMP CUIFTheme::DrawThemeBackground ( HDC  hDC,
int  iStateId,
LPCRECT  pRect,
LPCRECT  pClipRect 
)

Definition at line 98 of file cicuif.cpp.

99{
100 if (!cicGetFN(s_hUXTHEME, s_fnDrawThemeBackground, TEXT("uxtheme.dll"), "DrawThemeBackground"))
101 return E_FAIL;
102 return s_fnDrawThemeBackground(m_hTheme, hDC, m_iPartId, iStateId, pRect, pClipRect);
103}
static HDC hDC
Definition: 3dtext.c:33
INT m_iPartId
Definition: cicuif.h:91
static FN_DrawThemeBackground s_fnDrawThemeBackground
Definition: cicuif.h:97
INT INT iStateId
Definition: cicuif.h:130

◆ DrawThemeEdge()

STDMETHODIMP CUIFTheme::DrawThemeEdge ( HDC  hDC,
int  iStateId,
LPCRECT  pDestRect,
UINT  uEdge,
UINT  uFlags,
LPRECT  pContentRect 
)

Definition at line 162 of file cicuif.cpp.

163{
164 if (!cicGetFN(s_hUXTHEME, s_fnDrawThemeEdge, TEXT("uxtheme.dll"), "DrawThemeEdge"))
165 return E_FAIL;
166 return s_fnDrawThemeEdge(m_hTheme, hDC, m_iPartId, iStateId, pDestRect, uEdge, uFlags, pContentRect);
167}
static FN_DrawThemeEdge s_fnDrawThemeEdge
Definition: cicuif.h:105
UINT uFlags
Definition: api.c:59

◆ DrawThemeIcon()

STDMETHODIMP CUIFTheme::DrawThemeIcon ( HDC  hDC,
int  iStateId,
LPCRECT  pRect,
HIMAGELIST  himl,
int  iImageIndex 
)

Definition at line 122 of file cicuif.cpp.

123{
124 if (!cicGetFN(s_hUXTHEME, s_fnDrawThemeIcon, TEXT("uxtheme.dll"), "DrawThemeIcon"))
125 return E_FAIL;
126 return s_fnDrawThemeIcon(m_hTheme, hDC, m_iPartId, iStateId, pRect, himl, iImageIndex);
127}
HIMAGELIST himl
static FN_DrawThemeIcon s_fnDrawThemeIcon
Definition: cicuif.h:100

◆ DrawThemeParentBackground()

STDMETHODIMP CUIFTheme::DrawThemeParentBackground ( HWND  hwnd,
HDC  hDC,
LPRECT  prc 
)

Definition at line 106 of file cicuif.cpp.

107{
108 if (!cicGetFN(s_hUXTHEME, s_fnDrawThemeParentBackground, TEXT("uxtheme.dll"), "DrawThemeParentBackground"))
109 return E_FAIL;
111}
static FN_DrawThemeParentBackground s_fnDrawThemeParentBackground
Definition: cicuif.h:98
_Out_ LPRECT prc
Definition: ntgdi.h:1658
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ DrawThemeText()

STDMETHODIMP CUIFTheme::DrawThemeText ( HDC  hDC,
int  iStateId,
LPCWSTR  pszText,
int  cchText,
DWORD  dwTextFlags,
DWORD  dwTextFlags2,
LPCRECT  pRect 
)

Definition at line 114 of file cicuif.cpp.

115{
116 if (!cicGetFN(s_hUXTHEME, s_fnDrawThemeText, TEXT("uxtheme.dll"), "DrawThemeText"))
117 return E_FAIL;
118 return s_fnDrawThemeText(m_hTheme, hDC, m_iPartId, iStateId, pszText, cchText, dwTextFlags, dwTextFlags2, pRect);
119}
static FN_DrawThemeText s_fnDrawThemeText
Definition: cicuif.h:99
_In_ int cchText
Definition: winuser.h:4465

◆ EnsureThemeData()

HRESULT CUIFTheme::EnsureThemeData ( HWND  hWnd)

Definition at line 77 of file cicuif.cpp.

78{
79 if (m_hTheme)
80 return S_OK;
82}
HWND hWnd
Definition: settings.c:17
HRESULT InternalOpenThemeData(HWND hWnd)
Definition: cicuif.cpp:66

Referenced by CDefCompFrameWindow::GetGripperWidth(), CTipbarWnd::GetGripperWidth(), CTipbarThread::GetTextSize(), and CUIFButton::GetTextSize().

◆ GetThemeBackgroundContentRect()

STDMETHODIMP CUIFTheme::GetThemeBackgroundContentRect ( HDC  hDC,
int  iStateId,
LPCRECT  pBoundingRect,
LPRECT  pContentRect 
)

Definition at line 138 of file cicuif.cpp.

139{
140 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeBackgroundContentRect, TEXT("uxtheme.dll"), "GetThemeBackgroundContentRect"))
141 return E_FAIL;
142 return s_fnGetThemeBackgroundContentRect(m_hTheme, hDC, m_iPartId, iStateId, pBoundingRect, pContentRect);
143}
static FN_GetThemeBackgroundContentRect s_fnGetThemeBackgroundContentRect
Definition: cicuif.h:102

◆ GetThemeBackgroundExtent()

STDMETHODIMP CUIFTheme::GetThemeBackgroundExtent ( HDC  hDC,
int  iStateId,
LPCRECT  pContentRect,
LPRECT  pExtentRect 
)

Definition at line 130 of file cicuif.cpp.

131{
132 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeBackgroundExtent, TEXT("uxtheme.dll"), "GetThemeBackgroundExtent"))
133 return E_FAIL;
134 return s_fnGetThemeBackgroundExtent(m_hTheme, hDC, m_iPartId, iStateId, pContentRect, pExtentRect);
135}
static FN_GetThemeBackgroundExtent s_fnGetThemeBackgroundExtent
Definition: cicuif.h:101

◆ GetThemeColor()

STDMETHODIMP CUIFTheme::GetThemeColor ( int  iStateId,
int  iPropId,
COLORREF pColor 
)

Definition at line 170 of file cicuif.cpp.

171{
172 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeColor, TEXT("uxtheme.dll"), "GetThemeColor"))
173 return E_FAIL;
174 return s_fnGetThemeColor(m_hTheme, m_iPartId, iStateId, iPropId, pColor);
175}
static FN_GetThemeColor s_fnGetThemeColor
Definition: cicuif.h:106

◆ GetThemeFont()

STDMETHODIMP CUIFTheme::GetThemeFont ( HDC  hDC,
int  iStateId,
int  iPropId,
LOGFONTW pFont 
)

Definition at line 186 of file cicuif.cpp.

187{
188 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeFont, TEXT("uxtheme.dll"), "GetThemeFont"))
189 return E_FAIL;
190 return s_fnGetThemeFont(m_hTheme, hDC, m_iPartId, iStateId, iPropId, pFont);
191}
static FN_GetThemeFont s_fnGetThemeFont
Definition: cicuif.h:108

Referenced by CTipbarWnd::CreateVerticalFont().

◆ GetThemeMargins()

STDMETHODIMP CUIFTheme::GetThemeMargins ( HDC  hDC,
int  iStateId,
int  iPropId,
LPRECT  prc,
MARGINS pMargins 
)

Definition at line 178 of file cicuif.cpp.

179{
180 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeMargins, TEXT("uxtheme.dll"), "GetThemeMargins"))
181 return E_FAIL;
182 return s_fnGetThemeMargins(m_hTheme, hDC, m_iPartId, iStateId, iPropId, prc, pMargins);
183}
static FN_GetThemeMargins s_fnGetThemeMargins
Definition: cicuif.h:107

Referenced by CTipbarWnd::InitThemeMargins(), and STDMETHODIMP_().

◆ GetThemePartSize()

STDMETHODIMP CUIFTheme::GetThemePartSize ( HDC  hDC,
int  iStateId,
LPRECT  prc,
THEMESIZE  eSize,
SIZE psz 
)

Definition at line 154 of file cicuif.cpp.

155{
156 if (!cicGetFN(s_hUXTHEME, s_fnGetThemePartSize, TEXT("uxtheme.dll"), "GetThemePartSize"))
157 return E_FAIL;
158 return s_fnGetThemePartSize(m_hTheme, hDC, m_iPartId, iStateId, prc, eSize, psz);
159}
static FN_GetThemePartSize s_fnGetThemePartSize
Definition: cicuif.h:104

Referenced by CDefCompFrameWindow::GetGripperWidth(), CTipbarWnd::GetGripperWidth(), and CTipbarWnd::InitThemeMargins().

◆ GetThemeTextExtent()

STDMETHODIMP CUIFTheme::GetThemeTextExtent ( HDC  hDC,
int  iStateId,
LPCWSTR  pszText,
int  cchCharCount,
DWORD  dwTextFlags,
LPCRECT  pBoundingRect,
LPRECT  pExtentRect 
)

Definition at line 146 of file cicuif.cpp.

147{
148 if (!cicGetFN(s_hUXTHEME, s_fnGetThemeTextExtent, TEXT("uxtheme.dll"), "GetThemeTextExtent"))
149 return E_FAIL;
150 return s_fnGetThemeTextExtent(m_hTheme, hDC, m_iPartId, iStateId, pszText, cchCharCount, dwTextFlags, pBoundingRect, pExtentRect);
151}
static FN_GetThemeTextExtent s_fnGetThemeTextExtent
Definition: cicuif.h:103

Referenced by CUIFButton::GetTextSize().

◆ InternalOpenThemeData()

HRESULT CUIFTheme::InternalOpenThemeData ( HWND  hWnd)

Definition at line 66 of file cicuif.cpp.

67{
68 if (!hWnd || !m_pszClassList)
69 return E_FAIL;
70
71 if (!cicGetFN(s_hUXTHEME, s_fnOpenThemeData, TEXT("uxtheme.dll"), "OpenThemeData"))
72 return E_FAIL;
74 return (m_hTheme ? S_OK : E_FAIL);
75}
LPCWSTR m_pszClassList
Definition: cicuif.h:90
static FN_OpenThemeData s_fnOpenThemeData
Definition: cicuif.h:95

Referenced by CTipbarWnd::CreateVerticalFont(), EnsureThemeData(), CTipbarThread::GetTextSize(), CTipbarWnd::InitThemeMargins(), and STDMETHODIMP_().

◆ STDMETHOD_() [1/3]

CUIFTheme::STDMETHOD_ ( COLORREF  ,
GetThemeSysColor   
)

◆ STDMETHOD_() [2/3]

CUIFTheme::STDMETHOD_ ( int  ,
GetThemeSysSize   
)

◆ STDMETHOD_() [3/3]

CUIFTheme::STDMETHOD_ ( void  ,
SetActiveTheme   
)

Member Data Documentation

◆ iPartId

INT CUIFTheme::iPartId

Definition at line 130 of file cicuif.h.

◆ iStateId

◆ m_hTheme

◆ m_iPartId

◆ m_iStateId

◆ m_pszClassList

◆ s_fnCloseThemeData

FN_CloseThemeData CUIFTheme::s_fnCloseThemeData = NULL
static

Definition at line 96 of file cicuif.h.

Referenced by CloseThemeData().

◆ s_fnDrawThemeBackground

FN_DrawThemeBackground CUIFTheme::s_fnDrawThemeBackground = NULL
static

Definition at line 97 of file cicuif.h.

Referenced by DrawThemeBackground().

◆ s_fnDrawThemeEdge

FN_DrawThemeEdge CUIFTheme::s_fnDrawThemeEdge = NULL
static

Definition at line 105 of file cicuif.h.

Referenced by DrawThemeEdge().

◆ s_fnDrawThemeIcon

FN_DrawThemeIcon CUIFTheme::s_fnDrawThemeIcon = NULL
static

Definition at line 100 of file cicuif.h.

Referenced by DrawThemeIcon().

◆ s_fnDrawThemeParentBackground

FN_DrawThemeParentBackground CUIFTheme::s_fnDrawThemeParentBackground = NULL
static

Definition at line 98 of file cicuif.h.

Referenced by DrawThemeParentBackground().

◆ s_fnDrawThemeText

FN_DrawThemeText CUIFTheme::s_fnDrawThemeText = NULL
static

Definition at line 99 of file cicuif.h.

Referenced by DrawThemeText().

◆ s_fnGetThemeBackgroundContentRect

FN_GetThemeBackgroundContentRect CUIFTheme::s_fnGetThemeBackgroundContentRect = NULL
static

Definition at line 102 of file cicuif.h.

Referenced by GetThemeBackgroundContentRect().

◆ s_fnGetThemeBackgroundExtent

FN_GetThemeBackgroundExtent CUIFTheme::s_fnGetThemeBackgroundExtent = NULL
static

Definition at line 101 of file cicuif.h.

Referenced by GetThemeBackgroundExtent().

◆ s_fnGetThemeColor

FN_GetThemeColor CUIFTheme::s_fnGetThemeColor = NULL
static

Definition at line 106 of file cicuif.h.

Referenced by GetThemeColor().

◆ s_fnGetThemeFont

FN_GetThemeFont CUIFTheme::s_fnGetThemeFont = NULL
static

Definition at line 108 of file cicuif.h.

Referenced by GetThemeFont().

◆ s_fnGetThemeMargins

FN_GetThemeMargins CUIFTheme::s_fnGetThemeMargins = NULL
static

Definition at line 107 of file cicuif.h.

Referenced by GetThemeMargins().

◆ s_fnGetThemePartSize

FN_GetThemePartSize CUIFTheme::s_fnGetThemePartSize = NULL
static

Definition at line 104 of file cicuif.h.

Referenced by GetThemePartSize().

◆ s_fnGetThemeSysColor

FN_GetThemeSysColor CUIFTheme::s_fnGetThemeSysColor = NULL
static

Definition at line 109 of file cicuif.h.

◆ s_fnGetThemeSysSize

FN_GetThemeSysSize CUIFTheme::s_fnGetThemeSysSize = NULL
static

Definition at line 110 of file cicuif.h.

◆ s_fnGetThemeTextExtent

FN_GetThemeTextExtent CUIFTheme::s_fnGetThemeTextExtent = NULL
static

Definition at line 103 of file cicuif.h.

Referenced by GetThemeTextExtent().

◆ s_fnOpenThemeData

FN_OpenThemeData CUIFTheme::s_fnOpenThemeData = NULL
static

Definition at line 95 of file cicuif.h.

Referenced by InternalOpenThemeData().

◆ s_hUXTHEME


The documentation for this class was generated from the following files: