Class: CryptopunksGui

Inherits:
Object
  • Object
show all
Includes:
View::ImageFrame, View::MenuBar, View::StyleOptionsFrame, Glimmer
Defined in:
app/model/image.rb,
app/view/menu_bar.rb,
app/cryptopunks_gui.rb,
app/view/help_dialog.rb,
app/view/image_frame.rb,
app/view/preferences_dialog.rb,
app/view/style_options_frame.rb

Defined Under Namespace

Modules: Model, View

Constant Summary

Constants included from View::MenuBar

View::MenuBar::HELP, View::MenuBar::LICENSE

Instance Method Summary collapse

Methods included from View::StyleOptionsFrame

#led_style_options_frame, #no_style_options_frame, #sketch_style_options_frame

Methods included from View::ImageFrame

#add_style_options, #change_output_location, #image_frame, #register_image_frame_observers

Methods included from View::MenuBar

#cryptopunks_gui_menu_bar, #help, #license, #show_about_dialog

Methods included from View::HelpDialog

#help_dialog

Constructor Details

#initializeCryptopunksGui

Returns a new instance of CryptopunksGui.



22
23
24
25
26
# File 'app/cryptopunks_gui.rb', line 22

def initialize
  @image = Model::Image.new
  create_gui
  @image.image_index = 0
end

Instance Method Details

#create_guiObject



32
33
34
35
36
37
38
39
40
41
# File 'app/cryptopunks_gui.rb', line 32

def create_gui
  @root = root { |root_proxy|
    title 'CryptoPunks GUI'
    iconphoto File.expand_path('../icons/cryptopunks-gui.png', __dir__)
    
    cryptopunks_gui_menu_bar(root: root_proxy, image: @image)
    
    image_frame(root: root_proxy, image: @image)
  }
end

#launchObject



28
29
30
# File 'app/cryptopunks_gui.rb', line 28

def launch
  @root.open
end