Class: Watobo::Gui::ResponseFilterDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::ResponseFilterDialog
- Includes:
- Responder
- Defined in:
- lib/watobo/gui/rewrite_filters_dialog.rb
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(owner, rule, settings = {}) ⇒ ResponseFilterDialog
constructor
A new instance of ResponseFilterDialog.
Constructor Details
#initialize(owner, rule, settings = {}) ⇒ ResponseFilterDialog
Returns a new instance of ResponseFilterDialog.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/watobo/gui/rewrite_filters_dialog.rb', line 384 def initialize(owner, rule, settings = {} ) super(owner, "Response Rule Filters", 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 = ResponseFilterCtrl.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
378 379 380 381 382 |
# File 'lib/watobo/gui/rewrite_filters_dialog.rb', line 378 def filter f = Watobo::Interceptor::FilterChain.new f.set_filters @table.filters f end |