Changeset 28970
- Timestamp:
- 01/24/09 17:39:14 (4 years ago)
- Location:
- lang/ruby/ruwin/lib/ruwin/edit_field
- Files:
-
- 2 modified
-
rich.rb (modified) (1 diff)
-
selection.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/ruwin/lib/ruwin/edit_field/rich.rb
r28967 r28970 4 4 class Selection < EditField::Selection 5 5 def string 6 temporary_refrect do 7 result = "\0"*length 8 sendMessage EM_GETSELTEXT, 0, result 9 result 10 end 6 result = "\0"*length 7 sendMessage EM_GETSELTEXT, 0, result 8 result 11 9 end 12 10 end -
lang/ruby/ruwin/lib/ruwin/edit_field/selection.rb
r28967 r28970 52 52 53 53 def string= string 54 sendMessage EM_REPLACESEL, 1, string 55 end 56 57 def sendMessage *args 54 58 temporary_refrect do 55 sendMessage EM_REPLACESEL, 1, string59 @control.sendMessage *args 56 60 end 57 61 end 58 62 59 63 private 60 def sendMessage *args61 @control.sendMessage *args62 end63 64 64 def temporary_refrect &block 65 65 return block.call if @reflection … … 76 76 77 77 def getsel 78 ranges = sendMessage EM_GETSEL, 0, 078 ranges = @control.sendMessage EM_GETSEL, 0, 0 79 79 return LOWORD(ranges), HIWORD(ranges) 80 80 end 81 81 82 82 def setsel first, last 83 sendMessage EM_SETSEL, first, last83 @control.sendMessage EM_SETSEL, first, last 84 84 end 85 85 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)