📄 container.h
字号:
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle &= ~(CTR_STYLE_FILL); \
} \
while(0)
//*****************************************************************************
//
//! Enables filling of a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function enables the filling of a container widget. The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerFillOn(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle |= CTR_STYLE_FILL; \
} \
while(0)
//*****************************************************************************
//
//! Sets the font for a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//! \param pFnt is a pointer to the font to use to draw text on the container
//! widget.
//!
//! This function changes the font used to draw text on the container widget.
//! The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerFontSet(pWidget, pFnt) \
do \
{ \
tContainerWidget *pW = pWidget; \
const tFont *pF = pFnt; \
pW->pFont = pF; \
} \
while(0)
//*****************************************************************************
//
//! Sets the outline color of a container widget.
//!
//! \param pWidget is a pointer to the container widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to outline the container
//! widget.
//!
//! This function changes the color used to outline the container widget on the
//! display. The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerOutlineColorSet(pWidget, ulColor) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulOutlineColor = ulColor; \
} \
while(0)
//*****************************************************************************
//
//! Disables outlining of a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function disables the outlining of a container widget. The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerOutlineOff(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle &= ~(CTR_STYLE_OUTLINE); \
} \
while(0)
//*****************************************************************************
//
//! Enables outlining of a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function enables the outlining of a container widget. The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerOutlineOn(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle |= CTR_STYLE_OUTLINE; \
} \
while(0)
//*****************************************************************************
//
//! Disables the centering of text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function disables the centering of text on a container widget. The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextCenterOff(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle &= ~(CTR_STYLE_TEXT_CENTER); \
} \
while(0)
//*****************************************************************************
//
//! Enables the centering of text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function enables the centering of text on a container widget. The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextCenterOn(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle |= CTR_STYLE_TEXT_CENTER; \
} \
while(0)
//*****************************************************************************
//
//! Sets the text color of a container widget.
//!
//! \param pWidget is a pointer to the container widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to draw text on the
//! container widget.
//!
//! This function changes the color used to draw text on the container widget
//! on the display. The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextColorSet(pWidget, ulColor) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulTextColor = ulColor; \
} \
while(0)
//*****************************************************************************
//
//! Disables the text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function disables the drawing of text on a container widget. The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextOff(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle &= ~(CTR_STYLE_TEXT); \
} \
while(0)
//*****************************************************************************
//
//! Enables the text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function enables the drawing of text on a container widget. The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextOn(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle |= CTR_STYLE_TEXT; \
} \
while(0)
//*****************************************************************************
//
//! Disables opaque text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function disables the use of opaque text on this container widget.
//! When not using opaque text, only the foreground pixels of the text are
//! drawn on the screen, allowing the previously drawn pixels (such as the
//! background) to show through the text.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextOpaqueOff(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle &= ~(CTR_STYLE_TEXT_OPAQUE); \
} \
while(0)
//*****************************************************************************
//
//! Enables opaque text on a container widget.
//!
//! \param pWidget is a pointer to the container widget to modify.
//!
//! This function enables the use of opaque text on this container widget.
//! When using opaque text, both the foreground and background pixels of the
//! text are drawn on the screen, blocking out the previously drawn pixels.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextOpaqueOn(pWidget) \
do \
{ \
tContainerWidget *pW = pWidget; \
pW->ulStyle |= CTR_STYLE_TEXT_OPAQUE; \
} \
while(0)
//*****************************************************************************
//
//! Changes the text drawn on a container widget.
//!
//! \param pWidget is a pointer to the container widget to be modified.
//! \param pcTxt is a pointer to the text to draw onto the container widget.
//!
//! This function changes the text that is drawn onto the container widget.
//! The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define ContainerTextSet(pWidget, pcTxt) \
do \
{ \
tContainerWidget *pW = pWidget; \
const char *pcT = pcTxt; \
pW->pcText = pcT; \
} \
while(0)
//*****************************************************************************
//
// Prototypes for the container widget APIs.
//
//*****************************************************************************
extern long ContainerMsgProc(tWidget *pWidget, unsigned long ulMsg,
unsigned long ulParam1, unsigned long ulParam2);
extern void ContainerInit(tContainerWidget *pWidget, const tDisplay *pDisplay,
long lX, long lY, long lWidth, long lHeight);
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
#endif // __CONTAINER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -