@@ -239,6 +239,53 @@ export class KIHWindow extends KIHPanel {
239239 }
240240}
241241
242+ /**
243+ * The Information window. Additionally to an ordinary window this also handles
244+ * tabs (tab is here a tab index).
245+ */
246+ export class InformationWindow extends KIHWindow {
247+ tab : number = 0 ;
248+ tabChanged = false ;
249+
250+ /**
251+ * Ctor.
252+ */
253+ constructor ( panelId : string , parent : any , ...params : any ) {
254+ super ( panelId , parent , params ) ;
255+ }
256+
257+ /**
258+ * Initialises the Matrix window.
259+ */
260+ override async initialise ( ...params ) : Promise < void > {
261+ await super . initialise ( ) ;
262+ let [ tab ] = params ;
263+ this . tab = tab ;
264+ }
265+
266+ /**
267+ * The update method handles tab changes. This merely sets a flag indicating
268+ * the change.
269+ */
270+ override update ( ...params ) {
271+ let [ tab ] = params ;
272+ this . tabChanged = tab != this . tab ;
273+ this . tab = tab ;
274+ }
275+
276+ /**
277+ * The toggle method switches the isOpen state, but only if no tab switch took
278+ * place. In this case the tab is switched.
279+ */
280+ override async toggle ( ) {
281+ if ( ! this . tabChanged || ! this . isOpen ) {
282+ await super . toggle ( ) ;
283+ }
284+ $ ( '#tINFORMATIONS' ) . tabs ( 'select' , this . tab ) ;
285+ this . tabChanged = false ;
286+ }
287+ }
288+
242289/**
243290 * The Matrix window is a special Window with extra functionality.
244291 */
@@ -408,6 +455,9 @@ export class MatrixWindow extends KIHWindow {
408455 }
409456}
410457
458+ /**
459+ * Represents the Unicode window.
460+ */
411461export class UnicodeWindow extends KIHWindow {
412462
413463 uniCodesListLoaded = false ;
0 commit comments