Re: [code] [textadept] Feature request: Reordering tab bar items

From: Mitchell <m.att.foicica.com>
Date: Thu, 30 May 2019 10:55:55 -0400 (EDT)

Hi Lukas,

On Wed, 29 May 2019, Procházka Lukáš Ing. wrote:

> Hello Mitchel,
>
> spoken ~3/4 years ago -
>
> - would it be possible to implement some API to allow moving tab bar items
> left/right?
>
> Suppose having toolbar showing:
>
> [F.txt] [A.txt] [Message box] [External Tool Output] [C.txt]
>
> - it would be handy to have some API to reorder items into a user defined
> order, to achieve e.g.:
>
> [Message box] [External Tool Output] [A.txt] [C.txt] [F.txt]
>
> (
> Invulnerable way enough might be adding a variable (e.g. _TB "Tool Bar" into
> - _G?) as a table of _BUFFER members (index in _TB be position from left).
>
> In the sample above:
>
> _BUFFERS = { [1] = <data related to F.txt>,
> [2] = <data related to A.txt>,
> [3] = <data related to MessageBox>,
> [4] = <data related to External Tool>,
> [5] = <data related to C.txt>,
> }
>
> and
> _TB = { _BUFFERS[1], _BUFFERS[2], _BUFFERS[3], _BUFFERS[4],
> _BUFFERS[5], }
>
> and after reordering
> _TB = { _BUFFERS[3], _BUFFERS[4], _BUFFERS[2], _BUFFERS[5],
> _BUFFERS[1], }
>
> events.TAB_CLICKED (index_of_clicked_tab) should retrieve
> _BUFFERS[_TB[index_of_clicked_tab]] in this case, to keep backward
> compatibility...
> )

While this is possible, I don't plan on taking the time to do so. It would likely require a fair amount of work in the core C code and on the Lua side to keep things in sync.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 30 May 2019 - 10:55:55 EDT

This archive was generated by hypermail 2.2.0 : Fri 31 May 2019 - 06:26:47 EDT