#include <ngscan.h>
Inheritance diagram for SelectScan:
Public Member Functions | |
SelectScan (SGNameItem *pItem, Change eChange, BOOL fQuiet=FALSE) | |
Protected Member Functions | |
virtual BOOL | OnSelectable (NodeRenderable *) |
Called by SelectScan when the 'select' action is executed. Tests the given node for membership of each highlighted set and changes it's selection status accordingly. | |
Protected Attributes | |
SGNameItem * | m_pItem |
Definition at line 155 of file ngscan.h.
|
|
|
Called by SelectScan when the 'select' action is executed. Tests the given node for membership of each highlighted set and changes it's selection status accordingly.
Reimplemented from BaseSelectScan. Definition at line 335 of file ngscan.cpp. 00336 { 00337 // If the node is a member then change its selection state. 00338 if (m_pItem->IsMember(pRender)) 00339 { 00340 // what it does is look at the text story if we are trying to select a text char 00341 // and we will be selecting the story 00342 // then just set the story to the end result 00343 // rather than selecting one char at a time (sjk 1/8/00) 00344 if (pRender->IsATextChar() && m_eChange != TOGGLE) 00345 { 00346 Node * pStory = pRender->FindParent(CC_RUNTIME_CLASS(TextStory)); 00347 if (pStory && m_pItem->IsMember(pStory)) 00348 { 00349 BOOL TurnOff = (m_eChange == DESELECT); 00350 00351 if (pStory->IsSelected() != TurnOff) 00352 { 00353 if (TurnOff) 00354 pRender->DeSelect(m_fShout); 00355 else 00356 pRender->Select(m_fShout); 00357 } 00358 00359 // keep the counts right 00360 m_nAffected++; 00361 00362 return TRUE; 00363 } 00364 } 00365 00366 BaseSelectScan::OnSelectable(pRender); 00367 } 00368 return TRUE; 00369 }
|
|
|