Class: Watobo::Gui::RewriteRulesDialog

Inherits:
FXDialogBox
  • Object
show all
Includes:
Responder
Defined in:
lib/watobo/gui/rewrite_rules_dialog.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, settings = {}) ⇒ RewriteRulesDialog

Returns a new instance of RewriteRulesDialog.



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 346

def initialize(owner, settings = {} )
  super(owner, "Rewrite Rules", DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE, :width => 650, :height => 610)

  FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)

  @main_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
  init_request_rules(@main_frame)
  init_response_rules(@main_frame)

  buttons_frame = FXHorizontalFrame.new(@main_frame, :opts => LAYOUT_FILL_X|LAYOUT_BOTTOM)
  @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_CANCEL), nil)
    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

Instance Method Details

#request_rulesObject



338
339
340
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 338

def request_rules
  @request_rules_table.rules
end

#response_rulesObject



342
343
344
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 342

def response_rules
  @response_rules_table.rules
end