Class ImGuiProbeSelector
- Namespace
- OpenEphys.EphysVisualization.Design
- Assembly
- OpenEphys.EphysVisualization.Design.dll
Provides an ImGui view of a probe: a minimap of the whole probe, and a zoomable view of part of it in which contacts can be selected by dragging.
public class ImGuiProbeSelector
- Inheritance
-
ImGuiProbeSelector
- Inherited Members
Remarks
The owner decides what the contacts mean through FillColor and Blocked, so the view itself is the same for any probe.
DrawMinimap() and DrawZoomedView(bool) each fill the child window they are called in, and answer the wheel while it is over them: scroll, Shift to pan across, Ctrl to zoom. Size the minimap's child with MinimapWidth(float, float).
Constructors
- ImGuiProbeSelector(float?, float, float?, float?)
Initializes a new instance of the ImGuiProbeSelector class.
Properties
- Blocked
Gets or sets the function saying whether the contact at an index into the probe's contacts is blocked from selection.
- BlockedFillColor
Gets the color blocked contacts are filled with, unless FillColorOverridesBlocked is set, for a Legend entry.
- Contacts
Gets where each of the probe's contacts stands in the selection, in the probe's contact order.
- CoordinateUnits
Gets the unit of the probe's coordinates, as its file names it.
- DragIntent
Gets what the current drag does, or Idle when no drag is in progress.
- FillColor
Gets or sets the function giving the fill color, in packed
0xAABBGGRRformat, of the contact at an index into the probe's contacts.
- FillColorOverridesBlocked
Gets or sets a value specifying whether blocked contacts are filled with FillColor rather than BlockedFillColor.
- Hotkeys
Every key the probe view answers: R arms a ruler, which the next drag or pair of clicks places, Delete removes the selected ruler and Shift+Delete all of them, and Escape cancels a zoom box, a selection box or a ruler being placed, or else, over the view, deselects a ruler, then clears the selection.
- Hovered
Gets a value indicating whether the pointer was over the zoomed view when it was last drawn, for an owner whose keys, like the view's own, should work only there.
- HoveredContactIndex
Gets the index into the probe's contacts of the contact under the pointer in the zoomed view, or -1 when there is none.
- InspectionBorderColor
Gets the color of the outline drawn around contacts inspected but not selected, for a Legend entry.
- Legend
Gets or sets the legend drawn above the zoomed view.
- OutlineColor
Gets or sets the function giving the color, in packed
0xAABBGGRRformat, of an outline the owner draws around the contact at an index into the probe's contacts, or zero for none. It is drawn in place of the selection's outline.
- PlacingRuler
Whether a ruler is armed or partly placed, for an owner's control to show.
- PointerPosition
Gets the point under the pointer in the zoomed view, in the probe's coordinates and CoordinateUnits, as of the last frame drawn, or null while the pointer is not over it.
- RulerCount
The number of rulers placed.
- RulerSelected
Whether a ruler is selected, which Delete removes, for an owner that gives Delete a meaning of its own only while none is.
- SelectedOutlineColor
Gets or sets the color of the outline drawn around selected contacts, SelectionBorderColor unless set.
- SelectionBorderColor
Gets the color of the outline drawn around selected contacts unless SelectedOutlineColor is set, for a Legend entry.
- SelectionSkipsBlocked
Gets or sets a value specifying whether blocked contacts are left out of the selection. Clear it to let a drag sweep them up, as selecting whole banks does.
- ShowCoordinateReadout
Gets or sets a value specifying whether the zoomed view shows the coordinates under the pointer.
- ShowGrid
Gets or sets a value specifying whether the zoomed view draws grid lines and their axis labels.
- ShowScrollBars
Gets or sets a value specifying whether the zoomed view has scroll bars, along its left edge and its bottom, that show where it sits on the probe and move it. They are always drawn while set, filling their tracks while the whole probe is in view, so the room the probe is drawn in does not change with the zoom.
Methods
- ClearSelection()
Deselects all contacts and clears drag state. Does not fire SelectionChanged.
- DrawMinimap()
Draws the minimap of the whole probe, filling the current child window, with a box showing what the zoomed view shows. Dragging in it moves the zoomed view. Call once per frame.
- DrawZoomedView(bool)
Draws the zoomed view of part of the probe, filling the current child window. Call once per frame.
- MinimapWidth(float, float)
Returns the width in pixels of a child window that fits the minimap, its depth ruler included, at
height.
- Refresh(SingleProbeGroup?)
Shows a probe, clearing the selection and placing the view as the constructor was told.
- RemoveRulers()
Removes every ruler, as Shift+Delete does.
- Reveal(int)
Scrolls the zoomed view to center a contact, unless the whole contact is already in view.
- Select(IEnumerable<int>, bool)
Selects contacts in place of the selection, or adds them to it, as a gesture would, and raises SelectionChanged. Blocked contacts are left out where SelectionSkipsBlocked.
- ToggleRuler()
Arms a ruler for the zoomed view, as R does, or cancels one waiting to be placed. The next drag in the view, or pair of clicks, places it.
Events
- SelectionChanged
Occurs when a gesture has changed the selection.