本文整理汇总了C++中IFWL_Widget::GetStylesEx方法的典型用法代码示例。如果您正苦于以下问题:C++ IFWL_Widget::GetStylesEx方法的具体用法?C++ IFWL_Widget::GetStylesEx怎么用?C++ IFWL_Widget::GetStylesEx使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFWL_Widget
的用法示例。
在下文中一共展示了IFWL_Widget::GetStylesEx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawBackground
FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (!pParams)
return FALSE;
IFWL_Widget* pWidget = pParams->m_pWidget;
FWLTHEME_STATE eState = FWLTHEME_STATE_Normal;
if (pParams->m_dwStates & CFWL_PartState_Hovered)
eState = FWLTHEME_STATE_Hover;
else if (pParams->m_dwStates & CFWL_PartState_Pressed)
eState = FWLTHEME_STATE_Pressed;
else if (pParams->m_dwStates & CFWL_PartState_Disabled)
eState = FWLTHEME_STATE_Disabale;
CFX_Graphics* pGraphics = pParams->m_pGraphics;
CFX_RectF* pRect = &pParams->m_rtPart;
FX_BOOL bVert = pWidget->GetStylesEx();
switch (pParams->m_iPart) {
case CFWL_Part::ForeArrow: {
DrawMaxMinBtn(pGraphics, pRect,
bVert ? FWLTHEME_DIRECTION_Up : FWLTHEME_DIRECTION_Left,
eState, &pParams->m_matrix);
break;
}
case CFWL_Part::BackArrow: {
DrawMaxMinBtn(pGraphics, pRect,
bVert ? FWLTHEME_DIRECTION_Down : FWLTHEME_DIRECTION_Right,
eState, &pParams->m_matrix);
break;
}
case CFWL_Part::Thumb: {
DrawThumbBtn(pGraphics, pRect, bVert, eState, TRUE, &pParams->m_matrix);
break;
}
case CFWL_Part::LowerTrack: {
DrawTrack(pGraphics, pRect, bVert, eState, TRUE, &pParams->m_matrix);
break;
}
case CFWL_Part::UpperTrack: {
DrawTrack(pGraphics, pRect, bVert, eState, FALSE, &pParams->m_matrix);
break;
}
default: {}
}
return TRUE;
}