?? dashboard.c
字號(hào):
/*
*********************************************************************************************************
* 礐/GUI
* Universal graphic software for embedded applications
*
* (c) Copyright 2002, Micrium Inc., Weston, FL
* (c) Copyright 2000, SEGGER Microcontroller Systeme GmbH
*
* 礐/GUI is protected by international copyright laws. Knowledge of the
* source code may not be used to write a similar product. This file may
* only be used in accordance with a license and should not be redistributed
* in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File : Dashboard.c
Purpose : dashboard demo
---------------------------END-OF-HEADER------------------------------
*/
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "GUI.h"
#include "LCDConf.h"
#include "MULTIPAGE.h"
#include "FRAMEWIN.h"
#include "DROPDOWN.h"
#if (GUI_ALLOC_SIZE < 4000000)
#error GUI_ALLOC_SIZE should be at least 4 MB
#endif
/*********************************************************************
*
* defines
*
**********************************************************************
*/
#define SHOW_RECTS 0
#define AA_FACTOR 6
#define HIRES 1
#if HIRES
#define FACTOR AA_FACTOR
#define HIRES_ON(); GUI_AA_EnableHiRes();
#define HIRES_OFF(); GUI_AA_DisableHiRes();
#else
#define FACTOR 1
#define HIRES_ON();
#define HIRES_OFF();
#endif
#define FLAG_SHOW_MARK 0
#define FLAG_SHOW_PITCH 1
#define FLAG_SHOW_GRAD 2
#define FLAG_SHOW_ARC 3 /* needs five bits (3 - 7) */
#define FLAG_SHOW_TEXT 8
#define FLAG_SHOW_SCALE 9
#define FLAG_NEEDLE_FRAME 10
#define FLAG_NEEDLE_LINE 11
#define PI 3.1415926536
#define NEEDLE_GRAD 720
#define ARRAY(aItems) aItems, GUI_COUNTOF(aItems)
/*********************************************************************
*
* structures
*
**********************************************************************
*/
typedef struct {
int x;
int y;
int xHere;
int yHere;
int DirX;
int DirY;
int PPM;
int Dif;
int PrevTime;
const GUI_BITMAP* pBitmap;
} NAVIMAP;
typedef struct {
U8 Sep[4];
} COLOR;
typedef struct {
int x;
int y;
int x0;
int y0;
int ArcStart;
int ArcEnd;
int ArcRadius;
int ArcArea1;
int ArcArea2;
int NumMarkLines;
int NumPitchLines;
int LineLen1;
int LineLen2;
int ArcWidth;
int GradDist;
int PenSize1;
int PenSize2;
int PenSize3;
int NeedleType;
int NeedleRadius;
int NumStep;
int NumStart;
int NumExp;
int LinePos1;
int LinePos2;
int ArcPos;
int AxisRadius;
int TextDist;
U16 Flags;
WM_HWIN hWin;
GUI_MEMDEV_Handle hMemDev;
char acText[33];
const GUI_BITMAP* pBitmap;
int BitmapY;
COLOR Color[7];
} SCALE;
typedef struct {
int NeedlePos;
int NeedleUPM;
int NeedleDir;
int NeedlePrevTime;
} NEEDLE;
static void _DrawScale(SCALE* pObj);
/*********************************************************************
*
* static data
*
**********************************************************************
*/
static int _InitDialog;
static WM_HWIN _hDialogColor;
static WM_HWIN _hDialogMark;
static WM_HWIN _hDialogPitch;
static WM_HWIN _hDialogArc;
static WM_HWIN _hDialogGrad;
static WM_HWIN _hDialogScale;
static WM_HWIN _hDialogMisc;
static DROPDOWN_Handle _hDropDownScale;
static DROPDOWN_Handle _hDropDownColor;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -