Support for wxWidgets 2.8.0

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
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Support for wxWidgets 2.8.0

Postby gcarlton » Wed Dec 13, 2006 02:10

I got the latest CELayoutEditor and there are two changes that need to be made to get it to work with wxWidgets 2.8.0. I've made up a patch, but I can't find the appropriate area to submit it.

Alternatively, I may be able to dig up SVN access since I think I had it at one point. I've got a few things I'd like to change but I don't just want to unilaterally commit them in! For instance, I've got a few ideas about positioning and UDims.

Anyway, here's the patch:
Index: inc/EditorCanvas.h
===================================================================
--- inc/EditorCanvas.h (revision 1460)
+++ inc/EditorCanvas.h (working copy)
@@ -22,6 +22,7 @@
#define _EDITOR_CANVAS_H_

#include "EditorDocument.h"
+#include "wx/glcanvas.h"

/** Provides OpenGL output. This canvas is the actual visible part of our "view"
* on the "document". The CEGUI system must be initialized when rendering, which is verified.
Index: src/DialogAddWindow.cpp
===================================================================
--- src/DialogAddWindow.cpp (revision 1460)
+++ src/DialogAddWindow.cpp (working copy)
@@ -158,7 +158,11 @@
}
// If only one widget, select it. This is convenient when heavy filtering applies, for example
// when only a MenuItem may be added.
- long cookie;
+ #if wxCHECK_VERSION(2,8,0)
+ wxTreeItemIdValue cookie;
+ #else
+ long cookie;
+ #endif
wxTreeItemId firstChild;
if (lookItem.IsOk() && m_widgetTree->GetChildrenCount(lookItem) == 1)
{
@@ -180,7 +184,11 @@
{
wxTreeItemId node = event.GetItem();
// If the element has no children, it is a "real" element, and not a node.
- long cookie;
+ #if wxCHECK_VERSION(2,8,0)
+ wxTreeItemIdValue cookie;
+ #else
+ long cookie;
+ #endif
wxTreeItemId child = m_widgetTree->GetFirstChild(node, cookie);
if (!child.IsOk())
{ // We have reach an end, traverse back and build up the name.
@@ -269,14 +277,25 @@
m_windowName = m_editName->GetValue();
// We already got the type in the tree handler
// Pass to subclass
+#if wxCHECK_VERSION(2,8,0)
+ // new way of returning
+ AcceptAndClose();
+#else
wxDialog::OnOK(event);
// Hide to pass control back to caller
Show(false);
+#endif
+
}

//--------------------------------------------------------------------------------------
void DialogAddWindow::OnCancel( wxCommandEvent& event )
{
+#if wxCHECK_VERSION(2,8,0)
+ // this is no longer supported
+ EndDialog(wxID_CANCEL);
+#else
wxDialog::OnCancel(event);
Show(false);
+#endif
}

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 Dec 13, 2006 09:12

[EDIT] Applied in SVN. [/EDIT]
Hi gcarlton,

thanks for the patch! I wil apply it :-)

For a next patch, you may also add a ticket to the mantis tracker and attach the patch as a file. Or send an email to me directly.


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 0 guests