|
From: Ben A. <bpa...@ma...> - 2009-02-12 02:12:51
|
On Feb 11, 2009, at 8:54 PM, Ethan Merritt wrote: > On Wednesday 11 February 2009 17:26:00 Ben Abbott wrote: >> On Feb 11, 2009, at 6:56 PM, Ethan Merritt wrote: >> >>> On Wednesday 11 February 2009 15:30:30 Petr Mikulik wrote: >>> >>>>> In any event, I'd prefer that gnuplot allow an existing window be >>>>> resized >>>>> and/or repositioned. That would remove the need to "close" an >>>>> existing >>>>> window. >>>> >>>> The problem is not in the "close" option. The problem is that >>>> Octave >>>> issues before each "plot" this command: >>>> >>>> set terminal x11 close enhanced title "Figure 1" size 560,420 >>>> position 300,148 >>>> >>>> i.e. Octave wants to reset size and position. However, I think that >>>> the >>>> size+position options should be added only if user has explicitly >>>> "set(gca,..., size/position, nnn)"; otherwise, these values should >>>> not be >>>> passed to gnuplot and the positioning should be done by the window >>>> manager >>>> and user's mouse movements. The default value of size/position in >>>> Octave >>>> should be "auto" or "default" but not an explicit number. >>> >>> I strongly agree. An application program has no business changing >>> my >>> window sizes or positions. >> >> I think we are all in agreement. From the perspective of octave the >> user communicates to gnuplot via octave. The intent is that octave >> will only change the window position when the user requests it. And >> when moved by the mouse, the window will remain where the user placed >> it (provided he does not ask octave to move it). > > I may still be missing the point. If the user places a window > somewhere > by mouse, it will stay there on its own without any extra code in > gnuplot or in Octave. Is the idea to allow Octave to save the state > of a session in which the user has manually positioned the windows? > That I can understand, and it can be done by re-creating the windows > in > their previous positions (now that Petr has added a way to read them > out). > But I don't see why there is a need to move an existing window under > software control - what's the intent there? Control over window size and position via its scripting language is something Matlab does. Compatibility with Matlab is a goal for Octave. Of course, there user controls the scripting language, so there should be no surprises for the user. In the event a script places a window and the user then moves it (via the mouse), the window is intended to stay where the mouse placed it (unless the user moves it again by using the mouse or a script). >>> I was reluctant to add this capability to >>> gnuplot in the first place, and the current conversation is not >>> reassuring me. At the least, I advocate for some simple way that >>> the >>> end user can disable all such position/sizing commands. >>> I am tempted to add an XResource: >>> gnuplot.leave-my-windows-alone: yes (default) >> >> I'm confused by the context of your comments, or perhaps you're not >> familiar with the details of what I'm hoping to do? >> >> From the octave side each figure/window has a list of properties >> which the user may modify. These properties include position and size >> (the actual figure property is called "position" and includes >> position >> and size info [X, Y, W, H]). > > Are you saying that the I have to fill in a whole table of > properties, just to open a window? Surely not. > Or does "modify" just mean "move or resize using the mouse"? The properties all have defaults, which may be modified via Octave's scripting language. The size and position of the figure are special in that they may be modified by either the scripting language of the mouse. > Your description seems to intermingle the notion of session management > (i.e. screen contents and layout) and the notion of keeping a > history of > the figure generation. What if I originally created a figure using my > wide-screen terminal at the lab, but then want to edit it later > on my small laptop? I don't think it's a good idea to mix screen > layout > information with figure properties; they are two entirely different > things. I'm unclear what you're referring to ... but if I infer correctly, Octave doesn't concern itself with the history of the figure position. It is only concerned with where the user place it last. Regarding the value of mixing screen layout with figure properties, I see your point. However, this is a historic choice of Mathworks. Thus, from my position it is a matter of compatibility. > I guess I need to find an Octave user, and look over their shoulder > for > a while to see how a typical session would go. As Octave's behavior in this is still under development, you might get a better idea seeing how Matlab behaves. Ben |