/// <summary> /// Initialization delegate, which creates the button. /// </summary> private static void InitButton(Variable var, String id) { var it = var as Button; Variable.BtnCallbacks.Add(id, new Tw.ButtonCallback(it.Callback)); Tw.AddButton(var.ParentBar.Pointer, id, Variable.BtnCallbacks[id], IntPtr.Zero, null); }
/// <summary> /// Initialization delegate, which creates the floating-point variable. /// </summary> private static void InitFloatVariable(Variable var, String id) { var it = var as FloatVariable; Variable.SetCallbacks.Add(id, new Tw.SetVarCallback(it.SetCallback)); Variable.GetCallbacks.Add(id, new Tw.GetVarCallback(it.GetCallback)); Tw.AddVarCB(var.ParentBar.Pointer, id, Tw.VariableType.Float, Variable.SetCallbacks[id], Variable.GetCallbacks[id], IntPtr.Zero, null); }
/// <summary> /// Initialization delegate, which creates the separator. /// </summary> private static void InitSeparator(Variable var, String id) { Tw.AddSeparator(var.ParentBar.Pointer, id, null); }