Is this a private or a public feature? Can I use it in my custom widgets?
The panel Header is the only place where xhooks is used in Ext.
Code:
Ext.define('Ext.panel.Header', {
....
initComponent: function() {
...
me.titleCmp = new Ext.draw.Component({
width : 15,
ariaRole : 'heading',
focusable : false,
viewBox : false,
flex : 1,
id : me.id + '_hd',
autoSize : true,
margins : '5 0 0 0',
items : [ me.textConfig ],
xhooks: {
setSize: function (width) {
// don't pass 2nd arg (height) on to setSize or we break 'flex:1'
this.callParent([width]);
}
},
// this is a bit of a cheat: we are not selecting an element of titleCmp
// but rather of titleCmp.items[0]
childEls : [
{ name: 'textEl', select: '.' + me.baseCls + '-text' }
]
});
....
},
...