diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 8cf86ecc2..985c56a10 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -135,6 +135,10 @@ IF(WITH_NEL) FIND_PACKAGE(CppTest) ENDIF(WITH_NEL_TESTS) + IF(WITH_GUI) + FIND_PACKAGE(Libwww REQUIRED) + ENDIF(WITH_GUI) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_SUBDIRECTORY(nel) diff --git a/code/nel/include/nel/gui/ctrl_button.h b/code/nel/include/nel/gui/ctrl_button.h index cfd842ded..02b827329 100644 --- a/code/nel/include/nel/gui/ctrl_button.h +++ b/code/nel/include/nel/gui/ctrl_button.h @@ -35,6 +35,7 @@ namespace NLGUI class CCtrlButton : public CCtrlBaseButton { public: + DECLARE_UI_CLASS( CCtrlButton ) /// Constructor CCtrlButton(const TCtorParam ¶m) : CCtrlBaseButton(param) diff --git a/code/nel/include/nel/gui/ctrl_col_pick.h b/code/nel/include/nel/gui/ctrl_col_pick.h index 62ac8522f..dd779e837 100644 --- a/code/nel/include/nel/gui/ctrl_col_pick.h +++ b/code/nel/include/nel/gui/ctrl_col_pick.h @@ -36,6 +36,7 @@ namespace NLGUI { public: + DECLARE_UI_CLASS( CCtrlColPick ) CCtrlColPick(const TCtorParam ¶m); ~CCtrlColPick(); diff --git a/code/nel/include/nel/gui/ctrl_polygon.h b/code/nel/include/nel/gui/ctrl_polygon.h index 8fa3768b7..cef57dd3c 100644 --- a/code/nel/include/nel/gui/ctrl_polygon.h +++ b/code/nel/include/nel/gui/ctrl_polygon.h @@ -43,7 +43,8 @@ namespace NLGUI class CCtrlPolygon : public CCtrlBase { public: - CCtrlPolygon(); + DECLARE_UI_CLASS( CCtrlPolygon ) + CCtrlPolygon( const TCtorParam ¶m ); virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); } virtual void updateCoords(); virtual void draw(); diff --git a/code/nel/include/nel/gui/ctrl_quad.h b/code/nel/include/nel/gui/ctrl_quad.h index 9a246cdb2..08c89675e 100644 --- a/code/nel/include/nel/gui/ctrl_quad.h +++ b/code/nel/include/nel/gui/ctrl_quad.h @@ -38,10 +38,12 @@ namespace NLGUI class CCtrlQuad : public CCtrlBase { public: + DECLARE_UI_CLASS( CCtrlQuad ) + enum TWrapMode { Repeat = 0, Clamp, CustomUVs, WrapModeCount }; - CCtrlQuad(); + CCtrlQuad( const TCtorParam ¶m ); // from CInterfaceElement bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup); diff --git a/code/nel/include/nel/gui/ctrl_sheet_selection.h b/code/nel/include/nel/gui/ctrl_sheet_selection.h index 95960d979..36d1c8336 100644 --- a/code/nel/include/nel/gui/ctrl_sheet_selection.h +++ b/code/nel/include/nel/gui/ctrl_sheet_selection.h @@ -54,7 +54,7 @@ namespace NLGUI */ class CCtrlSheetSelection { - public: + public: // Add a group, and returns its index, or -1 if already created. sint addGroup(const std::string &name); // Get a group by its name (must exist) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 43fa16b89..2df1dee5d 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -38,6 +38,7 @@ namespace NLGUI class CCtrlTextButton : public CCtrlBaseButton { public: + DECLARE_UI_CLASS( CCtrlTextButton ) /// Constructor CCtrlTextButton(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h index 357a4af40..75208b1e3 100644 --- a/code/nel/include/nel/gui/dbgroup_combo_box.h +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -39,6 +39,7 @@ namespace NLGUI class CDBGroupComboBox : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CDBGroupComboBox ) /// Constructor CDBGroupComboBox(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbgroup_select_number.h b/code/nel/include/nel/gui/dbgroup_select_number.h index 900fc5081..a5ef692ff 100644 --- a/code/nel/include/nel/gui/dbgroup_select_number.h +++ b/code/nel/include/nel/gui/dbgroup_select_number.h @@ -39,6 +39,7 @@ namespace NLGUI class CDBGroupSelectNumber : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CDBGroupSelectNumber ) /// Constructor CDBGroupSelectNumber(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbview_bar.h b/code/nel/include/nel/gui/dbview_bar.h index af97c87e7..d4a3de340 100644 --- a/code/nel/include/nel/gui/dbview_bar.h +++ b/code/nel/include/nel/gui/dbview_bar.h @@ -37,6 +37,7 @@ namespace NLGUI public: enum TViewBar { ViewBar_UltraMini, ViewBar_Mini, ViewBar_Normal, ViewBar_MiniThick }; public: + DECLARE_UI_CLASS( CDBViewBar ) /// Constructor CDBViewBar(const TCtorParam ¶m) diff --git a/code/nel/include/nel/gui/dbview_bar3.h b/code/nel/include/nel/gui/dbview_bar3.h index 5ad165008..785cb165b 100644 --- a/code/nel/include/nel/gui/dbview_bar3.h +++ b/code/nel/include/nel/gui/dbview_bar3.h @@ -34,6 +34,7 @@ namespace NLGUI class CDBViewBar3 : public CViewBitmap { public: + DECLARE_UI_CLASS( CDBViewBar3 ) /// Constructor CDBViewBar3(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbview_digit.h b/code/nel/include/nel/gui/dbview_digit.h index d4196cb8d..33446b2de 100644 --- a/code/nel/include/nel/gui/dbview_digit.h +++ b/code/nel/include/nel/gui/dbview_digit.h @@ -34,6 +34,7 @@ namespace NLGUI class CDBViewDigit : public CViewBase { public: + DECLARE_UI_CLASS( CDBViewDigit ) /// Constructor CDBViewDigit(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbview_number.h b/code/nel/include/nel/gui/dbview_number.h index 6f2bd2f07..2c76a255d 100644 --- a/code/nel/include/nel/gui/dbview_number.h +++ b/code/nel/include/nel/gui/dbview_number.h @@ -35,6 +35,7 @@ namespace NLGUI class CDBViewNumber : public CViewText { public: + DECLARE_UI_CLASS( CDBViewNumber ) /// Constructor CDBViewNumber(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/dbview_quantity.h b/code/nel/include/nel/gui/dbview_quantity.h index 7899a7558..67c4e57ba 100644 --- a/code/nel/include/nel/gui/dbview_quantity.h +++ b/code/nel/include/nel/gui/dbview_quantity.h @@ -35,6 +35,7 @@ namespace NLGUI class CDBViewQuantity : public CViewText { public: + DECLARE_UI_CLASS( CDBViewQuantity ) /// Constructor CDBViewQuantity(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/group_container.h b/code/nel/include/nel/gui/group_container.h index fc2729d46..452674aa1 100644 --- a/code/nel/include/nel/gui/group_container.h +++ b/code/nel/include/nel/gui/group_container.h @@ -48,6 +48,7 @@ namespace NLGUI { public: + DECLARE_UI_CLASS( CCtrlResizer ) CCtrlResizer(const TCtorParam ¶m); virtual void draw (); @@ -98,8 +99,9 @@ namespace NLGUI class CCtrlMover : public CCtrlBase { public: + DECLARE_UI_CLASS( CCtrlMover ) - CCtrlMover(const TCtorParam ¶m, bool canMove, bool canOpen); + CCtrlMover(const TCtorParam ¶m, bool canMove = true, bool canOpen = true ); ~CCtrlMover(); virtual void draw (); virtual bool handleEvent (const NLGUI::CEventDescriptor &event); @@ -163,6 +165,7 @@ namespace NLGUI virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children) = 0; }; public: + DECLARE_UI_CLASS( CGroupContainer ) CGroupContainer(const TCtorParam ¶m); ~CGroupContainer(); diff --git a/code/nel/include/nel/gui/group_editbox.h b/code/nel/include/nel/gui/group_editbox.h index b93f157c5..7ea2ab529 100644 --- a/code/nel/include/nel/gui/group_editbox.h +++ b/code/nel/include/nel/gui/group_editbox.h @@ -32,6 +32,7 @@ namespace NLGUI class CGroupEditBox : public CGroupEditBoxBase { public: + DECLARE_UI_CLASS( CGroupEditBox ) class IComboKeyHandler { @@ -42,7 +43,6 @@ namespace NLGUI enum TEntryType { Text, Integer, PositiveInteger, Float, PositiveFloat, Alpha, AlphaNum, AlphaNumSpace, Password, Filename, PlayerName }; // the type of entry this edit bot can deal with - DECLARE_UI_CLASS( CGroupEditBox ) /// Constructor CGroupEditBox(const TCtorParam ¶m); /// Dtor diff --git a/code/nel/include/nel/gui/group_frame.h b/code/nel/include/nel/gui/group_frame.h index 47c98a476..3d350b4d5 100644 --- a/code/nel/include/nel/gui/group_frame.h +++ b/code/nel/include/nel/gui/group_frame.h @@ -36,6 +36,7 @@ namespace NLGUI class CGroupFrame : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupFrame ) /// Constructor CGroupFrame(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/group_header.h b/code/nel/include/nel/gui/group_header.h index 9fd2a1a5b..ab6c94c35 100644 --- a/code/nel/include/nel/gui/group_header.h +++ b/code/nel/include/nel/gui/group_header.h @@ -35,6 +35,8 @@ namespace NLGUI class CGroupHeader : public CGroupList { public: + DECLARE_UI_CLASS( CGroupHeader ) + REFLECT_EXPORT_START(CGroupHeader, CGroupList) REFLECT_LUA_METHOD("enlargeColumns", luaEnlargeColumns); REFLECT_LUA_METHOD("resizeColumnsAndContainer", luaResizeColumnsAndContainer); @@ -67,6 +69,8 @@ namespace NLGUI class CGroupHeaderEntry : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupHeaderEntry ) + CGroupHeaderEntry(const TCtorParam ¶m); xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; // from CInterfaceGroup diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 2a0c22113..3f5526197 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -31,7 +31,7 @@ typedef std::map TStyle; extern "C" { -#include "libwww/WWWInit.h" +#include "WWWInit.h" } namespace NLGUI @@ -54,6 +54,8 @@ namespace NLGUI class CGroupHTML : public CGroupScrollText { public: + DECLARE_UI_CLASS( CGroupHTML ) + friend void TextAdd (struct _HText *me, const char * buf, int len); friend void TextBeginElement (_HText *me, int element_number, const BOOL *present, const char ** value); friend void TextEndElement (_HText *me, int element_number); @@ -658,6 +660,8 @@ namespace NLGUI class CGroupHTMLInputOffset : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupHTMLInputOffset ) + sint32 Offset; CGroupHTMLInputOffset(const TCtorParam ¶m); xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; diff --git a/code/nel/include/nel/gui/group_list.h b/code/nel/include/nel/gui/group_list.h index 709ae78e1..a86950d3e 100644 --- a/code/nel/include/nel/gui/group_list.h +++ b/code/nel/include/nel/gui/group_list.h @@ -30,6 +30,8 @@ namespace NLGUI class CGroupList : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupList ) + enum EAlign { Bottom = 0, diff --git a/code/nel/include/nel/gui/group_menu.h b/code/nel/include/nel/gui/group_menu.h index 65c408d1d..56b9fb0e3 100644 --- a/code/nel/include/nel/gui/group_menu.h +++ b/code/nel/include/nel/gui/group_menu.h @@ -42,6 +42,7 @@ namespace NLGUI class CViewTextMenu : public CViewText { public: + DECLARE_UI_CLASS( CViewTextMenu ) CViewTextMenu(const TCtorParam ¶m) : CViewText(param) { @@ -97,6 +98,7 @@ namespace NLGUI class CGroupSubMenu : public CGroupSubMenuBase { public: + DECLARE_UI_CLASS( CGroupSubMenu ) CGroupSubMenu(const TCtorParam ¶m); virtual ~CGroupSubMenu(); @@ -290,6 +292,7 @@ namespace NLGUI { public: + DECLARE_UI_CLASS( CGroupMenu ) CGroupMenu(const TCtorParam ¶m); virtual ~CGroupMenu(); diff --git a/code/nel/include/nel/gui/group_modal.h b/code/nel/include/nel/gui/group_modal.h index a3398fbc4..c177d6f0c 100644 --- a/code/nel/include/nel/gui/group_modal.h +++ b/code/nel/include/nel/gui/group_modal.h @@ -35,6 +35,8 @@ namespace NLGUI class CGroupModal : public CGroupFrame { public: + DECLARE_UI_CLASS( CGroupModal ) + bool SpawnOnMousePos : 1; bool ExitClickOut : 1; bool ExitClickL : 1; diff --git a/code/nel/include/nel/gui/group_paragraph.h b/code/nel/include/nel/gui/group_paragraph.h index 62e47cba8..b8792ece1 100644 --- a/code/nel/include/nel/gui/group_paragraph.h +++ b/code/nel/include/nel/gui/group_paragraph.h @@ -31,6 +31,8 @@ namespace NLGUI class CCtrlLink : public CCtrlButton { public: + DECLARE_UI_CLASS( CCtrlLink ) + CCtrlLink (const TCtorParam ¶m) : CCtrlButton(param) {} }; @@ -39,6 +41,8 @@ namespace NLGUI class CGroupParagraph : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupParagraph ) + enum EAlign { Bottom = 0, diff --git a/code/nel/include/nel/gui/group_scrolltext.h b/code/nel/include/nel/gui/group_scrolltext.h index 2a6a6eca4..7c5c58f22 100644 --- a/code/nel/include/nel/gui/group_scrolltext.h +++ b/code/nel/include/nel/gui/group_scrolltext.h @@ -39,6 +39,8 @@ namespace NLGUI class CGroupScrollText : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupScrollText ) + /// Constructor CGroupScrollText(const TCtorParam ¶m); ~CGroupScrollText(); diff --git a/code/nel/include/nel/gui/group_tab.h b/code/nel/include/nel/gui/group_tab.h index 44772656e..ee68acbc8 100644 --- a/code/nel/include/nel/gui/group_tab.h +++ b/code/nel/include/nel/gui/group_tab.h @@ -43,6 +43,7 @@ namespace NLGUI class CGroupTab : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupTab ) /// Constructor CGroupTab(const TCtorParam ¶m); @@ -153,6 +154,7 @@ namespace NLGUI class CCtrlTabButton : public CCtrlTextButton { public: + DECLARE_UI_CLASS( CCtrlTabButton ) CCtrlTabButton(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/group_table.h b/code/nel/include/nel/gui/group_table.h index 63e58283f..60d3d9e63 100644 --- a/code/nel/include/nel/gui/group_table.h +++ b/code/nel/include/nel/gui/group_table.h @@ -36,6 +36,8 @@ namespace NLGUI { friend class CGroupTable; public: + DECLARE_UI_CLASS( CGroupCell ) + CGroupCell(const TCtorParam ¶m); enum TAlign @@ -121,6 +123,7 @@ namespace NLGUI class CGroupTable : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CGroupTable ) ///constructor CGroupTable(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/group_tree.h b/code/nel/include/nel/gui/group_tree.h index d5f2f1a43..1b64122f3 100644 --- a/code/nel/include/nel/gui/group_tree.h +++ b/code/nel/include/nel/gui/group_tree.h @@ -33,6 +33,7 @@ namespace NLGUI { public: + DECLARE_UI_CLASS( CGroupTree ) struct SNode; // optional callback that is called when a node has been added diff --git a/code/nel/include/nel/gui/group_wheel.h b/code/nel/include/nel/gui/group_wheel.h index 7778a2753..c61b92dfd 100644 --- a/code/nel/include/nel/gui/group_wheel.h +++ b/code/nel/include/nel/gui/group_wheel.h @@ -28,6 +28,8 @@ namespace NLGUI class CInterfaceGroupWheel : public CInterfaceGroup { public: + DECLARE_UI_CLASS( CInterfaceGroupWheel ) + /// Constructor CInterfaceGroupWheel(const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/libwww.h b/code/nel/include/nel/gui/libwww.h index 3983e5777..8da217382 100644 --- a/code/nel/include/nel/gui/libwww.h +++ b/code/nel/include/nel/gui/libwww.h @@ -22,7 +22,7 @@ extern "C" { -#include "libwww/WWWInit.h" +#include "WWWInit.h" } namespace NLGUI diff --git a/code/nel/include/nel/gui/libwww_nel_stream.h b/code/nel/include/nel/gui/libwww_nel_stream.h index 4e1bd4e01..4dbadf1b8 100644 --- a/code/nel/include/nel/gui/libwww_nel_stream.h +++ b/code/nel/include/nel/gui/libwww_nel_stream.h @@ -20,7 +20,7 @@ #define LIBWWW_NEL_STREAM_H -#include "libwww/HTProt.h" +#include "HTProt.h" extern "C" HTProtCallback HTLoadNeLFile; extern "C" PUBLIC HTInputStream * HTNeLReader_new (HTHost * host, HTChannel * ch, void * param, int mode); diff --git a/code/nel/include/nel/gui/view_bitmap_combo.h b/code/nel/include/nel/gui/view_bitmap_combo.h index edfc8528b..f8329303f 100644 --- a/code/nel/include/nel/gui/view_bitmap_combo.h +++ b/code/nel/include/nel/gui/view_bitmap_combo.h @@ -99,6 +99,8 @@ namespace NLGUI class CViewBitmapCombo : public CViewBase, public NLMISC::ICDBNode::IPropertyObserver { public: + DECLARE_UI_CLASS( CViewBitmapCombo ) + typedef std::vector TIdArray; typedef std::vector TStringArray; typedef std::vector TColorArray; diff --git a/code/nel/include/nel/gui/view_link.h b/code/nel/include/nel/gui/view_link.h index 50dbb42c9..1cc40a883 100644 --- a/code/nel/include/nel/gui/view_link.h +++ b/code/nel/include/nel/gui/view_link.h @@ -36,6 +36,7 @@ namespace NLGUI class CViewLink : public CViewText { public: + DECLARE_UI_CLASS( CViewLink ) // Default constructor CViewLink (const TCtorParam ¶m); diff --git a/code/nel/include/nel/gui/view_polygon.h b/code/nel/include/nel/gui/view_polygon.h index d995254af..f45bcf305 100644 --- a/code/nel/include/nel/gui/view_polygon.h +++ b/code/nel/include/nel/gui/view_polygon.h @@ -36,7 +36,9 @@ namespace NLGUI class CViewPolygon : public CViewBase { public: - CViewPolygon(); + DECLARE_UI_CLASS( CViewPolygon ) + + CViewPolygon( const TCtorParam ¶m ); virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); } virtual void updateCoords(); virtual void draw(); diff --git a/code/nel/include/nel/gui/view_quad.h b/code/nel/include/nel/gui/view_quad.h index 254e6d272..5c9ea7485 100644 --- a/code/nel/include/nel/gui/view_quad.h +++ b/code/nel/include/nel/gui/view_quad.h @@ -36,10 +36,12 @@ namespace NLGUI class CViewQuad : public CViewBase { public: + DECLARE_UI_CLASS( CViewQuad ) + enum TWrapMode { Repeat = 0, Clamp, WrapModeCount }; - CViewQuad(); + CViewQuad( const TCtorParam ¶m ); // from CInterfaceElement bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup); diff --git a/code/nel/include/nel/gui/view_text_formated.h b/code/nel/include/nel/gui/view_text_formated.h index 245a2359d..d2271599d 100644 --- a/code/nel/include/nel/gui/view_text_formated.h +++ b/code/nel/include/nel/gui/view_text_formated.h @@ -35,6 +35,7 @@ namespace NLGUI class CViewTextFormated : public CViewText { public: + DECLARE_UI_CLASS( CViewTextFormated ) /// Interface for classes which can format the text for this view. class IViewTextFormatter diff --git a/code/nel/include/nel/gui/view_text_id.h b/code/nel/include/nel/gui/view_text_id.h index 43ce3b6e0..ac0477254 100644 --- a/code/nel/include/nel/gui/view_text_id.h +++ b/code/nel/include/nel/gui/view_text_id.h @@ -48,6 +48,7 @@ namespace NLGUI class CViewTextID : public CViewText { public: + DECLARE_UI_CLASS( CViewTextID ) /// Interface for classes which can provide text to CViewTextId class IViewTextProvider diff --git a/code/nel/include/nel/gui/view_text_id_formated.h b/code/nel/include/nel/gui/view_text_id_formated.h index 4b0532bd6..278c33338 100644 --- a/code/nel/include/nel/gui/view_text_id_formated.h +++ b/code/nel/include/nel/gui/view_text_id_formated.h @@ -36,6 +36,8 @@ namespace NLGUI class CViewTextIDFormated : public CViewTextID { public: + DECLARE_UI_CLASS( CViewTextIDFormated ) + CViewTextIDFormated(const TCtorParam ¶m) : CViewTextID(param) {} diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt index 1db5ed186..187f8e008 100644 --- a/code/nel/src/gui/CMakeLists.txt +++ b/code/nel/src/gui/CMakeLists.txt @@ -12,7 +12,7 @@ SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") NL_ADD_RUNTIME_FLAGS(nelgui) -INCLUDE_DIRECTORIES( ${LUA_INCLUDE_DIR} ) +INCLUDE_DIRECTORIES( ${LUA_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR}) NL_ADD_LIB_SUFFIX(nelgui) diff --git a/code/nel/src/gui/ctrl_polygon.cpp b/code/nel/src/gui/ctrl_polygon.cpp index b55bf7ddf..94615de75 100644 --- a/code/nel/src/gui/ctrl_polygon.cpp +++ b/code/nel/src/gui/ctrl_polygon.cpp @@ -25,7 +25,7 @@ namespace NLGUI { // ********************************************************************************* - CCtrlPolygon::CCtrlPolygon() : CCtrlBase(TCtorParam()) + CCtrlPolygon::CCtrlPolygon( const TCtorParam ¶m ) : CCtrlBase( param ) { // Construct _Color = CRGBA::White; diff --git a/code/nel/src/gui/ctrl_quad.cpp b/code/nel/src/gui/ctrl_quad.cpp index 7310c4138..26829b19e 100644 --- a/code/nel/src/gui/ctrl_quad.cpp +++ b/code/nel/src/gui/ctrl_quad.cpp @@ -25,7 +25,7 @@ namespace NLGUI { // ********************************************************************************* - CCtrlQuad::CCtrlQuad() : CCtrlBase(TCtorParam()), _Color(CRGBA::White), + CCtrlQuad::CCtrlQuad( const TCtorParam ¶m ) : CCtrlBase( param ), _Color(CRGBA::White), _Additif(false), _Filtered(true), _UMin(0.f), diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index f602b148e..67134a5f6 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -23,9 +23,9 @@ // LibWWW extern "C" { -#include "libwww/WWWLib.h" /* Global Library Include file */ -#include "libwww/WWWApp.h" -#include "libwww/WWWInit.h" +#include "WWWLib.h" /* Global Library Include file */ +#include "WWWApp.h" +#include "WWWInit.h" } #include diff --git a/code/nel/src/gui/libwww.cpp b/code/nel/src/gui/libwww.cpp index ccb97af6f..167816e3c 100644 --- a/code/nel/src/gui/libwww.cpp +++ b/code/nel/src/gui/libwww.cpp @@ -21,9 +21,9 @@ // LibWWW extern "C" { -#include "libwww/WWWLib.h" /* Global Library Include file */ -#include "libwww/WWWApp.h" -#include "libwww/WWWInit.h" +#include "WWWLib.h" /* Global Library Include file */ +#include "WWWApp.h" +#include "WWWInit.h" } #include "nel/gui/group_html.h" diff --git a/code/nel/src/gui/libwww_nel_stream.cpp b/code/nel/src/gui/libwww_nel_stream.cpp index 216f091cc..740078a99 100644 --- a/code/nel/src/gui/libwww_nel_stream.cpp +++ b/code/nel/src/gui/libwww_nel_stream.cpp @@ -21,16 +21,16 @@ extern "C" { /* Library Includes */ -#include "libwww/wwwsys.h" -#include "libwww/WWWUtil.h" -#include "libwww/WWWCore.h" -#include "libwww/WWWDir.h" -#include "libwww/WWWTrans.h" -#include "libwww/HTReqMan.h" -#include "libwww/HTBind.h" -#include "libwww/HTMulti.h" -#include "libwww/HTNetMan.h" -#include "libwww/HTChannl.h" +#include "wwwsys.h" +#include "WWWUtil.h" +#include "WWWCore.h" +#include "WWWDir.h" +#include "WWWTrans.h" +#include "HTReqMan.h" +#include "HTBind.h" +#include "HTMulti.h" +#include "HTNetMan.h" +#include "HTChannl.h" #include "nel/gui/libwww_nel_stream.h" /* Implemented here */ } diff --git a/code/nel/src/gui/view_polygon.cpp b/code/nel/src/gui/view_polygon.cpp index 9c6d9764f..573c542fd 100644 --- a/code/nel/src/gui/view_polygon.cpp +++ b/code/nel/src/gui/view_polygon.cpp @@ -25,7 +25,7 @@ namespace NLGUI { // ********************************************************************************* - CViewPolygon::CViewPolygon() : CViewBase(TCtorParam()) + CViewPolygon::CViewPolygon( const TCtorParam ¶m ) : CViewBase( param ) { // Construct _Color = CRGBA::White; diff --git a/code/nel/src/gui/view_quad.cpp b/code/nel/src/gui/view_quad.cpp index 0def5c4dc..3551ad689 100644 --- a/code/nel/src/gui/view_quad.cpp +++ b/code/nel/src/gui/view_quad.cpp @@ -24,7 +24,7 @@ namespace NLGUI { // ********************************************************************************* - CViewQuad::CViewQuad() : CViewBase(TCtorParam()), _Color(CRGBA::White), + CViewQuad::CViewQuad( const TCtorParam ¶m ) : CViewBase( param ), _Color(CRGBA::White), _Additif(false), _UMin(0.f), _UMax(1.f), diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index 0e56ac8b9..0a5d8533d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -33,6 +33,7 @@ FIND_PACKAGE(Libwww REQUIRED) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} + ${LUA_INCLUDE_DIR} ${QT_INCLUDES}) FILE(GLOB SRC *.cpp *.h) @@ -108,6 +109,7 @@ TARGET_LINK_LIBRARIES( ${LUABIND_LIBRARIES} ${CURL_LIBRARIES} ${LIBWWW_LIBRARIES} + ${LIBXML2_LIBRARIES} ) NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor") diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp index b8ae94ea0..c765398ea 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp @@ -50,8 +50,8 @@ namespace GUIEditor void ActionEditor::onOkButtonClicked() { - currentAction->Parameters = paramsEdit->text().toStdString(); - currentAction->Conditions = condEdit->text().toStdString(); + currentAction->Parameters = paramsEdit->text().toUtf8().constData(); + currentAction->Conditions = condEdit->text().toUtf8().constData(); hide(); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index ec419b87b..5a0aff4de 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -148,7 +148,8 @@ namespace GUIEditor projectParser.clear(); - if( !projectParser.parseProjectFile( fileName.toStdString() ) ) + std::string projectFileName = fileName.toUtf8().constData(); + if( !projectParser.parseProjectFile( projectFileName ) ) { QMessageBox::critical( this, tr( "Error parsing project file" ), @@ -185,7 +186,7 @@ namespace GUIEditor return; CProjectFileSerializer serializer; - serializer.setFile( currentProjectFile.toStdString() ); + serializer.setFile( currentProjectFile.toUtf8().constData() ); if( !serializer.serialize( projectFiles ) ) { QMessageBox::critical( this, @@ -220,7 +221,7 @@ namespace GUIEditor dir + "/" + projectFiles.projectName.c_str() + ".xml"; CProjectFileSerializer serializer; - serializer.setFile( newFile.toStdString() ); + serializer.setFile( newFile.toUtf8().constData() ); if( !serializer.serialize( projectFiles ) ) { QMessageBox::critical( this, @@ -230,7 +231,7 @@ namespace GUIEditor } std::string guiFile = - dir.toStdString() + "/" + "ui_" + projectFiles.projectName + ".xml"; + std::string( dir.toUtf8().constData() ) + "/" + "ui_" + projectFiles.projectName + ".xml"; WidgetSerializer widgetSerializer; widgetSerializer.setFile( guiFile ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp index 8f7f7e38f..c57a6cd09 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp @@ -78,11 +78,11 @@ namespace GUIEditor if( !parser->getLinkData( currentLinkId, data ) ) return; - data.expr = expressionEdit->toPlainText().toStdString(); - data.target = targetEdit->text().toStdString(); - data.action = ahEdit->text().toStdString(); - data.params = ahParamEdit->text().toStdString(); - data.cond = condEdit->text().toStdString(); + data.expr = expressionEdit->toPlainText().toUtf8().constData(); + data.target = targetEdit->text().toUtf8().constData(); + data.action = ahEdit->text().toUtf8().constData(); + data.params = ahParamEdit->text().toUtf8().constData(); + data.cond = condEdit->text().toUtf8().constData(); parser->updateLinkData( data.id, data ); Q_EMIT okClicked(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp index 176e3e149..533472da4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp @@ -88,7 +88,7 @@ namespace GUIEditor &ok ); if( ok ) { - if( CWidgetManager::getInstance()->getElementFromId( parent.toStdString() ) == NULL ) + if( CWidgetManager::getInstance()->getElementFromId( parent.toUtf8().constData() ) == NULL ) { QMessageBox::critical( this, tr( "Parent group doesn't exist" ), @@ -96,7 +96,7 @@ namespace GUIEditor return; } SLinkData data; - data.parent = parent.toStdString(); + data.parent = parent.toUtf8().constData(); uint32 id = CWidgetManager::getInstance()->getParser()->addLinkData( data ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp index 856b32108..b92fea72b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp @@ -67,9 +67,9 @@ namespace GUIEditor } SPropEntry prop; - prop.propName = nameEdit->text().toStdString(); - prop.propType = typeCB->currentText().toStdString(); - prop.propDefault = defvalEdit->text().toStdString(); + prop.propName = nameEdit->text().toUtf8().constData(); + prop.propType = typeCB->currentText().toUtf8().constData(); + prop.propDefault = defvalEdit->text().toUtf8().constData(); widgetInfoTreeNode->addPropertyToAll( prop ); widgetInfoTreeNode = NULL; @@ -84,7 +84,7 @@ namespace GUIEditor if( widgetInfoTreeNode == NULL ) return false; - if( widgetInfoTreeNode->hasProperty( nameEdit->text().toStdString() ) ) + if( widgetInfoTreeNode->hasProperty( nameEdit->text().toUtf8().constData() ) ) return false; return true; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp index 0ac2b6508..2d8ecdeb7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp @@ -77,7 +77,7 @@ namespace GUIEditor bool NewWidgetWidget::checkNameField() { - if( nameEdit->text().toStdString().empty() ) + if( nameEdit->text().isEmpty() ) return false; return true; @@ -88,7 +88,7 @@ namespace GUIEditor if( widgetInfoTree == NULL ) return false; - CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( nameEdit->text().toStdString() ); + CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( nameEdit->text().toUtf8().constData() ); if( node != NULL ) return false; @@ -98,16 +98,16 @@ namespace GUIEditor void NewWidgetWidget::addNewWidget() { - CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( ancestorCB->currentText().toStdString() ); + CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( ancestorCB->currentText().toUtf8().constData() ); if( node == NULL ) { - nlerror( "Ancestor %s doesn't exist! Aborting addition!", ancestorCB->currentText().toStdString().c_str() ); + nlerror( "Ancestor %s doesn't exist! Aborting addition!", ancestorCB->currentText().toUtf8().constData() ); return; } SWidgetInfo info; - info.ancestor = ancestorCB->currentText().toStdString(); - info.name = nameEdit->text().toStdString(); + info.ancestor = ancestorCB->currentText().toUtf8().constData(); + info.name = nameEdit->text().toUtf8().constData(); info.GUIName = "C" + info.name; info.isAbstract = false; info.resolved = true; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp index 7b916ac81..c36b16f64 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp @@ -49,7 +49,7 @@ namespace GUIEditor currentProc = name; IParser *parser = CWidgetManager::getInstance()->getParser(); - CProcedure *proc = parser->getProc( name.toStdString() ); + CProcedure *proc = parser->getProc( name.toUtf8().constData() ); std::vector< CProcAction >::const_iterator itr; for( itr = proc->Actions.begin(); itr != proc->Actions.end(); ++itr ) @@ -74,7 +74,7 @@ namespace GUIEditor return; CProcedure *proc = - CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() ); + CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc == NULL ) return; @@ -96,14 +96,14 @@ namespace GUIEditor if( ok ) { CProcedure *proc = - CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() ); + CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc != NULL ) { - proc->addAction( name.toStdString() ); + proc->addAction( name.toUtf8().constData() ); actionList->addItem( name ); } else - nlinfo( "Cannot find procedure %s", currentProc.toStdString().c_str() ); + nlinfo( "Cannot find procedure %s", currentProc.toUtf8().constData() ); } } @@ -123,17 +123,17 @@ namespace GUIEditor return; CProcedure *proc = - CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() ); + CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc != NULL ) { if( !proc->removeAction( static_cast< uint32 >( actionList->currentRow() ) ) ) - nlinfo( "Action #%d not found in procedure %s.", actionList->currentRow(), currentProc.toStdString().c_str() ); + nlinfo( "Action #%d not found in procedure %s.", actionList->currentRow(), currentProc.toUtf8().constData() ); item = actionList->takeItem( actionList->currentRow() ); delete item; } else - nlinfo( "Cannot find procedure %s", currentProc.toStdString().c_str() ); + nlinfo( "Cannot find procedure %s", currentProc.toUtf8().constData() ); } void ProcEditor::onUpButtonClicked() @@ -149,7 +149,7 @@ namespace GUIEditor if( prevItem == NULL ) return; - CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() ); + CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc == NULL ) return; @@ -172,7 +172,7 @@ namespace GUIEditor if( nextItem == NULL ) return; - CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() ); + CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc == NULL ) return; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp index 809d25080..48b63153f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp @@ -65,7 +65,7 @@ namespace GUIEditor if( item == NULL ) return; - CProcedure *proc = parser->getProc( item->text().toStdString() ); + CProcedure *proc = parser->getProc( item->text().toUtf8().constData() ); if( proc == NULL ) return; @@ -86,7 +86,7 @@ namespace GUIEditor if( ok ) { IParser *parser = CWidgetManager::getInstance()->getParser(); - if( !parser->addProc( newProc.toStdString() ) ) + if( !parser->addProc( newProc.toUtf8().constData() ) ) { QMessageBox::critical( this, tr( "Cannot add new procedure" ), @@ -113,7 +113,7 @@ namespace GUIEditor if( button != QMessageBox::Yes ) return; - if( !parser->removeProc( item->text().toStdString() ) ) + if( !parser->removeProc( item->text().toUtf8().constData() ) ) return; item = procList->takeItem( procList->currentRow() ); delete item; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp index b08faac4c..7213b332a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp @@ -121,7 +121,7 @@ namespace GUIEditor QString name = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement ); if( name.isEmpty() ) return false; - files.projectName = name.toStdString(); + files.projectName = name.toUtf8().constData(); } else if( reader.name() == "version" ) @@ -137,7 +137,7 @@ namespace GUIEditor QString mg = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement ); if( mg.isEmpty() ) return false; - files.masterGroup = mg.toStdString(); + files.masterGroup = mg.toUtf8().constData(); } else if( reader.name() == "activegroup" ) @@ -145,7 +145,7 @@ namespace GUIEditor QString ag = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement ); if( ag.isEmpty() ) return false; - files.activeGroup = ag.toStdString(); + files.activeGroup = ag.toUtf8().constData(); } } @@ -171,7 +171,7 @@ namespace GUIEditor QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement ); if( fileName.isEmpty() ) return false; - files.guiFiles.push_back( fileName.toStdString() ); + files.guiFiles.push_back( fileName.toUtf8().constData() ); } @@ -201,7 +201,7 @@ namespace GUIEditor QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement ); if( fileName.isEmpty() ) return false; - files.mapFiles.push_back( fileName.toStdString() ); + files.mapFiles.push_back( fileName.toUtf8().constData() ); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp index a979f4744..0279ede6a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp @@ -88,7 +88,7 @@ namespace GUIEditor for( int i = 0; i < c; i++ ) { QTreeWidgetItem *item = topItem->child( i ); - projectFiles.guiFiles.push_back( item->text( 0 ).toStdString() ); + projectFiles.guiFiles.push_back( item->text( 0 ).toUtf8().constData() ); } } @@ -99,7 +99,7 @@ namespace GUIEditor for( int i = 0; i < c; i++ ) { QTreeWidgetItem *item = topItem->child( i ); - projectFiles.mapFiles.push_back( item->text( 0 ).toStdString() ); + projectFiles.mapFiles.push_back( item->text( 0 ).toUtf8().constData() ); } } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp index 7f491fc7c..1612ea803 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -82,13 +82,9 @@ namespace GUIEditor currentElement = id; - std::string n; - n = typeid( *e ).name(); - std::string::size_type i = n.find_last_of( ':' ); - if( i != std::string::npos ) - n = n.substr( i + 1, n.size() - 1 ); + std::string n = e->getClassName(); - setupProperties( n, e ); + setupProperties( n, e ); connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), this, SLOT( onPropertyChanged( QtProperty* ) ) ); } @@ -109,7 +105,7 @@ namespace GUIEditor CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); if( e == NULL ) return; - e->setProperty( propName.toStdString(), propValue.toStdString() ); + e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); } void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) @@ -163,4 +159,4 @@ namespace GUIEditor p->setValue( v ); browser->addProperty( p ); } -} \ No newline at end of file +} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index 3915111fc..f510d6fb1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -53,7 +53,7 @@ namespace item = item->parent(); } - name = s.toStdString(); + name = s.toUtf8().constData(); return name; } } @@ -137,7 +137,8 @@ namespace GUIEditor if( item->parent() == NULL ) return; - std::string selection = makeFullName( item, item->text( 0 ).toStdString() ); + std::string n = item->text( 0 ).toUtf8().constData(); + std::string selection = makeFullName( item, n ); CWidgetManager::getInstance()->setCurrentEditorSelection( selection ); Q_EMIT selectionChanged( selection ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp index 0ef767340..4c2339c40 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp @@ -43,7 +43,7 @@ namespace GUIEditor std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin(); while( itr != parentInfo.props.end() ) { - std::vector< SPropEntry >::const_iterator fItr; + std::vector< SPropEntry >::iterator fItr; fItr = std::find( props.begin(), props.end(), *itr ); if( fItr == props.end() ) continue; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h index 39068c5d1..81adfe06c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h @@ -82,7 +82,7 @@ namespace GUIEditor /// Remove child by name bool removeChildByName( const std::string &name ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().name == name ) { @@ -98,7 +98,7 @@ namespace GUIEditor /// Remove child by name, but don't delete the child bool removeChildByNameND( const std::string &name ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().name == name ) { @@ -113,7 +113,7 @@ namespace GUIEditor /// Remove child by ancestor's name bool removeChildByAncestor( const std::string &ancestor ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().ancestor == ancestor ) { @@ -172,7 +172,7 @@ namespace GUIEditor /// Removes this property from the node void removeProperty( const SPropEntry &prop ) { - std::vector< SPropEntry >::const_iterator itr = info.props.begin(); + std::vector< SPropEntry >::iterator itr = info.props.begin(); while( itr != info.props.end() ) { if( ( itr->propName == prop.propName ) && diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp index dda52a4d5..0a9337e6c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp @@ -19,7 +19,7 @@ #include "widget_info_serializer.h" #include "new_property_widget.h" #include "new_widget_widget.h" -#include +#include namespace GUIEditor{ CWidgetProperties::CWidgetProperties( QWidget *parent ) : @@ -63,7 +63,7 @@ namespace GUIEditor{ return; QListWidgetItem *item = widgetList->item( i ); - setPropsOf( item->text().toStdString().c_str() ); + setPropsOf( item->text().toUtf8().constData() ); } @@ -83,7 +83,7 @@ namespace GUIEditor{ if( reply != QMessageBox::Yes ) return; - tree->removeNode( widgetName.toStdString() ); + tree->removeNode( widgetName.toUtf8().constData() ); widgetPropTree->clear(); buildWidgetList(); } @@ -91,12 +91,12 @@ namespace GUIEditor{ void CWidgetProperties::onRemovePButtonClicked() { QTreeWidgetItem *item = widgetPropTree->currentItem(); - CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toStdString() ); + CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toUtf8().constData() ); if( ( item == NULL ) || ( node == NULL ) ) return; - std::string name = item->text( 0 ).toStdString(); + std::string name = item->text( 0 ).toUtf8().constData(); std::vector< SPropEntry >::const_iterator itr = node->getInfo().findProp( name ); if( itr == node->getInfo().props.end() ) @@ -133,7 +133,7 @@ namespace GUIEditor{ if( ( widgetList->currentRow() >= widgetList->count() ) || ( widgetList->currentRow() < 0 ) ) return; - CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toStdString() ); + CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toUtf8().constData() ); if( node == NULL ) return; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp index 21d4d0497..fe7ee6d54 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp @@ -71,7 +71,7 @@ namespace GUIEditor f.close(); } else - nlwarning( QString( "File %1 cannot be opened!" ).arg( file ).toStdString().c_str() ); + nlwarning( QString( "File %1 cannot be opened!" ).arg( file ).toUtf8().constData() ); } void CWidgetPropParser::parseGUIWidgetXML( QFile &file ) @@ -126,19 +126,19 @@ namespace GUIEditor if( !reader.hasError() ) { if( key == "name" ) - info.name = value.toStdString(); + info.name = value.toUtf8().constData(); else if( key == "guiname" ) - info.GUIName = value.toStdString(); + info.GUIName = value.toUtf8().constData(); else if( key == "ancestor" ) - info.ancestor = value.toStdString(); + info.ancestor = value.toUtf8().constData(); else if( key == "description" ) - info.description = value.toStdString(); + info.description = value.toUtf8().constData(); else if( key == "icon" ) - info.icon == value.toStdString(); + info.icon == value.toUtf8().constData(); else if( key == "abstract" ) { @@ -169,7 +169,7 @@ namespace GUIEditor return; std::map< std::string, SWidgetInfo >::iterator itr = - widgetInfo->find( widgetName.toStdString() ); + widgetInfo->find( widgetName.toUtf8().constData() ); if( itr == widgetInfo->end() ) return; @@ -192,15 +192,15 @@ namespace GUIEditor if( !reader.hasError() ) { if( key == "name" ) - prop.propName = value.toStdString(); + prop.propName = value.toUtf8().constData(); else if( key == "type" ) - prop.propType = value.toStdString(); + prop.propType = value.toUtf8().constData(); else if( key == "default" ) - prop.propDefault = value.toStdString(); + prop.propDefault = value.toUtf8().constData(); else - nlwarning( QString( "Unknown tag %1 within a property" ).arg( key ).toStdString().c_str() ); + nlwarning( QString( "Unknown tag %1 within a property" ).arg( key ).toUtf8().constData() ); } else diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index 933e305b5..991437159 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -10,6 +10,10 @@ SET(RZ_SERVER_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/server/src) ADD_SUBDIRECTORY(common) IF(WITH_RYZOM_CLIENT) + IF(NOT WITH_GUI) + MESSAGE( FATAL_ERROR "The client cannot be built without the NeL GUI Library (WITH_GUI)") + ENDIF(NOT WITH_GUI) + IF(WITH_LUA51) FIND_PACKAGE(Lua51 REQUIRED) ELSE(WITH_LUA51) @@ -41,8 +45,6 @@ IF(WITH_RYZOM_CLIENT) ENDIF(APPLE) ENDIF(CURL_STATIC) - FIND_PACKAGE(Libwww REQUIRED) - ADD_SUBDIRECTORY(client) ENDIF(WITH_RYZOM_CLIENT) diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index efd9d83e8..8cf3e4a23 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -733,7 +733,8 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) //if (pCB != NULL) pCB->setActive(false); } nlassert(!_FrustumView); - _FrustumView = new CCtrlQuad; + CViewBase::TCtorParam param; + _FrustumView = new CCtrlQuad( param ); _FrustumView->setActive(false); addView(_FrustumView); _FrustumView->setParent(this); diff --git a/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp index 1369e03db..cb00080dc 100644 --- a/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp @@ -548,9 +548,10 @@ void CDisplayerVisualActivitySequence::setWorldMapNumEdges(uint count) else { uint left = count - (uint)_WorldMapEdges.size(); + CViewBase::TCtorParam param; while (left --) { - CCtrlQuad *cq = new CCtrlQuad; + CCtrlQuad *cq = new CCtrlQuad( param ); cq->setModulateGlobalColor(false); cq->setActive(true); gm->addCtrl(cq); diff --git a/code/ryzom/client/src/r2/displayer_visual_group.cpp b/code/ryzom/client/src/r2/displayer_visual_group.cpp index 7376e1832..6d80530a4 100644 --- a/code/ryzom/client/src/r2/displayer_visual_group.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_group.cpp @@ -54,7 +54,7 @@ namespace R2 class CCtrlPolygonSelectable : public CCtrlPolygon, public IDisplayerUIHandle { public: - CCtrlPolygonSelectable(CInstance &instance) : Instance(instance) {} + CCtrlPolygonSelectable( CViewBase::TCtorParam ¶m, CInstance &instance) : Instance(instance), CCtrlPolygon( param ) {} // from IDisplayerUIHandle virtual CInstance &getDisplayedInstance() { return Instance; } // from IDisplayerUIHandle @@ -99,7 +99,7 @@ protected: class CCtrlQuadSelectable : public CCtrlQuad, public IDisplayerUIHandle { public: - CCtrlQuadSelectable(CInstance &instance, uint edgeIndex) : Instance(instance), EdgeIndex(edgeIndex) {} + CCtrlQuadSelectable( CViewBase::TCtorParam ¶m, CInstance &instance, uint edgeIndex) : Instance(instance), EdgeIndex(edgeIndex), CCtrlQuad( param ){} // from IDisplayerUIHandle virtual CInstance &getDisplayedInstance() { return Instance; } // from IDisplayerUIHandle @@ -179,7 +179,8 @@ CCtrlPolygon *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlPolygon() con { //H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender) nlassert(DisplayedInstance); - CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable(*DisplayedInstance); + CViewBase::TCtorParam param; + CCtrlPolygonSelectable *result = new CCtrlPolygonSelectable( param, *DisplayedInstance); result->setId(DisplayedInstance->getId()); result->setToolTipParent(CCtrlBase::TTMouse); result->setToolTipParentPosRef(Hotspot_BR); @@ -192,7 +193,8 @@ CCtrlQuad *CDisplayerVisualGroup::CSelectablePrimRender::newCtrlQuad(uint edgeIn { //H_AUTO(R2_CDisplayerVisualGroup_CSelectablePrimRender) nlassert(DisplayedInstance); - CCtrlQuadSelectable *result = new CCtrlQuadSelectable(*DisplayedInstance, edgeIndex); + CViewBase::TCtorParam param; + CCtrlQuadSelectable *result = new CCtrlQuadSelectable( param, *DisplayedInstance, edgeIndex); result->setToolTipParent(CCtrlBase::TTMouse); result->setToolTipParentPosRef(Hotspot_BR); result->setToolTipPosRef(Hotspot_TL); diff --git a/code/ryzom/client/src/r2/instance_map_deco.cpp b/code/ryzom/client/src/r2/instance_map_deco.cpp index 45f8c5e7f..fc5fe314b 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.cpp +++ b/code/ryzom/client/src/r2/instance_map_deco.cpp @@ -110,7 +110,8 @@ CCtrlQuad *CInstanceMapDeco::newQuad(CGroupMap &owner) { //H_AUTO(R2_CInstanceMapDeco_newQuad) nlassert(_Instance); - CCtrlQuad *q = new CCtrlQuad; + CViewBase::TCtorParam param; + CCtrlQuad *q = new CCtrlQuad( param ); q->setActive(false); q->setModulateGlobalColor(false); owner.addCtrl(q); @@ -156,9 +157,11 @@ void CInstanceMapDeco::onAdd(CGroupMap &owner) CInterfaceGroup *window = owner.getParentContainer(); if (window) { + CViewBase::TCtorParam param; + for(uint k = 0; k < 2; ++k) { - _GlowStar[k] = new CCtrlQuad; + _GlowStar[k] = new CCtrlQuad( param ); _GlowStar[k]->setActive(false); _GlowStar[k]->setModulateGlobalColor(false); window->addCtrl(_GlowStar[k]); diff --git a/code/ryzom/client/src/r2/prim_render.cpp b/code/ryzom/client/src/r2/prim_render.cpp index f4a04f726..246f3f98e 100644 --- a/code/ryzom/client/src/r2/prim_render.cpp +++ b/code/ryzom/client/src/r2/prim_render.cpp @@ -188,6 +188,8 @@ CCtrlPolygon *CPrimRender::newCtrlPolygon() const //H_AUTO(R2_CPrimRender_newCtrlPolygon) class CCtrlMapPolygon : public CCtrlPolygon { + public: + CCtrlMapPolygon( CViewBase::TCtorParam ¶m ) : CCtrlPolygon( param ){} protected: // from CCtrlPolygon void computeScaledVertex(NLMISC::CVector2f &dest, const NLMISC::CVector2f &src) @@ -197,14 +199,16 @@ CCtrlPolygon *CPrimRender::newCtrlPolygon() const gm->worldToWindow(dest, src); } }; - return new CCtrlMapPolygon; + CViewBase::TCtorParam param; + return new CCtrlMapPolygon( param ); } // ********************************************************* CCtrlQuad *CPrimRender::newCtrlQuad(uint /* edgeIndex */) const { //H_AUTO(R2_CPrimRender_newCtrlQuad) - return new CCtrlQuad; + CViewBase::TCtorParam param; + return new CCtrlQuad( param ); } // *********************************************************