Class: Watobo::Gui::RequestFilterDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::RequestFilterDialog
- Includes:
- Responder
- Defined in:
- lib/watobo/gui/rewrite_filters_dialog.rb
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(owner, rule, settings = {}) ⇒ RequestFilterDialog
constructor
A new instance of RequestFilterDialog.
Constructor Details
#initialize(owner, rule, settings = {}) ⇒ RequestFilterDialog
Returns a new instance of RequestFilterDialog.
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/watobo/gui/rewrite_filters_dialog.rb', line 340 def initialize(owner, rule, settings = {} ) super(owner, "Request Rule Filter", DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE, :width => 650, :height => 300) FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept) @main_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) @table = FilterTable.new(@main_frame, rule.filters) @table_ctrl = RequestFilterCtrl.new(@main_frame, @table, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK) = FXHorizontalFrame.new(@main_frame, :opts => LAYOUT_FILL_X|LAYOUT_BOTTOM) @finishButton = FXButton.new(, "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_CANCEL), nil) self.handle(self, FXSEL(SEL_COMMAND, ID_ACCEPT), nil) end @cancelButton = FXButton.new(, "Cancel" , :target => self, :selector => FXDialogBox::ID_CANCEL, :opts => BUTTON_NORMAL|LAYOUT_RIGHT) end |
Instance Method Details
#filter ⇒ Object
334 335 336 337 338 |
# File 'lib/watobo/gui/rewrite_filters_dialog.rb', line 334 def filter f = Watobo::Interceptor::FilterChain.new f.set_filters @table.filters f end |