Re: [chlor-develop] Re: [Chlor-commits] SF.net SVN: chlor: [360] trunk/src
Status: Pre-Alpha
Brought to you by:
lenny222
|
From: <chl...@li...> - 2006-04-09 20:43:20
|
Hi Flo, sorry, i justed quickly browsed your changes and did not spot the activate/deactivate stuff. It seemed to me that the relevant stuff was only implemented in the ChlorMainView. Don't drink and code. Hm... we handle mouseDragged: in CGrabHandTool somehow that ChlorMainView's isn't called at all? Bye, Lenny > Hi, > > I would very much like to do so, but unfortunately don't get what > you're heading for. NSView does not provide any means to switch > autoscrolling on and off, therefore I added this functionality to > ChlorMainView. GrabHandTool switches then between autoscrolling and > non-autoscrolling in the activate: and deactivate: methods. What > else should be moved into these methods? > > Thanks for your patience, > Flo > > Am 09.04.2006 um 19:26 schrieb chlor-develop- > ad...@li...: > >> Hi Flo, >> >> could you please modify your change? This solution is unecessarily >> ugly. Please move this code to activate: and deactiveate: in >> CGrabHandTool like it proposed it. >> >> Thanks for your effort, >> Lenny >> >> Am 09.04.2006 um 12:32 schrieb chlor-commits- >> ad...@li...: >> >>> Revision: 360 >>> Author: floi >>> Date: 2006-04-09 03:31:54 -0700 (Sun, 09 Apr 2006) >>> ViewCVS: http://svn.sourceforge.net/chlor/?rev=360&view=rev >>> >>> Log Message: >>> ----------- >>> Made autoscrolling mode dependent in ChlorMainView. >>> This facility is now used by GrabHandTool to switch it off during >>> its operation. >>> >>> Modified Paths: >>> -------------- >>> trunk/src/ChlorMainView.h >>> trunk/src/ChlorMainView.m >>> trunk/src/tools/CGrabHandTool.m >>> trunk/src/tools/CTool.h >>> Modified: trunk/src/ChlorMainView.h >>> =================================================================== >>> --- trunk/src/ChlorMainView.h 2006-04-08 15:46:13 UTC (rev 359) >>> +++ trunk/src/ChlorMainView.h 2006-04-09 10:31:54 UTC (rev 360) >>> @@ -38,10 +38,16 @@ >>> * The selection renderer. >>> */ >>> CSelectionRenderer* m_selectionRenderer; >>> + >>> + /** >>> + * The autoscoll mode. >>> + */ >>> + BOOL shouldAutoscroll; >>> } >>> >>> //- (NSSize) contentSize; >>> - (void) setMainViewController: (ChlorMainController*) >>> theController; >>> - (ChlorMainController*) mainController; >>> +- (void) setAutoscrollMode: (BOOL) mode; >>> >>> @end >>> >>> Modified: trunk/src/ChlorMainView.m >>> =================================================================== >>> --- trunk/src/ChlorMainView.m 2006-04-08 15:46:13 UTC (rev 359) >>> +++ trunk/src/ChlorMainView.m 2006-04-09 10:31:54 UTC (rev 360) >>> @@ -34,6 +34,7 @@ >>> { >>> m_renderer = [[CRenderer alloc] init]; >>> m_selectionRenderer = [[CSelectionRenderer alloc] init]; >>> + [self setAutoscrollMode: YES]; >>> } >>> >>> return self; >>> @@ -92,11 +93,20 @@ >>> return YES; >>> } >>> >>> +- (void) setAutoscrollMode: (BOOL) mode >>> +{ >>> + // Sets the autoscroll mode. >>> + shouldAutoscroll = mode; >>> +} >>> + >>> + >>> - (void) mouseDragged: (NSEvent*) theEvent >>> { >>> // Scroll the view accordingly if the mouse is dragged >>> // outside the visible area. >>> - [self autoscroll: theEvent]; >>> + if( shouldAutoscroll ) { >>> + [self autoscroll: theEvent]; >>> + } >>> >>> [super mouseDragged: theEvent]; >>> } >>> >>> Modified: trunk/src/tools/CGrabHandTool.m >>> =================================================================== >>> --- trunk/src/tools/CGrabHandTool.m 2006-04-08 15:46:13 UTC (rev >>> 359) >>> +++ trunk/src/tools/CGrabHandTool.m 2006-04-09 10:31:54 UTC (rev >>> 360) >>> @@ -58,4 +58,18 @@ >>> [[m_view superview] scrollPoint: newPosition]; >>> } >>> >>> +- (void) activate >>> +{ >>> + // Autoscrolling interfers with our scrolling activities - we >>> switch it >>> + // therefore off. >>> + [m_view setAutoscrollMode: NO]; >>> +} >>> + >>> +- (void) deactivate >>> +{ >>> + // We're done, so we can switch autoscrolling back on again. >>> + [m_view setAutoscrollMode: YES]; >>> +} >>> + >>> + >>> @end >>> >>> Modified: trunk/src/tools/CTool.h >>> =================================================================== >>> --- trunk/src/tools/CTool.h 2006-04-08 15:46:13 UTC (rev 359) >>> +++ trunk/src/tools/CTool.h 2006-04-09 10:31:54 UTC (rev 360) >>> @@ -18,8 +18,9 @@ >>> */ >>> >>> #import <Cocoa/Cocoa.h> >>> + >>> +#import "ChlorMainView.h" >>> @class ChlorDocument; >>> -@class ChlorMainView; >>> >>> @interface CTool : NSResponder >>> { >>> >>> >>> This was sent by the SourceForge.net collaborative development >>> platform, the world's largest Open Source development site. >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by xPML, a groundbreaking >>> scripting language >>> that extends applications into web and mobile media. Attend the >>> live webcast >>> and join the prime developer group breaking into this new coding >>> territory! >>> http://sel.as-us.falkag.net/sel? >>> cmd=lnk&kid=110944&bid=241720&dat=121642 >>> _______________________________________________ >>> Chlor-commits mailing list >>> Chl...@li... >>> https://lists.sourceforge.net/lists/listinfo/chlor-commits >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the >> live webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> chlor-develop mailing list >> chl...@li... >> https://lists.sourceforge.net/lists/listinfo/chlor-develop >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > chlor-develop mailing list > chl...@li... > https://lists.sourceforge.net/lists/listinfo/chlor-develop |