Rollover on tree item and other tree item difficulties

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

netamaster
Just popping in
Just popping in
Posts: 1
Joined: Thu Mar 20, 2008 10:49

Rollover on tree item and other tree item difficulties

Postby netamaster » Thu Mar 20, 2008 11:10

Hello everybody.
I'm currently working on a chat system that uses CEGUI and some Tree, TreeItem elements in a List object.

- First thing is that I have an item of type CEGUI::TreeItem *item.
I wanted to subscribe EventListener of mouse event that uses some rollover efect to change the tree item in the list or to put an tooltip text - when mouse is over to show the tooltip text displaying some information.
A possible solution could be listener for the event CEGUI::Window::EventMouseMove, but i don't know how to get item's position in window etc.
If there is a simple rolloveritem and rolloutitem functions it would be the best solution for me.

- Another thing is that when i tryed to load the layout of an agenda there was an error that fired: "GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for NewData/Tree objects". I looked and i found the definition in the looknfeel file that follows:
--------------------------------------------------------------------------------------
<!--
***************************************************
NewData/Tree
***************************************************
-->

<WidgetLook name="NewData/Tree">
<PropertyDefinition name="SelectionBrushImage" initialValue="set:NewData image:GenericBrush" redrawOnWrite="true" />
<PropertyDefinition name="NormalTextColour" initialValue="FF000000" redrawOnWrite="true" />
<PropertyDefinition name="SelectedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
<PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
<PropertyDefinition name="FrameColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />

<!--<Property name="SelectionBrushImage" value="set:NewData image:GenericBrush" />
<Property name="NormalTextColour" value="FF000000" />
<Property name="SelectedTextColour" value="FFFFFFFF" />
<Property name="ActiveSelectionColour" value="FF607FFF" />
<Property name="InactiveSelectionColour" value="FF808080" />-->
<NamedArea name="ItemRenderingArea">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="NewData" image="ListboxLeft" dimension="Width" /></Dim>
<Dim type="TopEdge" ><ImageDim imageset="NewData" image="ListboxTop" dimension="Height" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="NewData" image="ListboxRight" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="NewData" image="ListboxBottom" dimension="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<!--<Child type="NewData/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="-5" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" offset="-25" type="Width" /></Dim>
<Dim type="Height" ><AbsoluteDim value="20" /></Dim>
</Area>
<VertAlignment type="BottomAligned" />
</Child>
<Child type="NewData/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="-5" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="5" /></Dim>
<Dim type="Width" ><AbsoluteDim value="20" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" offset="-10" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>-->
<Child type="NewData/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
<Dim type="Height" ><AbsoluteDim value="12" /></Dim>
</Area>
<VertAlignment type="BottomAligned" />
</Child>
<Child type="NewData/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="12" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>
<ImagerySection name="OpenTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="NewData" image="TreeListClosed" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="CloseTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="NewData" image="TreeListOpened" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section look="NewData/StaticShared" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section look="NewData/StaticShared" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
--------------------------------------------------------------------------------------
10x to all supporting team and users :!:

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Rollover on tree item and other tree item difficulties

Postby CrazyEddie » Sat Mar 22, 2008 08:45

Hi and welcome to the forum.

netamaster wrote:First thing is that I have an item of type CEGUI::TreeItem *item.
I wanted to subscribe EventListener of mouse event that uses some rollover efect to change the tree item in the list or to put an tooltip text - when mouse is over to show the tooltip text displaying some information.
A possible solution could be listener for the event CEGUI::Window::EventMouseMove, but i don't know how to get item's position in window etc.
If there is a simple rolloveritem and rolloutitem functions it would be the best solution for me.

Unfortunately I am not aware of any simple means of achieving notifications that could be used for roll-over effects within the Tree. Having said this, I am not overly familiar with this particular widget (except in so much as it closely models the old style listbox). For me it is completely inexcusable that the tree, being a new widget, was created using the out-dated approach that it does - it should have been created using the newer ItemList approach, thus allowing more advanced abilities such that you are asking about.

netamaster wrote:Another thing is that when i tryed to load the layout of an agenda there was an error that fired: "GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for NewData/Tree objects". I looked and i found the definition in the looknfeel file that follows:

It sounds like you are missing a mapping in the scheme file for the type "NewData/Tree" - defining a skin is not enough, this must then be mapped to a registered 'base' type and a registered WindowRenderer, to create a final type that can be instantiated.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests