Class: Rad

Inherits:
ArcadiaExt show all
Defined in:
ext/ae-rad/ae-rad.rb

Instance Attribute Summary collapse

Attributes inherited from ArcadiaExt

#arcadia, #name

Instance Method Summary collapse

Methods inherited from ArcadiaExt

#add_to_conf_property, #array_conf, #conf, #conf_array, #conf_default, #del_from_conf_property, #exec, #float_frame, #frame, #frame_def_visible?, #frame_domain, #frame_domain_default, #frame_visible?, #initialize, #maximize, #maximized?, #resize, #restore_default_conf

Constructor Details

This class inherits a constructor from ArcadiaExt

Instance Attribute Details

#inspectorObject (readonly)

Returns the value of attribute inspector.



13
14
15
# File 'ext/ae-rad/ae-rad.rb', line 13

def inspector
  @inspector
end

#libsObject (readonly)

Returns the value of attribute libs.



11
12
13
# File 'ext/ae-rad/ae-rad.rb', line 11

def libs
  @libs
end

#paletteObject (readonly)

Returns the value of attribute palette.



12
13
14
# File 'ext/ae-rad/ae-rad.rb', line 12

def palette
  @palette
end

Instance Method Details

#load_libsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'ext/ae-rad/ae-rad.rb', line 27

def load_libs
  @libs = ArcadiaLibs.new(self)
  libs = conf('libraries').split(',')
  libs.each{|lib|
    if lib
      begin
        require "#{Dir.pwd}/#{conf('libraries.'+lib+'.source')}"
        @libs.add_lib(
        ArcadiaLibs::ArcadiaLibParams.new(
        conf('libraries.'+lib+'.name'),
        "#{Dir.pwd}/#{conf('libraries.'+lib+'.source')}",
        conf('libraries.'+lib+'.require'),
        eval(conf('libraries.'+lib+'.collection.class')))
        )
      rescue Exception
        msg = %Q{Loading lib "#{lib}" ("#{$!.class.to_s}")  : #{$!.to_s} at : #{$@.to_s}}
        if Tk.messageBox('icon' => 'error', 'type' => 'okcancel',
          'title' => '(Rad) Libs', 
          'message' => msg) == 'cancel'
          raise
          exit
        else
          Tk.update
        end
      end
    end
  }
end

#on_build(_event) ⇒ Object



14
15
16
# File 'ext/ae-rad/ae-rad.rb', line 14

def on_build(_event)
  load_libs
end

#show_radObject



18
19
20
21
22
23
24
25
# File 'ext/ae-rad/ae-rad.rb', line 18

def show_rad
  if @palette.nil?
    @palette = Palette.new(self)
    @inspector = ObjiController.new(self)
  else
    float_frame(0).show
  end
end