Class: ArcadiaAboutSplash

Inherits:
TkToplevel
  • Object
show all
Defined in:
lib/a-core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArcadiaAboutSplash

Returns a new instance of ArcadiaAboutSplash.



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
# File 'lib/a-core.rb', line 1539

def initialize
  #_bgcolor = '#B83333'
  _bgcolor = '#000000'
  super()
  relief 'groove'
  #relief 'flat'
  background  _bgcolor
  highlightbackground  _bgcolor
  highlightthickness  1
  borderwidth 2
  withdraw 
  overrideredirect(true)
  
  @tkLabel3 = TkLabel.new(self){
    image  TkPhotoImage.new('format'=>'GIF','data' =>A_LOGO_GIF)
    background  _bgcolor
    place('x'=> 20,'y' => 20)
  }
  
  
#    @tkLabel1 = TkLabel.new(self){
#      text 'Arcadia'  
#      background  _bgcolor
#      foreground  '#ffffff'
#      font Arcadia.conf('splash.title.font')
#      justify  'left'
#      place('width' => '190','x' => 110,'y' => 10,'height' => 25)
#    }

  @tkLabel1 = TkLabel.new(self){
    image  TkPhotoImage.new('format'=>'GIF','data' =>ARCADIA_JAP_GIF)
    background  _bgcolor
    justify  'left'
    place('x' => 90,'y' => 10)
  }

  @tkLabelRuby = TkLabel.new(self){
    image TkPhotoImage.new('data' =>RUBY_DOCUMENT_GIF)
    background  _bgcolor
    place('x'=> 210,'y' => 12)
  }
  
  @tkLabel2 = TkLabel.new(self){
    text  'Arcadia Ide'
    background  _bgcolor
    foreground  '#ffffff'
    font Arcadia.instance['conf']['splash.subtitle.font']
    justify  'left'
    place('x' => 100,'y' => 40,'height' => 19)
  }
  @tkLabelVersion = TkLabel.new(self){
    text  'version: '+$arcadia['applicationParams'].version
    background  _bgcolor
    foreground  '#ffffff'
    font Arcadia.instance['conf']['splash.version.font']
    justify  'left'
    place('x' => 100,'y' => 65,'height' => 19)
  }
  @tkLabel21 = TkLabel.new(self){
    text  'by Antonio Galeone - 2004/2011'
    background  _bgcolor
    foreground  '#ffffff'
    font Arcadia.instance['conf']['splash.credits.font']
    justify  'left'
    anchor 'w'
    place('width' => '220','x' => 100,'y' => 95,'height' => 25)
  }

  @tkLabelCredits = TkLabel.new(self){
    text  'Contributors: Roger D. Pack'
    background  _bgcolor
    foreground  '#ffffff'
    font Arcadia.instance['conf']['splash.credits.font']
    justify  'left'
    anchor 'w'
    place('width' => '210','x' => 100,'y' => 115,'height' => 25)
  }

  @tkLabelStep = TkLabel.new(self){
    text  ''
    background  _bgcolor
    foreground  'yellow'
    font Arcadia.instance['conf']['splash.banner.font']
    justify  'left'
    anchor  'w'
    place('width'=>-5,'relwidth' => 1,'x' => 5,'y' => 160,'height' => 45)
  }
  @progress  = TkVariable.new
  reset
  _width = 380
  _height = 210
  #_width = 0;_height = 0
  _x = TkWinfo.screenwidth(self)/2 -  _width / 2
  _y = TkWinfo.screenheight(self)/2 -  _height / 2
  geometry = _width.to_s+'x'+_height.to_s+'+'+_x.to_s+'+'+_y.to_s
  Tk.tk_call('wm', 'geometry', self, geometry )
  #bind("ButtonPress-1", proc{self.destroy})
  bind("Double-Button-1", proc{self.destroy})
  info = TkApplication.sys_info
  set_sysinfo(info)
end

Instance Attribute Details

#progressObject (readonly)

Returns the value of attribute progress.



1538
1539
1540
# File 'lib/a-core.rb', line 1538

def progress
  @progress
end

Instance Method Details

#labelStep(_txt) ⇒ Object



1666
1667
1668
1669
# File 'lib/a-core.rb', line 1666

def labelStep(_txt)
  @tkLabelStep.text = _txt
  Tk.update
end

#last_step(_txt = nil) ⇒ Object



1671
1672
1673
1674
# File 'lib/a-core.rb', line 1671

def last_step(_txt = nil)
  @progress.numeric = @max
  labelStep(_txt) if _txt
end

#next_step(_txt = nil) ⇒ Object



1661
1662
1663
1664
# File 'lib/a-core.rb', line 1661

def next_step(_txt = nil)
  @progress.numeric += 1
  labelStep(_txt) if _txt
end

#resetObject



1657
1658
1659
# File 'lib/a-core.rb', line 1657

def reset
  @progress.value = -1
end

#set_progress(_max = 10) ⇒ Object



1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
# File 'lib/a-core.rb', line 1645

def set_progress(_max=10)
  @max = _max
  Tk::BWidget::ProgressBar.new(self, :width=>150, :height=>10,
    :background=>'#000000',
    :troughcolor=>'#000000',
    :foreground=>'#a11934',
    :variable=>@progress,
    :borderwidth=>0,
    :relief=>'flat',
    :maximum=>_max).place('relwidth' => '1','y' => 146,'height' => 2)
end

#set_sysinfo(_info) ⇒ Object



1641
1642
1643
# File 'lib/a-core.rb', line 1641

def set_sysinfo(_info)
  @tkLabelStep.text(_info)
end