Class: Watobo::Gui::InterceptorSettingsDialog

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

Overview

Class: SelectNonUniqueParmsDialog

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner) ⇒ InterceptorSettingsDialog

Returns a new instance of InterceptorSettingsDialog.



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 200

def initialize(owner)
  super(owner, "Interceptor Settings", DECOR_TITLE|DECOR_BORDER, :width => 400, :height => 500)
  #@interceptor_settings = interceptor_settings
  FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
  
  
  base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
  
  #  puts "create scopeframe with scope:"
  # @project.scope
  # @defineScopeFrame = DefineScopeFrame.new(base_frame, Watobo::Chats.sites(), YAML.load(YAML.dump(@project.scope)), prefs)
  @interceptorSettingsFrame = InterceptorSettingsFrame.new(base_frame, :opts => SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y)
  
  buttons_frame = FXHorizontalFrame.new(base_frame,
                                        :opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
  
  @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 Attribute Details

#interceptor_settingsObject (readonly)

Returns the value of attribute interceptor_settings.



184
185
186
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 184

def interceptor_settings
  @interceptor_settings
end

Instance Method Details

#onAccept(sender, sel, event) ⇒ Object



190
191
192
193
194
195
196
197
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 190

def onAccept(sender, sel, event)
  
  @interceptor_settings = @interceptorSettingsFrame.getSettings()
  
  getApp().stopModal(self, 1)
  self.hide()
  return 1
end

#transparent?Boolean

Returns:

  • (Boolean)


186
187
188
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 186

def transparent?
  @interceptorSettingsFrame.transparent_mode?
end