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

📄 pushbutton.h

📁 基于TI公司Cortex-M3的uart超级通信开发
💻 H
📖 第 1 页 / 共 4 页
字号:

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

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

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

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

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

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

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

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

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

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

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

//*****************************************************************************
//
// Prototypes for the push button widget APIs.
//
//*****************************************************************************
extern long RectangularButtonMsgProc(tWidget *pWidget, unsigned long ulMsg,
                                     unsigned long ulParam1,
                                     unsigned long ulParam2);
extern void RectangularButtonInit(tPushButtonWidget *pWidget,
                                  const tDisplay *pDisplay, long lX, long lY,
                                  long lWidth, long lHeight);
extern long CircularButtonMsgProc(tWidget *pWidget, unsigned long ulMsg,
                                  unsigned long ulParam1,
                                  unsigned long ulParam2);
extern void CircularButtonInit(tPushButtonWidget *pWidget,
                               const tDisplay *pDisplay, long lX, long lY,
                               long lR);

//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

#endif // __PUSHBUTTON_H__

⌨️ 快捷键说明

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