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

📄 radiobutton.h

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

//*****************************************************************************
//
// Prototypes for the radio button widget APIs.
//
//*****************************************************************************
extern long RadioButtonMsgProc(tWidget *pWidget, unsigned long ulMsg,
                               unsigned long ulParam1, unsigned long ulParam2);
extern void RadioButtonInit(tRadioButtonWidget *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 // __RADIOBUTTON_H__

⌨️ 快捷键说明

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