[rkward-devel] paginate onscreen graphics device
Prasenjit Kapat
kapatp at gmail.com
Mon Jun 21 04:38:18 UTC 2010
Hi,
On Sun, Jun 20, 2010 at 7:46 PM, Thomas Friedrichsmeier
<thomas.friedrichsmeier at ruhr-uni-bochum.de> wrote:
> On Sunday 20 June 2010, Prasenjit Kapat wrote:
>
>> 2. when/if the graphics window is closed? I can handle dev.off () and
>> graphics.off() but what happens if the close button on the window is
>> clicked? Or Window > Close (Ctl+W) is clicked? Do rlward still have a
>> chance to do _something_ (I've an idea of what to do) with existing
>> graphics?
>
> This will need a bit of hacking (the window should visually disappear at once,
> but the actual closing must not happen before the "something" has finished),
> but yes, it's definitely possible to insert some action when the window is
> closed. Let me know what you need done, and I'll add it, soon.
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);
>> Nice!! I've done exactly that and have a rudimentary code based on
>> Deepayan's rp () which is working! But yet to commit to svn. I've to
>> figure out where/what to add/modify in the C++ codes to add additional
>> GUI elements to the menu of the graphics window. May be you can help
>> here.
>
> Cool! See svn rev. 2887 (Note that you need to do "make install" to see the
> new menu items). Feel free to adjust all naming, etc. Of course this is very
> rudimentary, so far. Esp. we should add a mechanism to disable the "next" plot
> action when already at the last plot, and vice versa for the "previous"
> action. But this should be enough to play with for a start.
1. The disable parts haven't been implemented yet. Right now, once you
reach either end nothing is replayed.
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!
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.
Regards,
--
Prasenjit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: history.examples.R
Type: application/octet-stream
Size: 3053 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20100621/366e2616/attachment.obj>
More information about the Rkward-devel
mailing list