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

📄 listbox.h

📁 基于嵌入式实时多任务操作系统ucos-ii的GUI的源码
💻 H
字号:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, 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        : LISTBOX.h
Purpose     : LISTBOX widget include
--------------------END-OF-HEADER-------------------------------------
*/

#ifndef LISTBOX_H
#define LISTBOX_H

#include "WM.h"
#include "DIALOG_Intern.h"      /* Req. for Create indirect data structure */

#if GUI_WINSUPPORT


/************************************************************
*
*       States
*/

typedef WM_HMEM LISTBOX_Handle;

/************************************************************
*
*       Create / Status flags
*/
#define LISTBOX_CF_AUTOSCROLLBAR_H   (1<<0)
#define LISTBOX_SF_AUTOSCROLLBAR_H   (1<<0)
#define LISTBOX_CF_AUTOSCROLLBAR_V   (1<<1)
#define LISTBOX_SF_AUTOSCROLLBAR_V   (1<<1)


/*********************************************************************
*
*       Standard member functions
*
**********************************************************************
*/

#define LISTBOX_EnableMemdev(hObj)  WM_EnableMemdev(hObj)
#define LISTBOX_DisableMemdev(hObj) WM_DisableMemdev(hObj)
#define LISTBOX_Delete(hObj)        WM_DeleteWindow(hObj)
#define LISTBOX_Paint(hObj)         WM_Paint(hObj)
#define LISTBOX_Invalidate(hObj)    WM_InvalidateWindow(hObj)

/*********************************************************************
*
*       Create functions
*
**********************************************************************
*/

LISTBOX_Handle LISTBOX_Create        (const GUI_ConstString* ppText, int x0, int y0, int xsize, int ysize, int Flags);
LISTBOX_Handle LISTBOX_CreateAsChild (const GUI_ConstString* ppText, WM_HWIN hWinParent, int x0, int y0, int xsize, int ysize, int Flags);
LISTBOX_Handle LISTBOX_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK* cb);

/*********************************************************************
*
*       Member functions
*
**********************************************************************
*/

void         LISTBOX_AddKey         (LISTBOX_Handle hObj, int Key);
void         LISTBOX_AddString      (LISTBOX_Handle hObj, const char* s);
void         LISTBOX_DecSel         (LISTBOX_Handle hObj);
void         LISTBOX_DeleteString   (LISTBOX_Handle hObj, int Index);
int          LISTBOX_GetNumItems    (LISTBOX_Handle hObj);
int          LISTBOX_GetSel         (LISTBOX_Handle hObj);
void         LISTBOX_IncSel         (LISTBOX_Handle hObj);
void         LISTBOX_InsertString   (LISTBOX_Handle hObj, const char* s, int Index);
void         LISTBOX_SetAutoScrollH (LISTBOX_Handle hObj, int OnOff);
void         LISTBOX_SetAutoScrollV (LISTBOX_Handle hObj, int OnOff);
void         LISTBOX_SetBkColor     (LISTBOX_Handle hObj, int index, GUI_COLOR color);
void         LISTBOX_SetFont        (LISTBOX_Handle hObj, const GUI_FONT* pFont);
void         LISTBOX_SetOwner       (LISTBOX_Handle hObj, WM_HWIN hOwner);
void         LISTBOX_SetSel         (LISTBOX_Handle hObj, int Sel);
void         LISTBOX_SetString      (LISTBOX_Handle hObj, const char* s, int Index);
void         LISTBOX_SetText        (LISTBOX_Handle hObj, const GUI_ConstString* ppText);
GUI_COLOR    LISTBOX_SetTextColor   (LISTBOX_Handle hObj, unsigned int Index, GUI_COLOR Color);

/*********************************************************************
*
*       Global functions
*
**********************************************************************
*/

const GUI_FONT* LISTBOX_GetDefaultFont(void);
void            LISTBOX_SetDefaultFont(const GUI_FONT* pFont);

/*********************************************************************
*
*       Compatibility to older versions
*
**********************************************************************
*/

#define LISTBOX_SetBackColor(hObj, Index, Color) LISTBOX_SetBkColor(hObj, Index, Color)

#endif   /* GUI_WINSUPPORT */
#endif   /* LISTBOX_H */

⌨️ 快捷键说明

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