コード例 #1
0
ファイル: grlib_demo.c プロジェクト: ev3osek/ev3osek
       CANVAS_STYLE_OUTLINE | CANVAS_STYLE_IMG, 0, ClrGray, 0, 0, 0, g_TILogo,
       0);
Canvas(g_sCanvas1, g_psPanels + 2, &g_sCanvas2, 0,
       &g_sSHARP480x272x16Display, 5+X_OFFSET, 27+Y_OFFSET, 195, 76,
       CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT,
       ClrMidnightBlue, ClrGray, ClrSilver, &g_sFontCm22, "Text", 0, 0);

//*****************************************************************************
//
// The fourth panel, which demonstrates the checkbox widget.
//
//*****************************************************************************
tCanvasWidget g_psCheckBoxIndicators[] =
{
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 1, 0,
                 &g_sSHARP480x272x16Display, 230+X_OFFSET, 30+Y_OFFSET, 50, 42,
                 CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_ledOFF, 0),
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 2, 0,
                 &g_sSHARP480x272x16Display, 230+X_OFFSET, 82+Y_OFFSET, 50, 48,
                 CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_ledOFF, 0),
    CanvasStruct(g_psPanels + 3, 0, 0,
                 &g_sSHARP480x272x16Display, 230+X_OFFSET, 134+Y_OFFSET, 50, 42,
                 CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_ledOFF, 0)
};
tCheckBoxWidget g_psCheckBoxes[] =
{
    CheckBoxStruct(g_psPanels + 3, g_psCheckBoxes + 1, 0,
                   &g_sSHARP480x272x16Display, 40+X_OFFSET, 30+Y_OFFSET, 185, 42,
                   CB_STYLE_OUTLINE | CB_STYLE_FILL | CB_STYLE_TEXT, 16,
                   ClrMidnightBlue, ClrGray, ClrSilver, &g_sFontCm22, "Select",
                   0, OnCheckChange),
コード例 #2
0
// The canvas widgets used to show raw accelerometer values for each axis.
//
//*****************************************************************************
char g_pcAccStrings[2][MAX_DATA_STRING_LEN];
tCanvasWidget g_psAccFields[2] =
{
    //
    // The X and Y indicators here may appear to be reversed compared to the
    // commenting in the source code for the eZ430.  This ensures that the
    // accelerometer readings for left-right movement of the watch appears
    // as X readings and those for forwards-backwards movement appear as Y
    // readings (which appears intuitive to me at least).
    //
    CanvasStruct(&g_sIndicators, g_psAccFields + 1, 0,
                 &g_sKitronix320x240x16_SSD2119, 53, 77, 30, 20,
                 (CANVAS_STYLE_FILL | CANVAS_STYLE_TEXT |
                 CANVAS_STYLE_TEXT_RIGHT), ClrBlack, 0, ClrWhite,
                 g_pFontCmss14, g_pcAccStrings[1], 0, 0),
    CanvasStruct(&g_sIndicators, &g_sDrawingCanvas, 0,
                 &g_sKitronix320x240x16_SSD2119, 53, 92, 30, 20,
                 (CANVAS_STYLE_FILL | CANVAS_STYLE_TEXT |
                 CANVAS_STYLE_TEXT_RIGHT), ClrBlack, 0, ClrWhite,
                 g_pFontCmss14, g_pcAccStrings[0], 0, 0),
};

Canvas(g_sDrawingCanvas, &g_sIndicators, 0, 0,
       &g_sKitronix320x240x16_SSD2119, 108, 70, 204, 140,
       CANVAS_STYLE_APP_DRAWN, ClrBlack, ClrWhite, 0, 0, 0, 0,
       OnPaintAccelCanvas);

ImageButton(g_sCalibrateBtn, &g_psAccelPanel, &g_sClearBtn, 0,
コード例 #3
0
{
    ContainerStruct(g_psPanels + 1, 0, g_psRadioButtons1,
                    &g_sKentec320x240x16_SSD2119, 8, 30, 300, 140,
                    CTR_STYLE_OUTLINE | CTR_STYLE_TEXT, 0, ClrGray, ClrSilver,
                    FONT_20PT, g_pcLanguage),
};

//*****************************************************************************
//
// An array of canvas widgets, one per panel.  Each canvas is filled with
// black, overwriting the contents of the previous panel.
//
//*****************************************************************************
tCanvasWidget g_psPanels[] =
{
    CanvasStruct(0, 0, &g_sIntroduction, &g_sKentec320x240x16_SSD2119, 8, 22,
                 300, 158, CANVAS_STYLE_FILL, ClrBlack, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, g_psRadioContainers, &g_sKentec320x240x16_SSD2119, 8,
                 22, 300, 158, CANVAS_STYLE_FILL, ClrBlack, 0, 0, 0, 0, 0, 0),
};

//*****************************************************************************
//
// The number of panels.
//
//*****************************************************************************
#define NUM_PANELS              (sizeof(g_psPanels) / sizeof(g_psPanels[0]))

//*****************************************************************************
//
// The buttons and text across the bottom of the screen.
//
コード例 #4
0
ファイル: grlib_demo.c プロジェクト: peterliu2/tivaWare
       &g_sKentec320x240x16_SSD2119, 5, 109, 195, 76,
       CANVAS_STYLE_OUTLINE | CANVAS_STYLE_IMG, 0, ClrGray, 0, 0, 0, g_pui8Logo,
       0);
Canvas(g_sCanvas1, g_psPanels + 2, &g_sCanvas2, 0,
       &g_sKentec320x240x16_SSD2119, 5, 27, 195, 76,
       CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT,
       ClrMidnightBlue, ClrGray, ClrSilver, &g_sFontCm22, "Text", 0, 0);

//*****************************************************************************
//
// The fourth panel, which demonstrates the checkbox widget.
//
//*****************************************************************************
tCanvasWidget g_psCheckBoxIndicators[] = {
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 1, 0,
    &g_sKentec320x240x16_SSD2119, 230, 30, 50, 42,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pui8LightOff, 0),
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 2, 0,
    &g_sKentec320x240x16_SSD2119, 230, 82, 50, 48,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pui8LightOff, 0),
    CanvasStruct(g_psPanels + 3, 0, 0,
    &g_sKentec320x240x16_SSD2119, 230, 134, 50, 42,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pui8LightOff, 0)
};
tCheckBoxWidget g_psCheckBoxes[] = {
    CheckBoxStruct(g_psPanels + 3, g_psCheckBoxes + 1, 0,
    &g_sKentec320x240x16_SSD2119, 40, 30, 185, 42,
    CB_STYLE_OUTLINE | CB_STYLE_FILL | CB_STYLE_TEXT, 16,
    ClrMidnightBlue, ClrGray, ClrSilver, &g_sFontCm22, "Select",
    0, OnCheckChange),
    CheckBoxStruct(g_psPanels + 3, g_psCheckBoxes + 2, 0,
コード例 #5
0
#include "dev_list.h"
#include "menu.h"
#include "rit128x96x4.h"

//*****************************************************************************
//
// The widgets that make up the "Device List" panel.
//
//*****************************************************************************
static tCanvasWidget g_psDevListWidgets[] =
{
    //
    // The first row of device numbers.
    //
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 1, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
                 g_pFontFixed6x8, "1", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 19, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
                 g_pFontFixed6x8, "2", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 37, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
                 g_pFontFixed6x8, "3", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 55, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
                 g_pFontFixed6x8, "4", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 73, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
                 g_pFontFixed6x8, "5", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 91, 20, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrNotPresent,
コード例 #6
0
ファイル: position.c プロジェクト: VENGEL/StellarisWare
//*****************************************************************************
static char *g_ppcPosReference[] =
{
    "encoder",
    "potentiometer"
};

//*****************************************************************************
//
// The widgets that make up the "Position Control Mode" panel.
//
//*****************************************************************************
static tCanvasWidget g_psPositionWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 "Position Control Mode", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 24, 12, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcIDBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 60, 20, 54, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcPositionBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 28, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcPositionPBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 36, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcPositionIBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 44, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
コード例 #7
0
       OnFirmwarePaint);
RectangularButton(g_sFirmwareUpdateBtn, g_psPanels + 2, &g_sFirmwareUpdate,
                  0, &g_sKitronix320x240x16_SSD2119, 90, 140, 140, 40,
                  (PB_STYLE_OUTLINE | PB_STYLE_TEXT_OPAQUE | PB_STYLE_TEXT |
                   PB_STYLE_FILL), ClrNavy, ClrBlue, ClrSilver, ClrSilver,
                   FONT_20PT, 0, 0, 0, 0, 0, OnFirmwareUpdate);

//*****************************************************************************
//
// An array of canvas widgets, one per panel.  Each canvas is filled with
// black, overwriting the contents of the previous panel.
//
//*****************************************************************************
tCanvasWidget g_psPanels[] =
{
    CanvasStruct(0, 0, &g_sIntroduction, &g_sKitronix320x240x16_SSD2119, 0, 26,
                 320, 166, CANVAS_STYLE_FILL, ClrBlack, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, g_psRadioContainers, &g_sKitronix320x240x16_SSD2119, 0,
                 26, 320, 166, CANVAS_STYLE_FILL, ClrBlack, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, &g_sFirmwareUpdateBtn, &g_sKitronix320x240x16_SSD2119, 0,
                 26, 320, 166, CANVAS_STYLE_FILL, ClrBlack, 0, 0, 0, 0, 0, 0)
};

//*****************************************************************************
//
// The number of panels.
//
//*****************************************************************************
#define NUM_PANELS              (sizeof(g_psPanels) / sizeof(g_psPanels[0]))

//*****************************************************************************
//
コード例 #8
0
// The canvas widgets used to show raw accelerometer values for each axis.
//
//*****************************************************************************
char g_pcAccStrings[3][MAX_DATA_STRING_LEN];
tCanvasWidget g_psAccFields[3] =
{
    //
    // The X and Y indicators here may appear to be reversed compared to the
    // commenting in the source code for the eZ430.  This ensures that the
    // accelerometer readings for left-right movement of the watch appears
    // as X readings and those for forwards-backwards movement appear as Y
    // readings (which appears intuitive to me at least).
    //
    CanvasStruct(&g_sIndicators, g_psAccFields + 1, 0,
                 &g_sKitronix320x240x16_SSD2119, 45, 59, 30, 20,
                 (CANVAS_STYLE_FILL | CANVAS_STYLE_TEXT |
                 CANVAS_STYLE_TEXT_RIGHT), ClrBlack, 0, ClrWhite,
                 g_pFontCmss14, g_pcAccStrings[1], 0, 0),
    CanvasStruct(&g_sIndicators, g_psAccFields + 2, 0,
                 &g_sKitronix320x240x16_SSD2119, 45, 80, 30, 20,
                 (CANVAS_STYLE_FILL | CANVAS_STYLE_TEXT |
                 CANVAS_STYLE_TEXT_RIGHT), ClrBlack, 0, ClrWhite,
                 g_pFontCmss14, g_pcAccStrings[0], 0, 0),
    CanvasStruct(&g_sIndicators, &g_sDrawingCanvas, 0,
                 &g_sKitronix320x240x16_SSD2119, 45, 101, 30, 20,
                 (CANVAS_STYLE_FILL | CANVAS_STYLE_TEXT |
                 CANVAS_STYLE_TEXT_RIGHT), ClrBlack, 0, ClrWhite,
                 g_pFontCmss14, g_pcAccStrings[2], 0, 0),
};

Canvas(g_sDrawingCanvas, &g_sIndicators, 0, 0,
コード例 #9
0
// the firmware version, along with an update status message.
//
//*****************************************************************************
static char g_pcIDBuffer[4];
static char g_pcVersionBuffer[16];
static char g_pcMessageBuffer[24];

//*****************************************************************************
//
// The widgets that make up the "Firmware Update" panel.
//
//*****************************************************************************
static tCanvasWidget g_psUpdateWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 "Firmware Update", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 24, 24, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcIDBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 48, 36, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 "Start", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 12, 128, 1,
                 CANVAS_STYLE_FILL, ClrWhite, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 24, 18, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, "ID:", 0,
                 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 36, 48, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8,
                 "Version:", 0, 0),
コード例 #10
0
//
//*****************************************************************************
static char g_pcIDBuffer[4];
static char g_pcVoltageBuffer[12];
static char g_pcRampBuffer[12];
static char g_pcCompBuffer[12];

//*****************************************************************************
//
// The widgets that make up the "VComp Control Mode" panel.
//
//*****************************************************************************
static tCanvasWidget g_psVCompWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 "VComp Control Mode", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 24, 16, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcIDBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 54, 27, 48, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcVoltageBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 36, 38, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcRampBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 36, 49, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcCompBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 16, 18, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, "ID:", 0,
コード例 #11
0
ファイル: status.c プロジェクト: VENGEL/StellarisWare
static char g_pcCurrent[8];
static char g_pcTemp[8];
static char g_pcSpeed[8];
static char g_pcPosition[8];

//*****************************************************************************
//
// The widgets that make up the status display.
//
//*****************************************************************************
static tCanvasWidget g_psStatusWidgets[] =
{
    //
    // The separator line.
    //
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 61, 128, 1,
                 CANVAS_STYLE_FILL, ClrWhite, 0, 0, 0, 0, 0, 0),

    //
    // The first row of status, containing the bus and output voltages.
    //
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 64, 30, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, "Vbus:",
                 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 30, 64, 30, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, g_pcVBus,
                 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 68, 64, 30, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, "Vout:",
                 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 98, 64, 30, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8, g_pcVOut,
コード例 #12
0
#include "grlib/canvas.h"
#include "about.h"
#include "bdc-ui.h"
#include "menu.h"
#include "rit128x96x4.h"
#include "splash.h"

//*****************************************************************************
//
// The widgets that make up the "About" panel.
//
//*****************************************************************************
static tCanvasWidget g_psAboutWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL, ClrSelected, 0,
                 ClrWhite, g_pFontFixed6x8, "About", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 12, 128, 1,
                 CANVAS_STYLE_FILL, ClrWhite, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 20, 128, 56,
                 CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pucSplashImage, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 80, 128, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8,
                 "Brushed DC Motor", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 88, 128, 8,
                 CANVAS_STYLE_TEXT, 0, 0, ClrWhite, g_pFontFixed6x8,
                 "Reference Design Kit", 0, 0)
};

//*****************************************************************************
//
コード例 #13
0
//*****************************************************************************
static char g_pcIDBuffer[4];
static char g_pcCurrentBuffer[12];
static char g_pcCurrentPBuffer[12];
static char g_pcCurrentIBuffer[12];
static char g_pcCurrentDBuffer[12];

//*****************************************************************************
//
// The widgets that make up the "Current Control Mode" panel.
//
//*****************************************************************************
static tCanvasWidget g_psCurrentWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 "Current Control Mode", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 24, 16, 18, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcIDBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 54, 24, 54, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcCurrentBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 32, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcCurrentPBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 40, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
                 g_pcCurrentIBuffer, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 18, 48, 66, 8,
                 CANVAS_STYLE_TEXT, ClrSelected, 0, ClrWhite, g_pFontFixed6x8,
コード例 #14
0
       CANVAS_STYLE_OUTLINE | CANVAS_STYLE_IMG, 0, ClrGray, 0, 0, 0, g_pucLogo,
       0);
Canvas(g_sCanvas1, g_psPanels + 2, &g_sCanvas2, 0,
       &g_sFormike240x320x16_ILI9320, 5, 27, 230, 76,
       CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT,
       ClrMidnightBlue, ClrGray, ClrSilver, g_pFontCm22, "Text", 0, 0);

//*****************************************************************************
//
// The fourth panel, which demonstrates the checkbox widget.
//
//*****************************************************************************
tCanvasWidget g_psCheckBoxIndicators[] =
{
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 1, 0,
    &g_sFormike240x320x16_ILI9320, 190, 30, 50, 50,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pucLightOff, 0),
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 2, 0,
    &g_sFormike240x320x16_ILI9320, 190, 90, 50, 50,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pucLightOff, 0),
    CanvasStruct(g_psPanels + 3, g_psCheckBoxIndicators + 3, 0,
    &g_sFormike240x320x16_ILI9320, 190, 150, 50, 50,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pucLightOff, 0),
    CanvasStruct(g_psPanels + 3, 0, 0,
    &g_sFormike240x320x16_ILI9320, 190, 210, 50, 50,
    CANVAS_STYLE_IMG, 0, 0, 0, 0, 0, g_pucLightOff, 0)
};
tCheckBoxWidget g_psCheckBoxes[] =
{
    CheckBoxStruct(g_psPanels + 3, g_psCheckBoxes + 1, 0,
    &g_sFormike240x320x16_ILI9320, 0, 30, 185, 50,
コード例 #15
0
ファイル: help.c プロジェクト: VENGEL/StellarisWare
            //
            GrStringDraw(pContext, g_ppcHelpText[g_ulDelta + ulIdx], -1, 0,
                         (ulIdx * 8) + 16, 0);
        }
    }
}

//*****************************************************************************
//
// The widgets that make up the "Help" panel.
//
//*****************************************************************************
static tCanvasWidget g_psHelpWidgets[] =
{
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 0, 128, 8,
                 CANVAS_STYLE_TEXT | CANVAS_STYLE_FILL, ClrSelected, 0,
                 ClrWhite, g_pFontFixed6x8, "Help", 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 12, 128, 1,
                 CANVAS_STYLE_FILL, ClrWhite, 0, 0, 0, 0, 0, 0),
    CanvasStruct(0, 0, 0, &g_sRIT128x96x4Display, 0, 16, 128, 80,
                 CANVAS_STYLE_FILL | CANVAS_STYLE_APP_DRAWN, ClrBlack, 0, 0, 0,
                 0, 0, OnPaint)
};

//*****************************************************************************
//
// The number of widgets in the "Help" panel.
//
//*****************************************************************************
#define NUM_WIDGETS             (sizeof(g_psHelpWidgets) /                    \
                                 sizeof(g_psHelpWidgets[0]))