SelectScan Class Reference

Selects objects which are in the set item whose selection toggle has been clicked. More...

#include <ngscan.h>

Inheritance diagram for SelectScan:

BaseSelectScan NodeScan List of all members.

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

SGNameItemm_pItem

Detailed Description

Selects objects which are in the set item whose selection toggle has been clicked.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/5/99
See also:
BaseSelectScan

Definition at line 155 of file ngscan.h.


Constructor & Destructor Documentation

SelectScan::SelectScan SGNameItem pItem,
Change  eChange,
BOOL  fQuiet = FALSE
 


Member Function Documentation

BOOL SelectScan::OnSelectable NodeRenderable pRender  )  [protected, virtual]
 

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.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/5/99
Parameters:
pRender --- the current renderable node in the selection scan [INPUTS]
Returns:
TRUE, continue scanning.
See also:
BaseSelectScan

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 }


Member Data Documentation

SGNameItem* SelectScan::m_pItem [protected]
 

Definition at line 163 of file ngscan.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:49 2007 for Camelot by  doxygen 1.4.4