[Plib-devel] RE: Deleting a widget from inside its callback (was RE: [Plib-dev el] PUI questions)
Brought to you by:
sjbaker
From: Dave M. <Dav...@dy...> - 2000-08-02 17:17:39
|
nice patch John! I commited the changes to CVS. notes: - i made puCleanUpJunk a private static function - puDisplay calls puCleanUpJunk (along with puMouse and puKeyboard) - i changed complex.cxx to use puDeleteObject - http://plib.sourceforge.net/pui/index.html should be updated - john-- the button assignment in "int puMouse ( int x, int y )" in your code uses -1 whereas the code in CVS uses 0. i left it zero > > int puMouse ( int x, int y ) > { > puCursor ( x, y ) ; > > if ( last_buttons == 0 ) > return FALSE ; > > int button = (last_buttons & (1<<PU_LEFT_BUTTON )) ? > PU_LEFT_BUTTON : > (last_buttons & (1<<PU_MIDDLE_BUTTON)) ? > PU_MIDDLE_BUTTON : > (last_buttons & (1<<PU_RIGHT_BUTTON )) ? > PU_RIGHT_BUTTON > : -1 ; > > int h = puGetWindowHeight () ; > > int return_value = puGetBaseLiveInterface () -> checkHit ( button, > PU_DRAG, x, > h - y ) ; > > puCleanUpJunk () ; > > return return_value ; > } > > > John F. Fay > joh...@eg... |