Download presentation
Presentation is loading. Please wait.
Published byPatience Pearson Modified over 9 years ago
1
RAPID: THE RAPID ADA PORTABLE INTERFACE DESIGNER Martin Carlisle Department of Computer Science US Air Force Academy
2
Objectives u Provide an intuitive GUI designer for Ada that is u Low cost u Readily extensible u Portable
3
Outline u RAPID development secrets u Demonstration u Questions
4
Compiler theory to the rescue u Bootstrapping u Created file format for RAPID GUIs u Created generators for widgets u GUI for RAPID was designed using RAPID u 40% of RAPID source was automatically generated u As new widgets were added, they could quickly be used in RAPID itself
5
Portion of GUI file WINDOW "." 300 58 MENUBAR MENU "File" 0 ITEM "New" 0 "File_Menu.New_Choice" Ctrl+N ITEM "Open" 0 "File_Menu.Open_Choice" Ctrl+O ENDOF MENU ENDOF MENUBAR WIDGETS PICTUREBUTTON newButton 0 0 23 23 "File_Menu.New_Choice" "new_gif" ENDOF WIDGETS ENDOF WINDOW
6
OO big win for widgets u GUI widgets naturally lend themselves to an inheritance hierarchy: Widget Button TextPicture
7
OO big win for widgets u Check button required only 101 new lines of code u 8 methods associated with a widget-- often much of work can be done by calling the parent method
8
Using OO to reduce code size procedure Write_Widget(Widget : Check_Button; File : File_Type) is begin -- Write_Widget Gui_Enum.Io.Put(File,Gui_Enum.Checkbutto n); Ada.Text_Io.Put(File," "); Write_Widget(Gui_Widget(Widget),File); Ada.Text_Io.Put_Line(File,Widget.Text.all); end Write_Widget;
9
Common Dialogs provided u File Open u File Save u Quit (are you sure?) u Yes/No u OK
10
Widgets (and their utilities) u Text Label u change text u Text Entry u Set text u Get text (as string, integer, float) u Clear u Text button u Picture button
11
More widgets u Check box u Select u Deselect u Is selected? u Radio button (creates an enumeration type) u Select u Which is selected?
12
Other utilities u Destroy window u Compare file times u Get value of Tcl variable (advanced user)
13
Demonstration u Overall u Sort demo
14
Conclusions u Project was successful, currently being used to design ground station software for USAFA Falconsat satellite u Compiler techniques (bootstrapping, intermediate language) support u faster development u easier “cross-compilation” to different GUI libraries
15
Future Work u Use JVM Swing components instead of Tcl/Tk u Additional widgets u Portable Ada IDE
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.