Mercurial > traipse_dev
comparison orpg/tools/predTextCtrl.py @ 122:36919b8a3ef9 alpha
Traipse Alpha 'OpenRPG' {091031-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go.
Traipse also makes it easy for developers to work on code without fear of
sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the
code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the
productivity of the user.
Update Summary (Cleaning up for Beta)
Added Bookmarks
Fix to Remote Admin Commands
Minor fix to text based Server
Fix to Pretty Print, from Core
Fix to Splitter Nodes not being created
Fix to massive amounts of images loading, from Core
Added 'boot' command to remote admin
Added confirmation window for sent nodes
Minor changes to allow for portability to an OpenSUSE linux OS
Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG
Zoom Mouse plugin added
Images added to Plugin UI
Switching to Element Tree
Map efficiency, from FlexiRPG
Added Status Bar to Update Manager
default_manifest.xml renamed to default_upmana.xml
Cleaner clode for saved repositories
New TrueDebug Class in orpg_log
Mercurial's hgweb folder is ported to upmana
Happy Halloween!
author | sirebral |
---|---|
date | Sat, 31 Oct 2009 22:07:55 -0500 |
parents | 9314d63c0941 |
children | 0f720618a8bd |
comparison
equal
deleted
inserted
replaced
121:496dbf12a6cb | 122:36919b8a3ef9 |
---|---|
351 | 351 |
352 self.keyHook = keyHook # Save the keyHook passed in | 352 self.keyHook = keyHook # Save the keyHook passed in |
353 ExpandoTextCtrl._wrapLine = self._wrapLine | 353 ExpandoTextCtrl._wrapLine = self._wrapLine |
354 | 354 |
355 | 355 |
356 def _wrapLine(self, line, dc, width): | 356 def _wrapLine(self, line, dc, width): |
357 # Estimate where the control will wrap the lines and | 357 # Estimate where the control will wrap the lines and |
358 # return the count of extra lines needed. | 358 # return the count of extra lines needed. |
359 # Re writes ExpandoTextCtrl _wrapLine function | 359 # Re writes ExpandoTextCtrl _wrapLine function |
360 print 'New _wrapLine Function' | 360 print 'New _wrapLine Function' |
361 pte = dc.GetPartialTextExtents(line) | 361 pte = dc.GetPartialTextExtents(line) |
362 width -= wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X) | 362 width -= wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X) |
363 idx = 0 | 363 idx = 0 |
364 start = 0 | 364 start = 0 |
365 count = 0 | 365 count = 0 |
366 spc = -1 | 366 spc = -1 |
367 while idx < len(pte): | 367 while idx < len(pte): |
368 if line[idx] == ' ': spc = idx | 368 if line[idx] == ' ': spc = idx |
369 if pte[idx] - start > width: | 369 if pte[idx] - start > width: |
370 # we've reached the max width, add a new line | 370 # we've reached the max width, add a new line |
371 count += 1 | 371 count += 1 |
372 # did we see a space? if so restart the count at that pos | 372 # did we see a space? if so restart the count at that pos |
373 if spc != -1: | 373 if spc != -1: |
374 idx = spc + 1 | 374 idx = spc + 1 |
375 spc = -1 | 375 spc = -1 |
376 start = pte[idx] | 376 start = pte[idx] |
377 else: | 377 else: |
378 idx += 1 | 378 idx += 1 |
379 return count | 379 return count |
380 | 380 |
381 # findWord subroutine. | 381 # findWord subroutine. |
382 # | 382 # |
383 # self : instance of self | 383 # self : instance of self |
384 # insert: index of last char in st | 384 # insert: index of last char in st |