📄 guidemo_treeview.c
字号:
/*********************************************************************
* SEGGER MICROCONTROLLER SYSTEME GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2008 SEGGER Microcontroller Systeme GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
***** emWin - Graphical user interface for embedded applications *****
emWin 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 re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : GUIDEMO_Treeview.c
Purpose : Treeview demo
----------------------------------------------------------------------
*/
#include <stdlib.h>
#include "GUI.h"
#include "GUIDEMO.h"
#if GUI_WINSUPPORT
#include "DIALOG.h"
#include "TREEVIEW.h"
/*********************************************************************
*
* Types
*
**********************************************************************
*/
enum {
JOB_INC_SEL = 1,
JOB_DEC_SEL,
JOB_OPEN,
JOB_CLOSE,
JOB_SETIMAGE,
JOB_SETROWMODE,
JOB_HIDELINES,
JOB_SHOWLINES
};
/*********************************************************************
*
* ACTION_ITEM
*/
typedef struct {
int Delay;
int Job;
const char * pDescription;
} ACTION_ITEM;
/*********************************************************************
*
* SPRITE
*/
typedef struct {
int xPos; /* X-position of sprite */
int yPos; /* Y-position of sprite */
int dx; /* X-step */
int dy; /* Y-step */
int NumImages; /* Number of images in apImages */
GUI_CONST_STORAGE GUI_BITMAP ** apImages; /* Pointer to images */
GUI_HSPRITE hSprite; /* Handle of sprite */
int Index; /* Index of currently used bitmap */
} SPRITE;
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
/*********************************************************************
*
* _bmSmilie
*/
static const GUI_COLOR _ColorsSmilie[] = {
0xFFFFFF,0x000000,0x70FF70
};
static const GUI_LOGPALETTE _PalSmilie = {
3, /* number of entries */
1, /* Has transparency */
&_ColorsSmilie[0]
};
static const unsigned char _acSmilie[] = {
0x00, 0x55, 0x40, 0x00,
0x01, 0xAA, 0x90, 0x00,
0x06, 0xAA, 0xA4, 0x00,
0x19, 0x6A, 0x59, 0x00,
0x69, 0x6A, 0x5A, 0x40,
0x6A, 0xA6, 0xAA, 0x40,
0x6A, 0xA6, 0xAA, 0x40,
0x6A, 0xA6, 0xAA, 0x40,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -