ZFFramework
 
Loading...
Searching...
No Matches
ZFUIViewFocus.h File Reference

ZFUIView focus utility. More...

#include "ZFUIView.h"

Go to the source code of this file.

Classes

class  ZFUIViewFocusNextParam
 param for ZFUIViewFocusNextFind and ZFUIViewFocusNextMove More...
 
class  v_ZFUIViewFocusNextParam
 type wrapper for ZFTypeId::Value More...
 

Functions

void ZFUIViewFocusNextSetup (ZFUIView *from, ZFUIView *nextFocus)
 manually set the next focus target for the from view, set null to remove
 
const zfstringZFTypeId_ZFUIViewFocusNextParam (void)
 
zfanyT< ZFUIViewZFUIViewFocusNextFind (ZFUIView *view, const ZFUIViewFocusNextParam &param=(ZFUIViewFocusNextParam()))
 find next focusable from view (excluding) with direction
 
zfanyT< ZFUIViewZFUIViewFocusNextMove (ZFUIView *view, const ZFUIViewFocusNextParam &param=(ZFUIViewFocusNextParam()))
 move focus to next if available or do nothing otherwise, see ZFUIViewFocusNextFind
 
zfbool ZFUIViewFocusResolveKeyEvent (ZFUIView *view, ZFUIKeyEvent *keyEvent, zfauto *nextFocus=(zft_zfnull), ZFUIView *endParent=(zft_zfnull))
 util method to resolve key event (such as up/down/left/right keys) and check to move focus, see ZFUIViewFocusNextFind
 

Detailed Description

ZFUIView focus utility.

Function Documentation

◆ ZFTypeId_ZFUIViewFocusNextParam()

const zfstring & ZFTypeId_ZFUIViewFocusNextParam ( void )
inline


◆ ZFUIViewFocusNextFind()

zfanyT< ZFUIView > ZFUIViewFocusNextFind ( ZFUIView * view,
const ZFUIViewFocusNextParam & param = (ZFUIViewFocusNextParam()) )
extern

find next focusable from view (excluding) with direction

return first focusable view if found

◆ ZFUIViewFocusResolveKeyEvent()

zfbool ZFUIViewFocusResolveKeyEvent ( ZFUIView * view,
ZFUIKeyEvent * keyEvent,
zfauto * nextFocus = (zft_zfnull),
ZFUIView * endParent = (zft_zfnull) )
extern

util method to resolve key event (such as up/down/left/right keys) and check to move focus, see ZFUIViewFocusNextFind

return true if the event has been resolved, next focused view can be checked by the optional nextFocus param