Page tree
Skip to end of metadata
Go to start of metadata

NAVSETITEM describes a navigation item that you wish to insert, get or set (via NavInsertItemNavGetItem or NavSetItem)

Structure

 

Members

size
Type: UINT
The size of the structure in bytes. Set this to the size of the NAVITEM structure before using it with any API functions
hItem
Type: NavHandle
The returned NavHandle of the item. When you call any of the three Nav Set/Get/Insert functions, hItem will be set to contain the handle to the item you are referencing.
mask
Type: DWORD

A bitmask that defines what fields in the NAVSETITEM structure are to be considered when using it with NavGetItem and NavSetItem. NavInsertItem uses all the specified fields.

  
NI_MASK_FLAGSThe flags member is valid
NI_MASK_STATEThe state member is valid
NI_MASK_LABELThe label member is valid
NI_MASK_DESCRIPTIONThe description member is valid
NI_MASK_ICONThe icon member is valid
NI_MASK_EVENTMASKThe event mask is valid
NI_MASK_INTERFACEThe callback interface member is valid
NI_MASK_LPARAMThe LPARAM member is valid
NI_MASK_ALIASThe alias field is valid
NI_MASK_FQNThe FQN field is valid
flags
Type: DWORD

A bitmask describing the flags for the item

FlagDescription
NI_FLAG_CONTAINERThe item has a panel associated with it that will display all child items when selected. Mutually exclusive with NI_FLAG_CUSTOMCONTAINER
NI_FLAG_SORTCHILDRENSorts the children when displayed
NI_FLAG_CUSTOMCONTAINERIndicates that you wish to provide a custom panel for this container item. The framework will call you via the pInterface member in order to create your panel or notify you of navigation events.
NI_FLAG_HIDDENThe item is hidden
NI_FLAG_OWNERDRAWChild items of a container will be owner-drawn. You will be called via the pInterface->NavItemDrawItem function to draw the child item.
NI_FLAG_XAMLTEXTUnused
NI_FLAG_DYNAMICHELPHelp content for this item is dynamic. Whenever the framework navigates to this item, you will be asked for the help content via a call to pInterface->NavItemGetHelpContent
NI_FLAG_DEFAULTLOCATIONUsed internally

NI_FLAG_MESSAGEBAR_ICONINFO

NI_FLAG_MESSAGEBAR_ICONWARNING

NI_FLAG_MESSAGEBAR_ICONSHIELD

Message Bar Only: Places an icon of the specified type in front of the message in the Message Bar
NI_FLAG_MESSAGEBAR_NOTIFYMessage Bar Only: Instead of navigating to the link in the item in the Message Bar, notify the item via its pInterface->NavItemNotify function.
state
Type: UINT

The current state of the item.

NI_STATE_SELECTEDThe item is currently selected
NI_STATE_FOCUSThe item is currently focussed

 

strLabel
Type: LPCWSTR
The label to display to the user
strDescription
Type: LPCWSTR
The user friendly description of the item. Usually displayed as a tool tip.
hModule
Type: HINSTANCE
The module instance that will provide resources to this item
nIconId
Type: UINT
The resource id of the icon to use.
EventMask
Type: UINT

The bitmask indicating what events this item wants to be notified about.

FlagValid Item TypesDescription
NI_EVENT_MOUSE_LCLICK

Nav items created with NI_FLAG_CONTAINER

Tasks, Listeners

For items registered with NI_FLAG_CONTAINER, then this event is sent when the panel is clicked.

For tasks it's sent when the task item is clicked

NI_EVENT_MOUSE_RCLICKNav items created with NI_FLAG_CONTAINER, , ListenersThe item wants notification of right mouse click events in the panel
NI_EVENT_MOUSE_DBLCLICKNav Items with no panel and Nav items created with NI_FLAG_CONTAINER, ListenersFor nav items with no panel, this event is sent when the item is clicked. For items registered with NI_FLAG_CONTAINER, this event is sent when the panel is double clicked
NI_EVENT_MOUSE_ENTEREXITUnusedThe item wants notification when the mouse enters/exits the item
NI_EVENT_MOUSE_MOVEUnusedThe item wants notification when the mouse moves within the item
NI_EVENT_ACTIVATENav Items created with NI_FLAG_CUSTOMCONTAINER, ListenersThe item wants to be notified when it is activated
NI_EVENT_DEACTIVATENav Items created with NI_FLAG_CUSTOMCONTAINER, ListenersThe item wants to be notified when it's deactivated. For listeners, this event is sent BEFORE deactivation.
NI_EVENT_NOTIFYInternalDo not use
NI_EVENT_CREATEDListenersNotifies all listeners registered with NavRegisterNavFilter that a new nav item has been created.
NI_EVENT_DESTROYEDListenersNotifies all listeners registered with NavRegisterNavFilter that a nav item has been destroyed.
pInterface [Optional]
Pointer to the NavigationItemUIInterface that will handle events and delegation for this item. Can be NULL to indicate no handler.
strAlias
Type: LPCWSTR

The alias of this item. Can be NULL to indicate no alias.

strFQN
Type: LPCWSTR

The fully qualified name of this item. e.g. NAVIGATIONTREE\MyComponent\MyItem

 

Remarks

Components can register as listeners for navigation events by calling NavRegisterNavFilter. They can only listen on navigation tree items and not any other type of navigation item.

 

Examples

None

See Also

NavInsertItem

NavGetItem

NavSetItem

NavGetItemEx

NavSetItemEx