13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Ext.define('KitchenSink.view.toolbar.BasicToolbar', {
    extend: 'Ext.toolbar.Toolbar',
    xtype: 'basic-toolbar',
    id: 'basic-toolbar',
    //<example>
    exampleTitle: 'Basic Toolbar',
    exampleDescription: [
        '<p>Demonstrates a simple toolbar. Some of the buttons have menus attached.</p>'
    ].join(''),
    themes: {
        classic: {
            width: 380,
            pasteIconCls: 'paste',
            cutIconCls: 'cut',
            copyIconCls: 'copy',
            formatIconCls: 'format',
            listIconCls: 'list'
        },
        neptune: {
            width: 500,
            pasteGlyph: 70,
            cutGlyph: 67,
            copyGlyph: 102,
            formatGlyph: 76,
            listGlyph: 61
        }
    },
    //</example>
 
    initComponent: function() {
        Ext.apply(this, {
            width: this.themeInfo.width,
            items: [{
                xtype:'splitbutton',
                text:'Menu Button',
                iconCls: this.themeInfo.listIconCls,
                glyph: this.themeInfo.listGlyph,
                menu:[{
                    text:'Menu Button 1'
                }]
            }, '-', {
                xtype:'splitbutton',
                text:'Cut',
                iconCls: this.themeInfo.cutIconCls,
                glyph: this.themeInfo.cutGlyph,
                menu: [{
                    text:'Cut Menu Item'
                }]
            }, {
                iconCls: this.themeInfo.copyIconCls,
                glyph: this.themeInfo.copyGlyph,
                text:'Copy'
            }, {
                text:'Paste',
                iconCls: this.themeInfo.pasteIconCls,
                glyph: this.themeInfo.pasteGlyph,
                menu:[{
                    text:'Paste Menu Item'
                }]
            }, '-', {
                iconCls: this.themeInfo.formatIconCls,
                glyph: this.themeInfo.formatGlyph,
                text:'Format'
            }]
        });
        this.callParent();
    }
});