[rkward-devel] paginate onscreen graphics device
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Jun 21 12:41:33 UTC 2010
Hi,
On Monday 21 June 2010, Prasenjit Kapat wrote:
> Once the dev.off () bug has been fixed, what I would like is this:
> On closing a window (either by clicking X or Ctrl+W or dev.off () or
> graphics.off ()) call rk.record.plot$onDelDevice (deviceID).
> Basically, something along the following lines:
>
> RKGlobals::rInterface ()->issueCommand ("rk.record.plot$onDelDevice ("
> + QString::number (device_number) + ')', RCommand::App, i18n ("Add
> current plot before closing device number %1", device_number),
> error_dialog);
Ok, will do this. But it may take a few days.
dev.off() (which is also called by graphics.off()) will have to be handled in R.
> 1. The disable parts haven't been implemented yet. Right now, once you
> reach either end nothing is replayed.
Can you arrange for some function to be called whenever the history-length or
position changes? Then I can take care of updating the state of the menu
items.
> 2. Menu entries: I have moved them from the View menu to the main main
> itself, and that too in a rather _ugly_ way. Now, before you start
> cursing: it is easy to move them back and having them in the main menu
> makes them all the more fun to use ;)
>
> 2a. A better solution would be provide a toolbar for the graphics
> window. Then have them under View and add them to the toolbar as well.
> The toolbar, in far enough future, could be used to add more "editing"
> features!
Alright, adding a toolbar will be easy.
> 3. There are some bugs: multiple devices with new plots will create
> some confusion and some of the new plots will not be added to the
> history. I am looking into this. But this should not crash rkward.
>
> 4. Finally, an example file is attached to showcase the history
> feature. Just source it.
>
> Opinions, suggestions, criticisms are welcomed.
Looks pretty neat, already! Some comments and wishlist:
- Keeping one global history seems reasonable to me.
- dev.interactive() or deviceIsInteractive() might help in figuring out which
devices to ignore. Or perhaps, adding a call to onAddDevice() in
rk.screen.device() will allow to keep a list of devices to watch. Note that
RKWard preview windows should probably also be ignored (.rk.preview.devices).
- Perhaps it would be useful to track the creation time or even the main title
of each plot (if you can find a way to do that). Then we could additionally
offer a drop-down list of the plots in the history.
- internal.R and public.R are really getting crowded. Perhaps you can split
all graphics functions into one or more separate files? ("svn add" to add the
new files to SVN).
- Some (configurable) way to limit the number/memory size of plots kept in
history would be nice.
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20100621/9cfa487d/attachment.sig>
More information about the Rkward-devel
mailing list