arcadia 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -14,3 +14,5 @@ win::font={Courier New} 9
14
14
  win::font.bold={Courier New} 9 bold
15
15
  hightlight.sel.color.foreground=black
16
16
  hightlight.sel.color.background=#ff8000
17
+ color.foreground=black
18
+ color.background=#FFFFFF
@@ -1,202 +1,200 @@
1
- #
2
- # ae-output.rb - Arcadia Ruby ide
3
- # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
- #
5
-
6
- require "tk"
7
- #require "base/a-utils"
8
-
9
- class OutputView
10
- attr_reader :text
11
- def initialize(parent=nil)
12
-
13
- left_frame = TkFrame.new(parent.frame).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
14
-
15
- @button_u = Tk::BWidget::Button.new(left_frame){
16
- image TkPhotoImage.new('dat' => CLEAR_GIF)
17
- helptext 'Clear'
18
- foreground 'blue'
19
- command proc{parent.main_frame.text.delete('1.0','end')}
20
- relief 'groove'
21
- pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
22
- }
23
-
24
-
25
- #@splitted_frame = AGTkVSplittedFrames.new(parent.frame,20)
26
- @text = TkText.new(parent.frame,
27
- 'wrap'=> 'none',
28
- 'relief' => 'sunken',
29
- 'font' => parent.conf('font')
30
- ){|j|
31
- TkScrollbar.new(j){|s|
32
- command proc{|*args| j.yview(*args)}
33
- j.yscrollcommand proc{|first,last| s.set first,last}
34
- }.pack('side'=>'right', 'fill'=>'y')
35
- }.place('relwidth' => '1','x' => '25','y' => '0','relheight' => '1', 'width' => '-25')
36
- @text.tag_configure('simple_msg',
37
- 'background' => '#d9d994',
38
- 'borderwidth'=>1,
39
- 'relief'=> 'flat'
40
- )
41
- @text.tag_configure('debug_msg',
42
- 'background' => '#f6c9f6',
43
- 'foreground' => '#000000',
44
- 'borderwidth'=>1,
45
- 'relief'=> 'flat'
46
- )
47
- @text.tag_configure('error_msg',
48
- 'background' => '#f6c9f6',
49
- 'foreground' => 'red',
50
- 'borderwidth'=>1,
51
- 'relief'=> 'flat'
52
- )
53
-
54
- @text.tag_configure('bord_msg',
55
- #'foreground' => '#b9b8b9'
56
- 'foreground' => '#7c9b10'
57
- )
58
- @text.tag_configure('sel',
59
- 'background'=>parent.conf('hightlight.sel.color.background'),
60
- 'foreground'=>parent.conf('hightlight.sel.color.foreground'))
61
-
62
- end
63
- end
64
-
65
- class Output < ArcadiaExt
66
- attr_reader :main_frame
67
-
68
- def on_before_build(_event)
69
- #ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
70
- Arcadia.add_listener(self, MsgEvent)
71
- #_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
72
- @main_frame = OutputView.new(self)
73
- @run_threads = Array.new
74
- end
75
-
76
-
77
- def on_after_build(_event)
78
- self.frame_raise
79
- # MainContract.instance.raise_extension(self,
80
- # 'domain'=>@arcadia['conf'][@name+'.frame'],
81
- # 'extension' =>@name,
82
- # 'channel'=>conf('MsgContract.channel'))
83
- end
84
-
85
- def format_time(_time)
86
- _time.strftime("at %a %d-%b-%Y %H:%M:%S")
87
- end
88
-
89
- def on_msg(_event)
90
- self.frame_raise
91
- _txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.msg.strip+"\n"
92
- _index_begin = @main_frame.text.index('end')
93
- @main_frame.text.insert(_index_begin,_txt)
94
- _index_end = @main_frame.text.index('end')
95
- case _event
96
- when DebugMsgEvent
97
- @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
98
- @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
99
- @main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
100
- parse_debug(_index_begin.split('.')[0].to_i)
101
- when ErrorMsgEvent
102
- @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
103
- @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
104
- @main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
105
- parse_debug(_index_begin.split('.')[0].to_i)
106
- else
107
- @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
108
- @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
109
- @main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
110
- end
111
- @main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
112
- @main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
113
- @main_frame.text.see(_index_end)
114
- end
115
-
116
- # def do_msg_event(_event)
117
- # self.frame_raise
118
- # #p _event.context.text.class
119
- # _txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.context.text.strip+"\n"
120
- # _index_begin = @main_frame.text.index('end')
121
- # @main_frame.text.insert(_index_begin,_txt)
122
- # _index_end = @main_frame.text.index('end')
123
- # if _event.context.type == MsgContract::TYPE_DEBUG
124
- # @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
125
- # @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
126
- # @main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
127
- # parse_debug(_index_begin.split('.')[0].to_i)
128
- # elsif _event.context.type == MsgContract::TYPE_ERROR
129
- # @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
130
- # @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
131
- # @main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
132
- # parse_debug(_index_begin.split('.')[0].to_i)
133
- # else
134
- # @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
135
- # @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
136
- # @main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
137
- # end
138
- # @main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
139
- # @main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
140
- # @main_frame.text.see(_index_end)
141
- # end
142
-
143
- def parse_debug(_from_row=0)
144
- _row = 0
145
- _cursor = @main_frame.text.cget('cursor')
146
- @main_frame.text.value.each{|l|
147
- _row = _row+1
148
- if _row >= _from_row
149
- _end = 0
150
- m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
151
- while m
152
- _txt = m.post_match
153
- if m[1] && m[2]
154
- _file = m[1]
155
- _line = m[2]
156
- _ibegin = _row.to_s+'.'+(m.begin(1)+_end).to_s
157
- _iend = _row.to_s+'.'+(m.end(2)+_end).to_s
158
- _end = m.end(2) + _end
159
- @main_frame.text.tag_configure(_row,
160
- 'foreground' => '#800000',
161
- 'borderwidth'=>0,
162
- 'relief'=>'flat',
163
- 'underline'=>true
164
- )
165
- @main_frame.text.tag_add(_row,_ibegin,_iend)
166
- @main_frame.text.tag_bind(_row,"Double-ButtonPress-1",
167
- proc{
168
- Arcadia.process_event(OpenBufferEvent.new(self,'file'=>_file, 'row'=>_line))
169
- #EditorContract.instance.open_file(self, 'file'=>_file, 'line'=>_line)
170
- }
171
- )
172
- @main_frame.text.tag_bind(_row,"Enter",
173
- proc{@main_frame.text.configure('cursor'=> 'hand2')}
174
- )
175
- @main_frame.text.tag_bind(_row,"Leave",
176
- proc{@main_frame.text.configure('cursor'=> _cursor)}
177
- )
178
-
179
-
180
-
181
- end
182
- m = /([A-Za-z]*[\.:]{0,1}[\/\w\d]*\.rb):(\d*)/.match(_txt)
183
- end
184
- end
185
- }
186
- end
187
-
188
- def out(_txt=nil, _tag=nil)
189
- if @main_frame && _txt
190
- if _tag
191
- @main_frame.text.insert('end',_txt, _tag)
192
- else
193
- @main_frame.text.insert('end',_txt)
194
- end
195
- end
196
- end
197
-
198
- def outln(_txt=nil, _tag=nil)
199
- self.out(_txt+"\n",_tag)
200
- end
201
-
202
- end
1
+ #
2
+ # ae-output.rb - Arcadia Ruby ide
3
+ # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
+ #
5
+
6
+ require "tk"
7
+ #require "base/a-utils"
8
+
9
+ class OutputView
10
+ attr_reader :text
11
+ def initialize(parent=nil)
12
+
13
+ left_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
14
+
15
+ @button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
16
+ image TkPhotoImage.new('dat' => CLEAR_GIF)
17
+ helptext 'Clear'
18
+ #foreground 'blue'
19
+ command proc{parent.main_frame.text.delete('1.0','end')}
20
+ #relief 'groove'
21
+ pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
22
+ }
23
+
24
+
25
+ #@splitted_frame = AGTkVSplittedFrames.new(parent.frame,20)
26
+ @text = TkText.new(parent.frame.hinner_frame,
27
+ {'wrap'=> 'none'}.update(Arcadia.style('edit'))
28
+ ){|j|
29
+ TkScrollbar.new(j, Arcadia.style('scrollbar')){|s|
30
+ command proc{|*args| j.yview(*args)}
31
+ j.yscrollcommand proc{|first,last| s.set first,last}
32
+ }.pack('side'=>'right', 'fill'=>'y')
33
+ }.place('relwidth' => '1','x' => '25','y' => '0','relheight' => '1', 'width' => '-25')
34
+ @text.tag_configure('simple_msg',
35
+ 'background' => '#d9d994',
36
+ 'borderwidth'=>1,
37
+ 'relief'=> 'flat'
38
+ )
39
+ @text.tag_configure('debug_msg',
40
+ 'background' => '#f6c9f6',
41
+ 'foreground' => '#000000',
42
+ 'borderwidth'=>1,
43
+ 'relief'=> 'flat'
44
+ )
45
+ @text.tag_configure('error_msg',
46
+ 'background' => '#f6c9f6',
47
+ 'foreground' => 'red',
48
+ 'borderwidth'=>1,
49
+ 'relief'=> 'flat'
50
+ )
51
+
52
+ @text.tag_configure('bord_msg',
53
+ #'foreground' => '#b9b8b9'
54
+ 'foreground' => '#7c9b10'
55
+ )
56
+ @text.tag_configure('sel',
57
+ 'background'=>parent.conf('hightlight.sel.color.background'),
58
+ 'foreground'=>parent.conf('hightlight.sel.color.foreground'))
59
+
60
+ end
61
+ end
62
+
63
+ class Output < ArcadiaExt
64
+ attr_reader :main_frame
65
+
66
+ def on_before_build(_event)
67
+ #ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
68
+ Arcadia.attach_listener(self, MsgEvent)
69
+ #_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
70
+ @main_frame = OutputView.new(self)
71
+ @run_threads = Array.new
72
+ end
73
+
74
+
75
+ def on_after_build(_event)
76
+ self.frame.show
77
+ # MainContract.instance.raise_extension(self,
78
+ # 'domain'=>@arcadia['conf'][@name+'.frame'],
79
+ # 'extension' =>@name,
80
+ # 'channel'=>conf('MsgContract.channel'))
81
+ end
82
+
83
+ def format_time(_time)
84
+ _time.strftime("at %a %d-%b-%Y %H:%M:%S")
85
+ end
86
+
87
+ def on_msg(_event)
88
+ self.frame.show
89
+ _txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.msg.strip+"\n"
90
+ _index_begin = @main_frame.text.index('end')
91
+ @main_frame.text.insert(_index_begin,_txt)
92
+ _index_end = @main_frame.text.index('end')
93
+ case _event.level
94
+ when 'debug'
95
+ @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
96
+ @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
97
+ @main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
98
+ parse_debug(_index_begin.split('.')[0].to_i)
99
+ when 'error'
100
+ @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
101
+ @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
102
+ @main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
103
+ parse_debug(_index_begin.split('.')[0].to_i)
104
+ else
105
+ @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
106
+ @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
107
+ @main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
108
+ end
109
+ @main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
110
+ @main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
111
+ @main_frame.text.see(_index_end)
112
+ end
113
+
114
+ # def do_msg_event(_event)
115
+ # self.frame_raise
116
+ # #p _event.context.text.class
117
+ # _txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.context.text.strip+"\n"
118
+ # _index_begin = @main_frame.text.index('end')
119
+ # @main_frame.text.insert(_index_begin,_txt)
120
+ # _index_end = @main_frame.text.index('end')
121
+ # if _event.context.type == MsgContract::TYPE_DEBUG
122
+ # @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
123
+ # @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
124
+ # @main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
125
+ # parse_debug(_index_begin.split('.')[0].to_i)
126
+ # elsif _event.context.type == MsgContract::TYPE_ERROR
127
+ # @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
128
+ # @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
129
+ # @main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
130
+ # parse_debug(_index_begin.split('.')[0].to_i)
131
+ # else
132
+ # @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
133
+ # @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
134
+ # @main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
135
+ # end
136
+ # @main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
137
+ # @main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
138
+ # @main_frame.text.see(_index_end)
139
+ # end
140
+
141
+ def parse_debug(_from_row=0)
142
+ _row = 0
143
+ _cursor = @main_frame.text.cget('cursor')
144
+ @main_frame.text.value.each{|l|
145
+ _row = _row+1
146
+ if _row >= _from_row
147
+ _end = 0
148
+ m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
149
+ while m
150
+ _txt = m.post_match
151
+ if m[1] && m[2]
152
+ _file = m[1]
153
+ _line = m[2]
154
+ _ibegin = _row.to_s+'.'+(m.begin(1)+_end).to_s
155
+ _iend = _row.to_s+'.'+(m.end(2)+_end).to_s
156
+ _end = m.end(2) + _end
157
+ @main_frame.text.tag_configure(_row,
158
+ 'foreground' => '#800000',
159
+ 'borderwidth'=>0,
160
+ 'relief'=>'flat',
161
+ 'underline'=>true
162
+ )
163
+ @main_frame.text.tag_add(_row,_ibegin,_iend)
164
+ @main_frame.text.tag_bind(_row,"Double-ButtonPress-1",
165
+ proc{
166
+ Arcadia.process_event(OpenBufferEvent.new(self,'file'=>_file, 'row'=>_line))
167
+ #EditorContract.instance.open_file(self, 'file'=>_file, 'line'=>_line)
168
+ }
169
+ )
170
+ @main_frame.text.tag_bind(_row,"Enter",
171
+ proc{@main_frame.text.configure('cursor'=> 'hand2')}
172
+ )
173
+ @main_frame.text.tag_bind(_row,"Leave",
174
+ proc{@main_frame.text.configure('cursor'=> _cursor)}
175
+ )
176
+
177
+
178
+
179
+ end
180
+ m = /([A-Za-z]*[\.:]{0,1}[\/\w\d]*\.rb):(\d*)/.match(_txt)
181
+ end
182
+ end
183
+ }
184
+ end
185
+
186
+ def out(_txt=nil, _tag=nil)
187
+ if @main_frame && _txt
188
+ if _tag
189
+ @main_frame.text.insert('end',_txt, _tag)
190
+ else
191
+ @main_frame.text.insert('end',_txt)
192
+ end
193
+ end
194
+ end
195
+
196
+ def outln(_txt=nil, _tag=nil)
197
+ self.out(_txt+"\n",_tag)
198
+ end
199
+
200
+ end
@@ -4,7 +4,7 @@
4
4
  #
5
5
 
6
6
  require 'tk'
7
- require 'base/a-tkcommons'
7
+ require 'lib/a-tkcommons'
8
8
  require 'tkextlib/bwidget'
9
9
  require "observer"
10
10
 
@@ -48,9 +48,9 @@ class TkStringType < TkTy
48
48
  @family = _family
49
49
  @etext = TkVariable.new(_host.cget('text'))
50
50
  @etextvalue = @etext.to_s
51
- @propobj = TkEntry.new(_host, 'textvariable'=>@etext){
52
- relief 'groove'
53
- font $arcadia['conf']['inspectors.inspector.value.font']
51
+ @propobj = TkEntry.new(_host, Arcadia.style('edit').update({'textvariable'=>@etext})){
52
+ #relief 'groove'
53
+ #font $arcadia['conf']['inspectors.inspector.value.font']
54
54
  place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1, 'bordermode'=>'outside')
55
55
  }
56
56
  @propobj.bind("KeyRelease-F1", proc{do_update})
@@ -78,15 +78,15 @@ class TkProcType < TkStringType
78
78
 
79
79
  def initialize(_host, _family, _agobj, _prop)
80
80
  super(_host, _family, _agobj, _prop, true)
81
- @bProp = TkButton.new(@propobj){
81
+ @bProp = TkButton.new(@propobj, Arcadia.style('toolbarbutton')){
82
82
  text '...'
83
- relief 'flat'
83
+ #relief 'flat'
84
84
  anchor 'e'
85
85
  padx 0
86
86
  pady 0
87
- activebackground background
88
- activeforeground 'red'
89
- borderwidth 1
87
+ #activebackground background
88
+ #activeforeground 'red'
89
+ #borderwidth 1
90
90
  pack('side' => 'right','fill' => 'y')
91
91
  }
92
92
  do_proc_update = proc{
@@ -133,10 +133,9 @@ class TkEnumType < TkTy
133
133
  _values = _prop['type'].values
134
134
  #Tk.messageBox('message'=>_values.class.to_s)
135
135
  end
136
- @propobj = Tk::BWidget::ComboBox.new(_host){
136
+ @propobj = Tk::BWidget::ComboBox.new(_host, Arcadia.style('combobox')){
137
137
  values _values
138
138
  modifycmd do_update
139
- font $arcadia['conf']['inspectors.inspector.value.font']
140
139
  editable _editable
141
140
  place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1, 'bordermode'=>'outside')
142
141
  def e
@@ -184,15 +183,15 @@ class TkEnumProcType < TkEnumType
184
183
 
185
184
  def initialize(_host, _family, _agobj, _prop)
186
185
  super(_host, _family, _agobj, _prop, true)
187
- @bProp = TkButton.new(@propobj.e){
186
+ @bProp = TkButton.new(@propobj.e, Arcadia.style('toolbarbutton')){
188
187
  text '...'
189
- relief 'flat'
188
+ #relief 'flat'
190
189
  anchor 'e'
191
190
  padx 0
192
191
  pady 0
193
- activebackground background
194
- activeforeground 'red'
195
- borderwidth 1
192
+ #activebackground background
193
+ #activeforeground 'red'
194
+ #borderwidth 1
196
195
  pack('side' => 'right','fill' => 'y')
197
196
  }
198
197
  do_proc_update = proc{
@@ -270,13 +269,14 @@ class ValueRap
270
269
  if !defined? @parent.lasthandlervalue
271
270
  @parent.lasthandlervalue = 0
272
271
  end
273
- @labelkey = TkLabel.new(@parent.right_text,
272
+ @labelkey = TkLabel.new(@parent.right_text,Arcadia.style('label').update({
274
273
  'text' => _text,
275
274
  'justify' => 'right',
276
275
  'anchor' => 'w',
277
276
  #'width'=>15,
278
- 'font'=> $arcadia['conf']['inspectors.inspector.value.font'],
279
- 'relief'=>'groove')
277
+ #'font'=> $arcadia['conf']['inspectors.inspector.value.font'],
278
+ #'relief'=>'groove'
279
+ }))
280
280
 
281
281
  TkTextWindow.new(@parent.right_text, 'end', 'window'=> @labelkey)
282
282
 
@@ -353,10 +353,10 @@ class PropLine
353
353
  @parent = _parent
354
354
  @prop = _prop
355
355
 
356
- @propkey = TkLabel.new(@parent.left_text){
356
+ @propkey = TkLabel.new(@parent.left_text, Arcadia.style('label')){
357
357
  text _name
358
358
  justify 'right'
359
- font $arcadia['conf']['inspectors.inspector.key.font']
359
+ #font $arcadia['conf']['inspectors.inspector.key.font']
360
360
  anchor 'w'
361
361
  # pack('fill'=>'x',:padx=>0, :pady=>0)
362
362
  }
@@ -401,12 +401,11 @@ class ValueRapReadOnly
401
401
  if !defined? @parent.bodyprops.lasthandlervalue
402
402
  @parent.bodyprops.lasthandlervalue = 0
403
403
  end
404
- @labelkey = TkLabel.new(@host,
404
+ @labelkey = TkLabel.new(@host, Arcadia.style('label').update({
405
405
  'text' => _text,
406
406
  'justify' => 'right',
407
- 'anchor' => 'w',
408
- 'font'=> $arcadia['conf']['inspectors.inspector.value.font'],
409
- 'relief'=>'groove')
407
+ 'anchor' => 'w'
408
+ }))
410
409
  @labelkey.pack('fill'=>'x',:padx=>0, :pady=>0)
411
410
  @labelkey.bind("ButtonPress-1", proc{
412
411
  do_manage_read_only
@@ -451,10 +450,9 @@ class PropLineReadOnly
451
450
  @bodyprops = _bodyprops
452
451
  @key = _key
453
452
  @splitted_frame = AGTkVSplittedFrames.new(@bodyprops.host, 85)
454
- @propkey = TkLabel.new(@splitted_frame.left_frame){
453
+ @propkey = TkLabel.new(@splitted_frame.left_frame, Arcadia.style('label')){
455
454
  text _key
456
455
  justify 'right'
457
- font $arcadia['conf']['inspectors.inspector.key.font']
458
456
  anchor 'w'
459
457
  pack('fill'=>'x',:padx=>0, :pady=>0)
460
458
  }
@@ -549,10 +547,10 @@ class InspectList
549
547
  def initialize(_family, _host, _left_width = 85)
550
548
  @lasthandlervalue = 0;
551
549
  @family = _family
552
- @bar = TkScrollbar.new(_host).pack('side'=>'right', 'fill'=>'y')
550
+ @bar = TkScrollbar.new(_host, Arcadia.style('scrollbar')).pack('side'=>'right', 'fill'=>'y')
553
551
  @pwind = AGTkVSplittedFrames.new(_host,_left_width)
554
552
  background = _host.cget('background')
555
- common_properties = {'relief'=>'flat','state'=>'disabled', 'borderwidth'=>0, 'relief'=>'flat', 'background'=>background}
553
+ common_properties = {'relief'=>'flat','state'=>'disabled', 'borderwidth'=>0, 'background'=>background}
556
554
  @left_text = TkText.new(@pwind.left_frame, common_properties).pack('expand'=>'yes', 'fill'=>'both')
557
555
  @right_text = TkText.new(@pwind.right_frame, common_properties).pack('expand'=>'yes', 'fill'=>'both')
558
556
 
@@ -658,10 +656,10 @@ class InnerFrameInspectMultiList < TkFrame
658
656
  attr_reader :tkFrameHost
659
657
  attr_reader :index
660
658
  def initialize(_parent, _index,_contr=nil)
661
- super(_parent)
659
+ super(_parent, Arcadia.style('panel'))
662
660
  @index = _index
663
- borderwidth 2
664
- relief 'groove'
661
+ #borderwidth 2
662
+ #relief 'groove'
665
663
  pack('side' => 'top',
666
664
  'anchor' => 'n',
667
665
  'expand' => 0,
@@ -669,15 +667,15 @@ class InnerFrameInspectMultiList < TkFrame
669
667
  'fill' => 'x')
670
668
  _self = self
671
669
  bind('Enter', proc{ _contr.set_current(_index)})
672
- @lTitle = TkLabel.new(self){
670
+ @lTitle = TkLabel.new(self, Arcadia.style('titlelabel')){
673
671
  text '...'
674
- background '#494949'
672
+ #background '#494949'
675
673
  place('relwidth' => '1',
676
674
  'x' => 0,
677
675
  'y' => 0,
678
676
  'height' => 19)
679
677
 
680
- @tkButtonX = TkButton.new(self){
678
+ @tkButtonX = TkButton.new(self, Arcadia.style('button')){
681
679
  text 'X'
682
680
  pack('side' => 'top',
683
681
  'anchor' => 'e')
@@ -688,9 +686,9 @@ class InnerFrameInspectMultiList < TkFrame
688
686
  end
689
687
  }
690
688
 
691
- @tkFrameHost = TkFrame.new(self){
689
+ @tkFrameHost = TkFrame.new(self, Arcadia.style('panel')){
692
690
  borderwidth 2
693
- relief 'groove'
691
+ #relief 'groove'
694
692
  place('relwidth' => '1',
695
693
  'x' => 0,
696
694
  'y' => 19,
@@ -706,20 +704,20 @@ class InspectMultiList
706
704
  _contr = self
707
705
  @family = _family
708
706
  @itemCount = 0
709
- @tkFrame1 = TkFrame.new(_host){
710
- borderwidth 2
711
- relief 'groove'
707
+ @tkFrame1 = TkFrame.new(_host, Arcadia.style('panel')){
708
+ #borderwidth 2
709
+ #relief 'groove'
712
710
  place(
713
711
  'relwidth' => '1',
714
712
  'x' => 0,
715
713
  'y' => 0,
716
714
  'height' => 30
717
715
  )
718
- @tkButton1 = TkButton.new(self){
716
+ @tkButton1 = TkButton.new(self, Arcadia.style('button')){
719
717
  text 'New'
720
718
  padx 0
721
719
  pady 0
722
- relief 'groove'
720
+ #relief 'groove'
723
721
  place(
724
722
  'x' => 2,
725
723
  'y' => 2,
@@ -732,9 +730,9 @@ class InspectMultiList
732
730
  attr_reader :tkButton1
733
731
  end
734
732
  }
735
- @tkFrame2 = TkFrame.new(_host){
733
+ @tkFrame2 = TkFrame.new(_host, Arcadia.style('panel')){
736
734
  borderwidth 2
737
- relief 'groove'
735
+ #relief 'groove'
738
736
  place(
739
737
  'relwidth' => '1',
740
738
  'relheight' => '1',
@@ -856,8 +854,8 @@ end
856
854
  class TkScrollbox<TkListbox
857
855
  include TkComposite
858
856
  def initialize_composite(keys=nil)
859
- list = TkListbox.new(@frame)
860
- scroll = TkScrollbar.new(@frame)
857
+ list = TkListbox.new(@frame, Arcadia.style('edit'))
858
+ scroll = TkScrollbar.new(@frame, Arcadia.style('scrollbar'))
861
859
  @path = list.path
862
860
  list.configure 'yscroll', scroll.path+" set"
863
861
  list.pack 'side'=>'left','fill'=>'both','expand'=>'yes'
@@ -910,7 +908,7 @@ class TkScrollboxObjBoard < ObjBoard
910
908
 
911
909
  def initialize(_host)
912
910
  super
913
- @sb = TkScrollbox.new(_host){
911
+ @sb = TkScrollbox.new(_host, Arcadia.style('edit')){
914
912
  width 200
915
913
  height 200
916
914
  pack('fill'=>'both', :padx=>0, :pady=>0)
@@ -949,7 +947,7 @@ class TkBwComboBoxObjBoard < ObjBoard
949
947
  @obji.select(@objectsList[_itemindex])
950
948
  @objectsList[_itemindex].activate
951
949
  }
952
- @sb = Tk::BWidget::ComboBox.new(_host){
950
+ @sb = Tk::BWidget::ComboBox.new(_host, Arcadia.style('combobox')){
953
951
  modifycmd do_select
954
952
  editable false
955
953
  expand 'tab'
@@ -986,20 +984,20 @@ class TkMenuButtonObjBoard < ObjBoard
986
984
 
987
985
  def initialize(_host, _obji)
988
986
  super
989
- @sb = TkMenubutton.new(
987
+ @sb = TkMenubutton.new(Arcadia.style('menu').update({
990
988
  :parent=>_host,
991
989
  :underline=>0,
992
990
  :direction=>:flush,
993
- :font=>$arcadia['conf']['inspectors.inspector.tree.font'],
994
- :relief=>:groove,
995
- :background=> :white,
996
- :justify=> :left){|mb|
997
- menu TkMenu.new(
991
+ #:font=>$arcadia['conf']['inspectors.inspector.tree.font'],
992
+ #:relief=>:groove,
993
+ #:background=> :white,
994
+ :justify=> :left})){|mb|
995
+ menu TkMenu.new(Arcadia.style('menu').update({
998
996
  :parent=>mb,
999
- :tearoff=>1,
1000
- :font=>$arcadia['conf']['inspectors.inspector.tree.font'],
1001
- :background=> :white,:relief=>'flat'
1002
- )
997
+ :tearoff=>1
998
+ #:font=>$arcadia['conf']['inspectors.inspector.tree.font'],
999
+ #:background=> :white,:relief=>'flat'
1000
+ }))
1003
1001
  pack('fill'=>'x', 'padx'=>0, 'pady'=>0, 'anchor'=>'n')
1004
1002
  }
1005
1003
  @menu = @sb.cget('menu')
@@ -1124,11 +1122,11 @@ class Obji
1124
1122
  @f_top = @pmainwind.top_frame
1125
1123
  @f_bottom = @pmainwind.bottom_frame
1126
1124
  @lb = TkMenuButtonObjBoard.new(@f_top, self)
1127
- @ojts = Tk::BWidget::NoteBook.new(@f_bottom){
1125
+ @ojts = Tk::BWidget::NoteBook.new(@f_bottom, Arcadia.style('tabpanel')){
1128
1126
  tabbevelsize 0
1129
1127
  internalborderwidth 0
1130
1128
  side $arcadia['conf']['inspectors.inspector.tabs.side']
1131
- font $arcadia['conf']['inspectors.inspector.tabs.font']
1129
+ #font $arcadia['conf']['inspectors.inspector.tabs.font']
1132
1130
  pack('fill'=>'both', :padx=>0, :pady=>0, :expand => 'yes')
1133
1131
  }
1134
1132
  #@inspect_core = _agobj_start.class.class_inspector.new(@ojts, _agobj_start)
@@ -1264,11 +1262,11 @@ class ObjiControllerView
1264
1262
  attr_reader :nb_base
1265
1263
  attr_reader :layout
1266
1264
  def initialize(_frame)
1267
- @nb_base = Tk::BWidget::NoteBook.new(_frame){
1265
+ @nb_base = Tk::BWidget::NoteBook.new(_frame, Arcadia.style('tabpanel')){
1268
1266
  tabbevelsize 0
1269
1267
  internalborderwidth 0
1270
1268
  side $arcadia['conf']['inspectors.tabs.side']
1271
- font $arcadia['conf']['inspectors.tabs.font']
1269
+ #font $arcadia['conf']['inspectors.tabs.font']
1272
1270
  pack('fill'=>'both', :padx=>0, :pady=>0, :expand => 'yes')
1273
1271
  }
1274
1272
  end
@@ -1293,10 +1291,6 @@ class ObjiController #< ArcadiaExt
1293
1291
  @rad.frame(0)
1294
1292
  end
1295
1293
 
1296
- def frame_free
1297
- @rad.frame_free(0)
1298
- end
1299
-
1300
1294
  def build
1301
1295
  #@main_frame = ObjiControllerView.new(self.frame)
1302
1296
  @objis = Hash.new
@@ -1324,7 +1318,7 @@ class ObjiController #< ArcadiaExt
1324
1318
 
1325
1319
  def main_frame
1326
1320
  if !defined?(@main_frame) || @main_frame == nil
1327
- @main_frame = ObjiControllerView.new(self.frame)
1321
+ @main_frame = ObjiControllerView.new(self.frame.hinner_frame)
1328
1322
  end
1329
1323
  return @main_frame
1330
1324
  end
@@ -1381,7 +1375,7 @@ class ObjiController #< ArcadiaExt
1381
1375
  self.main_frame.nb_base.delete(@objis.delete(_obji))
1382
1376
  if @objis.length == 0
1383
1377
  @active = nil
1384
- self.frame_free
1378
+ self.frame.free
1385
1379
  @main_frame = nil
1386
1380
  else
1387
1381
  activate(@objis.keys[@objis.length-1])
@@ -1482,11 +1476,11 @@ class AGTkInspector < AGInspector
1482
1476
  def initialize( _host, _agobj)
1483
1477
  super( _host, _agobj)
1484
1478
  @ojts_layout = _host.insert('end','layout','text'=>'Layout')
1485
- @top_panel = TkFrame.new(@ojts_layout){
1479
+ @top_panel = TkFrame.new(@ojts_layout, Arcadia.style('panel')){
1486
1480
  place('x'=>0, 'y'=>0, 'relheight'=>1, 'relwidth'=>1)
1487
1481
  }
1488
1482
  @tabs['LayoutType'] = InspectList.new('layout_man', @top_panel)
1489
- @mid_panel = TkFrame.new(@ojts_layout){
1483
+ @mid_panel = TkFrame.new(@ojts_layout, Arcadia.style('panel')){
1490
1484
  place('x'=>0, 'y'=>20,'relheight'=>1, 'relwidth'=>1)
1491
1485
  }
1492
1486
  @tabs['Layout'] = InspectList.new('...',@mid_panel)