#include <UiButtonBar.h>
继承自UiWin。
公有成员 | |
| int | CalcIndexOfPos (int x, int y) |
| void | EnableButton (int nIndex, bool bEnable) |
| 启用、禁用某个按钮 | |
| MZFC_INLINE int | GetBarType () |
| 获得工具条类型(:: BUTTONBAR_TYPE_480,:: BUTTONBAR_TYPE_720. :: BUTTONBAR_TYPE_NONE) | |
| int | GetButtonCount () |
| 获得按钮个数 | |
| COLORREF | GetDisabledTextColor () |
| 获得禁用状态的文本颜色 | |
| BOOL | GetExtendedProperty_UiButtonBar (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| int | GetHighLightButton () |
| 获得中间按键的高亮按键 | |
| bool | IsButtonEnabled (int nIndex) |
| 是否启用、禁用某个按钮 | |
| bool | IsButtonShow (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) |
| 绘制控件 | |
| MZFC_INLINE void | SetBarType (int nType) |
| 设置工具条类型(:: BUTTONBAR_TYPE_480,:: BUTTONBAR_TYPE_720. :: BUTTONBAR_TYPE_NONE) | |
| void | SetButton (int nIndex, bool bShow, bool bEnable, const wchar_t *strText) |
| void | SetButtonCount (int nCount) |
| 设置按钮个数 | |
| void | SetButtonText (int nIndex, const wchar_t *strText) |
| void | SetDisabledTextColor (COLORREF clr) |
| 设置禁用状态的文本颜色 | |
| BOOL | SetExtendedProperty_UiButtonBar (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| void | SetHighLightButton (int nIndex) |
| 设置高亮按键 | |
| void | ShowButton (int nIndex, bool bShow) |
| 显示、隐藏某个按钮 | |
| UiButtonBar () | |
| ~UiButtonBar () | |
保护属性 | |
| bool | m_bButtonEnables [MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] |
| bool | m_bButtonShows [MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] |
| CMzString | m_ButtonTexts [MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] |
| COLORREF | m_clrDisableText |
| COLORREF | m_clrTextColor |
| int | m_nBarType |
| int | m_nButtonCount |
| int | m_nHighLightIndex |
| int | m_nLButtonDown_Index |
| ImagingHelper * | m_pImgBottomBar |
| ImagingHelper * | m_pImgCurrentTab |
| ImagingHelper * | m_pImgOtherTab |
| ImagingHelper * | m_pImgTabBG |
| UiButtonBar::UiButtonBar | ( | ) |
| UiButtonBar::~UiButtonBar | ( | ) |
| int UiButtonBar::CalcIndexOfPos | ( | int | x, | |
| int | y | |||
| ) |
| void UiButtonBar::EnableButton | ( | int | nIndex, | |
| bool | bEnable | |||
| ) |
启用、禁用某个按钮
| nIndex | 按钮索引 | |
| bShow | 启用、禁用 |
| MZFC_INLINE int UiButtonBar::GetBarType | ( | ) |
获得工具条类型(:: BUTTONBAR_TYPE_480,:: BUTTONBAR_TYPE_720. :: BUTTONBAR_TYPE_NONE)
| int UiButtonBar::GetButtonCount | ( | ) |
获得按钮个数
| COLORREF UiButtonBar::GetDisabledTextColor | ( | ) |
获得禁用状态的文本颜色
| BOOL UiButtonBar::GetExtendedProperty_UiButtonBar | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要获取或设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| int UiButtonBar::GetHighLightButton | ( | ) |
获得中间按键的高亮按键
| bool UiButtonBar::IsButtonEnabled | ( | int | nIndex | ) |
是否启用、禁用某个按钮
| nIndex | 按钮索引 |
| bool UiButtonBar::IsButtonShow | ( | int | nIndex | ) |
是否显示、隐藏某个按钮
| nIndex | 按钮索引 |
| int UiButtonBar::OnLButtonDown | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
当控件被左键按下时,此函数会被调用.
重载UiWin。
| int UiButtonBar::OnLButtonUp | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
当控件被左键放开时,此函数会被调用.
重载UiWin。
| void UiButtonBar::PaintWin | ( | HDC | hdcDst, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [virtual] |
绘制控件
重载此函数可以自定义控件的绘制
| hdcDst | 目的DC | |
| prcWin | 控件所在区域(以HDC的左上角为原点) | |
| prcUpdate | 需要更新的区域(以HDC的左上角为原点) |
重载UiWin。
| MZFC_INLINE void UiButtonBar::SetBarType | ( | int | nType | ) |
设置工具条类型(:: BUTTONBAR_TYPE_480,:: BUTTONBAR_TYPE_720. :: BUTTONBAR_TYPE_NONE)
| nType | 工具条类型 |
| void UiButtonBar::SetButton | ( | int | nIndex, | |
| bool | bShow, | |||
| bool | bEnable, | |||
| const wchar_t * | strText | |||
| ) |
| void UiButtonBar::SetButtonCount | ( | int | nCount | ) |
设置按钮个数
| void UiButtonBar::SetButtonText | ( | int | nIndex, | |
| const wchar_t * | strText | |||
| ) |
| void UiButtonBar::SetDisabledTextColor | ( | COLORREF | clr | ) |
设置禁用状态的文本颜色
| clr | 被禁用按钮文字颜色 |
| BOOL UiButtonBar::SetExtendedProperty_UiButtonBar | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| void UiButtonBar::SetHighLightButton | ( | int | nIndex | ) |
设置高亮按键
| nIndex | 按钮索引 nIndex=-1: 无,>=0: 按钮索引 |
| void UiButtonBar::ShowButton | ( | int | nIndex, | |
| bool | bShow | |||
| ) |
显示、隐藏某个按钮
| nIndex | 按钮索引 | |
| bShow | 显示、隐藏 |
bool UiButtonBar::m_bButtonEnables[MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] [protected] |
bool UiButtonBar::m_bButtonShows[MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] [protected] |
CMzString UiButtonBar::m_ButtonTexts[MZ_UI_BUTTONBAR_TEXT_BUTTON_COUNT] [protected] |
COLORREF UiButtonBar::m_clrDisableText [protected] |
COLORREF UiButtonBar::m_clrTextColor [protected] |
int UiButtonBar::m_nBarType [protected] |
int UiButtonBar::m_nButtonCount [protected] |
int UiButtonBar::m_nHighLightIndex [protected] |
int UiButtonBar::m_nLButtonDown_Index [protected] |
ImagingHelper* UiButtonBar::m_pImgBottomBar [protected] |
ImagingHelper* UiButtonBar::m_pImgCurrentTab [protected] |
ImagingHelper* UiButtonBar::m_pImgOtherTab [protected] |
ImagingHelper* UiButtonBar::m_pImgTabBG [protected] |
1.6.1