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.



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 179

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.



163
164
165
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 163

def interceptor_settings
  @interceptor_settings
end

Instance Method Details

#onAccept(sender, sel, event) ⇒ Object



169
170
171
172
173
174
175
176
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 169

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

#transparent?Boolean

Returns:

  • (Boolean)


165
166
167
# File 'lib/watobo/gui/interceptor_settings_dialog.rb', line 165

def transparent?
  @interceptorSettingsFrame.transparent_mode?
end