New infrastructure feature. Games are now permitted to be
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 6 Sep 2008 09:27:56 +0000 (09:27 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 6 Sep 2008 09:27:56 +0000 (09:27 +0000)
commitfa3abef5abe95dd9668a87b1cc57a724dcbf6354
tree8f02add581cf4b0d0d69d4ad5490b124a322a0ad
parentef114e9b86efa3b430985888d3d7630ebd5d81fb
New infrastructure feature. Games are now permitted to be
_conditionally_ able to format the current puzzle as text to be sent
to the clipboard. For instance, if a game were to support playing on
a square grid and on other kinds of grid such as hexagonal, then it
might reasonably feel that only the former could be sensibly
rendered in ASCII art; so it can now arrange for the "Copy" menu
item to be greyed out depending on the game_params.

To do this I've introduced a new backend function
(can_format_as_text_now()), and renamed the existing static backend
field "can_format_as_text" to "can_format_as_text_ever". The latter
will cause compile errors for anyone maintaining a third-party front
end; if any such person is reading this, I apologise to them for the
inconvenience, but I did do it deliberately so that they'd know to
update their front end.

As yet, no checked-in game actually uses this feature; all current
games can still either copy always or copy never.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8161 cda61777-01e9-0310-a592-d414129be87e
38 files changed:
blackbox.c
bridges.c
cube.c
devel.but
dominosa.c
fifteen.c
filling.c
flip.c
galaxies.c
gtk.c
guess.c
inertia.c
lightup.c
loopy.c
map.c
midend.c
mines.c
net.c
netslide.c
nullgame.c
osx.m
pattern.c
pegs.c
puzzles.h
rect.c
samegame.c
sixteen.c
slant.c
solo.c
tents.c
twiddle.c
unequal.c
unfinished/pearl.c
unfinished/separate.c
unfinished/slide.c
unfinished/sokoban.c
untangle.c
windows.c