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
|
# File 'lib/watobo/gui/table_editor.rb', line 38
def initialize(owner)
super(owner, "Add Parameter", DECOR_ALL)
@location = nil
@pname = nil
@pval = nil
base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
frame = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
FXLabel.new(frame, "Method:")
@location_combo = FXComboBox.new(frame, 5, nil, 0,
COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
%w( Post Url Cookie ).each do |loc|
item = @location_combo.appendItem(loc)
@location_combo.setItemData(item, loc)
end
@location_combo.numVisible = 3
@location_combo.numColumns = 8
@location_combo.currentItem = 0
@location_combo.editable = false
FXLabel.new(frame, "Parameter:")
@parm_name_dt = FXDataTarget.new('')
FXTextField.new(frame, 15,
:target => @parm_name_dt, :selector => FXDataTarget::ID_VALUE,
:opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
FXLabel.new(frame, "Value:")
@parm_value_dt = FXDataTarget.new('')
FXTextField.new(frame, 15,
:target => @parm_value_dt, :selector => FXDataTarget::ID_VALUE,
:opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT)
buttons_frame = FXHorizontalFrame.new(base_frame,
:opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
@finishButton = FXButton.new(buttons_frame, "Accept" , nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
@finishButton.enable
@finishButton.connect(SEL_COMMAND) do |sender, sel, item|
self.handle(self, FXSEL(SEL_COMMAND, ID_ACCEPT), nil)
end
@cancelButton = FXButton.new(buttons_frame, "Cancel" ,
:target => self, :selector => FXDialogBox::ID_CANCEL,
:opts => BUTTON_NORMAL|LAYOUT_RIGHT)
end
|