rbcurse-core 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
data/lib/rbcurse.rb CHANGED
@@ -4,5 +4,5 @@ require 'rbcurse/core/system/window'
4
4
  require 'rbcurse/core/widgets/rwidget'
5
5
  require 'rbcurse/core/util/rdialogs'
6
6
  class Rbcurse
7
- VERSION = '0.0.5'
7
+ VERSION = '0.0.8'
8
8
  end
@@ -4,7 +4,7 @@
4
4
  # Author: rkumar http://github.com/rkumar/rbcurse/
5
5
  # Date: Around for a long time
6
6
  # License: Same as Ruby's License (http://www.ruby-lang.org/LICENSE.txt)
7
- # Last update: 2013-03-08 17:27
7
+ # Last update: 2013-03-08 19:12
8
8
  #
9
9
  # == CHANGED
10
10
  # removed Pad and Subwin to lib/ver/rpad.rb - hopefully I've seen the last of both
@@ -280,7 +280,7 @@ module VER
280
280
  # Previously this printed a chunk as a full line, I've modified it to print on
281
281
  # one line. This can be used for running text.
282
282
  # NOTE 2013-03-08 - 17:02 added width so we don't overflow
283
- def show_colored_chunks(chunks, defcolor = nil, defattr = nil, wid = 999)
283
+ def show_colored_chunks(chunks, defcolor = nil, defattr = nil, wid = 999, pcol = 0)
284
284
  return unless visible?
285
285
  ww = 0
286
286
  chunks.each do |chunk| #|color, chunk, attrib|
@@ -289,6 +289,19 @@ module VER
289
289
  color = chunk.color
290
290
  attrib = chunk.attrib
291
291
  text = chunk.text
292
+
293
+ ## 2013-03-08 - 19:11 take care of scrolling by means of pcol
294
+ if pcol > 0
295
+ if pcol > text.length
296
+ # ignore entire chunk and reduce pcol
297
+ pcol -= text.length
298
+ next
299
+ else
300
+ # print portion of chunk and zero pcol
301
+ text = text[pcol..-1]
302
+ pcol = 0
303
+ end
304
+ end
292
305
  oldw = ww
293
306
  ww += text.length
294
307
  if ww > wid
@@ -1132,6 +1132,8 @@ module RubyCurses
1132
1132
  Ncurses::Panel.update_panels
1133
1133
  ch=@window.getchar()
1134
1134
  hide_bottomline
1135
+ ## return char so we can use for asking for one character
1136
+ return ch
1135
1137
  end
1136
1138
  # since say does not leave the screen, it is not exactly recommended
1137
1139
  # as it will hide what's below. It's better to call pause, or this, which
@@ -524,7 +524,7 @@ module RubyCurses
524
524
  # or pass it to show_col
525
525
  a = get_attrib @attrib
526
526
  # FIXME this does not clear till the eol
527
- @graphic.show_colored_chunks content, acolor, a, @width-@internal_width
527
+ @graphic.show_colored_chunks content, acolor, a, @width-@internal_width, @pcol
528
528
  elsif content.is_a? Chunks::Chunk
529
529
  raise "TODO chunk in textview"
530
530
  elsif content.is_a? Array
@@ -9,7 +9,7 @@
9
9
  * Author: rkumar (arunachalesha)
10
10
  * Date: 2008-11-19 12:49
11
11
  * License: Same as Ruby's License (http://www.ruby-lang.org/LICENSE.txt)
12
- * Last update: 2013-03-05 19:50
12
+ * Last update: 2013-03-16 20:06
13
13
 
14
14
  == CHANGES
15
15
  * 2011-10-2 Added PropertyVetoException to rollback changes to property
@@ -232,7 +232,7 @@ module RubyCurses
232
232
  when 393..402
233
233
  return "M-F"+ (keycode-392).to_s
234
234
  when 0
235
- return "C-space" # i hope this is correct, just guessing
235
+ return "C-space"
236
236
  when 160
237
237
  return "M-space" # at least on OSX Leopard now (don't remember this working on PPC)
238
238
  when C_LEFT
data/rbcurse-core.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rbcurse-core"
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rahul Kumar"]
12
- s.date = "2013-03-08"
12
+ s.date = "2013-03-18"
13
13
  s.description = "Ruby curses/ncurses widgets for easy application development on text terminals (ruby 1.9, 1.8)"
14
14
  s.email = "sentinel1879@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbcurse-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-08 00:00:00.000000000 Z
12
+ date: 2013-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi-ncurses