Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.util.TextMetrics.json
1 {
2   "name" : "Roo.util.TextMetrics",
3   "augments" : [
4   ],
5   "desc" : "Provides precise pixel measurements for blocks of text so that you can determine exactly how high and\nwide, in pixels, a given block of text will be.",
6   "isSingleton" : true,
7   "isStatic" : true,
8   "isBuiltin" : false,
9   "config" : [
10   ],
11   "methods" : [
12     {
13       "name" : "createInstance",
14       "desc" : "Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces\nthe overhead of multiple calls to initialize the style properties on each measurement.",
15       "isStatic" : false,
16       "isConstructor" : false,
17       "isPrivate" : false,
18       "memberOf" : "Roo.util.TextMetrics",
19       "example" : "",
20       "deprecated" : "",
21       "since" : "",
22       "see" : "",
23       "params" : [
24         {
25           "name" : "el",
26           "type" : "String/HTMLElement",
27           "desc" : "The element, dom node or id that the instance will be bound to",
28           "isOptional" : false
29         },
30         {
31           "name" : "fixedWidth",
32           "type" : "Number",
33           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
34           "isOptional" : false
35         }
36       ],
37       "returns" : [
38         {
39           "name" : "",
40           "type" : "Roo.util.TextMetrics.Instance",
41           "desc" : "instance The new instance"
42         }
43       ]
44     },
45     {
46       "name" : "measure",
47       "desc" : "Measures the size of the specified text",
48       "isStatic" : false,
49       "isConstructor" : false,
50       "isPrivate" : false,
51       "memberOf" : "Roo.util.TextMetrics",
52       "example" : "",
53       "deprecated" : "",
54       "since" : "",
55       "see" : "",
56       "params" : [
57         {
58           "name" : "el",
59           "type" : "String/HTMLElement",
60           "desc" : "The element, dom node or id from which to copy existing CSS styles\nthat can affect the size of the rendered text",
61           "isOptional" : false
62         },
63         {
64           "name" : "text",
65           "type" : "String",
66           "desc" : "The text to measure",
67           "isOptional" : false
68         },
69         {
70           "name" : "fixedWidth",
71           "type" : "Number",
72           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
73           "isOptional" : false
74         }
75       ],
76       "returns" : [
77         {
78           "name" : "",
79           "type" : "Object",
80           "desc" : "An object containing the text's size {width: (width), height: (height)}"
81         }
82       ]
83     }
84   ],
85   "events" : [
86   ]
87 }