Package ghidra.app.nav

# Interface Navigatable

All Known Implementing Classes:
  `NavigatableComponentProviderAdapter`

public interface Navigatable
Interface for ComponentProviders to implement if they support basic navigation and selection capabilities. Implementing this interface will provide the provider with navigation history and actions that require navigation or selection. (Search Text, Search Memory, Select bytes, Select instructions, etc.)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final long`
  `DEFAULT_NAVIGATABLE_ID`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addNavigatableListener(NavigatableRemovalListener listener)`
  Adds a listener to be notified if this Navigatable is terminated
  `ProgramSelection`
  `getHighlight()`
  Returns the current highlight of this Navigatable
  `long`
  `getInstanceID()`
  `ProgramLocation`
  `getLocation()`
  Returns the current location of this Navigatable
  `LocationMemento`
  `getMemento()`
  Returns the view state for this navigatable
  `Icon`
  `getNavigatableIcon()`
  Returns an icon that represents this Navigatable
  `Program`
  `getProgram()`
  Returns the current Program of this Navigatable
  `ProgramSelection`
  `getSelection()`
  Returns the current selection of this Navigatable
  `String`
  `getTextSelection()`
  Returns the current text selection or null
  `boolean`
  `goTo(Program program, ProgramLocation location)`
  Commands this navigatable to goto (display) the given program and location
  `boolean`
  `isConnected()`
  Returns true if this Navigatable is "connected".
  `boolean`
  `isDisposed()`
  Returns true if this navigatable is no longer valid
  `default boolean`
  `isDynamic()`
  Return true if this Navigatable is part of the "dynamic analysis" or "debugger" user interface.
  `boolean`
  `isVisible()`
  Returns true if this provider is visible
  `void`
  `removeHighlightProvider(ListingHighlightProvider highlightProvider, Program program)`
  Removes the given highlight provider for the given program
  `void`
  `removeNavigatableListener(NavigatableRemovalListener listener)`
  Removes a listener to be notified if this Navigatable is terminated.
  `void`
  `requestFocus()`
  Tells this provider to request focus.
  `void`
  `setHighlight(ProgramSelection highlight)`
  Tells this Navigatable to set its highlight to the given highlight
  `void`
  `setHighlightProvider(ListingHighlightProvider highlightProvider, Program program)`
  Set the highlight provider for the given program
  `void`
  `setMemento(LocationMemento memento)`
  Sets the view state for this navigatable.
  `void`
  `setSelection(ProgramSelection selection)`
  Tells this Navigatable to set its selection to the given selection
  `boolean`
  `supportsHighlight()`
  Returns true if this navigatable supports highlighting
  `boolean`
  `supportsMarkers()`
  Currently only the 'connected' windows support markers

- ## Field Details

  - ### DEFAULT_NAVIGATABLE_ID

    static final long DEFAULT_NAVIGATABLE_ID
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getInstanceID

    long getInstanceID()

  - ### goTo

    boolean goTo(Program program, ProgramLocation location)
    Commands this navigatable to goto (display) the given program and location
    Parameters:
      `program` - the program
      `location` - the location in that program to display
    Returns:
      true if the goto was successful

  - ### getLocation

    ProgramLocation getLocation()
    Returns the current location of this Navigatable
    Returns:
      the current location of this Navigatable

  - ### getProgram

    Program getProgram()
    Returns the current Program of this Navigatable
    Returns:
      the current Program of this Navigatable

  - ### getMemento

    LocationMemento getMemento()
    Returns the view state for this navigatable
    Returns:
      the view state for this navigatable

  - ### setMemento

    void setMemento(LocationMemento memento)
    Sets the view state for this navigatable. This is used later to restore the view state.
    Parameters:
      `memento` - the state of this navigatable

  - ### getNavigatableIcon

    Icon getNavigatableIcon()
    Returns an icon that represents this Navigatable
    Returns:
      the icon

  - ### isConnected

    boolean isConnected()
    Returns true if this Navigatable is "connected". Navigatables are connected if they produce and consume location and selection events.
    Returns:
      true if this Navigatable is "connected"

  - ### isDynamic

    default boolean isDynamic()
    Return true if this Navigatable is part of the "dynamic analysis" or "debugger" user interface.
    Returns:
      true if this Navigatable is "dynamic"

  - ### supportsMarkers

    boolean supportsMarkers()
    Currently only the 'connected' windows support markers
    Returns:
      true if this navigatable supports markers

  - ### requestFocus

    void requestFocus()
    Tells this provider to request focus.

  - ### isVisible

    boolean isVisible()
    Returns true if this provider is visible
    Returns:
      true if visible

  - ### setSelection

    void setSelection(ProgramSelection selection)
    Tells this Navigatable to set its selection to the given selection
    Parameters:
      `selection` - the selection to set.

  - ### setHighlight

    void setHighlight(ProgramSelection highlight)
    Tells this Navigatable to set its highlight to the given highlight
    Parameters:
      `highlight` - the highlight to set.

  - ### getSelection

    ProgramSelection getSelection()
    Returns the current selection of this Navigatable
    Returns:
      the current selection of this Navigatable

  - ### getHighlight

    ProgramSelection getHighlight()
    Returns the current highlight of this Navigatable
    Returns:
      the current highlight of this Navigatable

  - ### getTextSelection

    String getTextSelection()
    Returns the current text selection or null
    Returns:
      the text selection

  - ### addNavigatableListener

    void addNavigatableListener(NavigatableRemovalListener listener)
    Adds a listener to be notified if this Navigatable is terminated
    Parameters:
      `listener` - the listener to be notified when this Navigatable is closed

  - ### removeNavigatableListener

    void removeNavigatableListener(NavigatableRemovalListener listener)
    Removes a listener to be notified if this Navigatable is terminated.
    Parameters:
      `listener` - the listener that no longer should be notified when this Navigatable is closed.

  - ### isDisposed

    boolean isDisposed()
    Returns true if this navigatable is no longer valid
    Returns:
      true if this navigatable is no longer valid

  - ### supportsHighlight

    boolean supportsHighlight()
    Returns true if this navigatable supports highlighting
    Returns:
      true if this navigatable supports highlighting

  - ### setHighlightProvider

    void setHighlightProvider(ListingHighlightProvider highlightProvider, Program program)
    Set the highlight provider for the given program
    Parameters:
      `highlightProvider` - the provider
      `program` - the program

  - ### removeHighlightProvider

    void removeHighlightProvider(ListingHighlightProvider highlightProvider, Program program)
    Removes the given highlight provider for the given program
    Parameters:
      `highlightProvider` - the provider
      `program` - the program