Cross-platform version

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Wed Jul 12, 2006 13:23

Hi Dalfy

that is a really good question :D

so now I have checked out the correct branch :-), v-0-4-1, which should correspond to the cegui version I have installed.
I have previously installed wxWidgets 2.6.3 with opengl and unicode configured, as described in the wiki.
But there still seems to be some inconsistencies:
EditorDocument.cpp: I member function 'void
EditorDocument::SetBackgroundImage(const wxString&)':
EditorDocument.cpp:248: error: no matching function for call to `
CEGUI::ImagesetManager::createImagesetFromImageFile(const char[16], const
wxChar*)'
/usr/local/include/CEGUI/CEGUIImagesetManager.h:150: error: candidates are:
CEGUI::Imageset* CEGUI::ImagesetManager::createImagesetFromImageFile(const
CEGUI::String&, const CEGUI::String&, const CEGUI::String&)


any clues on why this happens?

kind regards
Martin

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Jul 12, 2006 14:30

Mmm that's odd. Seems like i only fixed that for 0.5. Can you pass the second parameter to the createImageSet method within "StringHelper::ToCEGUIString()"? (Can't access SVN right now to copy/paste).

Good luck!

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Thu Jul 13, 2006 09:05

Hi Scriptkid

that did solve the issue replacing
filepath.c_str() with
StringHelper::ToCEGUIString(filepath)
in EditorDocument.cpp line 246
But now I'm having trouble with wxwidgets during the linking stage.
I have downloaded wxWidgets 2.6.3 source archive wxALL and configured it with opengl and unicode as described in the wiki.

but i get the following linker error
g++ -g -O2 -o CELayoutEditor CELayoutEditor.o CopiedSelection.o DialogAbout.o DialogAddWindow.o DialogMain.o DialogGrid.o EditorCanvas.o EditorDocument.o EditorFrame.o EditorView.o WindowBox.o Options.o Selection.o SelectionMover.o SupportedLooks.o WindowContext.o CommandAddWindow.o iniFile.o -L/usr/local/lib -lCEGUIBase -lCEGUIOpenGLRenderer -L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6
EditorCanvas.o(.text+0x9a): In function `EditorCanvas::EditorCanvas[not-in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/usr/local/include/wx-2.6/wx/string.h:325: undefined reference to `wxGLCanvas::wxGLCanvas[not-in-charge](wxWindow*, wxGLCanvas const*, int, wxPoint const&,wxSize const&, long, wxString const&, int*, wxPalette const&)'
EditorCanvas.o(.text+0xc7): In function `EditorCanvas::EditorCanvas[not-in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:44: undefined reference to `wxGLCanvas::SetCurrent()'
EditorCanvas.o(.text+0x186): In function `EditorCanvas::EditorCanvas[not-in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/usr/local/include/wx-2.6/wx/string.h:237: undefined reference to `wxGLCanvas::~wxGLCanvas [not-in-charge]()'
EditorCanvas.o(.text+0x20a): In function `EditorCanvas::EditorCanvas[in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/usr/local/include/wx-2.6/wx/string.h:325: undefined reference to `wxGLCanvas::wxGLCanvas[not-in-charge](wxWindow*, wxGLCanvas const*, int, wxPoint const&,wxSize const&, long, wxString const&, int*, wxPalette const&)'
EditorCanvas.o(.text+0x237): In function `EditorCanvas::EditorCanvas[in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:44: undefined reference to `wxGLCanvas::SetCurrent()'
EditorCanvas.o(.text+0x2f6): In function `EditorCanvas::EditorCanvas[in-charge](wxView*, wxFrame*, wxPoint const&, wxSize const&)':
/usr/local/include/wx-2.6/wx/string.h:237: undefined reference to `wxGLCanvas::~wxGLCanvas [not-in-charge]()'
EditorCanvas.o(.text+0x501): In function `EditorCanvas::Render()':
/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:122: undefined reference to `wxGLCanvas::SetCurrent()'
EditorCanvas.o(.text+0x540):/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:140: undefined reference to `wxGLCanvas::SwapBuffers()'
EditorCanvas.o(.rodata+0x0): undefined reference to `wxGLCanvas::sm_eventTable'
EditorCanvas.o(.gnu.linkonce.r._ZTV12EditorCanvas+0x8): undefined reference to `wxGLCanvas::GetClassInfo() const'
EditorCanvas.o(.gnu.linkonce.r._ZTV12EditorCanvas+0x1dc):/usr/local/include/wx-2.6/wx/string.h:325: undefined reference to `wxGLCanvas::OnInternalIdle()'
EditorCanvas.o(.gnu.linkonce.t._ZN12EditorCanvasD1Ev+0x13): In function `EditorCanvas::~EditorCanvas [in-charge]()':
/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:27: undefined reference to `wxGLCanvas::~wxGLCanvas [not-in-charge]()'
EditorCanvas.o(.gnu.linkonce.t._ZN12EditorCanvasD0Ev+0x16): In function `EditorCanvas::~EditorCanvas [in-charge deleting]()':
/home/mba/3d_util/MyEditor/src/EditorCanvas.cpp:27: undefined reference to `wxGLCanvas::~wxGLCanvas [not-in-charge]()'
EditorCanvas.o(.gnu.linkonce.r._ZTI12EditorCanvas+0x8): undefined reference to `typeinfo for wxGLCanvas'


Solved: I manually added -lwx_gtk2u_gl-2.6 to the makefiles, which solved the issue.
I then had a problem that the Makefile in bin had reference to the datafiles which it then tried to compiled, I removed these references in the makefile.

And now it works .... thanks Scriptkid for a really nice tool!

Kind regards
Martin[/b]

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Tue Jul 18, 2006 13:21

one small issue

This had me baffled for quite some time I couldn't load any of my old layouts made with the windows version of the editor. When it finally dawned on me: "Its the decimal separator used in the xml files that causes the the editor to freeze in linux"
I had the impression that the period (.) was generally used as decimal separator throughout the gui system, but I can see that the xml output from the cross-platform version of the editor produces commas as separators. Is this an error or is it a conscious choice?

kind regards
Martin

Xirnohn
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Thu Jun 22, 2006 13:32
Location: Hungary, Debrecen
Contact:

Postby Xirnohn » Tue Jul 18, 2006 19:29

Xirnohn wrote:What i changed:
-Added BackgroundEnabled property. Usefull for StaticText.
-Added Vertical/Horizontal Window alignment property, you can align it relaitve to the parent(i think you can use this from the Edit/Align menu. There are more options).
-Added Vertical/Horizontal Text alignment property. You can align your text in a StaticText.
-Added Image property. You can edit an StaticImage's Image property. I did it couse i hate when i save the layout and its delete the image property.
-Added InheritsTooltipText property.
-Added Tooltip property. Now you can edit window's tooltips.


New additions coming:
-Color editing with general property editor as text, or shift+clicking on a resize point with color dialog(upper left resize point: TextColor's tl, Upper right resize point: TextColor's tr, etc). If you shif+click on a middle resize point your choice applied to the all color rect. All the four colour visible in the color dialog as custom color, so you can swap colors easily.
-Now you can edit image vert/horz alignment, like left, top, right, bottom, streched, tiled alignment.

Just need some code cleaning, documenting and i upload it.

Xir

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Jul 18, 2006 19:35

Hi Xirnohn,

thanks in advance for your contributions. I have started to apply patches, so your's is definately going to be looked in soon!

:-)

Xirnohn
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Thu Jun 22, 2006 13:32
Location: Hungary, Debrecen
Contact:

Postby Xirnohn » Tue Jul 18, 2006 19:42

scriptkid wrote:Hi Xirnohn,

thanks in advance for your contributions. I have started to apply patches, so your's is definately going to be looked in soon!

:-)


Thx, then i start hurry. :D

Edit: Bin(with dlls) and source now available.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Jul 19, 2006 08:29

Hi mba,

can you give an example about the difference between the usage of "." and "," in xml? So i can have a try myself.

Besides, about the makefile in the bin directory: did you (re)move the datafiles directory before compiling?

Thanks!

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Thu Jul 20, 2006 07:00

hi scriptkid

heres an example of a layout generated with the cross-platform version of the layout editor

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<GUILayout>
<Window Type="DefaultWindow" Name="Root" >
<Property Name="Alpha" Value="1,000000" />
<Property Name="AutoRepeatDelay" Value="0,300000" />
<Property Name="AutoRepeatRate" Value="0,060000" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedAreaRect" Value="{{0,000000,0,000000},{0,000000,0,000000},{1,000000,0,000000},{1,000000,0,000000}}" />
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}" />
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}" />
<Window Type="TaharezLook/FrameWindow" Name="Nameless" >
<Property Name="Alpha" Value="1,000000" />
<Property Name="AutoRepeatDelay" Value="0,300000" />
<Property Name="AutoRepeatRate" Value="0,060000" />
<Property Name="CaptionColour" Value="00FFFFFF" />
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor" />
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget" />
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor" />
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor" />
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor" />
<Property Name="SizingBorderThickness" Value="8,000000" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="TitlebarFont" Value="Commonwealth-10" />
<Property Name="UnifiedAreaRect" Value="{{0,100000,0,000000},{0,100000,0,000000},{0,350000,0,000000},{0,350000,0,000000}}" />
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}" />
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}" />
</Window>
</Window>
</GUILayout>


notice that comma's are used for every decimal separator, if I had exported with the windows version the separators would have been periods.

Hope this clarifies my issue.

Besides, about the makefile in the bin directory: did you (re)move the datafiles directory before compiling?


Of course! silly me...

...but I still had to manually add -lwx_gtk2u_gl-2.6 to the linker flags



Kind regards
Martin

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Jul 20, 2006 09:33

Hi mba,

the "," vs. "." is an interesting one. It's probably the result of localization setting for wxWidgets. The editor uses a 'wx' method to convert a string into a double when updating the Udim properties.

To verify (i did that myself): open a Sample CEGUI layout which has "." as seperators, and just change the position of one window. Save the file and look at it. It should show "," for your modified windows, and "." for the untouched ones, right?

I will look into it. Thanks for the heads-up! :-)

[EDIT] I have added the bug to mantis: http://www.cegui.org.uk/mantis/view.php?id=90 [/EDIT]

User avatar
mba
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Tue Oct 11, 2005 11:54
Location: Denmark

Postby mba » Fri Jul 21, 2006 11:38

yes you are probably right, that wxWidgets has been localized to Denmark when I build it. I can not try your suggestion as the editor stops responding when trying to load layouts with (.) separators.

Do you think it would solve the issue if I set my locale to US before configuring and building wxWidgets

mba

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Aug 03, 2006 17:31

Hey mba,

now i am pretty much stuck on the XML issue. It has nothing to do with wxWidgets btw, sorry for suggesting that. When writing xml, that string value is generated in CEGUI as follows:

Code: Select all

String PropertyHelper::urectToString(const URect& val)
{
   using namespace std;

   char buff[512];
   sprintf(
      buff,
      "{{%f,%f},{%f,%f},{%f,%f},{%f,%f}}",
      val.d_min.d_x.d_scale,val.d_min.d_x.d_offset,
      val.d_min.d_y.d_scale,val.d_min.d_y.d_offset,
      val.d_max.d_x.d_scale,val.d_max.d_x.d_offset,
      val.d_max.d_y.d_scale,val.d_max.d_y.d_offset
   );

   return String((utf8*)buff);
}


I can only guess that the printf familily does localization. But that's hard to believe since i only found some very specific topics on google, and they are not even for sprintf but rather printf:

http://sources.redhat.com/ml/bug-glibc/ ... 00301.html
http://caml.inria.fr/pub/old_caml_site/ ... /1857.html
...

User avatar
Dalfy
CEGUI Team (Retired)
Posts: 130
Joined: Tue Oct 11, 2005 16:13
Location: Paris, FRANCE
Contact:

Postby Dalfy » Fri Aug 04, 2006 08:55

Scriptkid have a look at setlocale which is used to set the localization used in the export. setlocale is the C version of a similar function in C++. There is example on how to use it correctly in the code of the Propertyhelper I think. I will have a look at this issue later today. I am adding an entry to CEGUI tracker.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Fri Aug 04, 2006 14:02

In 0.5:

Code: Select all

setlocale(LC_NUMERIC, "C");


is the first line of the constructor of System, to avoid this issue.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Fri Aug 04, 2006 14:08

mba: try setting your "LANG" environment variable to "C" before running the editor


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 9 guests