1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
/* ************************************************************* *
* The Amulet User Interface Development Environment *
* ************************************************************* *
* Created automatically by the Gilt program in Amulet. *
* Do not edit this file directly. *
* For more information on Amulet, contact amulet@cs.cmu.edu *
* ************************************************************* *
* Generated on Thu Aug 7 13:56:41 1997
* Amulet version 3.0
* ************************************************************* */
#include <amulet.h>
#include SCRIPTING_ADVANCED__H
#include REGISTRY__H // for Am_Get_Type_Name
Am_Object am_askforvalue;
Am_Define_String_Formula(get_value_type_string) {
Am_Value old_value = self.Get_Sibling(Am_CONSTANT_OBJECTS_WIDGET)
.Get(Am_VALUES);
Am_String str;
#ifdef DEBUG
str = Am_Get_Type_Name(old_value.type);
#else
str = "No Debug Version";
#endif
return(str);
}
Am_Object am_askforvalue_Initialize () {
am_askforvalue = Am_Window.Create(DSTR("am_askforvalue"))
.Set(Am_DESTROY_WINDOW_METHOD, Am_Default_Pop_Up_Window_Destroy_Method)
.Set(Am_FILL_STYLE, Am_Amulet_Purple)
.Set(Am_TITLE, "Enter a Value")
.Set(Am_ICON_TITLE, "Enter a Value")
.Set(Am_WIDTH, 339)
.Set(Am_HEIGHT, 125)
;
am_askforvalue
.Add_Part(Am_LABEL, Am_Text.Create()
.Set(Am_LEFT, 31)
.Set(Am_TOP, 14)
.Set(Am_TEXT, "Type a new value of type")
.Set(Am_LINE_STYLE, Am_Black)
.Set(Am_FILL_STYLE, Am_No_Style)
)
.Add_Part(Am_Text.Create(DSTR("TYPE_OF_ITEM"))
.Set(Am_LEFT, Am_Right_Of_Sibling(Am_LABEL, 10))
.Set(Am_TOP, 14)
.Set(Am_TEXT, get_value_type_string)
.Set(Am_LINE_STYLE, Am_Black)
.Set(Am_FILL_STYLE, Am_No_Style)
)
.Add_Part(Am_Text.Create()
.Set(Am_LEFT, 31)
.Set(Am_TOP, 29)
.Set(Am_TEXT, "or hit cancel to abort the script")
.Set(Am_LINE_STYLE, Am_Black)
.Set(Am_FILL_STYLE, Am_No_Style)
)
.Add_Part(Am_CONSTANT_OBJECTS_WIDGET, Am_Text_Input_Widget.Create()
.Set(Am_LEFT, 31)
.Set(Am_TOP, 47)
.Set(Am_WIDTH, 300)
.Set(Am_HEIGHT, 25)
.Add(Am_VALUES, Am_No_Value) //set with old value
.Set(Am_TEXT_CHECK_LEGAL_METHOD, am_check_valid_type)
.Get_Object(Am_COMMAND)
.Set(Am_LABEL, "New value:")
.Get_Owner()
.Set(Am_FILL_STYLE, Am_Amulet_Purple)
)
.Add_Part(Am_Button_Panel.Create()
.Set(Am_LEFT, Am_Center_X_Is_Center_Of_Owner)
.Set(Am_TOP, 80)
.Set(Am_FILL_STYLE, Am_Amulet_Purple)
.Set(Am_LAYOUT, Am_Horizontal_Layout)
.Set(Am_H_SPACING, 0)
.Set(Am_V_SPACING, 0)
.Set(Am_MAX_RANK, 0)
.Set(Am_ITEMS, Am_Value_List()
.Add(Am_Standard_OK_Command.Create())
.Add(Am_Standard_Cancel_Command.Create())
)
)
.Add_Part(Am_Tab_To_Next_Widget_Interactor.Create())
;
return am_askforvalue;
}
|