|
From: andrew7 <bd...@us...> - 2006-12-26 01:17:33
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31517/include/smartwin/widgets Modified Files: WidgetModalDialog.h WidgetWindow.h WidgetWindowBase.h Log Message: Allow SW to work with SP1 for MSVC 2005 by removing "typename ThisMessageMap::" from "typename ThisMessageMap::boolFunctionTakingVoid eventHandler" for #ifdef _MSC_VER. The #ifdef __GNUC__ code is the old way. Index: WidgetWindowBase.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetWindowBase.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- WidgetWindowBase.h 9 Sep 2006 19:12:33 -0000 1.34 +++ WidgetWindowBase.h 26 Dec 2006 01:17:29 -0000 1.35 @@ -229,9 +229,16 @@ * If you return true from your event handler the window is closed, otherwise * the window is NOT allowed to actually close!! */ +#ifdef _MSC_VER + void onClosing( itsBoolFunctionTakingVoid eventHandler ); + void onClosing( boolFunctionTakingVoid eventHandler ); +#endif +#ifdef __GNUC__ void onClosing( typename ThisMessageMap::itsBoolFunctionTakingVoid eventHandler ); void onClosing( typename ThisMessageMap::boolFunctionTakingVoid eventHandler ); +#endif + // TODO: Outfactor into "time Aspect" class /// Creates a timer object. /** The supplied function must have the signature void foo( const CommandPtr & @@ -242,8 +249,14 @@ * event handler function after the specified (in milliSeconds parameter) time * has elapsed. */ +#ifdef _MSC_VER + void createTimer( itsVoidFunctionTakingCommand eventHandler, unsigned int milliSecond, const SmartWin::Command & command ); + void createTimer( voidFunctionTakingCommand eventHandler, unsigned int milliSecond, const SmartWin::Command & command ); +#endif +#ifdef __GNUC__ void createTimer( typename ThisMessageMap::itsVoidFunctionTakingCommand eventHandler, unsigned int milliSecond, const SmartWin::Command & command ); void createTimer( typename ThisMessageMap::voidFunctionTakingCommand eventHandler, unsigned int milliSecond, const SmartWin::Command & command ); +#endif /// Closes the window /** Call this function to raise the "Closing" event. <br> @@ -342,7 +355,14 @@ } template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::onClosing( itsBoolFunctionTakingVoid eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::onClosing( typename ThisMessageMap::itsBoolFunctionTakingVoid eventHandler ) +#endif { this->addNewSignal( typename MessageMapType::SignalTupleType( @@ -358,8 +378,16 @@ ); } + template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::onClosing( boolFunctionTakingVoid eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::onClosing( typename ThisMessageMap::boolFunctionTakingVoid eventHandler ) +#endif { this->addNewSignal( typename MessageMapType::SignalTupleType( @@ -375,10 +403,19 @@ ); } + template< class EventHandlerClass, class MessageMapPolicy > +#ifdef _MSC_VER +void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::createTimer( voidFunctionTakingCommand eventHandler, + unsigned milliSecond, + const Command & command ) +#endif + +#ifdef __GNUC__ void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::createTimer( typename ThisMessageMap::voidFunctionTakingCommand eventHandler, unsigned milliSecond, const Command & command ) +#endif { unsigned int event = - 1; for ( int n = 0; n < 100; ++n ) @@ -403,10 +440,20 @@ ::SetTimer( this->Widget::itsHandle, event, static_cast< UINT >( milliSecond ), static_cast< TIMERPROC >( timerProc ) ); } + template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::createTimer( itsVoidFunctionTakingCommand eventHandler, + unsigned milliSecond, + const Command & command ) +#endif + +#ifdef __GNUC__ void WidgetWindowBase< EventHandlerClass, MessageMapPolicy >::createTimer( typename ThisMessageMap::itsVoidFunctionTakingCommand eventHandler, unsigned milliSecond, const Command & command ) +#endif { unsigned int event = - 1; for ( int n = 1; n < 101; ++n ) Index: WidgetWindow.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetWindow.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- WidgetWindow.h 23 Dec 2006 02:36:34 -0000 1.29 +++ WidgetWindow.h 26 Dec 2006 01:17:29 -0000 1.30 @@ -133,8 +133,18 @@ * The argument CREATESTRUCT sent into your handler is modifiable so that you * can add/remove styles and add remove EX styles etc. */ +#ifdef _MSC_VER + void onCreate( itsVoidFunctionTakingSeedPointer eventHandler ); + void onCreate( voidFunctionTakingSeedPointer eventHandler ); +#endif + +#ifdef __GNUC__ void onCreate( typename ThisMessageMap::itsVoidFunctionTakingSeedPointer eventHandler ); void onCreate( typename ThisMessageMap::voidFunctionTakingSeedPointer eventHandler ); +#endif + + + // TODO: Fix! This doesn't work if you have an application with multiple windows in addition to that it's a member method plus lots of other architectual issues!! // TODO: Add support in the Seed class to override "class name" and then we can do a lookup upon that name given...?? @@ -292,8 +302,15 @@ Widget::create( cs ); } + template< class EventHandlerClass, class MessageMapPolicy > +#ifdef _MSC_VER +void WidgetWindow< EventHandlerClass, MessageMapPolicy >::onCreate( itsVoidFunctionTakingSeedPointer eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetWindow< EventHandlerClass, MessageMapPolicy >::onCreate( typename ThisMessageMap::itsVoidFunctionTakingSeedPointer eventHandler ) +#endif { this->addNewSignal ( typename MessageMapType::SignalTupleType @@ -310,7 +327,14 @@ } template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetWindow< EventHandlerClass, MessageMapPolicy >::onCreate( voidFunctionTakingSeedPointer eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetWindow< EventHandlerClass, MessageMapPolicy >::onCreate( typename ThisMessageMap::voidFunctionTakingSeedPointer eventHandler ) +#endif { this->addNewSignal ( typename MessageMapType::SignalTupleType Index: WidgetModalDialog.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetModalDialog.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- WidgetModalDialog.h 3 Nov 2006 13:26:17 -0000 1.20 +++ WidgetModalDialog.h 26 Dec 2006 01:17:29 -0000 1.21 @@ -139,11 +139,20 @@ * Method signature must be bool foo(); <br> * If you return true from your Event Handler the system will NOT mess up the * initial focus you have chosen, if you return false the system will decide - * which contrl to initially have focus according to the tab order of the + * which control to initially have focus according to the tab order of the * controls! */ +#ifdef _MSC_VER + void onInitDialog( boolFunctionTakingVoid eventHandler ); + void onInitDialog( itsBoolFunctionTakingVoid eventHandler ); +#endif + +#ifdef __GNUC__ void onInitDialog( typename ThisMessageMap::boolFunctionTakingVoid eventHandler ); void onInitDialog( typename ThisMessageMap::itsBoolFunctionTakingVoid eventHandler ); +#endif + + protected: // Protected since this Widget we HAVE to inherit from @@ -257,8 +266,16 @@ } template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetModalDialog< EventHandlerClass, MessageMapPolicy >:: +onInitDialog( itsBoolFunctionTakingVoid eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetModalDialog< EventHandlerClass, MessageMapPolicy >:: onInitDialog( typename ThisMessageMap::itsBoolFunctionTakingVoid eventHandler ) +#endif { this->addNewSignal ( typename MessageMapType::SignalTupleType @@ -275,8 +292,16 @@ } template< class EventHandlerClass, class MessageMapPolicy > + +#ifdef _MSC_VER +void WidgetModalDialog< EventHandlerClass, MessageMapPolicy >:: +onInitDialog( boolFunctionTakingVoid eventHandler ) +#endif + +#ifdef __GNUC__ void WidgetModalDialog< EventHandlerClass, MessageMapPolicy >:: onInitDialog( typename ThisMessageMap::boolFunctionTakingVoid eventHandler ) +#endif { this->addNewSignal ( typename MessageMapType::SignalTupleType |