Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
GenericEditor Class Reference

Base class for creating processor editors. More...

#include <GenericEditor.h>

Inheritance diagram for GenericEditor:
AccessClass ArduinoOutputEditor EventNodeEditor FilterEditor FPGAOutputEditor MergerEditor RecordControlEditor ReferenceNodeEditor ResamplingNodeEditor SignalGeneratorEditor SourceNodeEditor SpikeDetectorEditor SplitterEditor VisualizerEditor WiFiOutputEditor

List of all members.

Public Member Functions

 GenericEditor (GenericProcessor *owner)
 Constructor.
virtual ~GenericEditor ()
 Destructor.
void paint (Graphics &g)
 Draws the editor's background.
bool keyPressed (const KeyPress &key)
 Called whenever a key is pressed and the editor has keyboard focus.
void switchSelectedState ()
 Toggles the editor's selection state.
void select ()
 Highlights an editor and calls editorWasClicked().
void highlight ()
 Highlights an editor.
void deselect ()
 Deselects an editor.
bool getSelectionState ()
 Returns an editor's selection state.
void enable ()
 Used to enable an editor's processor.
void disable ()
 Used to disable an editor's processor.
bool getEnabledState ()
 Returns whether or not the editor's processor is enabled (i.e., whether it's able to handle data.
void setEnabledState (bool)
 Used to enable or disable an editor's processor.
void startAcquisition ()
 Called just prior to the start of acquisition, to allow the editor to prepare.
void stopAcquisition ()
 Called after the end of acquisition.
String getName ()
 Returns the name of the editor.
virtual void tabNumber (int t)
 Sets the number of the editor's associated tab in the DataViewport.
int tabNumber ()
 Returns the number of the editor's associated tab in the DataViewport.
virtual void switchSource (int)
 Required for MergerEditor only.
virtual void switchSource ()
 Required for MergerEditor only.
GenericProcessorgetProcessor () const
 Returns the processor associated with an editor.
void fadeIn ()
 Causes the editor to fade in when it first appears in the EditorViewport.
virtual void switchDest ()
 Required for SplitterEditor only.
virtual void switchIO (int)
 Required for SplitterEditor and MergerEditor only.
virtual void buttonClicked (Button *button)
 Handles button clicks for all editors.
virtual void buttonEvent (Button *button)
 Called by buttonClicked().
virtual void sliderValueChanged (Slider *slider)
 Handles slider events for all editors.
virtual void sliderEvent (Slider *slider)
 Called by sliderValueChanged().
virtual void editorWasClicked ()
 Required for opening displays in a VisualizerEditor.
bool checkDrawerButton (Button *button)
 Checks to see if a button click occurred on the ChannelSelector drawer button.
bool getRecordStatus (int chan)
 Returns the record status of a given channel from the ChannelSelector.
bool getAudioStatus (int chan)
 Returns the audio monitoring status of a given channel from the ChannelSelector.
void selectChannels (Array< int >)
 Selects all the channels in the input array.
void refreshColors ()
 Refreshes an editor's background colors when the user selects new ones with the ColourSelector.
virtual void update ()
 Called when an editor's processor updates its settings (mainly to update channel count).
virtual void updateSettings ()
 Called by the update() method to allow the editor to update its custom settings.
virtual void updateVisualizer ()
 Allows an editor to update the settings of its visualizer (such as channel count and sample rate).
virtual void channelChanged (int chan)
 Used by SpikeDetectorEditor.
Array< int > getActiveChannels ()
 Returns all selected channels from the ChannelSelector.
ChannelgetChannel (int chan)
 Returns the Channel object for a given continuous channel number.
ChannelgetEventChannel (int chan)
 Returns the Channel object for a given event channel number.
- Public Member Functions inherited from AccessClass
 AccessClass ()
 ~AccessClass ()
void setUIComponent (UIComponent *)
 Sets the object's UIComponent and copies all the necessary pointers from the UIComponent.
virtual void updateChildComponents ()
 Called within setUIComponent() to enable subclasses to update their members' pointers.
EditorViewportgetEditorViewport ()
 Returns a pointer to the application's EditorViewport.
DataViewportgetDataViewport ()
 Returns a pointer to the application's DataViewport.
ProcessorListgetProcessorList ()
 Returns a pointer to the application's ProcessorList.
ProcessorGraphgetProcessorGraph ()
 Returns a pointer to the application's ProcessorGraph.
ControlPanelgetControlPanel ()
 Returns a pointer to the application's DataViewport.
MessageCentergetMessageCenter ()
 Returns a pointer to the application's MessageCenter.
UIComponentgetUIComponent ()
 Returns a pointer to the application's UIComponent.
AudioComponentgetAudioComponent ()
 Returns a pointer to the application's AudioComponent.

Public Attributes

int desiredWidth
 Determines how wide the editor will be drawn.
int nodeId
 The unique integer ID of the editor's processor.
bool isFading
 Indicates whether or not the editor is in the processof fading in.
float accumulator
 Used to control the speed at which the editor fades in.
Array< ParameterEditor * > parameterEditors
 An array of pointers to ParameterEditors created based on the Parameters of an editor's underlying processor.
Font titleFont
 Stores the font used to display the editor's name.

Protected Member Functions

virtual void addParameterEditors ()
 Can be overridden to customize the layout of ParameterEditors.

Protected Attributes

DrawerButtondrawerButton
 A pointer to the button that opens the drawer for the ChannelSelector.
int drawerWidth
 Determines the width of the ChannelSelector drawer when opened.
ChannelSelectorchannelSelector
 A pointer to the editor's ChannelSelector.

Detailed Description

Base class for creating processor editors.

If a processor doesn't havesign an editor defined, a GenericEditor will be used.

Classes derived from this class must place their controls as child components. They shouldn't try to re-draw any aspects of their background.

See also:
GenericProcessor, EditorViewport

Constructor & Destructor Documentation

GenericEditor::GenericEditor ( GenericProcessor owner)

Constructor.

Loads fonts and creates default buttons.

virtual GenericEditor::~GenericEditor ( )
virtual

Destructor.


Member Function Documentation

void GenericEditor::paint ( Graphics &  g)

Draws the editor's background.

bool GenericEditor::keyPressed ( const KeyPress &  key)

Called whenever a key is pressed and the editor has keyboard focus.

void GenericEditor::switchSelectedState ( )

Toggles the editor's selection state.

void GenericEditor::select ( )

Highlights an editor and calls editorWasClicked().

void GenericEditor::highlight ( )

Highlights an editor.

void GenericEditor::deselect ( )

Deselects an editor.

bool GenericEditor::getSelectionState ( )

Returns an editor's selection state.

void GenericEditor::enable ( )

Used to enable an editor's processor.

Reimplemented in VisualizerEditor.

void GenericEditor::disable ( )

Used to disable an editor's processor.

Reimplemented in VisualizerEditor.

bool GenericEditor::getEnabledState ( )

Returns whether or not the editor's processor is enabled (i.e., whether it's able to handle data.

void GenericEditor::setEnabledState ( bool  )

Used to enable or disable an editor's processor.

void GenericEditor::startAcquisition ( )

Called just prior to the start of acquisition, to allow the editor to prepare.

Reimplemented in ResamplingNodeEditor.

void GenericEditor::stopAcquisition ( )

Called after the end of acquisition.

Reimplemented in ResamplingNodeEditor.

String GenericEditor::getName ( )

Returns the name of the editor.

virtual void GenericEditor::tabNumber ( int  t)
virtual

Sets the number of the editor's associated tab in the DataViewport.

int GenericEditor::tabNumber ( )

Returns the number of the editor's associated tab in the DataViewport.

virtual void GenericEditor::switchSource ( int  )
virtual

Required for MergerEditor only.

Reimplemented in MergerEditor.

virtual void GenericEditor::switchSource ( )
virtual

Required for MergerEditor only.

Reimplemented in MergerEditor.

GenericProcessor* GenericEditor::getProcessor ( ) const

Returns the processor associated with an editor.

void GenericEditor::fadeIn ( )

Causes the editor to fade in when it first appears in the EditorViewport.

virtual void GenericEditor::switchDest ( )
virtual

Required for SplitterEditor only.

Reimplemented in SplitterEditor.

virtual void GenericEditor::switchIO ( int  )
virtual

Required for SplitterEditor and MergerEditor only.

Reimplemented in MergerEditor, and SplitterEditor.

virtual void GenericEditor::buttonClicked ( Button *  button)
virtual

Handles button clicks for all editors.

Deals with clicks on the editor's title bar and channel selector drawer.

virtual void GenericEditor::buttonEvent ( Button *  button)
virtual

Called by buttonClicked().

Deals with clicks on custom buttons. Subclasses of GenericEditor should modify this method only.

Reimplemented in SpikeDetectorEditor, VisualizerEditor, SignalGeneratorEditor, EventNodeEditor, FilterEditor, MergerEditor, SplitterEditor, and ReferenceNodeEditor.

virtual void GenericEditor::sliderValueChanged ( Slider *  slider)
virtual

Handles slider events for all editors.

virtual void GenericEditor::sliderEvent ( Slider *  slider)
virtual

Called by sliderValueChanged().

Deals with clicks on custom sliders. Subclasses of GenericEditor should modify this method only.

Reimplemented in SpikeDetectorEditor, and SignalGeneratorEditor.

virtual void GenericEditor::editorWasClicked ( )
virtual

Required for opening displays in a VisualizerEditor.

Hopefully will be deprecated soon.

Reimplemented in VisualizerEditor.

bool GenericEditor::checkDrawerButton ( Button *  button)

Checks to see if a button click occurred on the ChannelSelector drawer button.

bool GenericEditor::getRecordStatus ( int  chan)

Returns the record status of a given channel from the ChannelSelector.

bool GenericEditor::getAudioStatus ( int  chan)

Returns the audio monitoring status of a given channel from the ChannelSelector.

void GenericEditor::selectChannels ( Array< int >  )

Selects all the channels in the input array.

void GenericEditor::refreshColors ( )

Refreshes an editor's background colors when the user selects new ones with the ColourSelector.

virtual void GenericEditor::update ( )
virtual

Called when an editor's processor updates its settings (mainly to update channel count).

virtual void GenericEditor::updateSettings ( )
virtual

Called by the update() method to allow the editor to update its custom settings.

Reimplemented in RecordControlEditor.

virtual void GenericEditor::updateVisualizer ( )
virtual

Allows an editor to update the settings of its visualizer (such as channel count and sample rate).

Reimplemented in VisualizerEditor.

virtual void GenericEditor::channelChanged ( int  chan)
virtual

Used by SpikeDetectorEditor.

Reimplemented in SpikeDetectorEditor.

Array<int> GenericEditor::getActiveChannels ( )

Returns all selected channels from the ChannelSelector.

Channel* GenericEditor::getChannel ( int  chan)

Returns the Channel object for a given continuous channel number.

Channel* GenericEditor::getEventChannel ( int  chan)

Returns the Channel object for a given event channel number.

virtual void GenericEditor::addParameterEditors ( )
protectedvirtual

Can be overridden to customize the layout of ParameterEditors.

Reimplemented in SignalGeneratorEditor.


Member Data Documentation

int GenericEditor::desiredWidth

Determines how wide the editor will be drawn.

int GenericEditor::nodeId

The unique integer ID of the editor's processor.

bool GenericEditor::isFading

Indicates whether or not the editor is in the processof fading in.

float GenericEditor::accumulator

Used to control the speed at which the editor fades in.

Array<ParameterEditor*> GenericEditor::parameterEditors

An array of pointers to ParameterEditors created based on the Parameters of an editor's underlying processor.

Font GenericEditor::titleFont

Stores the font used to display the editor's name.

DrawerButton* GenericEditor::drawerButton
protected

A pointer to the button that opens the drawer for the ChannelSelector.

int GenericEditor::drawerWidth
protected

Determines the width of the ChannelSelector drawer when opened.

ChannelSelector* GenericEditor::channelSelector
protected

A pointer to the editor's ChannelSelector.


The documentation for this class was generated from the following file: