Class: Watobo::Gui::InterceptorFilterSettingsDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::InterceptorFilterSettingsDialog
- Includes:
- Responder, Interceptor
- Defined in:
- lib/watobo/gui/interceptor_gui.rb
Constant Summary
Constants included from Interceptor
Interceptor::INTERCEPT_BOTH, Interceptor::INTERCEPT_DEFAULT_PORT, Interceptor::INTERCEPT_NONE, Interceptor::INTERCEPT_REQUEST, Interceptor::INTERCEPT_RESPONSE, Interceptor::MODE_REGULAR, Interceptor::MODE_TRANSPARENT, Interceptor::REWRITE_BOTH, Interceptor::REWRITE_NONE, Interceptor::REWRITE_REQUEST, Interceptor::REWRITE_RESPONSE
Instance Method Summary collapse
- #getRequestFilter ⇒ Object
- #getResponseFilter ⇒ Object
-
#initialize(owner, settings = {}) ⇒ InterceptorFilterSettingsDialog
constructor
A new instance of InterceptorFilterSettingsDialog.
Methods included from Interceptor
active?, intercept_mode, intercept_mode=, intercept_requests?, intercept_responses?, proxy, proxy_mode, proxy_mode=, rewrite_mode, rewrite_mode=, rewrite_requests?, rewrite_responses?, start, stop, transparent?
Constructor Details
#initialize(owner, settings = {}) ⇒ InterceptorFilterSettingsDialog
Returns a new instance of InterceptorFilterSettingsDialog.
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 |
# File 'lib/watobo/gui/interceptor_gui.rb', line 850 def initialize(owner, settings = {}) super(owner, "Interceptor Settings", DECOR_ALL, :width => 300, :height => 425) @request_filter = {} @response_filter = {} @request_filter.update settings[:request_filter_settings] @response_filter.update settings[:response_filter_settings] FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept) base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) @tabbook = FXTabBook.new(base_frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT) = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X) @req_opt_tab = FXTabItem.new(@tabbook, "Request Options", nil) frame = FXVerticalFrame.new(@tabbook, :opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) scroll_window = FXScrollWindow.new(frame, SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) @req_opt_frame = FXVerticalFrame.new(scroll_window, :opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) @resp_opt_tab = FXTabItem.new(@tabbook, "Response Options", nil) frame= FXVerticalFrame.new(@tabbook, :opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) scroll_window = FXScrollWindow.new(frame, SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) @resp_opt_frame = FXVerticalFrame.new(scroll_window, :opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) initRequestFilterFrame() updateRequestFilterFrame() initResponseFilterFrame() updateResponseFilterFrame() @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
#getRequestFilter ⇒ Object
842 843 844 |
# File 'lib/watobo/gui/interceptor_gui.rb', line 842 def getRequestFilter() @request_filter end |
#getResponseFilter ⇒ Object
846 847 848 |
# File 'lib/watobo/gui/interceptor_gui.rb', line 846 def getResponseFilter() @response_filter end |