| Methods Index |
Subclasses:
CRadioNavigator, CWindowNavigator, CFaceNavigator
CTabStop objects.
CTabStops
CTabStops, representing the tab order of the navigator. A navigator can have any number of tab stops.
Movements
K_RIGHT) to a right movement (M_Right). Navigate() responds to a given Movement.
EndJump
EJ_Circular, EJ_None, or EJ_Out. EJ_Out is an attribute used by those navigators that behave as if there is seamless navigation between one navigator and a sibling.
|
|
|
EJ_None
|
EJ_None at the end or beginning of group
|
EJ_Circular
| Roll back to home or end (default) |
EJ_Out
| Navigate out to parent |
|
|
|
JI_Selected
| Move down to selected tab stop |
JI_End
| Move down to home or end |
CNavigator(CSubview* theEnclosure = NULL);
virtual ~CNavigator();
virtual CCourse GetMovement(const CKey& theKey) const;
CCourse ,object describing the movement taken by the navigator when a key event described by theKey is received.
void DefineMovement(const CKey& theKey, CCourse theCourse);
theKey.
void SetEndJump(EndJump);
|
|
|
EJ_None
|
EJ_None at the end or beginning of group
|
EJ_Circular
| Roll back to home or end (default) |
EJ_Out
| Navigate out to parent |
EndJump GetEndJump() const;
EndJump action taken when the user tabs past the last tab stop.
void SetJumpInto(JumpInto); JumpInto GetJumpInto() const;
|
|
|
JI_Selected
| Move down to selected tab stop |
JI_End
| Move down to home or end |
int TabStopCount() const;
CTabStop* GetTabStopAt(int theIndex) const;
n=theIndex) tab stop registered with the navigator, or NULL if theIndex is out of range.
void RemoveTabStop(CTabStop* theTabStop);
theTabStop from the navigator, provided it was already inserted.
void ClearTabStops();
void InsertTabStop(int theIndex , CTabStop* theTabStop);
theTabStop at theIndex, before any item already stored in that location. The tab stop is consumed by the navigator and destroyed in the navigator's destructor.
void AppendTabStop(CTabStop* theTabStop);
theTabStop to the end of the navigator. The tab stop is consumed by the navigator and destroyed in the navigator's destructor.
void InsertSubNavigator(int theIndex, CNavigator* theSubNavigator);
theSubNavigator and inserts it at theIndex, before any item already stored in that location. The subnavigator is consumed by the navigator and destroyed in the navigator's destructor.
void AppendSubNavigator(CNavigator*
theSubNavigator);
theSubNavigator and appends it to the end of the navigator. The subnavigator is consumed by the navigator and destroyed in the navigator's destructor.
void MoveTabStop(int theIndex, CTabStop* theTabStop);
theTabStop to the theIndex, before any item already stored in that location.
BOOLEAN AppendSubviews(const CSubview* theEnclosure);
CRadioGroup objects ,nested in theEnclosure as a special case, adding a special tab stop subnavigator that includes radio buttons nested inside the group.
CTabStop* FindTabStopHavingView(const CView* theView);
theView. Returns NULL if no such tab stop exists.
void AddHotKeyToView(const CKey& theHotKey, CView* theView);
theView. Whenever a key event is received like the event described by theHotKey, the navigator will provide theView with focus.
void InitFocus();
BOOLEAN DoKey(int theKey, BOOLEAN itIsShifted,
BOOLEAN itIsControl); BOOLEAN DoKey(const CKey&);
void DeactivateCurrentTabStop();
virtual BOOLEAN CurrentTabStopSearch(
CNavigator*& theCurrentNav,
CTabStop*& theCurrentTabStop);
theCurrent navigator and tab stop which contain focus. The current navigator could be the navigator itself or a nested navigator.
virtual BOOLEAN HotKeyTabStopSearch(
const CKey& theHotKey,
CNavigator*& foundNav,
CTabStop*& foundTabStop);
theHotKey is received as an event.
virtual void DeactivateTabStop(CTabStop* theTabStop);
theTabStop, assuming that view has focus.
virtual void ActivateTabStop(CTabStop* theTabStop);
theTabStop.
static CNavigatorManager* Manager();
virtual BOOLEAN Navigate(const CCourse& theCourse,
const CKey& theKey, CTabStop*,
CNavigator*& aNewNav, CTabStop*& aNewTabStop );
M_Up means the same as M_Left, M_DownMost means M_RightMost, etc.
theCourse
theKey, or M_None if the key is unrecognized.
theKey
theTabStop
theTabStop != NULL - theTabStop is a pointer to this navigator's tab stop list. This is the tab stop from which to navigate.
theTabStop == NULL - This navigator is called from this navigator's parent navigator and tab stop, which sends only M_*Most movements to its children.
foundNav
foundTabStop.
foundTabStop
TRUE if the navigation took place, FALSE otherwise, in which case the key event still needs to be processed.
BOOLEAN Navigate(const CKey&, CTabStop*,
CNavigator*& aNewNav,
CTabStop*& aNewTabStop);
Navigate() above.
const CSubview* GetEnclosure() const; void SetEnclosure(const CSubview* theEnclosure);
virtual CTabStop* ConstructNavTabStop(CNavigator*); virtual CTabStop* ConstructViewTabStop(CView*); virtual NRadioNavigator* ConstructRadioNavigator(CRadioGroup*);
static RWBoolean TestTrue(void*, void*); static RWBoolean TabStopTestViewIs(const CTabStop*, const CView*); static RWBoolean TabStopTestCanActivate(const CTabStop*, void*); static RWBoolean TabStopTestIsActive(const CTabStop*, void*); static RWBoolean TabStopTestXvtWindowIs(const CTabStop*, void*); static RWBoolean TabStopHasHotKey(const CTabStop*, const CKey*);
RWtestGenerics collection iterator. They are used internally by methods such as FindTabStop, TestTabStop, TraverseCurrentTabStops, etc.
virtual BOOLEAN TestTabStop(FindDirection,
CTabStop* theTabStop, CNavigator*& foundNav,
CTabStop*& foundTabStop,
BOOLEAN UpdateCurrentTabStop = FALSE,
RWtestGeneric theTabStopTest = 0,
void* theTabStopTestData = NULL,
RWtestGeneric theNavTest = 0,
void* theNavTestData = NULL); virtual BOOLEAN FindTabStop(FindDirection,
FindEntryMethod, CTabStop* theStart,
CNavigator*& foundNav, CTabStop*& foundTabStop,
BOOLEAN UpdateCurrentTabStop = FALSE,
RWtestGeneric theTabStopTest = 0,
void* = NULL, RWtestGeneric theNavTest = 0,
void* = NULL);
CNavigator::FindTabStop - Finds a tab stop somewhere within this navigator
CNavigator::TestTabStop - Tests or finds a tab stopThe "Swiss Army Knife" pair of tab stop search methods, providing tab stop traversal with an assortment of modes and filters. These are recursive pairs of functions: each calls the other for deep, subnavigator traversal.
Parameters:
theDirection (FindDirection)
theEntryMethod (FindEntryMethod)
theEntryMethod, applies to the top level call only: All deep recursive calls use FE_None Can be one of:
FE_None: Start at beginning (or ending) tab stop.
FE_AtTabStop: Start at theStart tab stop.
FE_AfterTabStop: Start at the tab stop after (or, if theDirection is FD_Backward, before) theStart.
theStart (const CTabStop*)
FindEntryMethod. Ignored if theEntryMethod is FE_None
foundNav (CNavigator*&)
foundTabStop (CTabStop*&)
UpdateCurrentTabStop (BOOLEAN)
TRUE if update each navigator's itsCurrentTabStop (which is why this method is not const).
theTabStopTest (RWtestGeneric);
NULL or if (*theTabStopTest)(aTabstop, theTabStopTestData) returns TRUE, then a successful tab stop is found and this FindTabStop terminates, returning TRUE.
theTabStopTestData (void*)
theTabStopTest's data.
theNavTest (RWtestGeneric)
*theNavTest)(aSubNavigator, theNavTestData) returns TRUE on that tab stop's subnavigator, then its FindTabStop is called with these parameters. If it is successful, returns TRUE.
theNavTestData (void*)
theNavTest's data.
TRUE if a valid tab stop is found, in which case foundNav and foundTabStop point to these matching items.
FALSE otherwise, in which case foundNav and foundTabStop are unchanged.
CNavigator to expand search side effects at any depth (level).
virtual CTabStop* PickTabStop(RWtestGeneric theTabStopTest = 0,
void* = NULL,
RWtestGeneric theNavTest = 0,
void* = NULL);
Note: Subclasses have freedom of choice as to which tab stop is current: For example, the current
NRadioNavigator tab stop
would be the view of the tab stop whose id is
itsRadioGroup->GetSelectedButton();
BOOLEAN TraverseCurrentTabStops(CNavigator*& foundNav,
CTabStop*& foundTabStop,
RWtestGeneric theTabStopTest = 0,
void* = NULL);
itsCurrentTabStop chain of tab stops until a match is found.Parameters:
foundNav (CNavigator*&)
foundTabStop (CTabStop*&)
theTabStopTest (RWtestGeneric)
NULL or if (*theTabStopTest)(aTabstop, theTabStopTestData) returns TRUE, then a successful tab stop is found and this FindTabStop terminates, returning TRUE.
theTabStopTestData (void*)
theTabStopTest's data.
TRUE if a matching current tab stop is found, in which case foundNav and foundTabStop point to these matching items.
FALSE otherwise, in which case foundNav and foundTabStop are unchanged.
CTabStop* FindFocusable(FindDirection,
FindEntryMethod, CTabStop* theTabStop);
Navigate() to locate a tab stop that can receive focus.