arcadia 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/README +132 -134
  2. data/bin/arcadia +13 -0
  3. data/conf/arcadia.conf +196 -3
  4. data/conf/arcadia.init.rb +27 -6
  5. data/conf/arcadia.res.rb +10 -0
  6. data/ext/ae-complete-code/ae-complete-code.rb +76 -82
  7. data/ext/ae-doc-code/ae-doc-code.rb +295 -291
  8. data/ext/ae-editor/ae-editor.conf +88 -67
  9. data/ext/ae-editor/ae-editor.rb +400 -202
  10. data/ext/ae-editor/langs/conf.lang +16 -5
  11. data/ext/ae-editor/langs/lang.lang.bind +1 -1
  12. data/ext/ae-editor/langs/rb.lang +77 -41
  13. data/ext/ae-editor/langs/rbw.lang.bind +1 -1
  14. data/ext/ae-event-log/ae-event-log.rb +46 -45
  15. data/ext/ae-file-history/ae-file-history.conf +1 -1
  16. data/ext/ae-file-history/ae-file-history.rb +373 -298
  17. data/ext/ae-output/ae-output.conf +2 -0
  18. data/ext/ae-output/ae-output.rb +200 -202
  19. data/ext/ae-rad/ae-rad-inspector.rb +64 -70
  20. data/ext/ae-rad/ae-rad-palette.rb +14 -14
  21. data/ext/ae-rad/ae-rad.conf +2 -0
  22. data/ext/ae-rad/lib/tk/al-tk.rb +2991 -2987
  23. data/ext/ae-rad/lib/tk/al-tkarcadia.rb +26 -26
  24. data/ext/ae-ruby-debug/ae-ruby-debug.conf +8 -8
  25. data/ext/ae-ruby-debug/ae-ruby-debug.rb +1566 -1465
  26. data/ext/ae-search-in-files/ae-search-in-files.rb +294 -284
  27. data/ext/ae-shell/ae-shell.rb +20 -11
  28. data/{base → lib}/a-commons.rb +291 -80
  29. data/{base → lib}/a-contracts.rb +40 -18
  30. data/{arcadia.rb → lib/a-core.rb} +238 -148
  31. data/{base → lib}/a-tkcommons.rb +81 -63
  32. metadata +64 -65
  33. data/ext/ae-action-dispatcher/ae-action-dispatcher.conf +0 -6
  34. data/ext/ae-action-dispatcher/ae-action-dispatcher.rb +0 -22
  35. data/ext/ae-inspector/ae-inspector.conf +0 -7
  36. data/ext/ae-inspector/ae-inspector.rb +0 -1519
  37. data/ext/ae-palette/ae-palette.conf +0 -7
  38. data/ext/ae-palette/ae-palette.rb +0 -265
@@ -3,10 +3,11 @@
3
3
  # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
4
  #
5
5
 
6
- require "base/a-commons"
6
+ require "lib/a-commons"
7
7
 
8
8
  class TkApplication < Application
9
9
  def run
10
+ Tk.appname(self['applicationParams'].name)
10
11
  Tk.mainloop
11
12
  end
12
13
  end
@@ -183,11 +184,15 @@ end
183
184
 
184
185
 
185
186
  class AGTkSplittedFrames < TkFrame
186
- def initialize(parent=nil, length=10, keys=nil)
187
+ def initialize(parent=nil, length=10, slen=5, keys=nil)
188
+ if keys.nil?
189
+ keys = Hash.new
190
+ end
191
+ keys.update(Arcadia.style('panel'))
187
192
  super(parent, keys)
188
193
  @parent = parent
189
- @slen = 5
190
- relief 'groove'
194
+ @slen = slen
195
+ #relief 'groove'
191
196
  end
192
197
 
193
198
  def maximize(_frame)
@@ -209,14 +214,20 @@ end
209
214
 
210
215
  class AGTkVSplittedFrames < AGTkSplittedFrames
211
216
  attr_reader :left_frame, :right_frame, :splitter_frame
212
- def initialize(parent=nil, width=10, keys=nil)
213
- super(parent, width, keys)
217
+ def initialize(parent=nil, width=10, slen=5, perc=false, keys=nil)
218
+ super(parent, width, slen, keys)
214
219
 
215
220
  self.pack(:expand=>true, :fill=>:both)
216
- @left_frame = TkFrame.new(self){
217
- relief 'flat'
221
+ @left_frame = TkFrame.new(self, Arcadia.style('panel')){
222
+ #relief 'flat'
218
223
  }
219
- x = width
224
+ if perc
225
+ p_width = TkWinfo.screenwidth(self)
226
+ x = (p_width/100*width).to_i
227
+ else
228
+ x = width
229
+ end
230
+
220
231
  @left_frame.place(
221
232
  'relx' => 0,
222
233
  'x' => 0,
@@ -232,9 +243,9 @@ class AGTkVSplittedFrames < AGTkSplittedFrames
232
243
  @left_frame_obj.relwidth = 0
233
244
  @left_frame_obj.relheight = 1
234
245
 
235
- @splitter_frame = TkFrame.new(self){
236
- relief 'raised'
237
- border 1
246
+ @splitter_frame = TkFrame.new(self, Arcadia.style('splitter')){
247
+ #relief 'raised'
248
+ #border 1
238
249
  }
239
250
 
240
251
  @splitter_frame.place(
@@ -251,11 +262,11 @@ class AGTkVSplittedFrames < AGTkSplittedFrames
251
262
  proc{do_resize}
252
263
  )
253
264
  _self = self
254
- @b_left = TkButton.new{
265
+ @b_left = TkButton.new(nil, Arcadia.style('button')){
255
266
  image TkPhotoImage.new('dat'=>LEFT_SIDE_GIF)
256
267
  }
257
268
 
258
- @b_right = TkButton.new{
269
+ @b_right = TkButton.new(nil, Arcadia.style('button')){
259
270
  image TkPhotoImage.new('dat'=>RIGHT_SIDE_GIF)
260
271
  }
261
272
  @proc_unplace = proc{
@@ -303,26 +314,27 @@ class AGTkVSplittedFrames < AGTkSplittedFrames
303
314
  }
304
315
  }, "%x %y")
305
316
 
306
- @splitter_frame.bind_append(
307
- "Enter",
308
- proc{
309
- @color_save = @splitter_frame.background
310
- @splitter_frame.background('#9aa6a7')}
311
- )
312
- @splitter_frame.bind_append(
313
- "Leave",
314
- proc{
315
- @splitter_frame.background(@color_save)
316
- }
317
- )
317
+ # @splitter_frame.bind_append(
318
+ # "Enter",
319
+ # proc{
320
+ # @color_save = @splitter_frame.background
321
+ # @splitter_frame.background(Arcadia.conf('splitter.highlightbackground'))}
322
+ # #@splitter_frame.background('#9aa6a7')}
323
+ # )
324
+ # @splitter_frame.bind_append(
325
+ # "Leave",
326
+ # proc{
327
+ # @splitter_frame.background(@color_save)
328
+ # }
329
+ # )
318
330
  @splitter_frame_obj = AGTkObjPlace.new(@splitter_frame, 'x')
319
331
  @splitter_frame_obj.width = @slen
320
332
  @splitter_frame_obj.height = 0
321
333
  @splitter_frame_obj.relwidth = 0
322
334
  @splitter_frame_obj.relheight = 1
323
335
  x = x + @slen
324
- @right_frame = TkFrame.new(self){
325
- relief 'flat'
336
+ @right_frame = TkFrame.new(self, Arcadia.style('panel')){
337
+ #relief 'flat'
326
338
  }
327
339
  @right_frame.place(
328
340
  'relwidth' => 1,
@@ -376,6 +388,10 @@ class AGTkVSplittedFrames < AGTkSplittedFrames
376
388
  @right_frame_obj.width = - _w - @slen
377
389
  @right_frame_obj.amove(_w + @slen,0)
378
390
  end
391
+
392
+ def is_left_hide?
393
+ @left_frame_obj.w == 0
394
+ end
379
395
 
380
396
  def hide_right
381
397
  if (@state=='right')
@@ -425,8 +441,8 @@ end
425
441
 
426
442
  class AGTkOSplittedFrames < AGTkSplittedFrames
427
443
  attr_reader :top_frame, :bottom_frame
428
- def initialize(parent=nil, height=10, perc=false,keys=nil)
429
- super(parent, height, keys)
444
+ def initialize(parent=nil, height=10, slen=5, perc=false, keys=nil)
445
+ super(parent, height, slen, keys)
430
446
  self.place(
431
447
  'relwidth' => 1,
432
448
  'relx' => 0,
@@ -436,8 +452,8 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
436
452
  'rely' => 0,
437
453
  'bordermode' => 'inside'
438
454
  )
439
- @top_frame = TkFrame.new(self){
440
- relief 'flat'
455
+ @top_frame = TkFrame.new(self, Arcadia.style('panel')){
456
+ # relief 'flat'
441
457
  }
442
458
  if perc
443
459
  p_height = TkWinfo.screenheight(self)
@@ -455,9 +471,9 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
455
471
  @top_frame_obj.height = y
456
472
  @top_frame_obj.relwidth = 1
457
473
  @top_frame_obj.relheight = 0
458
- @splitter_frame = TkFrame.new(self){
459
- relief 'groove'
460
- border 1
474
+ @splitter_frame = TkFrame.new(self, Arcadia.style('splitter')){
475
+ #relief 'groove'
476
+ #border 1
461
477
  }
462
478
  @splitter_frame.place(
463
479
  'relx' => 0,
@@ -482,8 +498,8 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
482
498
  @splitter_frame_obj.relwidth = 1
483
499
  @splitter_frame_obj.relheight = 0
484
500
  y = y + @slen
485
- @bottom_frame = TkFrame.new(self){
486
- relief 'flat'
501
+ @bottom_frame = TkFrame.new(self, Arcadia.style('panel')){
502
+ # relief 'flat'
487
503
  }
488
504
  @bottom_frame.place(
489
505
  'relwidth' => 1,
@@ -500,10 +516,10 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
500
516
  @bottom_frame_obj.height = -y
501
517
  @bottom_frame_obj.relwidth = 1
502
518
  @bottom_frame_obj.relheight = 1
503
- _xbutton = TkButton.new(@splitter_frame){
519
+ _xbutton = TkButton.new(@splitter_frame, Arcadia.style('toolbarbutton')){
504
520
  background '#4966d7'
505
- overrelief 'raised'
506
- relief 'flat'
521
+ #overrelief 'raised'
522
+ #relief 'flat'
507
523
  }
508
524
  _xbutton.place(
509
525
  'x' => 0,
@@ -516,10 +532,10 @@ class AGTkOSplittedFrames < AGTkSplittedFrames
516
532
  "ButtonPress-1",
517
533
  proc{hide_top}
518
534
  )
519
- _ybutton = TkButton.new(@splitter_frame){
535
+ _ybutton = TkButton.new(@splitter_frame, Arcadia.style('toolbarbutton')){
520
536
  background '#118124'
521
- overrelief 'raised'
522
- relief 'flat'
537
+ #overrelief 'raised'
538
+ #relief 'flat'
523
539
  }
524
540
  _ybutton.place(
525
541
  'x' => 21,
@@ -624,11 +640,11 @@ class TkBaseTitledFrame < TkFrame
624
640
  attr_reader :top
625
641
 
626
642
  def initialize(parent=nil, *args)
627
- super(parent, *args)
643
+ super(parent, Arcadia.style('panel'))
628
644
  @parent = parent
629
645
  @title_height = 18
630
646
  @top = TkFrame.new(self){
631
- background '#303b50'
647
+ background Arcadia.conf('titlelabel.background')
632
648
  #foreground 'white'
633
649
  #anchor 'w'
634
650
  }.place('x'=>0, 'y'=>0,'height'=>@title_height, 'relwidth'=>1)
@@ -641,22 +657,23 @@ class TkBaseTitledFrame < TkFrame
641
657
 
642
658
  @button_frame=TkFrame.new(@top){
643
659
  #background '#303b50'
660
+ background Arcadia.conf('titlelabel.background')
644
661
  }.pack('side'=> 'right','anchor'=> 'w')
645
662
 
646
663
  self.head_buttons
647
664
  end
648
665
 
649
666
  def create_frame
650
- return TkFrame.new(self).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1)
667
+ return TkFrame.new(self,Arcadia.style('panel')).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1)
651
668
  #pack('fill'=>'both','expand'=> 1, 'anchor'=>'center')
652
669
  #
653
670
  end
654
671
 
655
672
  def add_button(_label,_proc=nil,_image=nil, _side= 'right')
656
- TkButton.new(@button_frame){
673
+ TkButton.new(@button_frame, Arcadia.style('toolbarbutton')){
657
674
  text _label if _label
658
675
  image TkPhotoImage.new('dat' => _image) if _image
659
- relief 'flat'
676
+ #relief 'flat'
660
677
  font 'helvetica 8 bold'
661
678
  #borderwidth 0
662
679
  #background '#303b50'
@@ -678,24 +695,27 @@ class TkTitledFrame < TkBaseTitledFrame
678
695
  attr_reader :frame
679
696
  attr_reader :top
680
697
 
681
- def initialize(parent=nil, title='...', img=nil , keys=nil)
698
+ def initialize(parent=nil, title=nil, img=nil , keys=nil)
682
699
  super(parent, keys)
683
700
  @state = 'normal'
684
- @title_label =TkLabel.new(@top){
685
- text title+' :: '
701
+ title.nil??_text_title ='':_text_title = title+' :: '
702
+ @title_label =TkLabel.new(@top, Arcadia.style('titlelabel')){
703
+ text _text_title
686
704
  anchor 'w'
687
- font $arcadia['conf']['all.frame.title.font']
688
- background '#303b50'
689
- foreground '#e8e651'
705
+ #font $arcadia['conf']['all.frame.title.font']
706
+ # background '#303b50'
707
+ # foreground '#e8e651'
708
+ # font Arcadia.conf('titlepanel.font')
709
+ # background Arcadia.conf('titlepanel.background')
710
+ # foreground Arcadia.conf('titlepanel.foreground')
690
711
  compound 'left'
691
712
  image TkAllPhotoImage.new('file' => img) if img
692
713
  pack('side'=> 'left','anchor'=> 'e')
693
714
  }
694
- @top_label =TkLabel.new(@top){
715
+ @top_label =TkLabel.new(@top, Arcadia.style('titlelabel')){
695
716
  anchor 'w'
696
- font $arcadia['conf']['all.frame.title.font.italic']
697
- background '#303b50'
698
- foreground '#FFFFFF'
717
+ font "#{Arcadia.conf('titlelabel.font')} italic"
718
+ foreground Arcadia.conf('titlecontext.foreground')
699
719
  compound 'left'
700
720
  pack('side'=> 'left','anchor'=> 'e')
701
721
  }
@@ -795,15 +815,12 @@ class TkFloatTitledFrame < TkBaseTitledFrame
795
815
  borderwidth 2
796
816
  relief 'groove'
797
817
 
798
- @top_label = TkLabel.new(@top){
799
- background '#303b50'
800
- foreground 'white'
818
+ @top_label = TkLabel.new(@top, Arcadia.style('titlelabel')){
801
819
  anchor 'w'
802
820
  }.pack('fill'=>'x', 'side'=>'top')
803
821
  #.place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1 ,'width'=>-20)
804
822
 
805
- @resizing_label=TkLabel.new(self){
806
- #background '#303b50'
823
+ @resizing_label=TkLabel.new(self, Arcadia.style('label')){
807
824
  text '-'
808
825
  image TkPhotoImage.new('dat'=>EXPAND_LIGHT_GIF)
809
826
  }.pack('side'=> 'right','anchor'=> 's')
@@ -860,6 +877,7 @@ class TkFloatTitledFrame < TkBaseTitledFrame
860
877
  end
861
878
 
862
879
  class TkProgressframe < TkFloatTitledFrame
880
+ attr_accessor :max
863
881
  def initialize(parent=nil, _max=100, *args)
864
882
  super(parent)
865
883
  @max = _max
metadata CHANGED
@@ -1,43 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: arcadia
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2007-10-25 00:00:00 +02:00
8
- summary: An Ide for Ruby application building with ruby-tk.
9
- require_paths:
10
- - lib
11
- email: antonio-galeone@rubyforge.org
12
- homepage: http://arcadia.rubyforge.org
13
- rubyforge_project:
14
- description:
15
- autorequire:
16
- default_executable:
17
- bindir: .
18
- has_rdoc: false
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.3.0
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Antonio Galeone
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-28 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rcodetools
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.5.0.0
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: ruby-debug
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.9.3
32
+ version:
33
+ description:
34
+ email: antonio-galeone@rubyforge.org
35
+ executables:
36
+ - arcadia
37
+ extensions: []
38
+
39
+ extra_rdoc_files:
40
+ - README
31
41
  files:
32
- - base/a-contracts.rb
33
- - base/a-commons.rb
34
- - base/a-tkcommons.rb
42
+ - bin/arcadia
43
+ - lib/a-commons.rb
44
+ - lib/a-tkcommons.rb
45
+ - lib/a-contracts.rb
46
+ - lib/a-core.rb
35
47
  - conf/arcadia.conf
36
48
  - conf/arcadia.init.rb
37
49
  - conf/arcadia.res.rb
38
- - ext/ae-inspector
39
- - ext/ae-inspector/ae-inspector.rb
40
- - ext/ae-inspector/ae-inspector.conf
41
50
  - ext/ae-shell
42
51
  - ext/ae-shell/ae-shell.conf
43
52
  - ext/ae-shell/ae-shell.rb
@@ -45,9 +54,6 @@ files:
45
54
  - ext/ae-complete-code
46
55
  - ext/ae-complete-code/ae-complete-code.conf
47
56
  - ext/ae-complete-code/ae-complete-code.rb
48
- - ext/ae-palette
49
- - ext/ae-palette/ae-palette.rb
50
- - ext/ae-palette/ae-palette.conf
51
57
  - ext/ae-editor
52
58
  - ext/ae-editor/ae-editor.rb
53
59
  - ext/ae-editor/ae-editor.conf
@@ -71,8 +77,8 @@ files:
71
77
  - ext/ae-doc-code/ae-doc-code.rb
72
78
  - ext/ae-doc-code/ae-doc-code.conf
73
79
  - ext/ae-ruby-debug
74
- - ext/ae-ruby-debug/ae-ruby-debug.rb
75
80
  - ext/ae-ruby-debug/ae-ruby-debug.conf
81
+ - ext/ae-ruby-debug/ae-ruby-debug.rb
76
82
  - ext/ae-flag
77
83
  - ext/ae-flag/ae-flag.rb
78
84
  - ext/ae-flag/ae-flag.conf
@@ -96,9 +102,6 @@ files:
96
102
  - ext/ae-rad/lib/tk/al-tkcustom.rb
97
103
  - ext/ae-rad/lib/tk/al-tk.res.rb
98
104
  - ext/ae-rad/ae-rad-libs.rb
99
- - ext/ae-action-dispatcher
100
- - ext/ae-action-dispatcher/ae-action-dispatcher.rb
101
- - ext/ae-action-dispatcher/ae-action-dispatcher.conf
102
105
  - tcl/BWidget-1.8.0
103
106
  - tcl/BWidget-1.8.0/BWman
104
107
  - tcl/BWidget-1.8.0/BWman/options.htm
@@ -232,40 +235,36 @@ files:
232
235
  - tcl/BWidget-1.8.0/ChangeLog
233
236
  - tcl/BWidget-1.8.0/LICENSE.txt
234
237
  - tcl/BWidget-1.8.0/README.txt
235
- - arcadia.rb
236
238
  - README
237
- test_files: []
238
-
239
+ has_rdoc: false
240
+ homepage: http://arcadia.rubyforge.org
241
+ post_install_message:
239
242
  rdoc_options:
240
243
  - --title
241
244
  - Arcadia Documentation
242
245
  - --main
243
246
  - README
244
247
  - -q
245
- extra_rdoc_files:
246
- - README
247
- executables:
248
- - arcadia.rb
249
- extensions: []
250
-
248
+ require_paths:
249
+ - lib
250
+ required_ruby_version: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: "0"
255
+ version:
256
+ required_rubygems_version: !ruby/object:Gem::Requirement
257
+ requirements:
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: "0"
261
+ version:
251
262
  requirements: []
252
263
 
253
- dependencies:
254
- - !ruby/object:Gem::Dependency
255
- name: rcodetools
256
- version_requirement:
257
- version_requirements: !ruby/object:Gem::Version::Requirement
258
- requirements:
259
- - - ">="
260
- - !ruby/object:Gem::Version
261
- version: 0.5.0.0
262
- version:
263
- - !ruby/object:Gem::Dependency
264
- name: ruby-debug
265
- version_requirement:
266
- version_requirements: !ruby/object:Gem::Version::Requirement
267
- requirements:
268
- - - ">="
269
- - !ruby/object:Gem::Version
270
- version: 0.9.3
271
- version:
264
+ rubyforge_project: arcadia
265
+ rubygems_version: 1.0.1
266
+ signing_key:
267
+ specification_version: 2
268
+ summary: An Ide for Ruby written in Ruby using the classic tcl/tk GUI toolkit.
269
+ test_files: []
270
+