jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Tokenlist updated


G. Milde wrote:
On 13.03.06, Marko Mahnic wrote:
Hi.

I modified tokenlist and added:
   - filter command is interactive
...
A feature request would be the use of popup_buffer() (from bufutils)
instead of pop2buf, so the window will close as well when the TokenList
buffer is closed by the emulations keybinding to close_buffer().

Also, there might be a case when you have split the window already and
want to keep this setting. Exiting a TokenList with "q" will destroy it.
(This is why popup_buffer is as complicated as it is.)


I will look into it. I might also use windows.sl instead. For the moment
I wanted to make tokenlist as independent as possible. The most noticeable
drawback is window management. I am hoping that John will add popup windows
at some point. In BRIEF I was able to do something like:

   n = create_popup_window(x, y, w, h);
   setbuf("*TokenList*");
   process(); % new event loop created;
   % the above is similar to a modal popup dialog

   % this is only executed when you exit() from the new event loop
   delete_window(n);
   delbuf("*TokenList*");

I think this would be enaugh for all popup buffer needs (lists, help).
(It's been more than 10 years since I last used/programmed BRIEF and
it is quite possible that the above code is all wrong).

Here is how tokenlist would use window.sl:
------------------------
require("window");
private variable WindowState = NULL;

define tkl_display_results()
{
   WindowState = save_windows();
   create_windows_rel(50, 50);
   select_bottom_window();
   sw2buf (tkl_TokenBuffer);
   ...
}

define tkl_goto_token()
{
   variable line, buf;
   (buf, line) = tkl_get_token_info();

   if (WindowState == NULL) onewindow();
   else restore_windows(WindowState);
   WindowState = NULL;

   sw2buf (buf);
   goto_line (line);
   tkl_make_line_visible();
}

define tkl_quit()
{
   if (WindowState == NULL)
   {
      otherwindow();
      onewindow();
   }
   else restore_windows(WindowState);
   WindowState = NULL;
}
-------------


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]