[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: koffice
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2006-12-27 16:11:04
Message-ID: 200612271711.04798.t.zachmann () zagge ! de
[Download RAW message or body]

On Wednesday 27 December 2006 12:18, Thomas Zander wrote:
> On Sunday 24 December 2006 08:04, Thorsten Zachmann wrote:
> > o Added the possiblity to pass data to the creation of shapes. This
> >   makes it quite easy to find out the active page/layer which is
> >   otherwise not so easy as it is not part of the document but of the
> >   view.
>
> Can we please avoid this new class/argument?
> Creating a shape is done by a piece of code that has access to the view
> already (a tool has access to the view) and moving the attaching of a shape
> to a layer (which is also a shape) should not happen in the document.
> _Especially_ since it is a view property.
>
> If karbon etc add their layer shapes to the viewManager like we discussed
> in Deventer I also don't see why it would be difficult to add this at
> creation time.
>
> All in all; adding this datamember to the interface that all KOffice apps
> should implement, but most of them should ignore does not seem like the
> best solution to me.

I really tried to do it a different way but all failed or came to the point 
where the document or page needed to know the active page/layer of the view 
which inserted the shape.

As you say the active layer and also the active page is a property of the view 
so there is no nice way to get them in the document which implements the 
KoShapeControllerBase. Therefore I added this data to be passed to the shape 
creation/deletion. 
It is quite an easy solution that adds nearly no overhead for applications 
that don't need it and makes it really easy for application developers to get 
all needed data.

I know kword might not need it but I can see it should be helpful in karbon 
for getting the active layer and maybe one day in krita when you can have a 
active layer per view and not only per document.

If you see a much easier way to do it please explain it to me.

Thorsten

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic