



版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- T/CIQA 87-2024煤和焦炭試驗配比和結果計算方法
- 官方的室內裝修施工合同3篇
- 擔保合同擔保合同(一)6篇
- 精裝房屋抵押借貸合同10篇
- 新建鐵路工程勞務協作合同3篇
- 鋼增強塑料復合管項目績效評估報告
- 高效節能電動機項目績效評估報告
- 小學第33個愛國衛生月主題活動
- 服裝設計高端時尚
- 兒歌表演唱教學設計
- 2025高考北京卷作文主題分析及范文
- 數字正射影像圖在測繪行業的生產流程
- 漏肩風病中醫護理方案
- 內蒙古赤峰歷年中考語文現代文閱讀之非連續性文本閱讀7篇(截至2024年)
- 尾礦庫安全生產責任制
- 養老院老人心理關愛制度
- 2024年中國裝飾公司100強企業排名
- 【MOOC】化學與人類文明-西安交通大學 中國大學慕課MOOC答案
- eras婦科腫瘤圍手術期管理指南解讀
- 2025年壓力容器作業證理論全國考試題庫(含答案)
- 2025醫院內部審計工作計劃范文
評論
0/150
提交評論