#include <UiToolBarPro.h>
继承自UiWin。
公有成员 | |
| int | CalcIndexOfPos (int x, int y) |
| void | EnableButton (ToolBarProButtonIndex nIndex, bool bEnable) |
| 启用、禁用某个按钮 | |
| void | EnableKeyBoard (bool bEnable) |
| void | EnableLeftArrow (bool bEnable) |
| 启用向左箭头(true:显示, false:隐藏) | |
| void | EnableSeparateLine (int nIndex, bool bEnable) |
| COLORREF | GetDisableTextColor () |
| 获得禁用状态的文本颜色 | |
| BOOL | GetExtendedProperty_UiToolbarPro (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| int | GetMiddleButtonHighLight () |
| 获得中间按键的高亮按键 | |
| int | GetMiddleButtonHighLightGrade (ToolBarProButtonIndex nIndex) |
| 获得高亮等级(0,1,2从亮到暗共三级) | |
| int | GetMiddleButtonMode () |
| int | GetMiddleButtonStyle () |
| 获得中间按键类型(文字按键:BUTTON_STYLE_TEXT 图标按键:BUTTON_STYLE_ICON) | |
| int | GetMidIconBtnCount () |
| 获得中间栏的图标按钮个数 | |
| MZFC_INLINE int | GetToolBarType () |
| 获得工具条类型(:: TOOLBARPRO_TYPE_480,:: TOOLBARPRO_TYPE_720. :: TOOLBARPRO_TYPE_NONE) | |
| bool | IsButtonEnabled (ToolBarProButtonIndex nIndex) |
| 是否启用、禁用某个按钮 | |
| bool | IsButtonShow (ToolBarProButtonIndex nIndex) |
| 是否显示、隐藏某个按钮 | |
| bool | IsEnableLeftArrow () |
| 是否启用向左箭头 | |
| bool | IsMiddleTextButtonIconHL () |
| 文字按钮图标是否高亮 | |
| bool | IsSeparateLineEnable (int nIndex) |
| int | OnLButtonDown (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键按下时,此函数会被调用. | |
| int | OnLButtonUp (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键放开时,此函数会被调用. | |
| void | PaintWin (HDC hdcDst, RECT *prcWin, RECT *prcUpdate) |
| 绘制控件 | |
| void | SetButton (ToolBarProButtonIndex nIndex, bool bShow, bool bEnable, const wchar_t *strText) |
| 设置左、右按键属性 | |
| void | SetDisableTextColor (COLORREF clr) |
| 设置禁用状态的文本颜色 | |
| BOOL | SetExtendedProperty_UiToolbarPro (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| void | SetIconButton (ToolBarProButtonIndex nIndex, bool bShow, bool bEnable, ImagingHelper *enableImg, ImagingHelper *hlImg, ImagingHelper *disImg) |
| 设置中间图标按钮属性 | |
| void | SetIconButtonCount (int nCount) |
| 设置按钮的个数 | |
| void | SetIconButtonImage (ToolBarProButtonIndex nIndex, ImagingHelper *enableImg, ImagingHelper *hlImg, ImagingHelper *disImg) |
| void | SetMiddleButton (bool bShow, bool bEnable, const wchar_t *strText, ImagingHelper *img, ImagingHelper *imgHL, ImagingHelper *disImg) |
| 设置中间文本按钮属性 | |
| void | SetMiddleButtonHighLight (ToolBarProButtonIndex nIndex) |
| 设置高亮按键 | |
| void | SetMiddleButtonHighLightGrade (ToolBarProButtonIndex nIndex, int nGrade) |
| 设置高亮等级(0,1,2从亮到暗共三级) | |
| void | SetMiddleButtonMode (int nMode) |
| void | SetMiddleButtonText (const wchar_t *strText) |
| 设置中间按钮文字 | |
| void | SetMiddleTextButtonIconHL (bool bEnable) |
| 设置文字按钮图标高亮 | |
| MZFC_INLINE void | SetToolBarType (int nType) |
| 设置工具条类型(:: TOOLBARPRO_TYPE_480,:: TOOLBARPRO_TYPE_720. :: TOOLBARPRO_TYPE_NONE) | |
| void | ShowButton (ToolBarProButtonIndex nIndex, bool bShow) |
| 显示、隐藏某个按钮 | |
| UiToolBarPro (void) | |
| ~UiToolBarPro (void) | |
保护属性 | |
| bool | m_bEnableKeyBoard |
| bool | m_bEnableSeparateLine [2] |
| bool | m_bFixedButtonEnable [FIXEDBUTTON_COUNT] |
| bool | m_bFixedButtonShow [FIXEDBUTTON_COUNT] |
| bool | m_bFixedLButton |
| bool | m_bFixedRButton |
| bool | m_bIsMouseMoved |
| bool | m_bMidButton |
| bool | m_bMidIconButtonEnable [TOOLBARPRO_MIDBUTTON_MAX] |
| bool | m_bMidIconButtonShow [TOOLBARPRO_MIDBUTTON_MAX] |
| bool | m_bMidTextBtnIconAlwaysHL |
| bool | m_bMidTextBtnIconHL |
| bool | m_bMidTextButtonEnable |
| bool | m_bMidTextButtonShow |
| bool | m_bShowLeftArrow |
| COLORREF | m_clrDisableText |
| CMzString | m_FixedButtonTexts [FIXEDBUTTON_COUNT] |
| ImagingHelper * | m_ImagesDisabled [TOOLBARPRO_MIDBUTTON_MAX] |
| CMzString | m_MidButtonTexts |
| ImagingHelper * | m_MidHighLightIcon [TOOLBARPRO_MIDBUTTON_MAX] |
| ImagingHelper * | m_MidIconBtnIcon [TOOLBARPRO_MIDBUTTON_MAX] |
| ImagingHelper * | m_MidTextButtonDisableIcon |
| ImagingHelper * | m_MidTextButtonHLIcon |
| ImagingHelper * | m_MidTextButtonIcon |
| int | m_nBarType |
| int | m_nButtonHighLightGrades [TOOLBARPRO_MIDBUTTON_MAX] |
| int | m_nHLFixedButtonIndex |
| int | m_nHLMidButtonIndex |
| int | m_nLButtonDown_Index |
| int | m_nMidButtonStyle |
| int | m_nMidIconButtonCount |
| int | m_nMidIconButtonMode |
| int | m_nMidTextButtonCount |
| int | m_nMidTextButtonMode |
| UiToolBarPro::UiToolBarPro | ( | void | ) |
| UiToolBarPro::~UiToolBarPro | ( | void | ) |
| int UiToolBarPro::CalcIndexOfPos | ( | int | x, | |
| int | y | |||
| ) |
| void UiToolBarPro::EnableButton | ( | ToolBarProButtonIndex | nIndex, | |
| bool | bEnable | |||
| ) |
启用、禁用某个按钮
| nIndex | 按钮索引 | |
| bShow | 启用、禁用 |
| void UiToolBarPro::EnableKeyBoard | ( | bool | bEnable | ) |
| void UiToolBarPro::EnableLeftArrow | ( | bool | bEnable | ) |
启用向左箭头(true:显示, false:隐藏)
| bEnable | 显示/隐藏左箭头 |
| void UiToolBarPro::EnableSeparateLine | ( | int | nIndex, | |
| bool | bEnable | |||
| ) |
| COLORREF UiToolBarPro::GetDisableTextColor | ( | ) |
获得禁用状态的文本颜色
| BOOL UiToolBarPro::GetExtendedProperty_UiToolbarPro | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要获取或设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| int UiToolBarPro::GetMiddleButtonHighLight | ( | ) |
获得中间按键的高亮按键
| int UiToolBarPro::GetMiddleButtonHighLightGrade | ( | ToolBarProButtonIndex | nIndex | ) |
获得高亮等级(0,1,2从亮到暗共三级)
| nIndex | 按钮索引 |
| int UiToolBarPro::GetMiddleButtonMode | ( | ) |
| int UiToolBarPro::GetMiddleButtonStyle | ( | ) |
获得中间按键类型(文字按键:BUTTON_STYLE_TEXT 图标按键:BUTTON_STYLE_ICON)
| int UiToolBarPro::GetMidIconBtnCount | ( | ) |
获得中间栏的图标按钮个数
| MZFC_INLINE int UiToolBarPro::GetToolBarType | ( | ) |
获得工具条类型(:: TOOLBARPRO_TYPE_480,:: TOOLBARPRO_TYPE_720. :: TOOLBARPRO_TYPE_NONE)
| bool UiToolBarPro::IsButtonEnabled | ( | ToolBarProButtonIndex | nIndex | ) |
是否启用、禁用某个按钮
| nIndex | 按钮索引 |
| bool UiToolBarPro::IsButtonShow | ( | ToolBarProButtonIndex | nIndex | ) |
是否显示、隐藏某个按钮
| nIndex | 按钮索引 |
| bool UiToolBarPro::IsEnableLeftArrow | ( | ) |
是否启用向左箭头
| bool UiToolBarPro::IsMiddleTextButtonIconHL | ( | ) |
文字按钮图标是否高亮
| bool UiToolBarPro::IsSeparateLineEnable | ( | int | nIndex | ) |
| int UiToolBarPro::OnLButtonDown | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
当控件被左键按下时,此函数会被调用.
重载UiWin。
| int UiToolBarPro::OnLButtonUp | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
当控件被左键放开时,此函数会被调用.
重载UiWin。
| void UiToolBarPro::PaintWin | ( | HDC | hdcDst, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [virtual] |
绘制控件
重载此函数可以自定义控件的绘制
| hdcDst | 目的DC | |
| prcWin | 控件所在区域(以HDC的左上角为原点) | |
| prcUpdate | 需要更新的区域(以HDC的左上角为原点) |
重载UiWin。
| void UiToolBarPro::SetButton | ( | ToolBarProButtonIndex | nIndex, | |
| bool | bShow, | |||
| bool | bEnable, | |||
| const wchar_t * | strText | |||
| ) |
设置左、右按键属性
| nIndex | 按钮索引 TOOLBARPRO_LEFT_TEXTBUTTON = 0 ///<左边固定文字按钮ID TOOLBARPRO_RIGHT_TEXTBUTTON = 1 ///<右边固定文字按钮ID | |
| bShow | 是否显示 | |
| bEnable | 启用、禁用 | |
| strText | 按钮文字 |
| void UiToolBarPro::SetDisableTextColor | ( | COLORREF | clr | ) |
设置禁用状态的文本颜色
| clr | 被禁用按钮文字颜色 |
| BOOL UiToolBarPro::SetExtendedProperty_UiToolbarPro | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| void UiToolBarPro::SetIconButton | ( | ToolBarProButtonIndex | nIndex, | |
| bool | bShow, | |||
| bool | bEnable, | |||
| ImagingHelper * | enableImg, | |||
| ImagingHelper * | hlImg, | |||
| ImagingHelper * | disImg | |||
| ) |
设置中间图标按钮属性
| nIndex | 按钮索引 TOOLBARPRO_MIDDLE_ICONBUTTON1 = 3 ///<中间图标按钮ID(左) TOOLBARPRO_MIDDLE_ICONBUTTON2 = 4 ///<中间图标按钮ID (中) TOOLBARPRO_MIDDLE_ICONBUTTON3 = 5 ///<中间图标按钮ID(右) | |
| bShow | 是否显示 | |
| bEnable | 启用、禁用 | |
| enableImg | 启用状态下的图标 | |
| hlImg | 高亮状态下的图标 | |
| disImg | 禁用状态下的图标 |
| void UiToolBarPro::SetIconButtonCount | ( | int | nCount | ) |
设置按钮的个数
| nCount | 按钮个数 |
| void UiToolBarPro::SetIconButtonImage | ( | ToolBarProButtonIndex | nIndex, | |
| ImagingHelper * | enableImg, | |||
| ImagingHelper * | hlImg, | |||
| ImagingHelper * | disImg | |||
| ) |
| void UiToolBarPro::SetMiddleButton | ( | bool | bShow, | |
| bool | bEnable, | |||
| const wchar_t * | strText, | |||
| ImagingHelper * | img, | |||
| ImagingHelper * | imgHL, | |||
| ImagingHelper * | disImg | |||
| ) |
设置中间文本按钮属性
| bShow | 是否显示 | |
| bEnable | 启用、禁用 | |
| strText | 按钮文字 | |
| img | 按钮图标 |
| void UiToolBarPro::SetMiddleButtonHighLight | ( | ToolBarProButtonIndex | nIndex | ) |
设置高亮按键
| nIndex | 按钮索引 |
| void UiToolBarPro::SetMiddleButtonHighLightGrade | ( | ToolBarProButtonIndex | nIndex, | |
| int | nGrade | |||
| ) |
设置高亮等级(0,1,2从亮到暗共三级)
| nIndex | 按钮索引 | |
| nGrade | 亮度等级 |
| void UiToolBarPro::SetMiddleButtonMode | ( | int | nMode | ) |
| void UiToolBarPro::SetMiddleButtonText | ( | const wchar_t * | strText | ) |
设置中间按钮文字
| strText | 按钮文字 |
| void UiToolBarPro::SetMiddleTextButtonIconHL | ( | bool | bEnable | ) |
设置文字按钮图标高亮
| bEnable | 是否高亮 |
| MZFC_INLINE void UiToolBarPro::SetToolBarType | ( | int | nType | ) |
设置工具条类型(:: TOOLBARPRO_TYPE_480,:: TOOLBARPRO_TYPE_720. :: TOOLBARPRO_TYPE_NONE)
| nType | 工具条类型 |
| void UiToolBarPro::ShowButton | ( | ToolBarProButtonIndex | nIndex, | |
| bool | bShow | |||
| ) |
显示、隐藏某个按钮
| nIndex | 按钮索引 | |
| bShow | 显示、隐藏 |
bool UiToolBarPro::m_bEnableKeyBoard [protected] |
bool UiToolBarPro::m_bEnableSeparateLine[2] [protected] |
bool UiToolBarPro::m_bFixedButtonEnable[FIXEDBUTTON_COUNT] [protected] |
bool UiToolBarPro::m_bFixedButtonShow[FIXEDBUTTON_COUNT] [protected] |
bool UiToolBarPro::m_bFixedLButton [protected] |
bool UiToolBarPro::m_bFixedRButton [protected] |
bool UiToolBarPro::m_bIsMouseMoved [protected] |
重载UiWin。
bool UiToolBarPro::m_bMidButton [protected] |
bool UiToolBarPro::m_bMidIconButtonEnable[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
bool UiToolBarPro::m_bMidIconButtonShow[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
bool UiToolBarPro::m_bMidTextBtnIconAlwaysHL [protected] |
bool UiToolBarPro::m_bMidTextBtnIconHL [protected] |
bool UiToolBarPro::m_bMidTextButtonEnable [protected] |
bool UiToolBarPro::m_bMidTextButtonShow [protected] |
bool UiToolBarPro::m_bShowLeftArrow [protected] |
COLORREF UiToolBarPro::m_clrDisableText [protected] |
CMzString UiToolBarPro::m_FixedButtonTexts[FIXEDBUTTON_COUNT] [protected] |
ImagingHelper* UiToolBarPro::m_ImagesDisabled[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
CMzString UiToolBarPro::m_MidButtonTexts [protected] |
ImagingHelper* UiToolBarPro::m_MidHighLightIcon[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
ImagingHelper* UiToolBarPro::m_MidIconBtnIcon[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
ImagingHelper* UiToolBarPro::m_MidTextButtonDisableIcon [protected] |
ImagingHelper* UiToolBarPro::m_MidTextButtonHLIcon [protected] |
ImagingHelper* UiToolBarPro::m_MidTextButtonIcon [protected] |
int UiToolBarPro::m_nBarType [protected] |
int UiToolBarPro::m_nButtonHighLightGrades[TOOLBARPRO_MIDBUTTON_MAX] [protected] |
int UiToolBarPro::m_nHLFixedButtonIndex [protected] |
int UiToolBarPro::m_nHLMidButtonIndex [protected] |
int UiToolBarPro::m_nLButtonDown_Index [protected] |
int UiToolBarPro::m_nMidButtonStyle [protected] |
int UiToolBarPro::m_nMidIconButtonCount [protected] |
int UiToolBarPro::m_nMidIconButtonMode [protected] |
int UiToolBarPro::m_nMidTextButtonCount [protected] |
int UiToolBarPro::m_nMidTextButtonMode [protected] |
1.6.1