Class: FtpBrowserDialog
- Inherits:
-
Fox::FXDialogBox
- Object
- Fox::FXDialogBox
- FtpBrowserDialog
- Includes:
- Fox
- Defined in:
- lib/piggy-gui/ftp_browser_widget.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(window, options = PiggyOptions.new) ⇒ FtpBrowserDialog
constructor
A new instance of FtpBrowserDialog.
-
#on_cmd_close(sender, sel, ptr) ⇒ Object
Send whenever this window is about to close.
- #on_quit_button(sender, sel, ptr) ⇒ Object
- #options ⇒ Object
Constructor Details
#initialize(window, options = PiggyOptions.new) ⇒ FtpBrowserDialog
Returns a new instance of FtpBrowserDialog.
14 15 16 17 18 19 20 21 |
# File 'lib/piggy-gui/ftp_browser_widget.rb', line 14 def initialize(window, = PiggyOptions.new) super(window, "Piggy FTP Client", DECOR_ALL) @frame = FXVerticalFrame.new(self) @frame.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_Y) @browser = FtpBrowserWidget.new(@frame, ) connect(SEL_CLOSE, method(:on_cmd_close)) @browser.quitButton.connect(SEL_COMMAND, method(:on_quit_button)) end |
Instance Method Details
#create ⇒ Object
27 28 29 30 31 |
# File 'lib/piggy-gui/ftp_browser_widget.rb', line 27 def create resize(@browser.preferred_width + 20, 600) place(PIGGY_WINDOW_PLACEMENT) super end |
#on_cmd_close(sender, sel, ptr) ⇒ Object
Send whenever this window is about to close
34 35 36 37 |
# File 'lib/piggy-gui/ftp_browser_widget.rb', line 34 def on_cmd_close(sender, sel, ptr) @browser.prepare_closure return 0 end |
#on_quit_button(sender, sel, ptr) ⇒ Object
39 40 41 |
# File 'lib/piggy-gui/ftp_browser_widget.rb', line 39 def (sender, sel, ptr) handle(sender, MKUINT(ID_ACCEPT, SEL_COMMAND), nil) end |
#options ⇒ Object
23 24 25 |
# File 'lib/piggy-gui/ftp_browser_widget.rb', line 23 def @browser. end |