[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics properties implementation
From: |
Michael Goffioul |
Subject: |
Re: Graphics properties implementation |
Date: |
Sat, 12 Jan 2008 12:57:03 +0100 |
On 1/12/08, Shai Ayal <address@hidden> wrote:
> there are a lot of warning like:
> graphics.h:700: warning: declaration of 'name' shadows a member of 'this'
> graphics.h: In constructor 'handle_property::handle_property(const
> std::string&, const graphics_handle&, const graphics_handle&)':
>
> is this OK?
I didn't notice, because MSVC didn't report it. John has fixed it.
> Also, there is one function which seems out of place
> axes::properties::set_defaults which is in graphics.cc
> No other objects have this function, and in it the properties are
> initialized. Since this function is not auto generated, the values
> might not correspond to the default values in the
> BEGIN_PROPERTIES/END_PROPERTIES block.
> Does anyone remember what this function is? Can we delete it or at
> least take out all the assignments ?
This is a special case, which resets the axes properties, but
not *all* of them. You can't blindly reset all properties to their
factory value and use auto-generation. As this is the only case
where this is needed, I think it's OK to keep it, however most
of the assignment could be made like:
graphics_object obj = gh_manaher::get_object (get_parent ());
xgrid = obj.get_factory_default ("xgrid");
It's slower, but you avoid the problem of default value mismatch.
Michael.
- Graphics properties implementation, Michael Goffioul, 2008/01/11
- Re: Graphics properties implementation, David Bateman, 2008/01/11
- Re: Graphics properties implementation, Shai Ayal, 2008/01/12
- Graphics properties implementation, John W. Eaton, 2008/01/12
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/12
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/12
- Re: Graphics properties implementation, Shai Ayal, 2008/01/12
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/12
- Re: Graphics properties implementation, John W. Eaton, 2008/01/12
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/12
- Re: Graphics properties implementation, Shai Ayal, 2008/01/12
- Re: Graphics properties implementation, Michael Goffioul, 2008/01/15
- Re: Graphics properties implementation, John W. Eaton, 2008/01/15