没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > nstextviewwithmathextensions |
|
nstextviewwithmathextensions
|
| 0 | 0 | 0 |
| 贡献者 | 讨论 | 代码提交 |
This project is an application framework that provides extended functionality for the NSTextView class. The specific additions include evaluation of inline equations such as '10+16*(12-10)' and conversions for natural language units such as '12 inches'.
When the cursor (input) location is changed within the extended text view object the framework scans the nearby text of the previous input location to identify equations and unit strings. When identified these strings are signified to the user by a dashed and colored underline (green for equations and blue for units). The user of a Macintosh system can then evaluate such equations or choose a conversion from a list of possible conversions by invoking a context sensitive menu by Cmd+Clicking on the appropriate region of text.
When applying unit conversions certain attempts are made to maintain the 'natural language' aspect of writing. For example, the string '1 quart' is converted into '1/4 gallon' but not '0.25 gallons'. Additionally, when presenting unit conversions very unlikely conversions will not be presented, such as conversions of '3.2 miles' into centimeters.
The framework is designed to be localizable. XCode project files included in this project include the framework source code, a modified version of the Apple TextEdit program which utilizes the framework, and an editor for creating localized databases of conversion names and factors.
标签:
