Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

Summary

Element Icon GUI Panel
Info
Category: User Interface AddIn: Base Layer
Creator: OkazoLab Scope: Parent event
Owns Snippets:   XAML Content Usage: Stimulus screen

Properties

NameDescription                              ConstraintsTypeOn
runtime
change
Settings
Open XAML Editor        Opens a XAML editor that , where you can define a GUI layout                Boolean         
Is Input Enabled        Defines whether the user input is allowed into the GUI layout. If the value is false, the GUI layout is shown but its XAML elements are can not receive an user input (e.g. by the keyboard or mouse).                Boolean         
Visual Theme        Defines a visual theme for the element's GUI                enXAML..         
colspan="5" bgcolor="#AADDDDD" |   
                          Boolean         
Visual Appearance
Alpha Masking        Defines, whether the visual content is used to create an opacity mask on the event surface. If masking is on, the content's pixel luminance (or, its inverse) defines transparency within element's viewport. The alpha masking allows, for example, create transparent holes on the event surface.                Int32         
AntiAliasing        if true, the rendered content will be antialiased for smoother visual appeariance. If false, rendering will be authentic to its source, e.g. a bitmap.                Boolean         
Position        Defines a position of the rendering viewport on the screen                clPoint         
Size        Defines a size of the element's rendering viewport on the screen                clSize         
Z Order        Indicates Z Order of the element on the given event                Int32         
Pivot Point        Defines alignment of the pivot point (or, element's position) relative to element's rendering area. The pivot point sets the center of element's rotation and scale directions.                stAlig..         
Visible        Defines whether the element is visible                Boolean         
Rotation        Rotation angle in degrees                Double         
Effects
Transparent Color        The color of the original pixels of rendered content that will be set as transparent                stColor         
Transparent Tolerance        Tolerance ratio for choosing colors that become transparent. Zero means that effect is not applied, 1 denotes that all colors will become trasparent                Int32         
Color Mask        Produces a multiplicative combination of the original pixels and the selected mask color (except the alpha channel).  The effect emulates a look through a colored glass.  White or transparent mask color dont change the original pixels                stColor         
Opacity        Opacity of the rendered content                Int32         
Contrast        Contrast of the rendered content                Int32         
Brightness        Brightness the rendered content                Int32         
Saturation        Saturation of the rendered content                Double         
Pixelation        Pixelation of the rendered content                Int32         
Blurring        The radius used in the gaussian blur of rendered content, as a pixel-based factor. The default is 0 which means no blurring.                Int32         
Scrambling                        Double         
Scrambling Grid Size        Defines a size of the scrambling grid                clSize         
Positional Jitter
Reset Jitter Now        Runtime command that resets the positional jitter.                Boolean         
Current Jitter        Returns the current jitter                clPoint         
Jitter Range        Defines a possible range for the random jitter. The range is centered to the position of the element.                clSize         
Control
Is Enabled        If set to false the element is completely omitted when the experiment is run                Boolean         
Title        Title of the element                String         

GUI Panel Element allows to lodge a user-defined layout of interactive GUI components (textboxes, buttons, sliders, checkboxes, etc.) into a selected zone on the event surface. The GUI layout is created with the XAML markup language and can host any number of GUI components. The components supports direct data binding to user global variables.


Description

The GUI Panel element allows to lodge a user-defined layout of interactive GUI components (textboxes, buttons, sliders, checkboxes, etc.) into a selected zone on the event surface. The GUI panel is created with the XAML markup language and can host any number of GUI components, for example a custom questionnaire form. Properties of the GUI components can be bound to the global and proxy variables.

This is particularly useful, if you need feedback from the user that is more elaborate than pressing a button on the keyboard. E.g select an option that is presented on screen.

Some example templates are provided by right-clicking on the code plane & selecting "Insert code template". (See screenshot 3)

Snapshots

Example response form made from xaml code

Example response form
made from xaml code

Code can be accessed by  clicking on the

Code can be accessed by
clicking on the "XAML Content
snippet in the bottom plane

Right clicking in the code plane brings up a menue  from which one can select

Right clicking in the code plane brings up a menue
from which one can select "Insert Code Template"

 A list of Example templates

A list of Example templates


Practical Use

Creating a simple response form

  1. Add a new event. Then click on "Add Element" -> "USER INTERFACE" -> 'GUI Panel'.
  2. Click on the "XAML Content" Snippet in the bottom plane as shown in the following screenshot:
    Code can be accessed by  clicking on the

    Code can be accessed by
    clicking on the "XAML Content
    snippet in the bottom plane
















  1. Paste in the following code:
    
    
    <StackPanel Orientation="Vertical"><TextBlock Text="Select the letter shown in white:" Foreground="LightGray" FontFamily="Verdana" Margin="0,20,0,5"/><ListBox SelectedIndex="{Binding ResponseTarget}"><ListBoxItem Content="A"/><ListBoxItem Content="B"/><ListBoxItem Content="C"/><ListBox.ItemsPanel><ItemsPanelTemplate><UniformGrid Columns="3" Rows="1"/></ItemsPanelTemplate></ListBox.ItemsPanel></ListBox>

    <TextBlock Text="Was 'X' presented?" Foreground="LightGray" FontFamily="Verdana" Margin="0,40,0,5" HorizontalAlignment="Center"/><StackPanel Orientation="Horizontal" HorizontalAlignment="Center"><RadioButton Content="Yes" IsChecked="{Binding ResponseXPresent}" GroupName="1" Margin="0,0,30,0"/><RadioButton Content="No" IsChecked="{Binding ResponseXNotPresent}" GroupName="1"/></StackPanel></StackPanel>
  2. Note that the GUI elements are bound to certain variables: {Binding ResponseTarget} , {Binding ResponseXPresent} , {Binding ResponseXNotPresent}.
  3. Open the header snippet from the bottom plane. Paste in the following:
    
    
    bool ResponseXPresent;
    bool ResponseXNotPresent;
    int ResponseTarget=-1;
  4. These are the variables that will hold the values of the user input.
  5. In addition, you may want to add some code to the 'Control Loop' snippet next to "Response & Feedback", so the program will know when to move on.
    
    
    if ((ResponseTarget!=-1)&&((ResponseXPresent)||(ResponseXNotPresent)) {
    ... //record output, compare to expected output etc..
    }

    Demo experiment showing the GUI Panel element in action are available in the Demo Gallery within EventIDE: Demos -> Classical Paradigms -> 'Attentional Blink in RSVP' and Demos ->Questionnaires.



Notes

XAML will automatically scale the graphic to match the canvas.  

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.