From: <sm...@us...> - 2008-11-24 21:46:21
|
Revision: 9017 http://plplot.svn.sourceforge.net/plplot/?rev=9017&view=rev Author: smekal Date: 2008-11-24 21:43:58 +0000 (Mon, 24 Nov 2008) Log Message: ----------- Locate, button and key handlers provided by the user are now called at the appropriate places. Not tested, but code compiles. Mentioned the locate mode implementation in README.release. Modified Paths: -------------- trunk/README.release trunk/drivers/wxwidgets_app.cpp Modified: trunk/README.release =================================================================== --- trunk/README.release 2008-11-24 16:43:30 UTC (rev 9016) +++ trunk/README.release 2008-11-24 21:43:58 UTC (rev 9017) @@ -122,8 +122,12 @@ The option "text" changed its meaning, since it enabled the FreeType library support, while now the option enables the driver's own text routines. -In addition the wxWidgets driver now correctly clears the background -(or parts of it) and transparency support was added. +Some other features were added: + * the wxWidgets driver now correctly clears the background (or parts of it) + * transparency support was added + * the "locate mode" (already availale in the xwin and tk driver) was + implemented, where graphics input events are processed and translated + to world coordinates 1.4 pdf driver improvements @@ -380,6 +384,13 @@ The option "text" changed its meaning, since it enabled the FreeType library support, while now the option enables the driver's own text routines. +Some other features were added: + * the wxWidgets driver now correctly clears the background (or parts of it) + * transparency support was added + * the "locate mode" (already availale in the xwin and tk driver) was + implemented, where graphics input events are processed and translated + to world coordinates + 2.12 pdf driver improvements The pdf driver (which is based on the haru library http://www.libharu.org) Modified: trunk/drivers/wxwidgets_app.cpp =================================================================== --- trunk/drivers/wxwidgets_app.cpp 2008-11-24 16:43:30 UTC (rev 9016) +++ trunk/drivers/wxwidgets_app.cpp 2008-11-24 21:43:58 UTC (rev 9017) @@ -416,11 +416,14 @@ Locate(); } else { /* Call user keypress event handler. Since this is called first, the user - * can disable all internal event handling by setting key.keysym to 0. */ - //if (pls->KeyEH != NULL) - // (*pls->KeyEH) (gin, pls->KeyEH_data, &dev->exit_eventloop); - // TODO: This must be tested and implemented - + * can disable all internal event handling by setting gin.keysym to 0. */ + if( m_pls->KeyEH != NULL ) { + int advance=0; + (*m_pls->KeyEH)( gin, m_pls->KeyEH_data, &advance ); + if( advance ) + wxGetApp().SetAdvanceFlag(); + } + switch( gin->keysym ) { case 'L': m_dev->locate_mode = LOCATE_INVOKED_VIA_DRIVER; @@ -554,9 +557,12 @@ else { /* Call user event handler. Since this is called first, the user can * disable all PLplot internal event handling by setting gin->button to 0. */ - //if( pls->ButtonEH != NULL) - // (*pls->ButtonEH)( gin, pls->ButtonEH_data, &dev->exit_eventloop ); - // TODO: This must be tested and implemented! + if( m_pls->ButtonEH != NULL) { + int advance=0; + (*m_pls->ButtonEH)( gin, m_pls->ButtonEH_data, &advance ); + if( advance ) + wxGetApp().SetAdvanceFlag(); + } /* Handle internal events */ switch( gin->button ) { @@ -591,10 +597,14 @@ wxGetApp().SetAdvanceFlag(); /* Call user locate mode handler if provided */ - //if( pls->LocateEH != NULL ) - // (*pls->LocateEH)( gin, pls->LocateEH_data, &dev->locate_mode ); - // TODO: This must be tested and implemented! - // else { + if( m_pls->LocateEH != NULL ) { + int locate_mode=m_dev->locate_mode; + (*m_pls->LocateEH)( gin, m_pls->LocateEH_data, &locate_mode ); + if( !locate_mode ) { + m_dev->locate_mode = 0; + m_dev->draw_xhair=false; + } + } else { if( plTranslateCursor(gin) ) { /* If invoked by the API, we're done */ /* Otherwise send report to stdout */ @@ -606,9 +616,9 @@ } else { /* Selected point is out of bounds, so end locate mode */ m_dev->locate_mode = 0; - m_dev->draw_xhair=false; + m_dev->draw_xhair=false; } - //} + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |