On 19 Jan 2015, at 20:18, Alexandre Bergel
<alexandre.bergel(a)me.com> wrote:
Hi Natalia,
Glad to see you around!
Yes, this is easy. You can simply send #remove or #removeWithItsConnectedEdges to an
element or an edge to see it removed. You can add it back by adding to the view again.
Consider this example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.
v @ RTDraggableView.
v addMenu: '+ shapes' callback: [
previousElements := v elements.
b := RTMondrian new.
b view: v.
newElements := b nodes: RTShape withAllSubclasses.
b edges connectFrom: #superclass.
b layout tree.
b build.
v signalUpdate.
TRConstraint move: newElements onTheRightOf: previousElements.
].
v addMenu: '+ layouts' callback: [
previousElements := v elements.
b := RTMondrian new.
b view: v.
newElements := b nodes: RTLayout withAllSubclasses.
b edges connectFrom: #superclass.
b layout tree.
b build.
v signalUpdate.
TRConstraint move: newElements onTheRightOf: previousElements. ].
v addMenu: '- layouts' callback: [
(v elements select: [ :el | el model == RTLayout or: [ el model inheritsFrom: RTLayout ]
]) do: #removeWithItsConnectedEdges.
v signalUpdate ].
v addMenu: '- shapes' callback: [
(v elements select: [ :el | el model == RTShape or: [ el model inheritsFrom: RTShape ]
]) do: #removeWithItsConnectedEdges.
v signalUpdate ].
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
On Jan 19, 2015, at 1:08 PM, Natalia Tymchuk
<natalia.tymchuk(a)unikernel.net> wrote:
Hello.
Is there some way to implement the hiding and showing some roassal elements? For example
if I want to have the buttons in my view which will give me this opportunity.
Best regards,
Natalia
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev