octave-maintainers
[Top][All Lists]
Advanced

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

Crude macro/toolbar for fltk plot window


From: Judd Storrs
Subject: Crude macro/toolbar for fltk plot window
Date: Fri, 10 Sep 2010 16:20:45 -0400

Hi,

I've decided I crave a toolbar-ish thing for productivity reasons. So, I've hacked together a very crude toolbar-ish modification to the fltk window (also works well when combined with the zenity package). It adds a bar across the top of the window with eight buttons that call fltk_macro_run(n) [n being the button number, 1:8].  The default fltk_macro_run.m just prints a message to the terminal, you change the behavior by replacing fltk_macro_run. An example that does something is:

function fltk_macro_run(n)
  switch n
    case 1
      plot(sin(1:0.1:10)) ;
    case 2
      plot(1:10) ;
    otherwise
      disp(n) ;
  endswitch
  drawnow ;
  fflush(stdout) ;
endfunction

I doubt this is useful for octave generally (probably octave wants uitoolbar, uipushtool, uitoggletool interfaces), but possibly some people may find it useful in the interim. One thing I tried was to compile a separate fltk_backend.oct that could possibly go towards octave-forge but I couldn't figure out how to load the .oct and replace the builtin fltk backend, but that could be driver error.  I don't yet understand how the handle graphics are changing/working and interacting with fltk_backend.cc in octave so I'm not sure where to start looking about how to move this towards a uitoolbar-style interface (a simple "start looking here" would be helpful). 

Any comments/pointers welcome.


--judd

Attachment: fltk-macro.diff
Description: Text Data


reply via email to

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