Class: Bioroebe::GUI::Gtk::Snapgene

Inherits:
Gtk::BaseModuleBox
  • Object
show all
Defined in:
lib/bioroebe/gui/experimental/snapgene/snapgene.rb

Overview

Bioroebe::GUI::Gtk::Snapgene

Constant Summary collapse

NAMESPACE =
#

NAMESPACE

#
inspect
TITLE =
#

TITLE

#
'Snapgene'
WIDTH =
#

WIDTH

#
'45% or minimum 200px'
HEIGHT =
#

HEIGHT

#
'15% or minimum 100px'
USE_THIS_FONT =
#

USE_THIS_FONT

#
:dejavu_condensed_20

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commandline_arguments = ARGV, run_already = true) ⇒ Snapgene

#

initialize

#


48
49
50
51
52
53
54
55
56
57
58
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 48

def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  super(:vertical)
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Class Method Details

.run(i = ARGV) ⇒ Object

#

Bioroebe::GUI::Gtk::Snapgene.run

#


128
129
130
131
132
133
134
135
136
137
138
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 128

def self.run(
    i = ARGV
  )
  require 'gtk_paradise/run'
  _ = ::Bioroebe::GUI::Gtk::Snapgene.new(i)
  r = ::Gtk.run
  r << _
  r.automatic_size_then_automatic_title
  r.enable_quick_exit
  r.top_left_then_run
end

Instance Method Details

#border_size?Boolean

#

border_size?

#

Returns:

  • (Boolean)


84
85
86
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 84

def border_size?
  2
end

#connect_skeletonObject

#

connect_skeleton (connect tag)

#


97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 97

def connect_skeleton
  abort_on_exception
  left_pane  = create_vbox
  right_pane = create_vbox
  hbox1 = create_hbox
  hbox1.minimal(text('Lane 1: '))
  entry1 = create_entry
  entry1.width_height(220, 30)
  hbox1.minimal(entry1, 2)
  entry2 = create_entry('cut with')
  entry2.width_height(220, 30)
  hbox1.minimal(entry2, 2)
  right_pane.minimal(hbox1, 1)
  left_pane.minimal(create_image(
    'https://i.imgur.com/Ytw7PiC.jpg'
  ))
  minimal(
    draggable_via_left_and_right_movement(left_pane, right_pane)
  )
end

#create_skeletonObject

#

create_skeleton (create tag)

#


91
92
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 91

def create_skeleton
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


77
78
79
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 77

def padding?
  4
end

#resetObject

#

reset (reset tag)

#


63
64
65
66
67
68
69
70
71
72
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 63

def reset
  reset_the_internal_variables
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, NAMESPACE]
  title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
  use_gtk_paradise_project_css_file 
  infer_the_size_automatically
end

#runObject

#

run (run tag)

#


121
122
123
# File 'lib/bioroebe/gui/experimental/snapgene/snapgene.rb', line 121

def run
  super()
end