Andre Poenitz <[EMAIL PROTECTED]> writes:
> You are certainly right when it comes to Model/View separation. The
> dimension cache is a 'view thing' (depends e.g. on font size), so it
> does not really belong _inside_ the insets. Also, insets that are way
> off the visible area do not need it at al
Andre Poenitz wrote:
On Wed, Jun 13, 2007 at 11:25:34PM +0200, Abdelrazak Younes wrote:
I think this is too complicated. A better solution IMHO is to remove the
data member altogether and put that in the BufferView (either in the
CoordCache or in in a new DimensionCache):
[...]
You are certai
> "Alfredo" == Alfredo Braunstein <[EMAIL PROTECTED]> writes:
Alfredo> Abdelrazak Younes wrote:
>> Andre Poenitz wrote:
>>> In the 1.6 cycle I'd like to get rid of the 'Dimension' data
>>> member in Inset. As a lot of insets need that member and
>>> derivation from a 'common' 'DimInset' base
Abdelrazak Younes wrote:
> Andre Poenitz wrote:
>>
>> In the 1.6 cycle I'd like to get rid of the 'Dimension' data member in
>> Inset. As a lot of insets need that member and derivation from a
>> 'common' 'DimInset' base was impractical I am thinking about using the
>> old ATL trick:
>
> I think
On Wed, Jun 13, 2007 at 11:25:34PM +0200, Abdelrazak Younes wrote:
> Andre Poenitz wrote:
> >
> >In the 1.6 cycle I'd like to get rid of the 'Dimension' data member in
> >Inset. As a lot of insets need that member and derivation from a
> >'common' 'DimInset' base was impractical I am thinking about
Andre Poenitz wrote:
In the 1.6 cycle I'd like to get rid of the 'Dimension' data member in
Inset. As a lot of insets need that member and derivation from a
'common' 'DimInset' base was impractical I am thinking about using the
old ATL trick:
I think this is too complicated. A better solution
On Wed, Jun 13, 2007 at 10:19:14PM +0200, Stefan Schimanski wrote:
> >>One problem I see here: What about the constructors? They must be
> >>generic in DimStuff, no?
> >
> >If you need the constructors, your question is the answer:
> >
> > struct FatInset : DimStuff {
> > FatInset(non-"
One problem I see here: What about the constructors? They must be
generic in DimStuff, no?
If you need the constructors, your question is the answer:
struct FatInset : DimStuff {
FatInset(non-"standard"-stuff-here) { ... }
}
No, it does not allow me to have non-standard cons
On Wed, Jun 13, 2007 at 09:44:10PM +0200, Stefan Schimanski wrote:
> > typedef DimStuff FatInset;
>
> Looks good. Nice trick. Would the following be possible?
>
> struct FatInset : DimStuff {
> }
Yes.
> Would there be any disadvantage of this? I think it's easier to
> understand.
Cons
#include
using namespace std;
// Base of the trick: Data _and_ implementation of the feature.
template
struct DimStuff : Base
{
DimStuff() : w(30) {}
int width() const { return w; }
void setWidth(in
10 matches
Mail list logo