Update of /cvsroot/plib/plib/src/puAux
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28520
Modified Files:
puAux.h puAuxBiSlider.cxx puAuxLargeInput.cxx
puAuxScrollBar.cxx puAuxTriSlider.cxx puAuxVerticalMenu.cxx
Log Message:
Implement code to allow the user to activate a widget with an application-specified mouse button
Index: puAux.h
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- puAux.h 22 Sep 2004 21:09:35 -0000 1.3
+++ puAux.h 6 May 2005 18:39:17 -0000 1.4
@@ -758,7 +758,7 @@
point_size = 10.0f ;
button_state = PU_UP ;
- trigger_button = PU_LEFT_BUTTON ;
+ trigger_button = active_mouse_button ;
mouse_x = mouse_y = mouse_z = 0.0f ;
translation_sensitivity = 1.0f ;
Index: puAuxBiSlider.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxBiSlider.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- puAuxBiSlider.cxx 21 Mar 2004 19:03:23 -0000 1.2
+++ puAuxBiSlider.cxx 6 May 2005 18:39:18 -0000 1.3
@@ -87,14 +87,14 @@
if ( updown != PU_DRAG )
puMoveToLast ( this );
- if ( button == PU_LEFT_BUTTON && updown == PU_UP )
+ if ( ( button == active_mouse_button ) && ( updown == PU_UP ) )
{
setActiveButton ( 0 ) ;
puDeactivateWidget () ;
return ;
}
- if ( button == PU_LEFT_BUTTON )
+ if ( button == active_mouse_button )
{
int sd = isVertical() ;
int sz = abox.max [sd] - abox.min [sd] ;
Index: puAuxLargeInput.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxLargeInput.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- puAuxLargeInput.cxx 21 Mar 2004 19:03:23 -0000 1.3
+++ puAuxLargeInput.cxx 6 May 2005 18:39:18 -0000 1.4
@@ -731,7 +731,7 @@
if ( updown != PU_DRAG )
puMoveToLast ( this );
- if ( button == PU_LEFT_BUTTON )
+ if ( button == active_mouse_button )
{
// Most GUI's activate a button on button-UP not button-DOWN.
Index: puAuxScrollBar.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxScrollBar.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- puAuxScrollBar.cxx 21 Mar 2004 19:03:23 -0000 1.2
+++ puAuxScrollBar.cxx 6 May 2005 18:39:18 -0000 1.3
@@ -139,13 +139,13 @@
if ( updown != PU_DRAG )
puMoveToLast ( this );
- if ( button == PU_LEFT_BUTTON && updown == PU_UP )
+ if ( ( button == active_mouse_button ) && ( updown == PU_UP ) )
{
puDeactivateWidget () ;
return ;
}
- if ( button == PU_LEFT_BUTTON )
+ if ( button == active_mouse_button )
{
int width = isVertical () ? abox.max[0] - abox.min[0] : abox.max[1] - abox.min[1] ;
Index: puAuxTriSlider.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxTriSlider.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- puAuxTriSlider.cxx 21 Mar 2004 19:03:23 -0000 1.2
+++ puAuxTriSlider.cxx 6 May 2005 18:39:18 -0000 1.3
@@ -106,14 +106,14 @@
setActiveButton ( 0 ) ;
}
- if ( button == PU_LEFT_BUTTON && updown == PU_UP )
+ if ( ( button == active_mouse_button ) && ( updown == PU_UP ) )
{
setActiveButton ( 0 ) ;
puDeactivateWidget () ;
return ;
}
- if ( button == PU_LEFT_BUTTON )
+ if ( button == active_mouse_button )
{
int sd = isVertical() ;
int sz = abox.max [sd] - abox.min [sd] ;
Index: puAuxVerticalMenu.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxVerticalMenu.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- puAuxVerticalMenu.cxx 21 Mar 2004 19:03:23 -0000 1.2
+++ puAuxVerticalMenu.cxx 6 May 2005 18:39:18 -0000 1.3
@@ -54,6 +54,7 @@
b -> setActiveDirn ( PU_UP_AND_DOWN ) ;
puPopupMenu *p = new puPopupMenu ( w+10, 0 ) ;
+ p->setActiveButton ( active_mouse_button ) ;
b -> setUserData ( p ) ;
|