internal UITKStyles(UITKComponent owner) { styles.Add("position", "absolute"); styles.Add("height", "50px"); styles.Add("width", "50px"); Owner = owner; }
internal UITKEventArguments(UITKComponent sender, bool ctrl, bool shift, bool alt) { Sender = sender; CtrlKey = ctrl; Shiftkey = shift; Altkey = alt; }
public UITKPosition(int x, int y, UITKComponent owner) { X = x; Y = y; Owner = owner; //AlignCenterHorizontal = false; //AlignCenterVertical = false; }
/// <summary> /// Add a new component to the surface at the specified x and y coordinate. /// </summary> /// <param name="component">The component to add to the surface.</param> /// <param name="x">The x coordinate.</param> /// <param name="y">The y coordinate.</param> public static void AddComponent(UITKComponent component) { if (!initialized) Initialize(); children.Add(component, component); Element element = document.createElement("div"); element.setAttribute("id", component.Id); surface.appendChild(element); component.Validate(); }
private void keyUp(UITKComponent sender, UITKKeyboardEventArguments e) { string oldText = currentText; currentText = Surface.GetValue(Id); if (oldText != currentText) TextChanged(this); }
internal UITKMarkup(string html, UITKComponent owner) { markup = html; Owner = owner; }
internal static void RegisterId(string id, UITKComponent component) { if (registry.ContainsKey(id)) registry[id] = component; else registry.Add(id, component); }
/// <summary> /// Redraws the component. /// </summary> /// <param name="component">The component to redraw.</param> internal static void Redraw(UITKComponent component) { string id = component.Id; HtmlElement element = (HtmlElement)document.getElementById(id); if (element != null) { element.outerHTML = component.Markup.GetMarkup(); foreach (var style in component.Styles.GetStyleDictionary()) { J("#" + id).css(style.Key.ToString(), style.Value.ToString()); } } }
internal UITKMouseEventArguments(UITKComponent sender, int x, int y, bool ctrl, bool shift, bool alt, int button) : base(sender, ctrl, shift, alt) { MouseX = x; MouseY = y; Button = button; }
internal UITKKeyboardEventArguments(UITKComponent sender, int keyCode, bool ctrl, bool shift, bool alt) : base(sender, ctrl, shift, alt) { KeyCode = keyCode; }