UiToolbar_Text类参考

文本按钮工具条 更多...

#include <UiToolbar_Text.h>

继承自UiWin

所有成员的列表。

公有成员

int CalcIndexOfPos (int x, int y)
void EnableButton (int nIndex, bool bEnable)
void EnableLeftArrow (bool bEnable)
 启用向左箭头(true:显示, false:不显示)
CMzString GetButtonText (int nIndex)
COLORREF GetDisableTextColor ()
 获得禁用状态的文本颜色
BOOL GetExtendedProperty_UiToolbar_Text (int nPropertyType, void *pValue, int nBufSize)
 获取或设置对象的扩展属性值
int GetHighLightButton ()
 get the high-light button
MZFC_INLINE int GetTextBarType ()
bool IsButtonEnabled (int nIndex)
 是否启用、禁用
bool IsButtonShow (int nIndex)
 是否显示、隐藏
bool IsEnableLeftArrow ()
 是否启用向左箭头
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 (int nIndex, bool bShow, bool bEnable, const wchar_t *strText)
 设置各个按钮的属性
void SetButtonText (int nIndex, const wchar_t *strText)
void SetDisableTextColor (COLORREF clr)
 设置禁用状态的文本颜色
BOOL SetExtendedProperty_UiToolbar_Text (int nPropertyType, void *pValue, int nBufSize)
 获取或设置对象的扩展属性值
void SetHighLightButton (int nIndex)
 获得高亮的按钮索引
MZFC_INLINE void SetTextBarType (int nType)
void ShowButton (int nIndex, bool bShow)
 显示、隐藏按钮
 UiToolbar_Text (void)
 ~UiToolbar_Text (void)

保护属性

bool m_bButtonEnables [MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT]
bool m_bButtonShows [MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT]
bool m_bShowLeftArrow
CMzString m_ButtonTexts [MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT]
COLORREF m_clrDisableText
int m_nBarType
int m_nHighLightIndex
int m_nLButtonDown_Index

详细描述

文本按钮工具条

文本按钮工具条有三个按钮,从左到右的索引分别是:0,1,2 当工具条中的按钮被点击,控件会向所在窗口发送 MZ_WM_COMMAND 消息

参见:
MZ_WM_COMMAND

构造及析构函数文档

UiToolbar_Text::UiToolbar_Text ( void   ) 
UiToolbar_Text::~UiToolbar_Text ( void   ) 

成员函数文档

int UiToolbar_Text::CalcIndexOfPos ( int  x,
int  y 
)
void UiToolbar_Text::EnableButton ( int  nIndex,
bool  bEnable 
)

启用、禁用按钮 nIndex 0,1,2

void UiToolbar_Text::EnableLeftArrow ( bool  bEnable  ) 

启用向左箭头(true:显示, false:不显示)

CMzString UiToolbar_Text::GetButtonText ( int  nIndex  ) 

获得按钮文本 nIndex 0,1,2

COLORREF UiToolbar_Text::GetDisableTextColor (  ) 

获得禁用状态的文本颜色

BOOL UiToolbar_Text::GetExtendedProperty_UiToolbar_Text ( int  nPropertyType,
void *  pValue,
int  nBufSize 
)

获取或设置对象的扩展属性值

参数:
nPropertyType 要获取或o设置的属性类型
pValue 要获取或设置的属性值的指针
nBufSize pValue所指向的变量的size大小(单位: 字节)
返回:
操作是否成功
int UiToolbar_Text::GetHighLightButton (  ) 

get the high-light button

MZFC_INLINE int UiToolbar_Text::GetTextBarType (  ) 
bool UiToolbar_Text::IsButtonEnabled ( int  nIndex  ) 

是否启用、禁用

bool UiToolbar_Text::IsButtonShow ( int  nIndex  ) 

是否显示、隐藏

bool UiToolbar_Text::IsEnableLeftArrow (  ) 

是否启用向左箭头

int UiToolbar_Text::OnLButtonDown ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

当控件被左键按下时,此函数会被调用.

重载UiWin

int UiToolbar_Text::OnLButtonUp ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

当控件被左键放开时,此函数会被调用.

重载UiWin

void UiToolbar_Text::PaintWin ( HDC  hdcDst,
RECT *  prcWin,
RECT *  prcUpdate 
) [virtual]

绘制控件

重载此函数可以自定义控件的绘制

参数:
hdcDst 目的DC
prcWin 控件所在区域(以HDC的左上角为原点)
prcUpdate 需要更新的区域(以HDC的左上角为原点)

重载UiWin

void UiToolbar_Text::SetButton ( int  nIndex,
bool  bShow,
bool  bEnable,
const wchar_t *  strText 
)

设置各个按钮的属性

参数:
nIndex 按钮索引
bShow 是否显示
bEnable 启用、禁用
strText 按钮文本
void UiToolbar_Text::SetButtonText ( int  nIndex,
const wchar_t *  strText 
)

设置按钮文本 nIndex 0,1,2

void UiToolbar_Text::SetDisableTextColor ( COLORREF  clr  ) 

设置禁用状态的文本颜色

BOOL UiToolbar_Text::SetExtendedProperty_UiToolbar_Text ( int  nPropertyType,
void *  pValue,
int  nBufSize 
)

获取或设置对象的扩展属性值

参数:
nPropertyType 要获取或设置的属性类型
pValue 要设置的属性值的指针
nBufSize pValue所指向的变量的size大小(单位: 字节)
返回:
操作是否成功
void UiToolbar_Text::SetHighLightButton ( int  nIndex  ) 

获得高亮的按钮索引

MZFC_INLINE void UiToolbar_Text::SetTextBarType ( int  nType  ) 
void UiToolbar_Text::ShowButton ( int  nIndex,
bool  bShow 
)

显示、隐藏按钮


成员数据文档

bool UiToolbar_Text::m_bButtonEnables[MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT] [protected]
bool UiToolbar_Text::m_bButtonShows[MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT] [protected]
CMzString UiToolbar_Text::m_ButtonTexts[MZ_UI_TOOLBAR_TEXT_BUTTON_COUNT] [protected]
COLORREF UiToolbar_Text::m_clrDisableText [protected]
int UiToolbar_Text::m_nBarType [protected]

该类的文档由以下文件生成:

Generated at Tue Feb 9 15:10:03 2010 for Meizu M8 SDK Documentation by  doxygen 1.6.1