petejkim / socks

A tiny web GUI toolkit for JavaScript, inspired by Shoes

This URL has Read+Write access

socks / socks.element.textblock.inscription.js
100644 39 lines (29 sloc) 0.906 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Socks .Element.TextBlock.Inscription @VERSION
*
* Copyright (c) 2009 Peter Jihoon Kim
*
* Licensed under the MIT License (MIT-LICENSE.txt)
*
* http://wiki.github.com/petejkim/socks
*
*/
 
(function(Socks){
      
  Socks.Element.TextBlock.Inscription = function(parent, style, array) {
    this._socks_type = 'Socks.Element.TextBlock.Inscription';
    this._elementId = window.Socks._nextElementId++;
    this._parent = parent;
    
    // create style object
    this._style = new Socks.Style();
    
    if(array !== undefined) {
      this._contents = array;
    } else {
      this._contents = [];
    }
    
    // create element in the DOM
    this._createElement('h6', {margin:0, padding:0, fontSize:10, fontWeight:'normal'});
  
    //set styles
    this.setStyle(style);
  };
  
  Socks.Element.TextBlock.Inscription.prototype = new Socks.Element.TextBlock();
  
})(window.SOCKS);