Class: DirectoryDiffMainWindow

Inherits:
Fox::FXMainWindow
  • Object
show all
Includes:
Fox
Defined in:
lib/piggy-gui/directory_diff_widget.rb

Overview

DirectoryDiffWidget shows differences between two directories.

Direct Known Subclasses

FtpBrowserMainWindow

Instance Method Summary collapse

Constructor Details

#initialize(app, options = PiggyOptions.new) ⇒ DirectoryDiffMainWindow

Returns a new instance of DirectoryDiffMainWindow.



14
15
16
17
18
19
20
21
# File 'lib/piggy-gui/directory_diff_widget.rb', line 14

def initialize(app, options = PiggyOptions.new)
  super(app, title_string, nil, nil, DECOR_ALL,
    0, 0, 200, 700, 0, 0)
  @frame = FXVerticalFrame.new(self)
  @frame.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_Y)
  set_main_widget(options)
  @browser.quitButton.connect(SEL_COMMAND, method(:on_terminate))
end

Instance Method Details

#createObject



31
32
33
34
35
# File 'lib/piggy-gui/directory_diff_widget.rb', line 31

def create
  resize(@browser.preferred_width + 20, 600)
  place(PIGGY_WINDOW_PLACEMENT)
  super
end

#on_terminate(sender, sel, ptr) ⇒ Object



37
38
39
40
# File 'lib/piggy-gui/directory_diff_widget.rb', line 37

def on_terminate(sender, sel, ptr)
  @browser.prepare_closure
  getApp.exit(0)
end

#set_main_widget(options) ⇒ Object



27
28
29
# File 'lib/piggy-gui/directory_diff_widget.rb', line 27

def set_main_widget(options)
  @browser = DirectoryDiffWidget.new(@frame, options)
end

#title_stringObject



23
24
25
# File 'lib/piggy-gui/directory_diff_widget.rb', line 23

def title_string
  "Piggy Directory Diff"
end