define(["require", "exports", "./history-group", "./clipboard-group", "./font-group", "./home-paragraph-group", "./find-group", "./styles-group", "../ribbon-base/ribbon-constants"], function (require, exports, history_group_1, clipboard_group_1, font_group_1, home_paragraph_group_1, find_group_1, styles_group_1, ribbon_constants_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HOME_TAB_ID = '_home_tab';
exports.HOME_TAB_TEXT = 'Home';
var HomeTab = (function () {
function HomeTab(container) {
this.container = container;
this.initialize();
}
HomeTab.prototype.initialize = function () {
this.historyGroup = new history_group_1.HistoryGroup(this.container);
this.clipboardGroup = new clipboard_group_1.ClipboardGroup(this.container);
this.fontGroup = new font_group_1.FontGroup(this.container);
this.paragraphGroup = new home_paragraph_group_1.HomeParagraphGroup(this.container);
this.findGroup = new find_group_1.FindGroup(this.container);
this.stylesGroup = new styles_group_1.StylesGroup(this.container);
};
HomeTab.prototype.getHomeTab = function () {
return {
id: this.container.element.id + ribbon_constants_1.RIBBON_ID + exports.HOME_TAB_ID,
header: this.container.localObj.getConstant(exports.HOME_TAB_TEXT),
keyTip: 'H',
groups: [
this.historyGroup.getGroupModel(),
this.clipboardGroup.getGroupModel(),
this.fontGroup.getGroupModel(),
this.paragraphGroup.getGroupModel(),
this.stylesGroup.getGroupModel(),
this.findGroup.getGroupModel()
]
};
};
HomeTab.prototype.updateSelection = function () {
this.clipboardGroup.updateSelection();
this.fontGroup.updateSelection();
this.paragraphGroup.updateSelection();
this.findGroup.updateSelection();
this.stylesGroup.updateStyleGallery();
};
HomeTab.prototype.updateContentChanged = function () {
this.historyGroup.updateContentChanged();
};
HomeTab.prototype.updateStyleGallery = function () {
Eif (this.stylesGroup) {
this.stylesGroup.updateStyleGallery();
}
};
HomeTab.prototype.destroy = function () {
Eif (this.historyGroup) {
this.historyGroup.destroy();
this.historyGroup = null;
}
Eif (this.clipboardGroup) {
this.clipboardGroup.destroy();
this.clipboardGroup = null;
}
Eif (this.fontGroup) {
this.fontGroup.destroy();
this.fontGroup = null;
}
Eif (this.paragraphGroup) {
this.paragraphGroup.destroy();
this.paragraphGroup = null;
}
Eif (this.findGroup) {
this.findGroup.destroy();
this.findGroup = null;
}
Eif (this.stylesGroup) {
this.stylesGroup.destroy();
this.stylesGroup = null;
}
};
return HomeTab;
}());
exports.HomeTab = HomeTab;
});
|