Example #1
0
 internal UITKStyles(UITKComponent owner)
 {
     styles.Add("position", "absolute");
     styles.Add("height", "50px");
     styles.Add("width", "50px");
     Owner = owner;
 }
Example #2
0
 internal UITKEventArguments(UITKComponent sender, bool ctrl, bool shift, bool alt)
 {
     Sender = sender;
     CtrlKey = ctrl;
     Shiftkey = shift;
     Altkey = alt;
 }
Example #3
0
 public UITKPosition(int x, int y, UITKComponent owner)
 {
     X = x;
     Y = y;
     Owner = owner;
     //AlignCenterHorizontal = false;
     //AlignCenterVertical = false;
 }
Example #4
0
 /// <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();
 }
Example #5
0
 private void keyUp(UITKComponent sender, UITKKeyboardEventArguments e)
 {
     string oldText = currentText;
     currentText = Surface.GetValue(Id);
     if (oldText != currentText) TextChanged(this);
 }
Example #6
0
 internal UITKMarkup(string html, UITKComponent owner)
 {
     markup = html; Owner = owner;
 }
Example #7
0
 internal static void RegisterId(string id, UITKComponent component)
 {
     if (registry.ContainsKey(id)) registry[id] = component;
     else registry.Add(id, component);
 }
Example #8
0
 /// <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());
         }
     }
 }
Example #9
0
 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;
 }
Example #10
0
 internal UITKKeyboardEventArguments(UITKComponent sender, int keyCode, bool ctrl, bool shift, bool alt)
     : base(sender, ctrl, shift, alt)
 {
     KeyCode = keyCode;
 }