Class: Watobo::Gui::ConfirmScanDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::ConfirmScanDialog
- Includes:
- Responder
- Defined in:
- lib/watobo/gui/confirm_scan_dialog.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize(owner, chatlist, scan_settings = {}) ⇒ ConfirmScanDialog
constructor
A new instance of ConfirmScanDialog.
- #onAccept(sender, sel, event) ⇒ Object
Constructor Details
#initialize(owner, chatlist, scan_settings = {}) ⇒ ConfirmScanDialog
Returns a new instance of ConfirmScanDialog.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/watobo/gui/confirm_scan_dialog.rb', line 18 def initialize(owner, chatlist, scan_settings={}) super(owner, "Confirm Scan", DECOR_ALL, :width => 500, :height => 400) FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept) base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) FXLabel.new(base_frame, "The following #{chatlist.length} chats will be scanned:") # @chatTable = ConversationTable.new(base_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) puts chatlist.length @chatTable = ConversationTable.new(base_frame) @chatTable.showConversation(chatlist) = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP) @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 Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
10 11 12 |
# File 'lib/watobo/gui/confirm_scan_dialog.rb', line 10 def scope @scope end |
Instance Method Details
#onAccept(sender, sel, event) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/watobo/gui/confirm_scan_dialog.rb', line 11 def onAccept(sender, sel, event) getApp().stopModal(self, 1) self.hide() return 1 end |