Click or drag to resize

AbstractHermeticGUIControl Class

Base class for a GUI element that incapsulates a class instance member.
Inheritance Hierarchy

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.1.0 (in KSPDev_Utils.1.0.dll) Version: 1.0 for KSP v1.6+
Syntax
C#
public abstract class AbstractHermeticGUIControl : IRenderableGUIControl
Request Example View Source

The AbstractHermeticGUIControl type exposes the following members.

Constructors
  NameDescription
Protected methodAbstractHermeticGUIControl
Creates a control, bound to a member.
Top
Methods
Remarks
This kind of controls are used to represent and/or edit the values of various types, but not in the usual OnGUI approach. The usual Unity approach assumes that the value is passed and returned in each rendering call. However, for the hermetic control, the source of the value is defined only once, at the creation time. Once it's done, the rendering is only called to have the logic handled. That said, the caller rendering method doesn't care about the underlying data, and that's why it's "hermetic".

The value source is either a field or a property of the class. Due to the need of using reflections to access the member, these controls are not performance optimized. They are fine for the debugging and settings dialogs, but for the performance demanding applications a regular Unity approach is suggested.

See Also