[GRASS-dev] Re: grass-dev Digest, Vol 13, Issue 50

On 5/11/07 8:30 AM, "grass-dev-request@grass.itc.it"
<grass-dev-request@grass.itc.it> wrote:

the bottom of the GUI Map Display window gives you rows= cols= and res=
values, but not exact region bounds. (lack of space..

yes

But would it matter since the display region bounds != computational region
bounds?

any suggestions
where to put that? expanding [+] list on that rows= cols= res= line?)

Not possible on the status line.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Hamish:

> expanding [+] list on that rows= cols= res= line?)

Michael:

Not possible on the status line.

Is that just for Tcl, or wxPy too?

Hamish

You can't do this in wxPython either. At least I don't think so, though
there is more flexibility for this kind of stuff.

In both TclTk and wxPython, an "expanding list" needs to be done as a
combobox, tree control, combo control, or something similar. In TclTk and I
think in wxPython, you can only put text into the status bar, not a
control/widget.

Michael

On 5/12/07 10:27 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Hamish:

expanding [+] list on that rows= cols= res= line?)

Michael:

Not possible on the status line.

Is that just for Tcl, or wxPy too?

Hamish

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Hamish:

>>> expanding [+] list on that rows= cols= res= line?

Michael:

>> Not possible on the status line.

H:

> Is that just for Tcl, or wxPy too?

M:

You can't do this in wxPython either. At least I don't think so,
though there is more flexibility for this kind of stuff.

In both TclTk and wxPython, an "expanding list" needs to be done as a
combobox, tree control, combo control, or something similar. In TclTk
and I think in wxPython, you can only put text into the status bar,
not a control/widget.

So what if we have a box at the bottom of the GUI that walks a like a
status bar and talks like a status bar but is coded as a combobox or
something similar?

(IF an exanding list is really useful in the first place)

Hamish

On 5/13/07 1:12 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Hamish:

expanding [+] list on that rows= cols= res= line?

Michael:

Not possible on the status line.

H:

Is that just for Tcl, or wxPy too?

M:

You can't do this in wxPython either. At least I don't think so,
though there is more flexibility for this kind of stuff.

In both TclTk and wxPython, an "expanding list" needs to be done as a
combobox, tree control, combo control, or something similar. In TclTk
and I think in wxPython, you can only put text into the status bar,
not a control/widget.

So what if we have a box at the bottom of the GUI that walks a like a
status bar and talks like a status bar but is coded as a combobox or
something similar?

(IF an exanding list is really useful in the first place)

I'm not convinced that it's worth the trouble to do. The wxPythyon GUI shows
extents rather than columns/rows. That is probably more meaningful, at least
in that context. For wxgrass, the resolution for the display is set to match
the pixel density of the display image (like one aspect of 'explore mode' in
the TclTk gui). This gives a better looking and faster rendering image. It
has no effect on the computational resolution. However, it means that rows
and columns in the display change with window size and zooming.

Michael

Hamish

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

[Hamish and Michael trying to find a way to fit more information on
the status line]
[...]
[Hamish]

So what if we have a box at the bottom of the GUI that walks a like a
status bar and talks like a status bar but is coded as a combobox or
something similar?

(IF an exanding list is really useful in the first place)

[Michael]

I'm not convinced that it's worth the trouble to do.

[...]

The problem is that in order to behave (resizing and so on), it must
be a carefully crafted widget and be carefully inserted in the frame's
layout.

An easier solution would be to expand the statusbar widget
capabilities. It's actually a multiple-field one-liner. The one-liner
thing is its most cumbersome detail. I found no way in which it can be
made to hold more than one line. (It's probably feasible in the C++
wx, but I guess there is some reason why it has not been done in the
Python bindings, and we do NOT want to handle patches to a upstream
dependency, do we?)

We could add an info button, or a tooltip to the statusbar (I'd favor
the former) that pops up extended information about the display.

This, for instance, works:

import wx
class mySB(wx.StatusBar):
    def __init__(self,parent,id=wx.ID_ANY):
        wx.StatusBar.__init__( self, parent, id )
        self.SetFieldsCount(1)
        r=self.GetFieldRect(0)
        self.txt = wx.StaticText(self, label="first field" )
        self.txt.SetToolTipString( u"some\nlong\ntext" )
        self.txt.SetPosition( (r.x+2, r.y+2) )
app=wx.App(0)
f=wx.Frame(parent=None,size=(50,50))
f.SetStatusBar(mySB(f))
f.Show()
app.SetTopWindow(f)
app.MainLoop()

Daniel.

--
-- Daniel Calvelo Aros

IMHO, it doesn't seem worth the trouble. The wxPython status line currently
gives the extents along with the current cursor position. The resolution is
meaningless in the display, as it changes dynamically.

We could add a button somewhere that pops up an info window for the current
region (i.e., does a g.region -pg). But then, that is already accessible
from the menu and prints to the text output window of the GIS Manager.

One thing that might be useful (maybe a wish from awhile back in fact) is
adding an info item to the current context menu for map layers in the GIS
Manager. It would pop up a message box with output from r.info or v.info in
it for the map layer under the cursor.

Michael

On 5/13/07 1:19 PM, "Daniel Calvelo" <dca.gis@gmail.com> wrote:

[Hamish and Michael trying to find a way to fit more information on
the status line]
[...]
[Hamish]

So what if we have a box at the bottom of the GUI that walks a like a
status bar and talks like a status bar but is coded as a combobox or
something similar?

(IF an exanding list is really useful in the first place)

[Michael]

I'm not convinced that it's worth the trouble to do.

[...]

The problem is that in order to behave (resizing and so on), it must
be a carefully crafted widget and be carefully inserted in the frame's
layout.

An easier solution would be to expand the statusbar widget
capabilities. It's actually a multiple-field one-liner. The one-liner
thing is its most cumbersome detail. I found no way in which it can be
made to hold more than one line. (It's probably feasible in the C++
wx, but I guess there is some reason why it has not been done in the
Python bindings, and we do NOT want to handle patches to a upstream
dependency, do we?)

We could add an info button, or a tooltip to the statusbar (I'd favor
the former) that pops up extended information about the display.

This, for instance, works:

import wx
class mySB(wx.StatusBar):
    def __init__(self,parent,id=wx.ID_ANY):
        wx.StatusBar.__init__( self, parent, id )
        self.SetFieldsCount(1)
        r=self.GetFieldRect(0)
        self.txt = wx.StaticText(self, label="first field" )
        self.txt.SetToolTipString( u"some\nlong\ntext" )
        self.txt.SetPosition( (r.x+2, r.y+2) )
app=wx.App(0)
f=wx.Frame(parent=None,size=(50,50))
f.SetStatusBar(mySB(f))
f.Show()
app.SetTopWindow(f)
app.MainLoop()

Daniel.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Michael Barton wrote:

One thing that might be useful (maybe a wish from awhile back in fact)
is adding an info item to the current context menu for map layers in
the GIS Manager. It would pop up a message box with output from r.info
or v.info in it for the map layer under the cursor.

(see the GRASS map browser in QGIS)

Hamish