Back

GUIEvent

The `GUIEvent` class in the SOFA framework is designed to notify about interactions with the Graphical User Interface (GUI). It inherits from the base `Event` class and is part of the Sofa.framework.Core module. This event encapsulates information related to GUI controls, such as control IDs, value names, and their corresponding values. The component provides methods for retrieving these details via `getControlID()`, `getValueName()`, and `getValue()`. Additionally, it includes utility functions like `checkEventType()` (static) and `GetClassName()` (static), which help in identifying the event type and class name respectively. It serves as a crucial communication mechanism between GUI elements and other components within SOFA simulations.

abstract
`GUIEvent` notifies about GUI interactions by encapsulating control IDs, value names, and actual values, facilitating communication between GUI elements and other simulation components.
sheet
# GUIEvent **Overview** The `GUIEvent` class in the SOFA framework is designed to notify about interactions with the Graphical User Interface (GUI). It inherits from the base `Event` class and serves as a mechanism for transmitting control information from GUI elements to other components within the simulation environment. **Parameters and Data** - **m_controlID**: Stores the identifier of the control element in the GUI that triggered the event. - **m_valueName**: Holds the name associated with a specific value (e.g., slider position). - **m_value**: Contains the actual value of the control element (e.g., numerical input from a slider). **Dependencies and Connections** `GUIEvent` inherits from the `Event` class, which is part of the Sofa.framework.Core module. It facilitates communication between GUI controls and other components within SOFA simulations.
description
The `GUIEvent` class in the SOFA framework is designed to notify about interactions with the Graphical User Interface (GUI). It inherits from the base `Event` class and is part of the Sofa.framework.Core module. This event encapsulates information related to GUI controls, such as control IDs, value names, and their corresponding values. The component provides methods for retrieving these details via `getControlID()`, `getValueName()`, and `getValue()`. Additionally, it includes utility functions like `checkEventType()` (static) and `GetClassName()` (static), which help in identifying the event type and class name respectively. It serves as a crucial communication mechanism between GUI elements and other components within SOFA simulations.
maths
The `GUIEvent` class in the SOFA framework is not directly involved in mathematical or physical computations related to finite element methods (FEM) or variational/Lagrangian mechanics. Instead, it serves as a communication mechanism between GUI controls and other components within the simulation environment. ### Mathematical/Physical Content - **Contribution to FEM Pipeline**: The `GUIEvent` does not contribute directly to any specific mathematical operators or constitutive laws in the finite element method pipeline such as mass matrix (\(M")), stiffness matrix (\(K")), internal force (\(f_{int}")), residual (\(R")), etc. It is purely a mechanism for event handling related to GUI interactions. ### Numerical Methods and Discretization Choices - **Numerical Methods**: There are no numerical methods or discretizations directly encoded in `GUIEvent`. This class is primarily concerned with the transmission of control information from the GUI, not with solving physical equations. ### Role in Global FEM Pipeline - **Role**: The `GUIEvent` class plays a role in handling user interactions within the simulation environment. It does not participate directly in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mappings. ### Component Description - **Attributes**: - `m_controlID`: Stores the identifier of the control element in the GUI that triggered the event. - `m_valueName`: Holds the name associated with a specific value (e.g., slider position). - `m_value`: Contains the actual value of the control element (e.g., numerical input from a slider). - **Methods**: - `getControlID()`: Returns the identifier of the GUI control. - `getValueName()`: Returns the name associated with the value. - `getValue()`: Returns the actual value from the control element. - `checkEventType(const Event *event)`: Static method to check if a given event is an instance of `GUIEvent`. - `GetClassName()`: Static method returning the class name as a string. ### Variational/Lagrangian Mechanics Framework - **Integration**: The `GUIEvent` component does not directly fit into the variational or Lagrangian mechanics framework. It is part of the broader infrastructure that enables user interactions and control within SOFA simulations but does not contribute to the mathematical formulation of physical systems.
{
  "name": "GUIEvent",
  "main": {
    "name": "GUIEvent",
    "namespace": "sofa::core::objectmodel",
    "module": "Sofa.framework.Core",
    "include": "sofa/core/objectmodel/GUIEvent.h",
    "doc": "This event notifies about GUI interaction.",
    "inherits": [
      "Event"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "getEventTypeIndex",
        "return_type": "int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "checkEventType",
        "return_type": "bool",
        "params": [
          {
            "name": "event",
            "type": "const Event *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "public"
      },
      {
        "name": "getControlID",
        "return_type": "const int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getValueName",
        "return_type": "const int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "getValue",
        "return_type": "const int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "GetClassName",
        "return_type": "const char *",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `GUIEvent` class in the SOFA framework is designed to notify about interactions with the Graphical User Interface (GUI). It inherits from the base `Event` class and is part of the Sofa.framework.Core module. This event encapsulates information related to GUI controls, such as control IDs, value names, and their corresponding values. The component provides methods for retrieving these details via `getControlID()`, `getValueName()`, and `getValue()`. Additionally, it includes utility functions like `checkEventType()` (static) and `GetClassName()` (static), which help in identifying the event type and class name respectively. It serves as a crucial communication mechanism between GUI elements and other components within SOFA simulations."
  },
  "maths": {
    "maths": "The `GUIEvent` class in the SOFA framework is not directly involved in mathematical or physical computations related to finite element methods (FEM) or variational/Lagrangian mechanics. Instead, it serves as a communication mechanism between GUI controls and other components within the simulation environment.\n\n### Mathematical/Physical Content\n- **Contribution to FEM Pipeline**: The `GUIEvent` does not contribute directly to any specific mathematical operators or constitutive laws in the finite element method pipeline such as mass matrix (\\(M\")), stiffness matrix (\\(K\")), internal force (\\(f_{int}\")), residual (\\(R\")), etc. It is purely a mechanism for event handling related to GUI interactions.\n\n### Numerical Methods and Discretization Choices\n- **Numerical Methods**: There are no numerical methods or discretizations directly encoded in `GUIEvent`. This class is primarily concerned with the transmission of control information from the GUI, not with solving physical equations.\n\n### Role in Global FEM Pipeline\n- **Role**: The `GUIEvent` class plays a role in handling user interactions within the simulation environment. It does not participate directly in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mappings.\n\n### Component Description\n- **Attributes**:\n  - `m_controlID`: Stores the identifier of the control element in the GUI that triggered the event.\n  - `m_valueName`: Holds the name associated with a specific value (e.g., slider position).\n  - `m_value`: Contains the actual value of the control element (e.g., numerical input from a slider).\n\n- **Methods**:\n  - `getControlID()`: Returns the identifier of the GUI control.\n  - `getValueName()`: Returns the name associated with the value.\n  - `getValue()`: Returns the actual value from the control element.\n  - `checkEventType(const Event *event)`: Static method to check if a given event is an instance of `GUIEvent`.\n  - `GetClassName()`: Static method returning the class name as a string.\n\n### Variational/Lagrangian Mechanics Framework\n- **Integration**: The `GUIEvent` component does not directly fit into the variational or Lagrangian mechanics framework. It is part of the broader infrastructure that enables user interactions and control within SOFA simulations but does not contribute to the mathematical formulation of physical systems.\n"
  },
  "summary": {
    "abstract": "`GUIEvent` notifies about GUI interactions by encapsulating control IDs, value names, and actual values, facilitating communication between GUI elements and other simulation components.",
    "sheet": "# GUIEvent\n\n**Overview**\n\nThe `GUIEvent` class in the SOFA framework is designed to notify about interactions with the Graphical User Interface (GUI). It inherits from the base `Event` class and serves as a mechanism for transmitting control information from GUI elements to other components within the simulation environment.\n\n**Parameters and Data**\n\n- **m_controlID**: Stores the identifier of the control element in the GUI that triggered the event.\n- **m_valueName**: Holds the name associated with a specific value (e.g., slider position).\n- **m_value**: Contains the actual value of the control element (e.g., numerical input from a slider).\n\n**Dependencies and Connections**\n\n`GUIEvent` inherits from the `Event` class, which is part of the Sofa.framework.Core module. It facilitates communication between GUI controls and other components within SOFA simulations."
  }
}