Programming Reference:ApplicationWindow Class: Difference between revisions
No edit summary |
|||
| Line 17: | Line 17: | ||
==Usage== | ==Usage== | ||
The main task filter in an application module uses a data member of type <tt>ApplicationWindow</tt> to provide visual output to the user. Other filters in an application module may access existing windows via the <tt>Window( name )</tt> accessor function provided by the <tt>Environment</tt> class. This allows filters to add specific information to existing windows. | The main task filter in an application module uses a data member of type <tt>ApplicationWindow</tt> to provide visual output to the user. Other filters in an application module may access existing windows via the <tt>Window( name )</tt> accessor function provided by the <tt>Environment</tt> class. This allows filters to add specific information to existing windows. | ||
==Display Parameterization and Visualization== | ==Display Parameterization and Visualization== | ||
Revision as of 17:43, 4 July 2011
Location
BCI2000/src/shared/modules/application/gui
Synopsis
Objects of type ApplicationWindow class represent windows of application modules. Typically, one such window exists, but more may be present in a single application module.
The ApplicationWindow class provides the following functionality:
- parameterization of application screen position and dimensions,
- display of a small copy of the application screen in an operator visualization window,
- refreshing the window, and writing a time stamp into the StimulusTime state variable once processing has been done in the Application Module,
- maintaining a list of application windows which may be accessed using the Environment::Window() and Environment::Windows() accessor functions.
ApplicationWindowpublicly inherits from DisplayWindow, and from EnvironmentExtension privately.
Application windows are identified by name; the default name is "Application".
Usage
The main task filter in an application module uses a data member of type ApplicationWindow to provide visual output to the user. Other filters in an application module may access existing windows via the Window( name ) accessor function provided by the Environment class. This allows filters to add specific information to existing windows.
Display Parameterization and Visualization
Typically, a BCI2000 application module displays feedback or other stimuli in an application window. In the GUI abstraction layer of the BCI2000 framework, the application window's drawing area is represented as an object that inherits the GUI::GraphDisplay interface.
ApplicationWindow objects will handle display visualization transparently, using the GraphDisplay's BitmapData method to obtain a copy of its contents, and to send these to the operator module for display in a visualization window using a message source ID of <name>Window.
Parameters
Parameter names are derived from the Application Window's name. For the default name of "Application", special parameter names apply; these are given first.
Application Window Properties
WindowWidth, WindowHeight
<name>WindowWidth, <name>WindowHeight
The width and height of the subject-visible application window, in pixels.
WindowLeft, WindowTop
<name>WindowLeft, <name>WindowTop
The screen position of the application window's top left corner, in pixels.
Application Window Visualization
Visualization parameters are available only if the descendant class provides a GUI::GraphDisplay pointer at construction time.
VisualizeApplicationWindow
Visualize<name>Window
Switches visualization display of a miniature copy of the application window on or off.
AppWindowSpatialDecimation
<name>WindowSpatialDecimation
A factor that determines resolution of visualized data in relation to the original window's size. Enlarging the factor reduces the visualization window's resolution, and its initial size, and improves system timing by reducing the amount of data transferred.
AppWindowTemporalDecimation
<name>WindowTemporalDecimation
A factor that determines the visualization window's update rate. A value of n results in each nth frame being transferred.
States
StimulusTime
A 16-bit time stamp in the same format as the SourceTime state. This time stamp is set immediately after the application module has updated the stimulus/feedback display. In conjunction with the SourceTime state, the StimulusTime stamp may be used to infer the time of stimulus presentation with greater accuracy than when only using the StimulusCode and StimulusBegin states, which have an accuracy of one data block. To obtain meaningful values in the StimulusTime stamp, Source Module and Application Module need to run on the same machine.
See also
Programming Reference:ApplicationBase Class, Programming Reference:DisplayWindow Class, Programming Reference:EnvironmentExtension Class