[Plib-cvs] plib/src/pui puDial.cxx,1.20,1.21
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-06-10 23:10:17
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv7793 Modified Files: puDial.cxx Log Message: James Jones: Implemented different CBModes for puDial Index: puDial.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puDial.cxx,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- puDial.cxx 4 Dec 2001 21:22:15 -0000 1.20 +++ puDial.cxx 10 Jun 2002 23:10:13 -0000 1.21 @@ -147,8 +147,33 @@ setValue ( angle ) ; - puSetActiveWidget ( this, x, y ) ; - invokeCallback () ; + switch ( cb_mode ) + { + case PUSLIDER_CLICK : + if ( updown == active_mouse_edge ) + { + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + } + break ; + + case PUSLIDER_DELTA : + if ( fabs ( last_cb_value - angle ) >= cb_delta ) + { + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + } + break ; + + case PUSLIDER_ALWAYS : + default : + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + break ; + } } } |