Class: Watobo::Gui::CreateFuzzerDlg
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::CreateFuzzerDlg
- Defined in:
- lib/watobo/gui/fuzzer_gui.rb
Instance Method Summary collapse
-
#initialize(owner) ⇒ CreateFuzzerDlg
constructor
A new instance of CreateFuzzerDlg.
- #tag ⇒ Object
Constructor Details
#initialize(owner) ⇒ CreateFuzzerDlg
Returns a new instance of CreateFuzzerDlg.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/watobo/gui/fuzzer_gui.rb', line 136 def initialize(owner) super(owner, "Create New Tag", DECOR_TITLE|DECOR_BORDER) main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Enter Label For Tag:") input = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X) @tag_dt = FXDataTarget.new('') @tag_text = FXTextField.new(input, 1, :target => @tag_dt, :selector => FXDataTarget::ID_VALUE, :opts => TEXTFIELD_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) FXLabel.new(main, "Note:\nTo define the position in the request enclose the tag name\nbetween '%%', eg. '%%tag%%'.\nIt will turn green if the given tag name is correct.\n" + "Don't forget to specify a generator!").justify = JUSTIFY_LEFT @tag_text.setFocus() @tag_text.setDefault() @tag_dt.connect(SEL_COMMAND) { @accept_btn.setFocus() @accept_btn.setDefault() } = FXHorizontalFrame.new(main, :opts => LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, :padLeft => 40, :padRight => 40, :padTop => 20, :padBottom => 20) # Accept @accept_btn = FXButton.new(, "&Accept", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) # Cancel FXButton.new(, "&Cancel", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) end |
Instance Method Details
#tag ⇒ Object
132 133 134 |
# File 'lib/watobo/gui/fuzzer_gui.rb', line 132 def tag @tag_dt.value end |