2018-08-15 00:36:18 +00:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2018-08-17 06:27:22 +00:00
|
|
|
import { MenuItem } from 'primeng/primeng';
|
2018-08-15 00:36:18 +00:00
|
|
|
|
|
|
|
@Component({
|
2018-08-15 14:54:10 +00:00
|
|
|
selector: 'app-menu-bar',
|
2018-08-15 15:16:28 +00:00
|
|
|
templateUrl: './menu-bar.component.html',
|
2018-08-15 00:36:18 +00:00
|
|
|
})
|
2018-08-15 15:16:28 +00:00
|
|
|
export class MenuBarComponent implements OnInit {
|
2018-08-15 00:36:18 +00:00
|
|
|
|
2018-08-17 06:27:22 +00:00
|
|
|
private items: MenuItem[];
|
2018-08-15 00:36:18 +00:00
|
|
|
|
|
|
|
constructor(
|
|
|
|
) { }
|
|
|
|
|
|
|
|
ngOnInit() {
|
2018-08-17 06:27:22 +00:00
|
|
|
this.items = [
|
|
|
|
{
|
|
|
|
label: 'File',
|
|
|
|
icon: 'pi pi-fw pi-file',
|
|
|
|
items: [{
|
|
|
|
label: 'New',
|
|
|
|
icon: 'pi pi-fw pi-plus',
|
|
|
|
items: [
|
|
|
|
{ label: 'Project' },
|
|
|
|
{ label: 'Other' },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{ label: 'Open' },
|
|
|
|
{ separator: true },
|
|
|
|
{ label: 'Quit' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Edit',
|
|
|
|
icon: 'pi pi-fw pi-pencil',
|
|
|
|
items: [
|
|
|
|
{ label: 'Delete', icon: 'pi pi-fw pi-trash' },
|
|
|
|
{ label: 'Refresh', icon: 'pi pi-fw pi-refresh' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Help',
|
|
|
|
icon: 'pi pi-fw pi-question',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Contents'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Search',
|
|
|
|
icon: 'pi pi-fw pi-search',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Text',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Workspace'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'File'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Actions',
|
|
|
|
icon: 'pi pi-fw pi-cog',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Edit',
|
|
|
|
icon: 'pi pi-fw pi-pencil',
|
|
|
|
items: [
|
|
|
|
{ label: 'Save', icon: 'pi pi-fw pi-save' },
|
|
|
|
{ label: 'Update', icon: 'pi pi-fw pi-save' },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Other',
|
|
|
|
icon: 'pi pi-fw pi-tags',
|
|
|
|
items: [
|
|
|
|
{ label: 'Delete', icon: 'pi pi-fw pi-minus' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Quit', icon: 'pi pi-fw pi-times'
|
|
|
|
}
|
|
|
|
];
|
2018-08-15 00:36:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
onTitlebarDoubleClick() {
|
|
|
|
}
|
|
|
|
}
|