亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? radiobutton.c

?? STM32+Grlib
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
//*****************************************************************************
//
// radiobutton.c - Radio button widget.
//
// Copyright (c) 2008-2010 Texas Instruments Incorporated.  All rights reserved.
// Software License Agreement
// 
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
// 
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 5821 of the Stellaris Graphics Library.
//
//*****************************************************************************

#include "driverlib/debug.h"
#include "grlib/grlib.h"
#include "grlib/widget.h"
#include "grlib/radiobutton.h"

//*****************************************************************************
//
//! \addtogroup radiobutton_api
//! @{
//
//*****************************************************************************

//*****************************************************************************
//
//! Draws a radio button widget.
//!
//! \param pWidget is a pointer to the radio button widget to be drawn.
//! \param bClick is a boolean that is \b true if the paint request is a result
//! of a pointer click and \b false if not.
//!
//! This function draws a radio button widget on the display.  This is called
//! in response to a \b #WIDGET_MSG_PAINT message.
//!
//! \return None.
//
//*****************************************************************************
static void
RadioButtonPaint(tWidget *pWidget, unsigned long bClick)
{
    tRadioButtonWidget *pRadio;
    tContext sCtx;
    long lX, lY;

    //
    // Check the arguments.
    //
    ASSERT(pWidget);

    //
    // Convert the generic widget pointer into a radio button widget pointer.
    //
    pRadio = (tRadioButtonWidget *)pWidget;

    //
    // Initialize a drawing context.
    //
    GrContextInit(&sCtx, pWidget->pDisplay);

    //
    // Initialize the clipping region based on the extents of this radio
    // button.
    //
    GrContextClipRegionSet(&sCtx, &(pWidget->sPosition));

    //
    // See if the radio button fill style is selected.
    //
    if((pRadio->usStyle & RB_STYLE_FILL) && !bClick)
    {
        //
        // Fill the radio button with the fill color.
        //
        GrContextForegroundSet(&sCtx, pRadio->ulFillColor);
        GrRectFill(&sCtx, &(pWidget->sPosition));
    }

    //
    // See if the radio button outline style is selected.
    //
    if((pRadio->usStyle & RB_STYLE_OUTLINE) && !bClick)
    {
        //
        // Outline the radio button with the outline color.
        //
        GrContextForegroundSet(&sCtx, pRadio->ulOutlineColor);
        GrRectDraw(&sCtx, &(pWidget->sPosition));
    }

    //
    // Draw the radio button.
    //
    lX = pWidget->sPosition.sXMin + (pRadio->usCircleSize / 2) + 2;
    lY = (pWidget->sPosition.sYMin +
          ((pWidget->sPosition.sYMax - pWidget->sPosition.sYMin) / 2));
    if(!bClick)
    {
        GrContextForegroundSet(&sCtx, pRadio->ulOutlineColor);
        GrCircleDraw(&sCtx, lX, lY, pRadio->usCircleSize / 2);
    }

    //
    // Select the foreground color based on whether or not the radio button is
    // selected.
    //
    if(pRadio->usStyle & RB_STYLE_SELECTED)
    {
        GrContextForegroundSet(&sCtx, pRadio->ulOutlineColor);
    }
    else
    {
        GrContextForegroundSet(&sCtx, pRadio->ulFillColor);
    }

    //
    // Fill in the radio button.
    //
    GrCircleFill(&sCtx, lX, lY, (pRadio->usCircleSize / 2) - 2);

    //
    // See if the radio button text or image style is selected.
    //
    if((pRadio->usStyle & (RB_STYLE_TEXT | RB_STYLE_IMG)) && !bClick)
    {
        //
        // Shrink the clipping region by the size of the radio button so that
        // it is not overwritten by further "decorative" portions of the
        // widget.
        //
        sCtx.sClipRegion.sXMin += pRadio->usCircleSize + 4;

        //
        // If the radio button outline style is selected then shrink the
        // clipping region by one pixel on each side so that the outline is not
        // overwritten by the text or image.
        //
        if(pRadio->usStyle & RB_STYLE_OUTLINE)
        {
            sCtx.sClipRegion.sYMin++;
            sCtx.sClipRegion.sXMax--;
            sCtx.sClipRegion.sYMax--;
        }

        //
        // See if the radio button image style is selected.
        //
        if(pRadio->usStyle & RB_STYLE_IMG)
        {
            //
            // Determine where along the Y extent of the widget to draw the
            // image.  It is drawn at the top if it takes all (or more than
            // all) of the Y extent of the widget, and it is drawn centered if
            // it takes less than the Y extent.
            //
            if(GrImageHeightGet(pRadio->pucImage) >
               (sCtx.sClipRegion.sYMax - sCtx.sClipRegion.sYMin))
            {
                lY = sCtx.sClipRegion.sYMin;
            }
            else
            {
                lY = (sCtx.sClipRegion.sYMin +
                      ((sCtx.sClipRegion.sYMax - sCtx.sClipRegion.sYMin -
                        GrImageHeightGet(pRadio->pucImage) + 1) / 2));
            }

            //
            // Set the foreground and background colors to use for 1 BPP
            // images.
            //
            GrContextForegroundSet(&sCtx, pRadio->ulTextColor);
            GrContextBackgroundSet(&sCtx, pRadio->ulFillColor);

            //
            // Draw the image next to the radio button.
            //
            GrImageDraw(&sCtx, pRadio->pucImage, sCtx.sClipRegion.sXMin, lY);
        }

        //
        // See if the radio button text style is selected.
        //
        if(pRadio->usStyle & RB_STYLE_TEXT)
        {
            //
            // Determine where along the Y extent of the widget to draw the
            // string.  It is drawn at the top if it takes all (or more than
            // all) of the Y extent of the widget, and it is drawn centered if
            // it takes less than the Y extent.
            //
            if(GrFontHeightGet(pRadio->pFont) >
               (sCtx.sClipRegion.sYMax - sCtx.sClipRegion.sYMin))
            {
                lY = sCtx.sClipRegion.sYMin;
            }
            else
            {
                lY = (sCtx.sClipRegion.sYMin +
                      ((sCtx.sClipRegion.sYMax - sCtx.sClipRegion.sYMin -
                        GrFontHeightGet(pRadio->pFont) + 1) / 2));
            }

            //
            // Draw the text next to the radio button.
            //
            GrContextFontSet(&sCtx, pRadio->pFont);
            GrContextForegroundSet(&sCtx, pRadio->ulTextColor);
            GrContextBackgroundSet(&sCtx, pRadio->ulFillColor);
            GrStringDraw(&sCtx, pRadio->pcText, -1, sCtx.sClipRegion.sXMin, lY,
                         pRadio->usStyle & RB_STYLE_TEXT_OPAQUE);
        }
    }
}

//*****************************************************************************
//
//! Handles pointer events for a radio button.
//!
//! \param pWidget is a pointer to the radio button widget.
//! \param ulMsg is the pointer event message.
//! \param lX is the X coordinate of the pointer event.
//! \param lY is the Y coordiante of the pointer event.
//!
//! This function processes pointer event messages for a radio button.  This is
//! called in response to a \b #WIDGET_MSG_PTR_DOWN, \b #WIDGET_MSG_PTR_MOVE,
//! and \b #WIDGET_MSG_PTR_UP messages.
//!
//! If the \b #WIDGET_MSG_PTR_UP message is received with a position within the
//! extents of the radio button, the radio button's selected state will be
//! unchanged if it is already selected.  If it is not selected, it will be
//! selected, its OnChange function will be called, and the peer radio button
//! widget that is selected will be unselected, causing its OnChange to be
//! called as well.
//!
//! \return Returns 1 if the coordinates are within the extents of the radio
//! button and 0 otherwise.
//
//*****************************************************************************
static long
RadioButtonClick(tWidget *pWidget, unsigned long ulMsg, long lX, long lY)
{
    tRadioButtonWidget *pRadio, *pRadio2;
    tWidget *pSibling;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产乱码久久蜜臀| 久久免费美女视频| 国产精品伊人色| 一区二区三区不卡在线观看| 精品少妇一区二区三区视频免付费| 成人丝袜视频网| 久久综合综合久久综合| 亚洲蜜臀av乱码久久精品| 欧美精品一区二区三区蜜臀| 欧美午夜理伦三级在线观看| 粉嫩aⅴ一区二区三区四区| 日本午夜精品一区二区三区电影| 国产精品国产三级国产普通话三级| 日韩欧美一区在线| 欧美这里有精品| 99久久精品费精品国产一区二区| 国产在线精品视频| 日本免费在线视频不卡一不卡二| 亚洲一区自拍偷拍| 亚洲少妇30p| 国产精品国产三级国产三级人妇| 国产三级欧美三级日产三级99| 5858s免费视频成人| 欧美日韩专区在线| 91原创在线视频| 99国产精品国产精品毛片| 国产99久久久国产精品潘金| 九一九一国产精品| 理论电影国产精品| 男女男精品视频网| 美女一区二区久久| 日本亚洲电影天堂| 青青草97国产精品免费观看无弹窗版| 亚洲第一二三四区| 视频一区二区三区在线| 日韩专区一卡二卡| 三级成人在线视频| 青青草精品视频| 精品在线一区二区| 国产乱妇无码大片在线观看| 国产乱人伦偷精品视频不卡| 国产伦精品一区二区三区免费 | 久久 天天综合| 久久99精品一区二区三区| 精品一区二区在线视频| 精品写真视频在线观看 | 色婷婷精品久久二区二区蜜臀av| 成人高清免费观看| 91丨九色丨国产丨porny| 91色porny蝌蚪| 欧美视频在线播放| 欧美一区二区视频在线观看2020 | 91亚洲国产成人精品一区二区三| 91一区二区在线观看| 欧美性极品少妇| 欧美视频在线观看一区| 欧美一区二区私人影院日本| www国产成人| 国产精品久久影院| 一区二区三区国产豹纹内裤在线| 亚洲一区二区偷拍精品| 日本一不卡视频| 国产高清无密码一区二区三区| 成人黄色国产精品网站大全在线免费观看| 处破女av一区二区| 在线观看中文字幕不卡| 91精品国产入口在线| 久久你懂得1024| 最新国产精品久久精品| 视频在线在亚洲| 国产成人综合精品三级| 色婷婷亚洲一区二区三区| 欧美美女视频在线观看| 久久欧美一区二区| 一区二区三区中文字幕电影 | 亚洲综合在线观看视频| 免费人成精品欧美精品| 成人国产精品免费观看视频| 欧美久久一二区| 亚洲一区二区三区免费视频| 久久99精品一区二区三区三区| 蜜桃在线一区二区三区| 国产一区二区三区蝌蚪| 色婷婷综合激情| 欧美精品一区二区三区久久久 | 日韩激情视频在线观看| 成人综合在线网站| 欧美一区二视频| 亚洲人成影院在线观看| 激情偷乱视频一区二区三区| 91丨九色丨黑人外教| 久久综合九色综合欧美就去吻| 亚洲主播在线播放| 国产91对白在线观看九色| 欧美三级一区二区| 国产精品乱人伦| 美女脱光内衣内裤视频久久影院| 99综合电影在线视频| 日韩精品专区在线| 亚洲一区在线电影| 99久久久久久| 久久精品视频在线看| 午夜电影一区二区| 91亚洲午夜精品久久久久久| 久久精品欧美一区二区三区麻豆| 日韩影视精彩在线| 欧美性xxxxx极品少妇| 国产精品少妇自拍| 国产综合色在线视频区| 欧美肥妇毛茸茸| 亚洲国产三级在线| 一本久久综合亚洲鲁鲁五月天| 国产日韩欧美精品电影三级在线| 免费在线观看视频一区| 欧美日韩国产另类不卡| 亚洲久草在线视频| 92国产精品观看| 中文字幕欧美激情一区| 国产一区二区三区免费在线观看| 日韩一区二区三区视频| 爽好多水快深点欧美视频| 欧美视频在线一区二区三区 | 色婷婷精品久久二区二区蜜臂av| 国产日韩欧美在线一区| 国产露脸91国语对白| 久久香蕉国产线看观看99| 奇米888四色在线精品| 欧美肥妇free| 日本成人在线网站| 欧美不卡视频一区| 极品尤物av久久免费看| 欧美成人video| 久久99蜜桃精品| 久久午夜色播影院免费高清| 精品在线亚洲视频| 久久精品一区二区三区四区| 国产馆精品极品| 国产精品久久久久久亚洲毛片 | 91精品欧美久久久久久动漫| 亚洲不卡一区二区三区| 欧美群妇大交群中文字幕| 日韩影院在线观看| 26uuu精品一区二区在线观看| 国产一区二区在线电影| 欧美国产综合一区二区| 99精品热视频| 亚洲高清免费一级二级三级| 欧美一区二区三区喷汁尤物| 精品一区精品二区高清| 中文字幕欧美区| 在线区一区二视频| 日一区二区三区| 久久蜜桃香蕉精品一区二区三区| 丁香六月综合激情| 亚洲人成伊人成综合网小说| 欧美色图激情小说| 看电影不卡的网站| 国产精品每日更新| 欧美美女喷水视频| 国产九九视频一区二区三区| 欧美国产一区二区| 在线精品国精品国产尤物884a| 日韩国产精品大片| 26uuu久久天堂性欧美| 99久久国产综合精品色伊| 亚洲国产视频直播| 久久综合中文字幕| 一本色道久久加勒比精品| 奇米色777欧美一区二区| 国产拍揄自揄精品视频麻豆| 在线欧美日韩精品| 国产最新精品免费| 夜夜嗨av一区二区三区中文字幕| 中国av一区二区三区| 欧美日韩视频在线第一区| 激情综合色综合久久综合| 亚洲免费观看高清在线观看| 4438x成人网最大色成网站| 国产成a人亚洲精品| 五月天激情小说综合| 国产精品无遮挡| 日韩一区二区三区电影| 91香蕉视频在线| 精品一区二区久久| 亚洲一卡二卡三卡四卡五卡| 久久日韩粉嫩一区二区三区 | 色婷婷亚洲精品| 美女性感视频久久| 亚洲精品日韩专区silk| 久久综合久久综合九色| 欧美日韩国产综合一区二区三区| 国产成人一区在线| 日韩高清不卡一区二区三区| 综合欧美亚洲日本| 久久久久久久久一| 91精品国产一区二区| 欧美无乱码久久久免费午夜一区| 从欧美一区二区三区| 久久精品国产澳门| 丝袜a∨在线一区二区三区不卡|