[GRASS5] GUI sections and metadata or history graphs.
Cedric Shock
cedricgrass at shockfamily.net
Fri Mar 10 12:17:37 EST 2006
On Friday 10 March 2006 07:36, Michael Barton wrote:
> What kind of information do you envision as coming out the the GUI guidance
> section for use by a GUI?
>
Hierarchical or grouping arrangement of options.
Here's an example, using the familiar g.region command:
I've listed possible GUI sections below each option
There are actually quite a few ways to organize options like these. They could
be grouped by what they affect (everything, bounds, resolution, display
options, effects) or by how they work, or even by what sort of data they go
with (raster, 3D, vector). Here I've arranged them by how they work.
-d Set from default region
guisection: Set from existing
-g Print the current region (shell script style)
guisection: Print options|Shell script
-p Print the current region
guisection: Print options
-l Print the current region in lat/long on current ellipsoid/datum
guisection: Print options
-e Print the current region extent
guisection: Print options
-c Print the current region map center coordinates
guisection: Print options
-m Print region resolution in meters (geodesic)
guisection: Print options
-a Align region to resolution (default = align to bounds, works only for
2D resolution )
guisection: Values|Bounds
-u Do not update the current region
guisection: Effects
-3 Print also 3D settings
guisection: Print options
-b Print the maximum bounding box in lat/long on WGS84 (-g mode only)
guisection: Print options|Shell script
Parameters:
region Set current region from named region
guisection: Set from existing
rast Set region to match this raster map
guisection: Set from existing
rast3d Set region to match this 3D raster map (both 2D and 3D values)
guisection: Set from existing
vect Set region to match this vector map
guisection: Set from existing
3dview Set region to match this 3dview file
guisection: Set from existing
n Value for the northern edge
guisection: Values|Bounds
s Value for the southern edge
guisection: Values|Bounds
e Value for the eastern edge
guisection: Values|Bounds
w Value for the western edge
guisection: Values|Bounds
t Value for the top edge
guisection: Values|Bounds
b Value for the bottom edge
guisection: Values|Bounds
res Grid resolution 2D (both north-south and east-west)
guisection: Values|Resolution|All
res3 3D grid resolution (north-south, east-west and top-bottom)
guisection: Values|Resolution|All
nsres North-south grid resolution 2D
guisection: Values|Resolution
ewres East-west grid resolution 2D
guisection: Values|Resolution
tbres Top-bottom grid resolution 3D
guisection: Values|Resolution
zoom Raster map to zoom into
guisection: Set from existing
align Raster map to align to
guisection: Set from existing
save Save the current region to region definition file
guisection: Effects
Then, as a GUI designer, I'd read these in in order, assuming the first things
to appear should be the first things to show, but grouping stuff together in
boxes, making a hierarchy like this:
Set from existing
region
rast
rast3d
vect
3dview
zoom
align
-d
Values
Bounds
n
s
e
w
-a
Resolution
All
res
res3d
nsres
ewres
tbres
Effects
save
-u
Print Options
Shell Script
-g
-b
-p
-l
-e
-c
-m
-3
Then with the GUI I could just display this hierarchy, all expanded, with
captions and input boxes (Imagine the current interface laid out like a web
page with headings), or I could use a fancy tree widget, with only required
options that don't have defaults already expanded and showing their widgets,
or I could make nested tabs with a tab for each set of options (ICK!), or I
could lay out options with just one row of tabs, a maximum number of tabs,
and a desired height to stay under.
Tab example and what's on each page: The active tab is marked with a *.
[*Set from existing][Values|Bounds][Values|Resolution][Effects][Print Options]
region
rast
rast3d
vect
3dview
zoom
align
-d
[Set from existing][*Values|Bounds][Values|Resolution][Effects][Print Options]
n
s
e
w
-a
[Set from existing][Values|Bounds][*Values|Resolution][Effects][Print Options]
All
res
res3d
nsres
ewres
tbres
[Set from existing][Values|Bounds][Values|Resolution][*Effects][Print Options]
save
-u
[Set from existing][Values|Bounds][Values|Resolution][Effects][*Print Options]
Shell Script
-g
-b
-p
-l
-e
-c
-m
-3
Expansion on last idea: a packer GUI can actually measure the sizes of boxes
before deciding how to pack them. Here I'll just use rows. Say a heading
costs 1 row, an option 2 rows, and a flag 1 row. Looking at the current GUI
we can display about 8 rows on small monitors, but we really don't want to
display more than 5 tabs (multiple rows of tabs are worse than scrolling in
my opinion). A user might want these numbers to be a bit higher on higher
resolution monitors.
So here are the sizes of what is inside widgets:
Set from existing - 15 rows
Values - 22 rows
Bounds - 9 rows
Resolution - 11 rows
All - 4 rows
Effects - 3 rows
Print Options - 9 rows
Shell Script - 2 rows
We have 49 rows of data to lay out. So we figure out about the amount to put
in each tab, by dividing by 5, and taking the maximum of that and 8. So now
we've decided to put at least 10 rows in each tab. So we start doing it:
* Starting with the biggest section, Values, we offer it two tabs because it
has at least 20 rows.
** Recurse into values
** We have 20 rows to distribute here amongst 2 tabs. Starting with the
biggest, Resolution, we give it a tab.
** We give the remaining tab to the remaining sections (Bounds)
* We have 27 rows to deal with, and 3 tabs left. 9 rows wins a tab.
* The biggest is 15, we award one tab to Set from existing
* Now we have 12 rows; max(6, 8)=8 wins a tab.
* The biggest is 9, we award a tab to Print Options
* Everything left gets the remaining one tab
Notes:
A section can refuse extra tabs (if it doesn't have subsections). If it does
then the layout system can either continue, adding the leftover tabs into
those distributed to the remaining sections or it can remove the section and
its tabs from the layout algorithm and relayout everything that's remaining.
If there are lots of little sections left over and we have multiple tabs left
we just start adding them together in order until we have a new section
bigger than the minimum size.
Now we have the following tabs:
Values|Bounds
Values|Resolution
Set from existing
Print Options
Effects
We put them back in order by where a part of them first appeared:
Set from existing
Values|Bounds
Values|Resolution
Effects
Print Options
And display them as demonstrated above.
I hope that demonstrates my motivation,
--Cedric Shock
More information about the grass-dev
mailing list