⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkbox.h

📁 基于TI公司Cortex-M3的uart超级通信开发
💻 H
📖 第 1 页 / 共 2 页
字号:
//! The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxFillColorSet(pWidget, ulColor) \
        do                                     \
        {                                      \
            tCheckBoxWidget *pW = pWidget;     \
            pW->ulFillColor = ulColor;         \
        }                                      \
        while(0)

//*****************************************************************************
//
//! Disables filling of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function disables the filling of a check box widget.  The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxFillOff(pWidget)             \
        do                                   \
        {                                    \
            tCheckBoxWidget *pW = pWidget;   \
            pW->usStyle &= ~(CB_STYLE_FILL); \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Enables filling of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function enables the filling of a check box widget.  The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxFillOn(pWidget)            \
        do                                 \
        {                                  \
            tCheckBoxWidget *pW = pWidget; \
            pW->usStyle |= CB_STYLE_FILL;  \
        }                                  \
        while(0)

//*****************************************************************************
//
//! Sets the font for a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//! \param pFnt is a pointer to the font to use to draw text on the check box.
//!
//! This function changes the font used to draw text on the check box.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxFontSet(pWidget, pFnt)     \
        do                                 \
        {                                  \
            tCheckBoxWidget *pW = pWidget; \
            const tFont *pF = pFnt;        \
            pW->pFont = pF;                \
        }                                  \
        while(0)

//*****************************************************************************
//
//! Changes the image drawn on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to be modified.
//! \param pImg is a pointer to the image to draw onto the check box.
//!
//! This function changes the image that is drawn onto the check box.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxImageSet(pWidget, pImg)     \
        do                                  \
        {                                   \
            tCheckBoxWidget *pW = pWidget;  \
            const unsigned char *pI = pImg; \
            pW->pucImage = pI;              \
        }                                   \
        while(0)

//*****************************************************************************
//
//! Disables the image on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function disables the drawing of an image on a check box widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxImageOff(pWidget)           \
        do                                  \
        {                                   \
            tCheckBoxWidget *pW = pWidget;  \
            pW->usStyle &= ~(CB_STYLE_IMG); \
        }                                   \
        while(0)

//*****************************************************************************
//
//! Enables the image on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function enables the drawing of an image on a check box widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxImageOn(pWidget)           \
        do                                 \
        {                                  \
            tCheckBoxWidget *pW = pWidget; \
            pW->usStyle |= CB_STYLE_IMG;   \
        }                                  \
        while(0)

//*****************************************************************************
//
//! Sets the outline color of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to outline the check box.
//!
//! This function changes the color used to outline the check box on the
//! display.  The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxOutlineColorSet(pWidget, ulColor) \
        do                                        \
        {                                         \
            tCheckBoxWidget *pW = pWidget;        \
            pW->ulOutlineColor = ulColor;         \
        }                                         \
        while(0)

//*****************************************************************************
//
//! Disables outlining of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function disables the outlining of a check box widget.  The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxOutlineOff(pWidget)             \
        do                                      \
        {                                       \
            tCheckBoxWidget *pW = pWidget;      \
            pW->usStyle &= ~(CB_STYLE_OUTLINE); \
        }                                       \
        while(0)

//*****************************************************************************
//
//! Enables outlining of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function enables the outlining of a check box widget.  The display is
//! not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxOutlineOn(pWidget)           \
        do                                   \
        {                                    \
            tCheckBoxWidget *pW = pWidget;   \
            pW->usStyle |= CB_STYLE_OUTLINE; \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Sets the text color of a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to draw text on the check
//! box.
//!
//! This function changes the color used to draw text on the check box on the
//! display.  The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxTextColorSet(pWidget, ulColor) \
        do                                     \
        {                                      \
            tCheckBoxWidget *pW = pWidget;     \
            pW->ulTextColor = ulColor;         \
        }                                      \
        while(0)

//*****************************************************************************
//
//! Disables the text on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function disables the drawing of text on a check box widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxTextOff(pWidget)             \
        do                                   \
        {                                    \
            tCheckBoxWidget *pW = pWidget;   \
            pW->usStyle &= ~(CB_STYLE_TEXT); \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Enables the text on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function enables the drawing of text on a check box widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxTextOn(pWidget)            \
        do                                 \
        {                                  \
            tCheckBoxWidget *pW = pWidget; \
            pW->usStyle |= CB_STYLE_TEXT;  \
        }                                  \
        while(0)

//*****************************************************************************
//
//! Disables opaque text on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function disables the use of opaque text on this check box.  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 check box image)
//! to show through the text.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxTextOpaqueOff(pWidget)              \
        do                                          \
        {                                           \
            tCheckBoxWidget *pW = pWidget;          \
            pW->usStyle &= ~(CB_STYLE_TEXT_OPAQUE); \
        }                                           \
        while(0)

//*****************************************************************************
//
//! Enables opaque text on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to modify.
//!
//! This function enables the use of opaque text on this check box.  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 CheckBoxTextOpaqueOn(pWidget)            \
        do                                       \
        {                                        \
            tCheckBoxWidget *pW = pWidget;       \
            pW->usStyle |= CB_STYLE_TEXT_OPAQUE; \
        }                                        \
        while(0)

//*****************************************************************************
//
//! Changes the text drawn on a check box widget.
//!
//! \param pWidget is a pointer to the check box widget to be modified.
//! \param pcTxt is a pointer to the text to draw onto the check box.
//!
//! This function changes the text that is drawn onto the check box.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define CheckBoxTextSet(pWidget, pcTxt)    \
        do                                 \
        {                                  \
            tCheckBoxWidget *pW = pWidget; \
            const char *pcT = pcTxt;       \
            pW->pcText = pcT;              \
        }                                  \
        while(0)

//*****************************************************************************
//
// Prototypes for the check box widget APIs.
//
//*****************************************************************************
extern long CheckBoxMsgProc(tWidget *pWidget, unsigned long ulMsg,
                            unsigned long ulParam1, unsigned long ulParam2);
extern void CheckBoxInit(tCheckBoxWidget *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 // __CHECKBOX_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -