overview <p>NAVSETITEM describes a navigation item that you wish to insert, get or set (via <ac:link><ri:page ri:content-title="NavInsertItem" /></ac:link>,&nbsp;<ac:link><ri:page ri:content-title="NavGetItem" /></ac:link>&nbsp;or&nbsp;<ac:link><ri:page ri:content-title="NavSetItem" /></ac:link>)</p> Structure <ac:structured-macro ac:name="code"><ac:plain-text-body><![CDATA[struct NAVSETITEM { UINT size; NavHandle hItem; UINT mask; UINT flags; UINT state; LPCWSTR strLabel; LPCWSTR strDescription; HINSTANCE hModule; UINT nIconId; UINT EventMask; NavigationItemUIInterface* pInterface; LPARAM lParam; LPCWSTR strAlias; LPCWSTR strFQN; }; ]]></ac:plain-text-body></ac:structured-macro> Members <ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">size</ac:parameter><ac:parameter ac:name="Type">UINT</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The size of the structure in bytes. Set this to the size of the NAVITEM structure before using it with any API functions</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">hItem</ac:parameter><ac:parameter ac:name="Linked">true</ac:parameter><ac:parameter ac:name="Type">NavHandle</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>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.</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">mask</ac:parameter><ac:parameter ac:name="Type">DWORD</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>A bitmask that defines what fields in the NAVSETITEM structure are to be considered when using it with <ac:link><ri:page ri:content-title="NavGetItem" /></ac:link> and <ac:link><ri:page ri:content-title="NavSetItem" /></ac:link>. <ac:link><ri:page ri:content-title="NavInsertItem" /></ac:link> uses all the specified fields.</p><table><tbody><tr><th>&nbsp;</th><th>&nbsp;</th></tr><tr><td><span>NI_MASK_FLAGS</span></td><td>The flags member is valid</td></tr><tr><td><span>NI_MASK_STATE</span></td><td>The state member is valid</td></tr><tr><td><span>NI_MASK_LABEL</span></td><td>The label member is valid</td></tr><tr><td><span>NI_MASK_DESCRIPTION</span></td><td>The description member is valid</td></tr><tr><td><span>NI_MASK_ICON</span></td><td>The icon member is valid</td></tr><tr><td><span>NI_MASK_EVENTMASK</span></td><td>The event mask is valid</td></tr><tr><td colspan="1" width=""><span>NI_MASK_INTERFACE</span></td><td colspan="1" width="">The callback interface member is valid</td></tr><tr><td><span>NI_MASK_LPARAM</span></td><td>The LPARAM member is valid</td></tr><tr><td><span>NI_MASK_ALIAS</span></td><td>The alias field is valid</td></tr><tr><td><span>NI_MASK_FQN</span></td><td>The FQN field is valid</td></tr></tbody></table></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">flags</ac:parameter><ac:parameter ac:name="Type">DWORD</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>A bitmask describing the flags for the item</p><table><tbody><tr><th>Flag</th><th>Description</th></tr><tr><td><span>NI_FLAG_CONTAINER</span></td><td>The item has a panel associated with it that will display all child items when selected. Mutually exclusive with <span>NI_FLAG_CUSTOMCONTAINER</span></td></tr><tr><td><span>NI_FLAG_SORTCHILDREN</span></td><td>Sorts the children when displayed</td></tr><tr><td><span>NI_FLAG_CUSTOMCONTAINER</span></td><td>Indicates 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.</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_HIDDEN</span></td><td colspan="1" width="">The item is hidden</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_OWNERDRAW</span></td><td colspan="1" width="">Child items of a container will be owner-drawn. You will be called via the pInterface-&gt;NavItemDrawItem function to draw the child item.</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_XAMLTEXT</span></td><td colspan="1" width="">Unused</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_DYNAMICHELP</span></td><td colspan="1" width="">Help 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-&gt;NavItemGetHelpContent</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_DEFAULTLOCATION</span></td><td colspan="1" width="">Used internally</td></tr><tr><td colspan="1" width=""><p><span>NI_FLAG_MESSAGEBAR_ICONINFO</span></p><p><span><span>NI_FLAG_MESSAGEBAR_ICONWARNING</span></span></p><p><span><span><span>NI_FLAG_MESSAGEBAR_ICONSHIELD</span></span></span></p></td><td colspan="1" width=""><strong>Message Bar Only:</strong> Places an icon of the specified type in front of the message in the Message Bar</td></tr><tr><td colspan="1" width=""><span>NI_FLAG_MESSAGEBAR_NOTIFY</span></td><td colspan="1" width=""><strong>Message Bar Only: </strong>Instead of navigating to the link in the item in the Message Bar, notify the item via its pInterface-&gt;NavItemNotify function.</td></tr></tbody></table><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">state</ac:parameter><ac:parameter ac:name="Type">UINT</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The current state of the item.</p><table><tbody><tr><td>NI_STATE_SELECTED</td><td>The item is currently selected</td></tr><tr><td>NI_STATE_FOCUS</td><td>The item is currently focussed</td></tr></tbody></table><p>&nbsp;</p><div /></ac:rich-text-body></ac:structured-macro></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">strLabel</ac:parameter><ac:parameter ac:name="Type">LPCWSTR</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The label to display to the user</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">strDescription</ac:parameter><ac:parameter ac:name="Type">LPCWSTR</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The user friendly description of the item. Usually displayed as a tool tip.</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">hModule</ac:parameter><ac:parameter ac:name="Type">HINSTANCE</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The module instance that will provide resources to this item</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">nIconId</ac:parameter><ac:parameter ac:name="Type">UINT</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The resource id of the icon to use.</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">EventMask</ac:parameter><ac:parameter ac:name="Type">UINT</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The bitmask indicating what events this item wants to be notified about.</p><table><tbody><tr><th>Flag</th><th colspan="1" width="">Valid Item Types</th><th>Description</th></tr><tr><td><span>NI_EVENT_MOUSE_LCLICK</span></td><td colspan="1" width=""><p>Nav items created with <span>NI_FLAG_CONTAINER</span></p><p>Tasks, Listeners</p></td><td><p>For items registered with <span>NI_FLAG_CONTAINER, then this event is sent when the panel is clicked.</span></p><p><span>For tasks it&apos;s sent when the task item is clicked</span></p></td></tr><tr><td><span>NI_EVENT_MOUSE_RCLICK</span></td><td colspan="1" width=""><span>Nav items created with </span><span>NI_FLAG_CONTAINER, <span>, Listeners</span></span></td><td><span>The item wants notification of right mouse click events in the panel</span></td></tr><tr><td><span>NI_EVENT_MOUSE_DBLCLICK</span></td><td colspan="1" width="">Nav Items with no panel and <span>Nav items created with </span><span>NI_FLAG_CONTAINER<span>, Listeners</span></span></td><td><span>For nav items with no panel, this event is sent when the item is clicked. <span>For items registered with </span><span>NI_FLAG_CONTAINER, this event is sent when the panel is double clicked</span></span></td></tr><tr><td><span>NI_EVENT_MOUSE_ENTEREXIT</span></td><td colspan="1" width="">Unused</td><td><span>The item wants notification when the mouse enters/exits the item</span></td></tr><tr><td><span>NI_EVENT_MOUSE_MOVE</span></td><td colspan="1" width="">Unused</td><td><span>The item wants notification when the mouse moves within the item</span></td></tr><tr><td><span>NI_EVENT_ACTIVATE</span></td><td colspan="1" width="">Nav Items <span>created with <span>NI_FLAG_CUSTOMCONTAINER<span>, Listeners</span></span></span></td><td>The item wants to be notified when it is activated</td></tr><tr><td>NI_EVENT_DEACTIVATE</td><td colspan="1" width=""><span>Nav Items </span><span>created with NI_FLAG_CUSTOMCONTAINER<span>, Listeners</span></span></td><td>The item wants to be notified when it&apos;s deactivated. For listeners, this event is sent BEFORE deactivation.</td></tr><tr><td>NI_EVENT_NOTIFY</td><td colspan="1" width="">Internal</td><td>Do not use</td></tr><tr><td><span>NI_EVENT_CREATED</span></td><td colspan="1" width=""><span>Listeners</span></td><td>Notifies all listeners registered with <ac:link><ri:page ri:content-title="NavRegisterNavFilter" /></ac:link> that a new nav item has been created.</td></tr><tr><td><span>NI_EVENT_DESTROYED</span></td><td colspan="1" width="">Listeners</td><td><span>Notifies all listeners registered with <ac:link><ri:page ri:content-title="NavRegisterNavFilter" /></ac:link></span><span> that a nav item has been destroyed.</span></td></tr></tbody></table></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">pInterface</ac:parameter><ac:parameter ac:name="TypeMod">*</ac:parameter><ac:parameter ac:name="Linked">true</ac:parameter><ac:parameter ac:name="Type">NavigationItemUIInterface</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:parameter ac:name="Optional">true</ac:parameter><ac:rich-text-body><p>Pointer to the <ac:link><ri:page ri:content-title="NavigationItemUIInterface" /></ac:link> that will handle events and delegation for this item. Can be NULL to indicate no handler.</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">strAlias</ac:parameter><ac:parameter ac:name="Type">LPCWSTR</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The alias of this item. Can be NULL to indicate no alias.</p><div /></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">strFQN</ac:parameter><ac:parameter ac:name="Type">LPCWSTR</ac:parameter><ac:parameter ac:name="Style">Member</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body><p>The fully qualified name of this item. e.g. NAVIGATIONTREE\MyComponent\MyItem</p><div /></ac:rich-text-body></ac:structured-macro> Remarks <p>Components can register as listeners for navigation events by calling&nbsp;<ac:link><ri:page ri:content-title="NavRegisterNavFilter" /></ac:link>. They can only listen on navigation tree items and not any other type of navigation item.</p> Examples None SeeAlso <p><ac:link><ri:page ri:content-title="NavInsertItem" /></ac:link></p><p><ac:link><ri:page ri:content-title="NavGetItem" /></ac:link></p><p><ac:link><ri:page ri:content-title="NavSetItem" /></ac:link></p><p><ac:link><ri:page ri:content-title="NavGetItemEx" /></ac:link></p><p><ac:link><ri:page ri:content-title="NavSetItemEx" /></ac:link></p>