~john-j-beard/kicad:grid_dot_size

Last commit made on 2017-02-16
Get this branch:
git clone -b grid_dot_size https://git.launchpad.net/~john-j-beard/kicad
Only John Beard can upload to this branch. If you are John Beard please log in for upload directions.

Branch merges

Branch information

Name:
grid_dot_size
Repository:
lp:~john-j-beard/kicad

Recent commits

91ff2e5... by John Beard

Simplify display option selection mappings using CFG_MAP

Rather than defining static functions to do the mapping, this can be mor
concisely done with the UTIL::CFG_MAP utility functions.

abed366... by John Beard

Sanitise incoming GAL config options using mapping tables

When reading config options from files, it's important to make sure the
value makes sense - the incoming data could be anything, and may have
incompatible values or be otherwise unreliable.

This introduces a simple way to define and use "mapping tables" which
can map between a "native" value, probably an enum (but not necessarily)
and some external value, for example the value written to file.

This provides a decoupling between the two values, as well as sanitising
inputs and outputs. This is important, as over time, if there isn't a
decoupled interface, changing options result in corrupt configs, or a
proliferation of obsolete enum values kept for compatibility.

7e042de... by John Beard

Add protected virtual dtor for GAL_DISPLAY_OPTIONS_OBSERVER

GAL_DISPLAY_OPTIONS_OBSERVER aren't deleted by a base class pointer -
they are an "incidental" part of other classes. Add a virtual protected
destructor to make this explicit.

807eaac... by John Beard

Add user control for grid minimum spacing in GAL

This allows the user to set a thicker grid line without causing the
grid lines to become over dense, or just make the grid denser according
to preference.

The term "density" is modified to "minimum grid spacing", which is
the pixel spacing between adjacent grid lines.

The spacing settings now comes in along, with other GAL display settings,
as part of GAL_DISPLAY_OPTIONS observer functionality. To this end, the
setter in GAL interface is removed, as an external user should be
setting this parameter via the GAL_DISPLAY_OPTIONS interface.

7cc370b... by John Beard

Add grid line thickness control to Display Options Dialog

This adds a user-settable control for the grid line thickness on GAL
canvases to the display options dialog.

The thickness settings now comes in, along with other GAL display
settings, as part of GAL_DISPLAY_OPTIONS observer functionality. To this
end, the setter in GAL interface is removed, as an external user should
be setting this parameter via the GAL_DISPLAY_OPTIONS interface.

Fixes: lp:1662482
* https://bugs.launchpad.net/kicad/+bug/1662482

5512ebd... by John Beard

Add a class to govern an "incrementing" text control

This class, INCREMENTAL_TEXT_CTRL, is used to provide a frameworks for
classes that want to control a text control that can be incremented
according to some scheme.

Also provided is a wxWidgets implementation with spin buttons for
control, as well as mousewheel support.

8253fc8... by John Beard

Break Display Options control value/enum mapping to functions

The mappings from enums to control settings can be done in static
functions, which makes the set/retreive functions more concise, and also
puts the mapping functions in a clearly delineated place.

35a58e8... by John Beard

Make KIGFX::GRID_STYLE an enum class

This provides stronger typing to these values.

08772f2... by John Beard

Move Grid style to Graphics Options dialog

This puts the graphical/display options with the other similar options
in that dialog, rather than with the dimension options found in the Set
Grid dialog, which is in the Dimensions menu.

Also place the option itself in the GAL Display Options structure, so it
can be updated using the observer mechanism there.

The setter for the style in the GAL interface is removed, as the public
interface for setting this option is now to modify the
GAL_DISPLAY_OPTIONS structure and notify the GAL when done.

8723dc9... by John Beard

Give all GAL canvases access to a GAL_DISPLAY_OPTIONS structure instance

Also loads the gal options when loading a canvas, as the canvas
otherwise might not register the initial settings.