brew菜单应用学习体会

简介: 对于菜单应用来说,应该是brew入门中相对比较复杂的一部分了,对比之前的按键处理、文字显示、定时器等章节的学习,内容和代码修改量都多了很多。 首先是IMenuCtl,下面是相关的SDK说明: To create and use a menu control 1.

对于菜单应用来说,应该是brew入门中相对比较复杂的一部分了,对比之前的按键处理、文字显示、定时器等章节的学习,内容和代码修改量都多了很多。

首先是IMenuCtl,下面是相关的SDK说明:

To create and use a menu control
1. Call ISHELL_CreateInstance() to create the menu control instance and obtain an interface pointer to it, specifying which of the four types of menu control you choose by its ClassID. //创建实例

2. Call IMENUCTL_SetRect() to define the screen rectangle in which the menu is to be drawn. //设置区域

3. Call IMENUCTL_SetProperties() to set any of the menu control properties, and call IMENUCTL_SetStyle to customize the appearance of your menu items. //设置菜单属性

4. Call IMENUCTL_SetTitle() to specify a menu title, and call IMENUCTL_AddItem() or IMENUCTL_AddItemEx() for each item to be added to the menu. //设置标题,设置每一项             以上为静态工作,未涉及处理事件。

5. When you have completely specified the properties and contents of the menu control, call IMENUCTL_SetActive() to draw the control on the screen and enable it to receive key events from the device user. While the menu control is active, your application's IAPPLET_HandleEvent() function must call IMENUCTL_HandleEvent() to pass all handled key events to the menu control for processing. // 设置菜单为活动,控制屏幕资源,接受键盘消息 APP的事件处理函数必须调用IME_HE来把所有处理过的按键事件传递到菜单控制来进行处理。

6. Determine how you are to obtain the device user's menu selection. If you process the selection when the device user presses the SELECT key, the IAPPLET_HandleEvent() function can contain logic to handle the selection of each menu item when the EVT_COMMAND is received. If your application receives EVT_COMMAND events from more than one control, be sure that the item IDs passed in the wParam parameter are unique. If you retrieve the device user's selection at some other time, you must call IMENUCTL_GetSel() or IMENUCTL_GetItemData() at this time to access the currently selected menu item and its double-word data, if any. //  逻辑处理- 决定你如何获得设备用户的菜单选择。如果你在用户按下SELECT键时处理选择...

7. When you no longer need the menu control, call IMENUCTL_Release() to free it.   // 当你不再需要菜单控制时,释放

Required header file:AEEMenu.h


 

目录
相关文章
|
11天前
|
Ubuntu Shell Python
Ubuntu学习笔记(一):pycharm设置快捷启动图标详解
这篇博客详细讲解了如何在Ubuntu 20.04系统中为PyCharm设置快捷启动图标,包括创建.desktop文件、编辑文件内容以及添加到收藏夹的步骤。
53 0
Ubuntu学习笔记(一):pycharm设置快捷启动图标详解
Androidstudio中界面设计无法拖动问题解决方法
Androidstudio中界面设计无法拖动问题解决方法
156 0
|
XML 测试技术 API
【Android开发日常】一文弄懂桌面图标快捷菜单 & 桌面小组件
开发可以定义快捷方式,以便在应用中执行特定操作。 这些快捷方式可在受支持的启动器或助理(如 Google 助理)中显示,方便用户快速启动应用中的常见任务或推荐任务。 通过本文你还将了解一些可提升快捷方式效果的最佳做法。
|
Ubuntu IDE 搜索推荐
统信UOS系统开发笔记(五):安装QtCreator开发IDE中的中文输入环境Fcitx输入法
中文输入法,QtCreator中无法输入中文也是ubuntu中一个常规问题,在国产银河麒麟系统中也有此问题(PS:最终无法结局,用文本自行贴),国产UOS也有此问题,本片要解决此问题,主要是安装和使用Fcitx输入法。   (PS:本篇完整的处理方式,流程成功,但是结果未成功,留下来给其他版本的参考)
|
Ubuntu Windows
|
Ubuntu 数据可视化 搜索推荐
麒麟系统开发笔记(六):安装QtCreator开发IDE中的中文输入环境Fcitx输入法
中文输入法,QtCreator中无法输入中文也是ubuntu中一个常规问题,在麒麟系统中也此问题,要解决此问题,主要是安装和使用Fcitx输入法。   本文章最终结果是失败的,但是读者的系统未必是跟笔者的系统类似的,笔者使用的系统正好是opengl修改源依赖库修改到一半的版本。
麒麟系统开发笔记(六):安装QtCreator开发IDE中的中文输入环境Fcitx输入法
|
存储 vr&ar Windows
NSIS安装包开发笔记(三):NSIS使用Qt做的安装界面制作安装包交互详解
NSIS安装包开发笔记(三):NSIS使用Qt做的安装界面制作安装包交互详解
NSIS安装包开发笔记(三):NSIS使用Qt做的安装界面制作安装包交互详解
NSIS安装包开发笔记(二):NSIS使用NSIS+Qt界面制作安装包流程
NSIS安装包开发笔记(二):NSIS使用NSIS+Qt界面制作安装包流程
NSIS安装包开发笔记(二):NSIS使用NSIS+Qt界面制作安装包流程