Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATWindow::FindControlAndVerify
CATControl * CATWindow::FindControlAndVerify ( const CATString controlName,
const CATString typeName,
CATUInt32 index = 0 
)

FindControlAndVerify() finds a control object by name, then verifies that it is of the appropriate type before returning it.

It will also return the index of the control in the window's child list if desired.

If the type doesn't match then NULL is returned.

Parameters:
controlName - name of the control to find.
controlName - name of the control type to check against.
index - ptr to CATUInt32 to receive index, or 0
Returns:
CATControl* - ptr to matching control, or 0 if none is found.

Definition at line 1268 of file CATWindow.cpp.

References CATFINDCONTROLSTRUCT::CurControl, FindControlCallback(), CATFINDCONTROLSTRUCT::FirstControl, CATGuiObj::ForEachControl(), CATFINDCONTROLSTRUCT::FoundControl, CATFINDCONTROLSTRUCT::Name, CATFINDCONTROLSTRUCT::NextControl, CATFINDCONTROLSTRUCT::PrevControl, CATFINDCONTROLSTRUCT::TargetControl, and CATFINDCONTROLSTRUCT::TypeName.

Referenced by GASPilot::OnInjectWindow(), and GASPilot::OnStart().


Generated on Mon Feb 11 04:11:16 2008 for Game Accessibility Suite by doxygen 1.5.4