



版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Lesson content:GUI Application OverviewData TargetsUsing Keywords and Targets with WidgetsLesson 7: Commands and Keywords (Part 2)30 minutesGUI Application OverviewMenus/IconsProvide the user with access to functionalityModesResponsible for gathering user input, processing commandsFormsProceduresFor
2、ms are “standalone”, procedures use promptsDialogsPrompt line, dialogs, viewportInput mechanismsLayout ManagersControl widget layoutWidgetsGUI controls (buttons, text fields, lists, etc.)GUI Commands & KeywordsProvide an interface between application data and the user interfaceData Targets (1/8)Reca
3、ll that data targets can operate in two modes, value and optionOption mode:Specified by using a message ID zero Data target responds by issuing the sender an ID_CHECK message if the senders ID matches the targets value; otherwise an ID_UNCHECK message is sent to the senderBy connecting multiple radi
4、o buttons (with different IDs) to the same target, the “one of many” selection is automatically enforced(as in the next example)Data Targets (2/8)Radio button exampleLets say that a data target, dt, has a value of 2Radio button 1 is given an ID = 1, and a target = dtRadio button 2 is given an ID = 2
5、, and a target = dtRadio button 3 is given an ID = 3, and a target = dtFXRadioButton(p, Button 1, dt, 1)FXRadioButton(p, Button 2, dt, 2)FXRadioButton(p, Button 3, dt, 3)Data Targets (3/8)Radio button exampleInitially, none of the buttons are checkedButton 1Button 2Button 3Data Targets (4/8)Radio bu
6、tton exampleDuring the GUI update process, Button 1 sends its target an update messageSince the ID of Button 1 does not match the data targets value, the data target sends the button an ID_UNCHECK messageID=1, SEL_UPDATEID_UNCHECK, MAND Data Targetvalue = 2Button 1Button 2Button 3Data Targets (5/8)R
7、adio button exampleNext in the GUI update process, Button 2 sends its target an update messageSince the ID of Button 2 does match the data targets value, the data target sends the button an ID_CHECK messageID=2, SEL_UPDATEID_CHECK, MANDButton 1Button 2Button 3 Data Targetvalue = 2Data Targets (6/8)R
8、adio button exampleNext in the GUI update process, Button 3 sends its target an update messageSince the ID of Button 3 does not match the data targets value, the data target sends the button an ID_UNCHECK messageButton 1Button 2Button 3 Data Targetvalue = 2ID=3, SEL_UPDATEID_UNCHECK, MANDData Target
9、s (7/8)Radio button exampleNow, if the user clicks on Button 1 it will send its target an command messageThe target responds by setting its value to 1ID=1, MAND Data Targetvalue = 1Button 1Button 2Button 3Data Targets (8/8)Radio button exampleThe GUI initiates another round of updating, and this tim
10、e Button 1 will receive an ID_CHECK message, and Button 2 and Button 3 will receive ID_UNCHECK messagesButton 1Button 2Button 3Using Keywords and Targets with Widgets (1/2)Symbolic constants Symbolic constants for kernel commands are all available in the top-level kernel name spaceThe same symbolic
11、constants are also available in the GUIGUI updating uses integer message IDs, but Abaqus/CAE often uses symbolic constants in its commands (for example renderStyle=WIREFRAME)Special symbolic constants have been created for the GUI process that have a string representation and a unique integer IDUse
12、of the ID allows AFXSymConstKeywords to be used with GUI updatingUse the getId() method of symbolic constants to obtain their IDUsing Keywords and Targets with Widgets (2/2)The widgets ID (selector) depends upon the type of keyword or target it is connected to:For int, float, string, and bool types,
13、 use a value of 0 (the default)For symbolic constant or int types:When connected to a list or combo box, use 0 When connected to a radio button, use the value of anappropriate symbolic constants ID (accessible via thegetId method)For tuple keywords:Use a value of zero when addressing the entire tupleUse the element number (1-based) when addressing a single element of the tuplecombo = boBox(hf, 8, 4,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年初级银行从业资格之初级个人理财题库综合试卷A卷附答案
- 提高生产连续性的措施与方法计划
- 冷冻半成品转让合同范例
- 针对不同性格员工的管理策略计划
- 农村荒山购买合同样本
- 与超市合伙合同标准文本
- 与员工劳务派遣合同样本
- 全职保姆雇用合同样本
- 兑fan店合同样本
- 临街网吧转让合同范例
- 小学二年级24点习试题库
- 医院检查报告单模板
- 回弹法检测砖砂浆强度计算表
- 2023年广东省高中学生化学竞赛试题和参考答案
- 小学劳动技术云教三年级下册植物栽培种植小葱(省一等奖)
- 泌尿外科手术分级目录
- 围术期支气管痉挛
- 科研项目台账
- 产品零部件防锈规定
- 2023年全国中学生生物学联赛试题(word版有答案)
- 浙江省嘉兴市地图矢量PPT模板(图文)
评论
0/150
提交评论