[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tabs are ready? -> Let us give a definition of tabs.

From: Alin Soare
Subject: Re: Tabs are ready? -> Let us give a definition of tabs.
Date: Thu, 9 Feb 2012 18:11:28 +0200

> Without events, do you have a concrete idea how to signal to a hidden tab that something changed , such that it changes the color?   
> I do not need a very limited API. I need a programmable tab bar.

I would give the tab a "wants attention" flag that gets unset when the tab is activated, and set when `(tab-request-attention TAB)' is called, e.g. by a process sentinal.  Then the tab's title would switch from `tab-inactive-face' to `tab-wants-attention-face'.

I would do somethig else: attach to tab an ID; using this id I generate a function whose name depends on its id. I add this function in the list of hooks of a process.

When the process makes an internal change, it calls the hook attached exactly to the tab I am interested about. This function could chnage the color , make a beep, or force a show-tab.

The way I'm picturing it, the tab's internal state consists of four pieces of data: a title, a window (or possibly window configuration), a function that's called when it becomes active, and another function that's called when it becomes inactive.  That *seems* like it's meeting all your requirements, as I've understood them.

Good. At least, yes.
NOT a window (or possibly window configuration). We need a LIST OF VARIABLES, local to tab. Imagine the tab as an actor. It can keep such a list. In fact, I wanted to say that I define a tab with message-passing style, and this is a way of implementing an object-oriented system.

Into such a list we can keep a variable that is evaluated to a window-config. In the moment of hide the tab, the hide event can save the current win-conf into a variable, and the show event can restore the winconf from this variable.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]