arcadia 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +126 -123
- data/arcadia.rb +770 -756
- data/base/a-contracts.rb +130 -93
- data/base/a-ext.rb +280 -280
- data/base/a-libs.rb +5 -11
- data/base/a-utils.rb +235 -44
- data/conf/arcadia.conf +20 -16
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +74 -0
- data/ext/ae-complete-code/ae-complete-code.conf +0 -0
- data/ext/ae-complete-code/ae-complete-code.rb +80 -79
- data/ext/ae-debug/ae-debug.conf +0 -0
- data/ext/ae-debug/ae-debug.rb +2 -6
- data/ext/ae-debug/debug1.57.rb +0 -0
- data/ext/ae-doc-code/ae-doc-code.conf +15 -0
- data/ext/ae-doc-code/ae-doc-code.rb +289 -0
- data/ext/ae-editor/ae-editor.conf +17 -8
- data/ext/ae-editor/ae-editor.rb +738 -396
- data/ext/ae-event-log/ae-event-log.conf +0 -0
- data/ext/ae-event-log/ae-event-log.rb +0 -0
- data/ext/ae-file-history/ae-file-history.conf +2 -2
- data/ext/ae-file-history/ae-file-history.rb +286 -290
- data/ext/ae-inspector/ae-inspector.conf +0 -0
- data/ext/ae-inspector/ae-inspector.rb +0 -0
- data/ext/ae-output-event/ae-output-event.conf +2 -2
- data/ext/ae-output/ae-output.conf +2 -2
- data/ext/ae-output/ae-output.rb +173 -178
- data/ext/ae-palette/ae-palette.conf +0 -0
- data/ext/ae-palette/ae-palette.rb +0 -0
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +54 -54
- data/lib/tk/al-tk.rb +3076 -3082
- data/lib/tk/al-tk.res.rb +0 -0
- data/lib/tk/al-tkarcadia.rb +0 -0
- data/lib/tk/al-tkcustom.rb +0 -0
- data/lib/tkext/al-bwidget.rb +0 -0
- data/lib/tkext/al-iwidgets.rb +0 -0
- data/lib/tkext/al-tile.rb +0 -0
- data/lib/tkext/al-tktable.rb +0 -0
- data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +276 -0
- data/tcl/BWidget-1.8.0/BWman/BWidget.html +228 -0
- data/tcl/BWidget-1.8.0/BWman/Button.html +273 -0
- data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +264 -0
- data/tcl/BWidget-1.8.0/BWman/ComboBox.html +402 -0
- data/tcl/BWidget-1.8.0/BWman/Dialog.html +314 -0
- data/tcl/BWidget-1.8.0/BWman/DragSite.html +139 -0
- data/tcl/BWidget-1.8.0/BWman/DropSite.html +254 -0
- data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +248 -0
- data/tcl/BWidget-1.8.0/BWman/Entry.html +341 -0
- data/tcl/BWidget-1.8.0/BWman/Label.html +331 -0
- data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +194 -0
- data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +144 -0
- data/tcl/BWidget-1.8.0/BWman/ListBox.html +678 -0
- data/tcl/BWidget-1.8.0/BWman/MainFrame.html +283 -0
- data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +218 -0
- data/tcl/BWidget-1.8.0/BWman/NoteBook.html +374 -0
- data/tcl/BWidget-1.8.0/BWman/PagesManager.html +180 -0
- data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +142 -0
- data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +153 -0
- data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +214 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +145 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollView.html +130 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +191 -0
- data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +116 -0
- data/tcl/BWidget-1.8.0/BWman/SelectColor.html +164 -0
- data/tcl/BWidget-1.8.0/BWman/SelectFont.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/Separator.html +77 -0
- data/tcl/BWidget-1.8.0/BWman/SpinBox.html +250 -0
- data/tcl/BWidget-1.8.0/BWman/StatusBar.html +147 -0
- data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +107 -0
- data/tcl/BWidget-1.8.0/BWman/Tree.html +947 -0
- data/tcl/BWidget-1.8.0/BWman/Widget.html +502 -0
- data/tcl/BWidget-1.8.0/BWman/contents.html +84 -0
- data/tcl/BWidget-1.8.0/BWman/index.html +7 -0
- data/tcl/BWidget-1.8.0/BWman/navtree.html +41 -0
- data/tcl/BWidget-1.8.0/BWman/options.htm +458 -0
- data/tcl/BWidget-1.8.0/CHANGES.txt +266 -0
- data/tcl/BWidget-1.8.0/ChangeLog +1641 -0
- data/tcl/BWidget-1.8.0/LICENSE.txt +41 -0
- data/tcl/BWidget-1.8.0/README.txt +127 -0
- data/tcl/BWidget-1.8.0/arrow.tcl +551 -0
- data/tcl/BWidget-1.8.0/bitmap.tcl +94 -0
- data/tcl/BWidget-1.8.0/button.tcl +324 -0
- data/tcl/BWidget-1.8.0/buttonbox.tcl +403 -0
- data/tcl/BWidget-1.8.0/color.tcl +493 -0
- data/tcl/BWidget-1.8.0/combobox.tcl +809 -0
- data/tcl/BWidget-1.8.0/demo/basic.tcl +199 -0
- data/tcl/BWidget-1.8.0/demo/bwidget.xbm +46 -0
- data/tcl/BWidget-1.8.0/demo/demo.tcl +212 -0
- data/tcl/BWidget-1.8.0/demo/dnd.tcl +42 -0
- data/tcl/BWidget-1.8.0/demo/manager.tcl +141 -0
- data/tcl/BWidget-1.8.0/demo/select.tcl +59 -0
- data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +214 -0
- data/tcl/BWidget-1.8.0/demo/tree.tcl +260 -0
- data/tcl/BWidget-1.8.0/demo/x1.xbm +2258 -0
- data/tcl/BWidget-1.8.0/dialog.tcl +345 -0
- data/tcl/BWidget-1.8.0/dragsite.tcl +197 -0
- data/tcl/BWidget-1.8.0/dropsite.tcl +455 -0
- data/tcl/BWidget-1.8.0/dynhelp.tcl +625 -0
- data/tcl/BWidget-1.8.0/entry.tcl +469 -0
- data/tcl/BWidget-1.8.0/font.tcl +566 -0
- data/tcl/BWidget-1.8.0/images/bold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/copy.gif +0 -0
- data/tcl/BWidget-1.8.0/images/cut.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragfile.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragicon.gif +0 -0
- data/tcl/BWidget-1.8.0/images/error.gif +0 -0
- data/tcl/BWidget-1.8.0/images/file.gif +0 -0
- data/tcl/BWidget-1.8.0/images/folder.gif +0 -0
- data/tcl/BWidget-1.8.0/images/hourglass.gif +0 -0
- data/tcl/BWidget-1.8.0/images/info.gif +0 -0
- data/tcl/BWidget-1.8.0/images/italic.gif +0 -0
- data/tcl/BWidget-1.8.0/images/minus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/new.gif +0 -0
- data/tcl/BWidget-1.8.0/images/opcopy.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/open.gif +0 -0
- data/tcl/BWidget-1.8.0/images/openfold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/oplink.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/opmove.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/overstrike.gif +0 -0
- data/tcl/BWidget-1.8.0/images/palette.gif +0 -0
- data/tcl/BWidget-1.8.0/images/passwd.gif +0 -0
- data/tcl/BWidget-1.8.0/images/paste.gif +0 -0
- data/tcl/BWidget-1.8.0/images/plus.xbm +5 -0
- data/tcl/BWidget-1.8.0/images/print.gif +0 -0
- data/tcl/BWidget-1.8.0/images/question.gif +0 -0
- data/tcl/BWidget-1.8.0/images/redo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/save.gif +0 -0
- data/tcl/BWidget-1.8.0/images/target.xbm +9 -0
- data/tcl/BWidget-1.8.0/images/underline.gif +0 -0
- data/tcl/BWidget-1.8.0/images/undo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/warning.gif +0 -0
- data/tcl/BWidget-1.8.0/init.tcl +40 -0
- data/tcl/BWidget-1.8.0/label.tcl +271 -0
- data/tcl/BWidget-1.8.0/labelentry.tcl +100 -0
- data/tcl/BWidget-1.8.0/labelframe.tcl +160 -0
- data/tcl/BWidget-1.8.0/lang/da.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/de.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/en.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/es.rc +53 -0
- data/tcl/BWidget-1.8.0/lang/fr.rc +52 -0
- data/tcl/BWidget-1.8.0/listbox.tcl +1638 -0
- data/tcl/BWidget-1.8.0/mainframe.tcl +711 -0
- data/tcl/BWidget-1.8.0/messagedlg.tcl +128 -0
- data/tcl/BWidget-1.8.0/notebook.tcl +1164 -0
- data/tcl/BWidget-1.8.0/pagesmgr.tcl +294 -0
- data/tcl/BWidget-1.8.0/panedw.tcl +381 -0
- data/tcl/BWidget-1.8.0/panelframe.tcl +246 -0
- data/tcl/BWidget-1.8.0/passwddlg.tcl +178 -0
- data/tcl/BWidget-1.8.0/pkgIndex.tcl +47 -0
- data/tcl/BWidget-1.8.0/progressbar.tcl +208 -0
- data/tcl/BWidget-1.8.0/progressdlg.tcl +87 -0
- data/tcl/BWidget-1.8.0/scrollframe.tcl +226 -0
- data/tcl/BWidget-1.8.0/scrollview.tcl +254 -0
- data/tcl/BWidget-1.8.0/scrollw.tcl +280 -0
- data/tcl/BWidget-1.8.0/separator.tcl +75 -0
- data/tcl/BWidget-1.8.0/spinbox.tcl +331 -0
- data/tcl/BWidget-1.8.0/statusbar.tcl +422 -0
- data/tcl/BWidget-1.8.0/tests/entry.test +173 -0
- data/tcl/BWidget-1.8.0/titleframe.tcl +170 -0
- data/tcl/BWidget-1.8.0/tree.tcl +2228 -0
- data/tcl/BWidget-1.8.0/utils.tcl +645 -0
- data/tcl/BWidget-1.8.0/widget.tcl +1576 -0
- data/tcl/BWidget-1.8.0/wizard.tcl +1028 -0
- data/tcl/BWidget-1.8.0/xpm2image.tcl +115 -0
- metadata +141 -5
data/base/a-libs.rb
CHANGED
@@ -464,9 +464,7 @@ class AG
|
|
464
464
|
end
|
465
465
|
|
466
466
|
def select
|
467
|
-
|
468
|
-
_tobj.wrapper = self
|
469
|
-
InspectorContract.instance.select(_tobj)
|
467
|
+
InspectorContract.instance.select(self, 'wrapper'=>self)
|
470
468
|
self
|
471
469
|
end
|
472
470
|
|
@@ -514,7 +512,7 @@ class AG
|
|
514
512
|
if @ag_parent
|
515
513
|
return @ag_parent.register(_agobj)
|
516
514
|
else
|
517
|
-
WrapperContract.instance.wrapper_created(
|
515
|
+
WrapperContract.instance.wrapper_created(self,'wrapper'=>_agobj)
|
518
516
|
#
|
519
517
|
# _tobj = InspectorActionContract::TInspectorActionObj.new(self)
|
520
518
|
# _tobj.wrapper = _agobj
|
@@ -590,9 +588,7 @@ class AG
|
|
590
588
|
|
591
589
|
|
592
590
|
def delete
|
593
|
-
|
594
|
-
_tobj.wrapper = self
|
595
|
-
InspectorContract.instance.delete_wrapper(_tobj)
|
591
|
+
InspectorContract.instance.delete_wrapper(self, 'wrapper'=>self)
|
596
592
|
end
|
597
593
|
|
598
594
|
def AG.class_wrapped
|
@@ -833,14 +829,12 @@ class AG
|
|
833
829
|
if old_value != _value
|
834
830
|
@props[_family][_name]['set'].call(_value)
|
835
831
|
end
|
836
|
-
WrapperContract.instance.property_updated(
|
837
|
-
WrapperContract::TWrapperObj.new(self,
|
832
|
+
WrapperContract.instance.property_updated(self,
|
838
833
|
'wrapper'=>self,
|
839
834
|
'property_name'=> _name,
|
840
835
|
'property_family'=>_family,
|
841
836
|
'property_old_value'=>old_value,
|
842
|
-
'property_new_value'=>_value
|
843
|
-
)
|
837
|
+
'property_new_value'=>_value
|
844
838
|
)
|
845
839
|
end
|
846
840
|
|
data/base/a-utils.rb
CHANGED
@@ -263,7 +263,7 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
|
|
263
263
|
relief 'flat'
|
264
264
|
}
|
265
265
|
if perc
|
266
|
-
|
266
|
+
p_height = TkWinfo.screenheight(self)
|
267
267
|
y = (p_height/100*height).to_i
|
268
268
|
else
|
269
269
|
y = height
|
@@ -442,20 +442,68 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
|
|
442
442
|
|
443
443
|
end
|
444
444
|
|
445
|
-
class
|
445
|
+
class TkBaseTitledFrame < TkFrame
|
446
446
|
attr_reader :frame
|
447
447
|
attr_reader :top
|
448
448
|
|
449
|
-
def initialize(parent=nil,
|
450
|
-
super(parent,
|
451
|
-
@state = 'normal'
|
449
|
+
def initialize(parent=nil, *args)
|
450
|
+
super(parent, *args)
|
452
451
|
@parent = parent
|
453
452
|
@title_height = 18
|
454
|
-
|
455
453
|
@top = TkFrame.new(self){
|
456
454
|
background '#303b50'
|
455
|
+
#foreground 'white'
|
456
|
+
#anchor 'w'
|
457
457
|
}.place('x'=>0, 'y'=>0,'height'=>@title_height, 'relwidth'=>1)
|
458
|
+
#.pack('fill'=> 'x','ipady'=> @title_height, 'side'=>'top')
|
459
|
+
|
460
|
+
|
461
|
+
@frame = create_frame
|
462
|
+
|
463
|
+
|
458
464
|
|
465
|
+
@button_frame=TkFrame.new(@top){
|
466
|
+
#background '#303b50'
|
467
|
+
}.pack('side'=> 'right','anchor'=> 'w')
|
468
|
+
|
469
|
+
self.head_buttons
|
470
|
+
end
|
471
|
+
|
472
|
+
def create_frame
|
473
|
+
return TkFrame.new(self).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1)
|
474
|
+
#pack('fill'=>'both','expand'=> 1, 'anchor'=>'center')
|
475
|
+
#
|
476
|
+
end
|
477
|
+
|
478
|
+
def add_button(_label,_proc=nil,_image=nil, _side= 'right')
|
479
|
+
TkButton.new(@button_frame){
|
480
|
+
text _label if _label
|
481
|
+
image TkPhotoImage.new('dat' => _image) if _image
|
482
|
+
relief 'flat'
|
483
|
+
font 'helvetica 8 bold'
|
484
|
+
#borderwidth 0
|
485
|
+
#background '#303b50'
|
486
|
+
#background '#8080ff'
|
487
|
+
pack('side'=> _side,'anchor'=> 'e')
|
488
|
+
bind('1',_proc) if _proc
|
489
|
+
}
|
490
|
+
end
|
491
|
+
|
492
|
+
def head_buttons
|
493
|
+
@bmaxmin = add_button('[ ]',proc{resize}, W_MAX_GIF)
|
494
|
+
end
|
495
|
+
|
496
|
+
end
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
class TkTitledFrame < TkBaseTitledFrame
|
501
|
+
attr_reader :frame
|
502
|
+
attr_reader :top
|
503
|
+
|
504
|
+
def initialize(parent=nil, title='...', img=nil , keys=nil)
|
505
|
+
super(parent, keys)
|
506
|
+
@state = 'normal'
|
459
507
|
@title_label =TkLabel.new(@top){
|
460
508
|
text title+' :: '
|
461
509
|
anchor 'w'
|
@@ -474,12 +522,7 @@ class TkTitledFrame < TkFrame
|
|
474
522
|
compound 'left'
|
475
523
|
pack('side'=> 'left','anchor'=> 'e')
|
476
524
|
}
|
477
|
-
@button_frame=TkFrame.new(@top){
|
478
|
-
#background '#303b50'
|
479
|
-
}.pack('side'=> 'right','anchor'=> 'w')
|
480
525
|
|
481
|
-
self.head_buttons
|
482
|
-
@frame = create_frame
|
483
526
|
@ap = Array.new
|
484
527
|
@apx = Array.new
|
485
528
|
@apy = Array.new
|
@@ -495,9 +538,6 @@ class TkTitledFrame < TkFrame
|
|
495
538
|
@title_label.text(_text+'::')
|
496
539
|
end
|
497
540
|
|
498
|
-
def create_frame
|
499
|
-
return TkFrame.new(self).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1)
|
500
|
-
end
|
501
541
|
|
502
542
|
def add_sep(_width=0,_background =@top.background)
|
503
543
|
TkLabel.new(@top){||
|
@@ -507,19 +547,6 @@ class TkTitledFrame < TkFrame
|
|
507
547
|
}
|
508
548
|
end
|
509
549
|
|
510
|
-
def add_button(_label,_proc=nil,_image=nil, _side= 'right')
|
511
|
-
TkButton.new(@button_frame){
|
512
|
-
text _label if _label
|
513
|
-
image TkPhotoImage.new('dat' => _image) if _image
|
514
|
-
relief 'flat'
|
515
|
-
font 'helvetica 8 bold'
|
516
|
-
#borderwidth 0
|
517
|
-
#background '#303b50'
|
518
|
-
#background '#8080ff'
|
519
|
-
pack('side'=> _side,'anchor'=> 'e', 'padx'=>0, 'pady'=>0)
|
520
|
-
bind('1',_proc) if _proc
|
521
|
-
}
|
522
|
-
end
|
523
550
|
|
524
551
|
def head_buttons
|
525
552
|
@bmaxmin = add_button('[ ]',proc{resize}, W_MAX_GIF)
|
@@ -601,10 +628,10 @@ class Application
|
|
601
628
|
init_config
|
602
629
|
yield(self) if block_given?
|
603
630
|
end
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
631
|
+
|
632
|
+
def Application.instance
|
633
|
+
@@instance
|
634
|
+
end
|
608
635
|
|
609
636
|
def init_config
|
610
637
|
self['applicationParams'].persistent_file = File.join(local_dir, self['applicationParams'].name+'.pers')
|
@@ -623,13 +650,13 @@ class Application
|
|
623
650
|
@objs[_name] = _obj
|
624
651
|
end
|
625
652
|
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
653
|
+
# this method load arcadia.conf from local directory for personalizations
|
654
|
+
def load_local_config(_create_if_not_exist=true)
|
655
|
+
local_file_config = File.join(local_dir,File.basename(self['applicationParams'].config_file))
|
656
|
+
if FileTest.exist?(local_file_config)
|
657
|
+
self['conf'].update(self.config_file2hash(local_file_config))
|
658
|
+
elsif _create_if_not_exist
|
659
|
+
f = File.new(local_file_config, "w")
|
633
660
|
begin
|
634
661
|
if f
|
635
662
|
p = self['conf']
|
@@ -642,8 +669,8 @@ class Application
|
|
642
669
|
ensure
|
643
670
|
f.close unless f.nil?
|
644
671
|
end
|
645
|
-
|
646
|
-
|
672
|
+
end
|
673
|
+
end
|
647
674
|
|
648
675
|
def local_dir
|
649
676
|
_local_dir = File.join(ENV["HOME"],'.'+self['applicationParams'].name) if ENV["HOME"]
|
@@ -716,10 +743,10 @@ class Application
|
|
716
743
|
|
717
744
|
|
718
745
|
def load_persist(_persist_file)
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
746
|
+
if _persist_file && !FileTest::exist?(_persist_file)
|
747
|
+
Dir.mkdir(File.dirname(_persist_file)) unless File.exists?(File.dirname(_persist_file))
|
748
|
+
File.new(_persist_file, File::CREAT)
|
749
|
+
end
|
723
750
|
|
724
751
|
if _persist_file && FileTest::exist?(_persist_file)
|
725
752
|
f = File::open(_persist_file,'r')
|
@@ -783,3 +810,167 @@ class TkApplication < Application
|
|
783
810
|
Tk.mainloop
|
784
811
|
end
|
785
812
|
end
|
813
|
+
|
814
|
+
module TkMovable
|
815
|
+
def start_moving(_moving_obj=self, _moved_obj=self)
|
816
|
+
@x0 = 0
|
817
|
+
@y0 = 0
|
818
|
+
@moving_obj = _moving_obj
|
819
|
+
@moved_obj = _moved_obj
|
820
|
+
@moving_obj.bind_append("B1-Motion", proc{|x, y| moving_do_move_obj(x,y)},"%x %y")
|
821
|
+
@moving_obj.bind_append("ButtonPress-1", proc{|e| moving_do_press(e.x, e.y)})
|
822
|
+
end
|
823
|
+
|
824
|
+
def stop_moving
|
825
|
+
@moving_obj.bind_remove("B1-Motion")
|
826
|
+
@moving_obj.bind_remove("ButtonPress-1")
|
827
|
+
end
|
828
|
+
|
829
|
+
def moving_do_press(_x, _y)
|
830
|
+
@x0 = _x
|
831
|
+
@y0 = _y
|
832
|
+
end
|
833
|
+
|
834
|
+
def moving_do_move_obj(_x, _y)
|
835
|
+
_x = TkPlace.info(@moved_obj)['x'] + _x - @x0
|
836
|
+
_y = TkPlace.info(@moved_obj)['y'] + _y - @y0
|
837
|
+
@moved_obj.place('x'=>_x, 'y'=>_y)
|
838
|
+
end
|
839
|
+
|
840
|
+
end
|
841
|
+
|
842
|
+
module TkResizabled
|
843
|
+
MIN_WIDTH = 50
|
844
|
+
MIN_HEIGHT = 50
|
845
|
+
def start_resizing(_moving_obj=self, _moved_obj=self)
|
846
|
+
@x0 = 0
|
847
|
+
@y0 = 0
|
848
|
+
@moving_obj = _moving_obj
|
849
|
+
@moved_obj = _moved_obj
|
850
|
+
@moving_obj.bind_append("B1-Motion", proc{|x, y| resizing_do_move_obj(x,y)},"%x %y")
|
851
|
+
@moving_obj.bind_append("ButtonPress-1", proc{|e| resizing_do_press(e.x, e.y)})
|
852
|
+
end
|
853
|
+
|
854
|
+
def stop_resizing
|
855
|
+
@moving_obj.bind_remove("B1-Motion")
|
856
|
+
@moving_obj.bind_remove("ButtonPress-1")
|
857
|
+
end
|
858
|
+
|
859
|
+
def resizing_do_press(_x, _y)
|
860
|
+
@x0 = _x
|
861
|
+
@y0 = _y
|
862
|
+
end
|
863
|
+
|
864
|
+
def resizing_do_move_obj(_x, _y)
|
865
|
+
_width0 = TkPlace.info(@moved_obj)['width']
|
866
|
+
_height0 = TkPlace.info(@moved_obj)['height']
|
867
|
+
_width = _width0 + _x - @x0
|
868
|
+
_height = _height0 + _y -@y0
|
869
|
+
_width = MIN_WIDTH if _width < MIN_WIDTH
|
870
|
+
_height = MIN_HEIGHT if _height < MIN_HEIGHT
|
871
|
+
@moved_obj.place('width'=>_width, 'height'=>_height)
|
872
|
+
end
|
873
|
+
|
874
|
+
end
|
875
|
+
|
876
|
+
|
877
|
+
class TkFloatTitledFrame < TkBaseTitledFrame
|
878
|
+
include TkMovable
|
879
|
+
include TkResizabled
|
880
|
+
def initialize(parent=nil, *args)
|
881
|
+
super(parent)
|
882
|
+
frame.place('height'=>-32)
|
883
|
+
borderwidth 2
|
884
|
+
relief 'groove'
|
885
|
+
|
886
|
+
@top_label = TkLabel.new(@top){
|
887
|
+
background '#303b50'
|
888
|
+
foreground 'white'
|
889
|
+
anchor 'w'
|
890
|
+
}.pack('fill'=>'x', 'side'=>'top')
|
891
|
+
#.place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1 ,'width'=>-20)
|
892
|
+
|
893
|
+
@resizing_label=TkLabel.new(self){
|
894
|
+
#background '#303b50'
|
895
|
+
text '-'
|
896
|
+
image TkPhotoImage.new('dat'=>EXPAND_LIGHT_GIF)
|
897
|
+
}.pack('side'=> 'right','anchor'=> 's')
|
898
|
+
|
899
|
+
|
900
|
+
start_moving(@top_label, self)
|
901
|
+
start_resizing(@resizing_label, self)
|
902
|
+
end
|
903
|
+
|
904
|
+
def title(_text)
|
905
|
+
@top_label.text(_text)
|
906
|
+
end
|
907
|
+
|
908
|
+
|
909
|
+
def on_close=(_proc)
|
910
|
+
add_button('X', _proc, TAB_CLOSE_GIF)
|
911
|
+
end
|
912
|
+
|
913
|
+
def hide
|
914
|
+
@manager = TkWinfo.manager(self)
|
915
|
+
if @manager == 'place'
|
916
|
+
@x_place = TkPlace.info(self)['x']
|
917
|
+
@y_place = TkPlace.info(self)['y']
|
918
|
+
@width_place = TkPlace.info(self)['width']
|
919
|
+
@height_place = TkPlace.info(self)['height']
|
920
|
+
self.unplace
|
921
|
+
end
|
922
|
+
end
|
923
|
+
|
924
|
+
def show
|
925
|
+
if @manager == 'place'
|
926
|
+
self.place('x'=>@x_place, 'y'=>@y_place, 'width'=>@width_place, 'height'=>@height_place)
|
927
|
+
end
|
928
|
+
end
|
929
|
+
|
930
|
+
def head_buttons
|
931
|
+
end
|
932
|
+
|
933
|
+
end
|
934
|
+
|
935
|
+
class TkProgressframe < TkFloatTitledFrame
|
936
|
+
def initialize(parent=nil, _max=100, *args)
|
937
|
+
super(parent)
|
938
|
+
@max = _max
|
939
|
+
@progress = TkVariable.new
|
940
|
+
@progress.value = -1
|
941
|
+
Tk::BWidget::ProgressBar.new(self, :width=>150, :height=>10,
|
942
|
+
:background=>'red',
|
943
|
+
:foreground=>'blue',
|
944
|
+
:variable=>@progress,
|
945
|
+
:borderwidth=>0,
|
946
|
+
:relief=>'flat',
|
947
|
+
:maximum=>_max).place('width' => '150','x' => 25,'y' => 30,'height' => 15)
|
948
|
+
|
949
|
+
@buttons_frame = TkFrame.new(self).pack('fill'=>'x', 'side'=>'bottom')
|
950
|
+
|
951
|
+
@b_cancel = TkButton.new(@buttons_frame){|_b_go|
|
952
|
+
default 'disabled'
|
953
|
+
text 'Cancel'
|
954
|
+
overrelief 'raised'
|
955
|
+
justify 'center'
|
956
|
+
pack('side'=>'top','ipadx'=>5, 'padx'=>5)
|
957
|
+
}
|
958
|
+
|
959
|
+
place('x'=>100,'y'=>100,'height'=> 120,'width'=> 200)
|
960
|
+
end
|
961
|
+
|
962
|
+
def quit
|
963
|
+
#self.destroy
|
964
|
+
end
|
965
|
+
|
966
|
+
def progress(_incr=1)
|
967
|
+
@progress.numeric += _incr
|
968
|
+
end
|
969
|
+
|
970
|
+
def on_cancel=(_proc)
|
971
|
+
@b_cancel.bind_append('1', _proc)
|
972
|
+
end
|
973
|
+
|
974
|
+
|
975
|
+
end
|
976
|
+
|
data/conf/arcadia.conf
CHANGED
@@ -73,9 +73,11 @@ toolbar_buttons.run.debugquit.action=debug->debug_quit
|
|
73
73
|
toolbar_buttons.sys=exit
|
74
74
|
toolbar_buttons.sys.exit.name=exit
|
75
75
|
toolbar_buttons.sys.exit.hint=Exit from Arcadia
|
76
|
-
toolbar_buttons.sys.exit.image=
|
76
|
+
toolbar_buttons.sys.exit.image=EXIT_STORY_GIF
|
77
77
|
toolbar_buttons.sys.exit.action=arcadia->do_exit
|
78
78
|
|
79
|
+
toolbar_show=yes
|
80
|
+
|
79
81
|
#:::::::::::::::: Libraries group ::::::::::::::::::::::<begin>
|
80
82
|
|
81
83
|
# this section is for the components pallets of the wrapped class
|
@@ -146,11 +148,11 @@ i386-mswin32::splash.banner.font=Ariel 8 italic
|
|
146
148
|
#:::::::::::::::: splash group ::::::::::::::::::::::<begin>
|
147
149
|
|
148
150
|
#:::::::::::::::: main group ::::::::::::::::::::::<begin>
|
149
|
-
main.mainmenu.font=courier
|
151
|
+
main.mainmenu.font=courier 12
|
150
152
|
i386-freebsd6::main.mainmenu.font=courier 12
|
151
153
|
i386-mswin32::main.mainmenu.font=Ariel 8
|
152
|
-
main.font=courier
|
153
|
-
main.font.bold=courier
|
154
|
+
main.font=courier 12
|
155
|
+
main.font.bold=courier 12 bold
|
154
156
|
i386-freebsd6::main.font=courier 12
|
155
157
|
i386-freebsd6::main.font=courier 12 bold
|
156
158
|
i386-mswin32::main.font=Ariel 8
|
@@ -160,39 +162,41 @@ i386-mswin32::main.component.font=Ariel 8
|
|
160
162
|
#:::::::::::::::: main group ::::::::::::::::::::::<end>
|
161
163
|
|
162
164
|
#:::::::::::::::: inspector group ::::::::::::::::::::::<begin>
|
163
|
-
inspectors.tabs.font=courier
|
165
|
+
inspectors.tabs.font=courier 12
|
164
166
|
i386-mswin32::inspectors.tabs.font=Ariel 8
|
165
167
|
i386-freebsd6::inspectors.tabs.font=courier 12
|
166
168
|
inspectors.tabs.side=top
|
167
|
-
inspectors.inspector.tabs.font=courier
|
169
|
+
inspectors.inspector.tabs.font=courier 12
|
168
170
|
i386-freebsd6::inspectors.inspector.tabs.font=courier 12
|
169
171
|
i386-mswin32::inspectors.inspector.tabs.font=Ariel 8
|
170
172
|
inspectors.inspector.tabs.side=top
|
171
|
-
inspectors.inspector.key.font=courier
|
172
|
-
inspectors.inspector.value.font=courier
|
173
|
+
inspectors.inspector.key.font=courier 12
|
174
|
+
inspectors.inspector.value.font=courier 12
|
173
175
|
i386-freebsd6::inspectors.inspector.key.font=courier 12
|
174
176
|
i386-freebsd6::inspectors.inspector.value.font=courier 12
|
175
177
|
i386-mswin32::inspectors.inspector.key.font=Ariel 8
|
176
178
|
i386-mswin32::inspectors.inspector.value.font=Ariel 8
|
177
|
-
inspectors.inspector.tree.font=courier
|
179
|
+
inspectors.inspector.tree.font=courier 12
|
178
180
|
i386-mswin32::inspectors.inspector.tree.font=Ariel 8
|
179
181
|
|
180
|
-
inspectors.debug.tabs.font=courier
|
182
|
+
inspectors.debug.tabs.font=courier 12
|
183
|
+
inspectors.debug.tabs.font.bold=courier 12 bold
|
181
184
|
i386-freebsd6::inspectors.debug.tabs.font=courier 12
|
182
|
-
i386-mswin32::inspectors.debug.tabs.font=courier 8
|
183
|
-
inspectors.debug.tabs.font.bold=courier 9 bold
|
184
185
|
i386-freebsd6::inspectors.debug.tabs.font.bold=courier 12 bold
|
186
|
+
i386-mswin32::inspectors.debug.tabs.font=courier 8
|
185
187
|
i386-mswin32::inspectors.debug.tabs.font.bold=courier 8 bold
|
186
188
|
#:::::::::::::::: inspector group ::::::::::::::::::::::<end>
|
187
189
|
|
188
190
|
|
189
191
|
|
190
192
|
#:::::::::::::::: all ::::::::::::::::::::::<begin>
|
191
|
-
all.frame.title.font=courier
|
192
|
-
all.frame.title.font.bold=courier
|
193
|
-
all.frame.title.font.italic=courier
|
193
|
+
all.frame.title.font=courier 12
|
194
|
+
all.frame.title.font.bold=courier 12 bold
|
195
|
+
all.frame.title.font.italic=courier 12 italic
|
194
196
|
i386-freebsd6::all.frame.title.font=courier 12
|
195
197
|
i386-freebsd6::all.frame.title.font.bold=courier 12 bold
|
196
198
|
i386-freebsd6::all.frame.title.font.italic=courier 12 italic
|
197
|
-
i386-mswin32::all.frame.title.font=
|
199
|
+
i386-mswin32::all.frame.title.font=courier 9
|
200
|
+
i386-mswin32::all.frame.title.font.bold=courier 9 bold
|
201
|
+
i386-mswin32::all.frame.title.font.italic=courier 9 italic
|
198
202
|
#:::::::::::::::: all ::::::::::::::::::::::<end>
|