Yes, that's one way to implement the approach I have in mind. John Darrington <j...@darrington.wattle.id.au> writes:
> I think I understand what you're saying now. > You're suggesting that we add the string_map as a member of the output > viewer object? Yes I think that will work. > > J' > > On Sun, Dec 18, 2011 at 11:22:36AM -0800, Ben Pfaff wrote: > [adding pspp-dev back, assuming it was just dropped accidentally] > > John Darrington <j...@darrington.wattle.id.au> writes: > > > On Sat, Dec 17, 2011 at 10:13:30AM -0800, Ben Pfaff wrote: > > > > I don't understand the problem yet. If we pass a particular set > > of options to a driver, then we'll get a particular > > configuration. If we need to change one option, then we can do > > that by updating the set of options slightly (just changing the > > one value) and then handing the driver the updated set of > > options. > > > > This sounds perfectly reasonable. > > > > The default values should default the same way they did > > on the first try, right? > > > > This doesn't sound so good. I don't want them to default. I want them > > to remain in their current state. > > > > > > For the current problem, I need a function, to be called in > > psppire-output-window.c (expose_event_callback) which sets the > > font and the foreground colour (perhaps a few other things too) > > but leaves the rest of the options in their current state. > > This doesn't seem possible at the moment without changing code > > in quote a lot of places or by circumventing the interface to > > the cairo xr driver. > > So let's use an example, because I still don't see the problem > yet. Suppose the cairo driver is initially configured as: > > foreground-color: black > font: Sans > font-size: 12pt > > No background color is specified, so suppose it defaults to > white. Now something comes along and wants to set the font size > to 10pt. So we take the original set of options, change the > font-size to 10pt, and hand the updated set of options back to > the driver (using some new "set_options" function I guess). The > new option set looks like this: > > foreground-color: black > font: Sans > font-size: 10pt > > No background color is specified now either, so it still defaults > to white. > > What's the problem with defaults in this scenario? > > Thanks, > > Ben. > -- > Ben Pfaff > http://benpfaff.org -- Ben Pfaff http://benpfaff.org _______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev