OpenSceneGraph/src/osgPlugins
Robert Osfield 687fd9362f From Jean-Sebastien Guay, "osgWidget::WindowManager did nothing in its keyUp event, and in particular didn't call any callbacks. Since I wanted to have callbacks on keyUp, I copied what it does on keyDown, which works for me. I could have just used keyDown and saved myself the trouble, but you know me... :-)
osgWidget::Input:

[Functional changes]
- Previously, the field would be filled with spaces up to its max length, and typing would just replace the spaces. Also, there was a _textLength variable that kept track of the real length of text in the field, since the osgText::Text's length just reflected the length of spaces+text entered. This was not great, as you could still select the spaces with the mouse and it just feels hacky. So I changed it to only contain the text entered, no spaces, and _textLength was removed since it's now redundant (the osgText::Text's length is used instead).
- Fixed the selection size which (visually only) showed one more character selected than what was really selected.
- Fixed selection by dragging the mouse, it would sometimes not select the last character of the string.
- Cursor will now accurately reflect whether insert mode is activated (block cursor) or we're in normal mode (line cursor) like in most editors.
- Implemented Ctrl-X (cut)
- Added a new clear() method that allows the field to be emptied correctly. Useful for a command line interface, for example (hint, hint).
- Mouse and keyboard event handler methods would always return false, which meant selecting with the mouse would also rotate the trackball, and typing an 's' would turn on stats.

[Code cleanup]
- Renamed the (local) _selectionMin and _selectionMax variables which are used in a lot of places, as the underscores would lead to think they were members. Either I called them selection{Min|Max} or delete{Min|Max} where it made more sense.
- Fixed some indenting which was at 3 spaces (inconsistently), I'm sure I didn't catch all the lines where this was the case though.
- Put spaces between variable, operator and value where missing, especially in for()s. Again I only did this where I made changes, there are probably others left.

The result is that delete, backspace, Ctrl-X, Ctrl-C, Ctrl-V, and typing behaviour should now be consistent with text editor conventions, whether insert mode is enabled or not. I hope. :-)

Note, there's a nasty const_cast in there. Why isn't osgText::Font::getGlyph() declared const?

Also, as a note, the current implementation of cut, copy and paste (in addition to being Windows only, yuck) gets and puts the data into an std::string, thus if the osgText::String in the field contains unicode characters I think it won't work correctly. Perhaps someone could implement a proper clipboard class that would be cross-platform and support osgText::String (more precisely other languages like Chinese) correctly? Cut, copy and paste are not critical to what I'm doing so I won't invest the time to do that, but I just thought I'd mention it.
"
2010-09-09 16:49:10 +00:00
..
3dc Converted osg::notify to OSG_INFO etc. 2010-05-28 16:29:53 +00:00
3ds From Maria Ten, "Importing 3ds files with a texture for the diffuse component and other one for opacity does not work with the osg 3ds plugin. In the attached file, there is a fix to solve this issue but it does not support textures without alpha channel in the opacity component (like black and white textures used in 3ds max to achieve the transparency). There is attached a test 3ds file too. 2010-08-16 14:54:16 +00:00
ac Converted osg::notify to OSG_INFO etc. 2010-05-28 16:30:36 +00:00
bmp Converted osg::notify to OSG_INFO etc. 2010-05-28 17:14:29 +00:00
bsp Converted osg::notify to OSG_INFO etc. 2010-05-28 16:30:58 +00:00
bvh Converted osg::notify to OSG_INFO etc. 2010-05-28 16:31:17 +00:00
cfg Converted osg::notify to OSG_INFO etc. 2010-05-28 16:31:38 +00:00
curl Converted osg::notify to OSG_INFO etc. 2010-05-28 16:32:06 +00:00
dae From Warren Macchi, "While tracing texture artifacts with the 2.9.8 dev release we 2010-07-31 10:18:41 +00:00
dds From Lukasz Izdebski, "Texture: added support for GL_EXT_texture_compression_rgtc, I added support (read and write ) for BC4 BC5 Block Compression to dds file format." 2010-08-16 14:11:49 +00:00
dicom Converted osg::notify to use info 2010-05-28 16:28:18 +00:00
directshow Converted osg::notify to OSG_INFO etc. 2010-05-28 16:37:10 +00:00
dot From Farshid Lashkari, "I modified some plugins to use the osgDB file stream functions in order to support UTF-8 encoded filenames." 2010-05-13 11:01:06 +00:00
dw Converted osg::notify to OSG_INFO etc. 2010-05-28 16:37:40 +00:00
dxf From Joachim Pouderoux, "Please find attached a very small fix for the DXF reader. The bug made OSG 2010-09-09 10:17:55 +00:00
exr Converted osg::notify to OSG_INFO etc. 2010-05-28 16:38:19 +00:00
fbx From Donn Mielcarek: 2010-08-17 13:25:46 +00:00
ffmpeg Added version check for av_lockmgr_register support. 2010-09-09 09:05:33 +00:00
freetype Cleaned up debug info, and changed Text3D across to using GL_NORMALIZE instead of GL_RESCALE_NORMAL. 2010-09-08 11:02:39 +00:00
gdal Converted osg::notify to OSG_INFO etc. 2010-05-28 17:15:47 +00:00
gecko Converted osg::notify to OSG_INFO etc. 2010-05-28 16:42:57 +00:00
geo Converted osg::notify to OSG_INFO etc. 2010-05-28 16:41:37 +00:00
gif Converted osg::notify to OSG_INFO etc. 2010-05-28 16:41:53 +00:00
glsl From Stephane Lamoliatte, "Here is a patch wich improves the support for geometry shaders in OpenSceneGraph. 2009-10-10 09:41:28 +00:00
gz Converted osg::notify to OSG_INFO etc. 2010-05-28 16:42:24 +00:00
hdr Ported osgUtil, osgDB, osgGA, NodeKits and plugins to compile against OpenGL ES 1.1 and OpenGL ES 2.0. 2009-10-28 20:31:57 +00:00
imageio Converted osg::notify to OSG_INFO etc. 2010-05-28 17:16:49 +00:00
Inventor From Jim Vaughan, "The attached file fixes a bug in the Inventor loader that causes texture images to have r with a value of zero. 2010-06-17 11:01:40 +00:00
ive Converted osg::notify to OSG_INFO etc. 2010-05-28 16:27:02 +00:00
jp2 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:44:28 +00:00
jpeg From Farshid Lashkari, "I modified some plugins to use the osgDB file stream functions in order to support UTF-8 encoded filenames." 2010-05-13 11:01:06 +00:00
logo Converted osg::notify to OSG_INFO etc. 2010-05-28 16:45:32 +00:00
lwo Converted osg::notify to OSG_INFO etc. 2010-05-28 16:47:42 +00:00
lws Converted osg::notify to OSG_INFO etc. 2010-05-28 16:44:08 +00:00
md2 Converted osg::notify to OSG_INFO etc. 2010-05-28 16:48:05 +00:00
mdl Converted osg::notify to OSG_INFO etc. 2010-05-28 17:14:11 +00:00
normals Converted osg::notify to OSG_INFO etc. 2010-05-28 16:48:31 +00:00
obj Added material setName. 2010-08-16 14:24:12 +00:00
ogr From Joachim Pouderoux, "I have added the support for wkbMultiPolygon & wkbMultiPolygon25D in the OGR 2010-09-09 10:14:54 +00:00
OpenFlight Converted osg::notify to OSG_INFO etc. 2010-05-28 16:22:02 +00:00
osg From Jean-Sebastien Guay, "osgWidget::WindowManager did nothing in its keyUp event, and in particular didn't call any callbacks. Since I wanted to have callbacks on keyUp, I copied what it does on keyDown, which works for me. I could have just used keyDown and saved myself the trouble, but you know me... :-) 2010-09-09 16:49:10 +00:00
osga Converted osg::notify to OSG_INFO etc. 2010-05-28 16:50:29 +00:00
osgtgz Converted osg::notify to OSG_INFO etc. 2010-05-28 16:50:45 +00:00
p3d Converted osg::notify to OSG_INFO etc. 2010-05-28 16:28:58 +00:00
pdf Converted osg::notify to OSG_INFO etc. 2010-05-28 17:17:09 +00:00
pfb Converted osg::notify to OSG_INFO etc. 2010-05-28 16:51:18 +00:00
pic From Philip Lowman, clean up of CMake files 2009-04-09 09:23:45 +00:00
ply Converted osg::notify to OSG_INFO etc. 2010-05-28 16:52:45 +00:00
png Converted osg::notify to OSG_INFO etc. 2010-05-28 16:53:46 +00:00
pnm Converted osg::notify to OSG_INFO etc. 2010-05-28 16:54:08 +00:00
pov From Jan Peciva, "I am sending pov plugin for exporting scene to POV-Ray format. 2010-07-31 10:33:20 +00:00
qfont Converted osg::notify to OSG_INFO etc. 2010-05-28 16:54:45 +00:00
quicktime Converted osg::notify to OSG_INFO etc. 2010-05-28 17:05:46 +00:00
revisions Converted osg::notify to OSG_INFO etc. 2010-05-28 17:06:10 +00:00
rgb From Mathias Froehlich, "While tracking some valgrind problems in flightgear, I found a remaining off by 2010-06-01 11:51:37 +00:00
rot Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:01 +00:00
scale Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:24 +00:00
shadow Converted osg::notify to OSG_INFO etc. 2010-05-28 17:07:44 +00:00
shp Converted osg::notify to OSG_INFO etc. 2010-05-28 17:08:10 +00:00
stl Converted osg::notify to OSG_INFO etc. 2010-05-28 17:08:30 +00:00
svg From Jeremy Moles, "Somehow, the SVG reader plugin has gone all this time without actually 2009-11-20 10:56:54 +00:00
terrain Converted osg::notify to OSG_INFO etc. 2010-05-28 17:09:15 +00:00
tga From Wang Rui, "Attachment is the implementation of the writing operation of the TGA 2010-08-16 14:39:53 +00:00
tgz Converted osg::notify to OSG_INFO etc. 2010-05-28 17:09:36 +00:00
tiff Converted osg::notify to OSG_INFO etc. 2010-05-28 17:10:06 +00:00
trans Converted osg::notify to OSG_INFO etc. 2010-05-28 17:10:27 +00:00
txf Moved TextNode into osgText. 2010-09-07 18:18:35 +00:00
txp Fixed build 2010-07-31 09:21:50 +00:00
view Converted osg::notify to OSG_INFO etc. 2010-05-28 17:11:14 +00:00
vnc Converted osg::notify to OSG_INFO etc. 2010-05-28 17:11:35 +00:00
vrml Fixed permissions 2010-06-03 16:02:01 +00:00
vtf Converted osg::notify to OSG_INFO etc. 2010-05-28 17:12:14 +00:00
x From Tassilo Glander, "I want to submit a fix for the plugin to load .x model files (Direct X). 2010-09-09 10:09:31 +00:00
xine Converted osg::notify to OSG_INFO etc. 2010-05-28 17:13:20 +00:00
zip Converted osg::notify to OSG_INFO etc. 2010-05-28 17:13:41 +00:00
CMakeLists.txt From Jan Peciva, "I am sending pov plugin for exporting scene to POV-Ray format. 2010-07-31 10:33:20 +00:00