CHANGED: #1471 The classes moved in the previous commit are now under the NLGUI namespace.

This commit is contained in:
dfighter1985 2012-06-09 03:57:40 +02:00
parent c8a1a35c93
commit 929b1c3aff
44 changed files with 8337 additions and 8074 deletions

View file

@ -24,15 +24,18 @@
#include "nel/misc/xml_auto_ptr.h"
#include <map>
namespace NLGUI
{
class CCtrlBase;
/**
* interface for action handlers
* \author Nicolas Brigand
* \author Nevrax France
* \date 2002
*/
class CCtrlBase;
class IActionHandler
{
public:
@ -133,4 +136,7 @@ public:
handler##Factory handler##FactoryInstance ; \
\
}
#endif //NL_ACTION_HANDLER_H

View file

@ -23,6 +23,8 @@
#include "nel/gui/view_base.h"
#include "nel/gui/event_descriptor.h"
namespace NLGUI
{
class CCtrlBase : public CViewBase
{
public:
@ -158,6 +160,7 @@ protected:
void convertTooltipHotSpot(const char *prop, THotSpot &parentHS, THotSpot &childHS);
};
}
#endif // RZ_VIEW_BASE_H

View file

@ -1,8 +1,28 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CTRL_DRAGGABLE_H
#define CTRL_DRAGGABLE_H
#include "nel/gui/ctrl_base.h"
namespace NLGUI
{
class CCtrlDraggable : public CCtrlBase
{
public:
@ -39,4 +59,6 @@ private:
bool draggable;
};
}
#endif

View file

@ -19,6 +19,9 @@
#include "nel/gui/ctrl_base.h"
namespace NLGUI
{
class CInterfaceGroup;
class CCtrlScrollBase : public CCtrlBase
@ -51,5 +54,7 @@ private:
};
}
#endif

View file

@ -20,6 +20,8 @@
#include "nel/gui/interface_group.h"
namespace NLGUI
{
class CGroupContainerBase : public CInterfaceGroup
{
@ -91,4 +93,9 @@ private:
};
}
#endif

View file

@ -20,6 +20,9 @@
#include "nel/gui/interface_group.h"
namespace NLGUI
{
class CGroupEditBoxBase : public CInterfaceGroup
{
public:
@ -60,5 +63,7 @@ private:
};
}
#endif

View file

@ -23,6 +23,10 @@
#include "nel/gui/interface_group.h"
namespace NLGUI
{
// ***************************************************************************
/** A Group with a background and a frame displayed
* \author Lionel Berenguier
@ -100,6 +104,7 @@ protected:
static std::vector<SDisplayType> _DispTypes;
};
}
#endif // NL_GROUP_FRAME_H

View file

@ -22,6 +22,8 @@
#include "nel/misc/types_nl.h"
#include "nel/gui/group_frame.h"
namespace NLGUI
{
// ***************************************************************************
/**
@ -64,6 +66,7 @@ protected:
sint32 _MouseDeltaX, _MouseDeltaY;
};
}
#endif // NL_GROUP_MODAL_H

View file

@ -27,7 +27,11 @@
#include "nel/gui/reflect.h"
#include "nel/gui/interface_common.h"
using namespace NLGUI;
class CGroupList;
class CGroupParagraph;
namespace NLGUI
{
class CInterfaceLink;
class CInterfaceElement;
@ -492,8 +496,8 @@ protected:
NLMISC::CRefPtr<CInterfaceElement> _ParentSize; // RefPtr in case of group destroyed in a parent group with posref on it
// Friend Class
friend class CGroupList;
friend class CGroupParagraph;
friend class ::CGroupList;
friend class ::CGroupParagraph;
// True if must modulate the global color with the view
bool _ModulateGlobalColor;
@ -591,6 +595,10 @@ inline bool operator==(const CStringShared &lhs, const CStringShared &rhs) { ret
inline bool operator!=(const CStringShared &lhs, const CStringShared &rhs) { return !(lhs == rhs); }
}
using namespace NLGUI;
#endif // NL_INTERFACE_ELEMENT_H
/* End of interface_element.h */

View file

@ -22,7 +22,9 @@
#include "nel/gui/ctrl_base.h"
#include "nel/gui/action_handler.h"
// ----------------------------------------------------------------------------
namespace NLGUI
{
class CInterfaceGroup : public CCtrlBase
{
public:
@ -399,6 +401,8 @@ protected:
// @}
};
}
#endif // NL_INTERFACE_GROUP_H
/* End of interface_group.h */

View file

@ -27,16 +27,9 @@ namespace NLGUI
class CReflectedProperty;
class CInterfaceExprValue;
class CInterfaceExprNode;
}
class CInterfaceElement;
class CInterfaceGroup;
using namespace NLGUI;
/** A link in an interface.
* A link is an object that can read one or several values from the database, that can evaluate an expression
* on these database entries (simple computation, using the CInterfaceExpr class), and that can affect the result to
@ -188,4 +181,6 @@ private:
void checkNbRefs();
};
}
#endif

View file

@ -28,6 +28,8 @@ namespace NL3D
class UAnimationSet;
}
namespace NLGUI
{
// ***************************************************************************
class CInterfaceOptionValue
@ -92,6 +94,7 @@ protected:
};
}
#endif // NL_INTERFACE_LAYER_H

View file

@ -23,6 +23,9 @@
#include "nel/misc/factory.h"
#include "nel/gui/interface_element.h"
namespace NLGUI
{
class CViewBase : public CInterfaceElement
{
public:
@ -76,6 +79,7 @@ public:
};
}
#endif // RZ_VIEW_BASE_H

View file

@ -1,8 +1,28 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef VIEW_POINTER_BASE_H
#define VIEW_POINTER_BASE_H
#include "nel/gui/view_base.h"
namespace NLGUI
{
class CViewPointerBase : public CViewBase
{
public:
@ -51,5 +71,7 @@ private:
};
}
#endif

View file

@ -23,6 +23,14 @@
#include "nel/misc/types_nl.h"
#include "nel/gui/interface_common.h"
namespace NLMISC
{
class CCDBNodeLeaf;
}
namespace NLGUI
{
class CInterfaceElement;
class CCtrlBase;
class CViewBase;
@ -30,11 +38,6 @@ class CInterfaceGroup;
class CViewPointerBase;
class CInterfaceOptions;
namespace NLMISC
{
class CCDBNodeLeaf;
}
class IParser
{
public:
@ -332,5 +335,7 @@ private:
NLMISC::CCDBNodeLeaf *_AProp;
};
}
#endif

View file

@ -25,6 +25,9 @@
using namespace std;
using namespace NLMISC;
namespace NLGUI
{
// ------------------------------------------------------------------------------------------------
CAHManager *CAHManager::_GlobalInstance = NULL;
// ------------------------------------------------------------------------------------------------
@ -706,3 +709,5 @@ class CAHUnlockAllContainer : public IActionHandler
}
};
REGISTER_ACTION_HANDLER (CAHUnlockAllContainer, "unlock_all_container");
}

View file

@ -24,6 +24,9 @@
using namespace NLMISC;
namespace NLGUI
{
// ***************************************************************************
CCtrlBase::~CCtrlBase()
{
@ -220,4 +223,5 @@ std::string CCtrlBase::getContextHelpWindowName() const
return "context_help";
}
}

View file

@ -1,5 +1,25 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/gui/ctrl_draggable.h"
namespace NLGUI
{
CCtrlDraggable* CCtrlDraggable::_LastDraggedSheet = NULL;
CCtrlDraggable::CCtrlDraggable(const TCtorParam &param) :
@ -9,3 +29,4 @@ CCtrlBase( param )
draggable = false;
}
}

View file

@ -16,6 +16,9 @@
#include "nel/gui/ctrl_scroll_base.h"
namespace NLGUI
{
CCtrlScrollBase::CCtrlScrollBase( const TCtorParam &param ) :
CCtrlBase( param )
{
@ -64,3 +67,6 @@ void CCtrlScrollBase::moveTargetY( sint32 dy )
// however reflection requires the class to be instantiated.
nlassert( false );
}
}

View file

@ -17,6 +17,9 @@
#include "nel/gui/group_container_base.h"
namespace NLGUI
{
CGroupContainerBase::CGroupContainerBase( const CViewBase::TCtorParam &param ) :
CInterfaceGroup( param )
{
@ -90,3 +93,5 @@ void CGroupContainerBase::setRolloverAlphaContainer(uint8 alpha)
triggerAlphaSettingsChangedAH();
}
}

View file

@ -1,5 +1,25 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/gui/group_editbox_base.h"
namespace NLGUI
{
CGroupEditBoxBase *CGroupEditBoxBase::_CurrSelection = NULL;
CGroupEditBoxBase::CGroupEditBoxBase( const TCtorParam &param ) :
@ -12,3 +32,5 @@ CGroupEditBoxBase::~CGroupEditBoxBase()
{
}
}

View file

@ -24,6 +24,9 @@
using namespace std;
using namespace NLMISC;
namespace NLGUI
{
NLMISC_REGISTER_OBJECT(CViewBase, CGroupFrame, std::string, "frame");
// ***************************************************************************
@ -247,3 +250,6 @@ string CGroupFrame::getColorAsString() const
{
return NLMISC::toString(_Color.R) + " " + NLMISC::toString(_Color.G) + " " + NLMISC::toString(_Color.B) + " " + NLMISC::toString(_Color.A);
}
}

View file

@ -20,10 +20,12 @@
#include "nel/gui/interface_element.h"
#include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/view_renderer.h"
#include "nel/misc/i_xml.h"
using namespace std;
#include "nel/misc/i_xml.h"
namespace NLGUI
{
NLMISC_REGISTER_OBJECT(CViewBase, CGroupModal, std::string, "modal");
@ -172,4 +174,5 @@ void CGroupModal::updateCoords ()
}
}
}

View file

@ -29,6 +29,9 @@
using namespace std;
using namespace NLMISC;
namespace NLGUI
{
CStringMapper *_UIStringMapper = NULL;
// ------------------------------------------------------------------------------------------------
@ -1255,6 +1258,7 @@ void CInterfaceElement::serialAH(NLMISC::IStream &f, IActionHandler *&ah)
}
}

View file

@ -34,6 +34,9 @@ using namespace NL3D;
// the first), instead of using 'this'. 'this' is already used by
// CLuaIHM::pushReflectableOnStack as unique id to CInterfaceElement's ref pointers
namespace NLGUI
{
REGISTER_UI_CLASS(CInterfaceGroup)
// ------------------------------------------------------------------------------------------------
@ -1954,3 +1957,5 @@ std::string CInterfaceGroup::getMaxSizeRefAsString() const
{
return "IMPLEMENT ME!";
}
}

View file

@ -29,6 +29,9 @@
using namespace std;
using namespace NLMISC;
namespace NLGUI
{
/////////////
// GLOBALS //
/////////////
@ -404,7 +407,7 @@ bool CInterfaceLink::CTargetInfo::affect(const CInterfaceExprValue &value)
return false;
}
// try to affect the property
if (!::affect(value, *Elem, *property))
if (!NLGUI::affect(value, *Elem, *property))
{
nlwarning("<CInterfaceLink::CTargetInfo::affect> Couldn't convert the value to affect to %s", Elem->getId().c_str());
@ -645,3 +648,7 @@ void CInterfaceLink::updateTrigeredLinks()
}
called = false;
}
}

View file

@ -23,7 +23,9 @@
using namespace std;
using namespace NLMISC;
// ***************************************************************************
namespace NLGUI
{
const CInterfaceOptionValue CInterfaceOptionValue::NullValue;
// ***************************************************************************
@ -123,3 +125,4 @@ bool CInterfaceOptions::getValBool(const std::string &sParamName) const
return getValue(sParamName).getValBool();
}
}

View file

@ -18,6 +18,9 @@
#include "nel/gui/interface_group.h"
#include "nel/gui/widget_manager.h"
namespace NLGUI
{
CViewBase::~CViewBase()
{
CWidgetManager::getInstance()->removeRefOnView (this);
@ -42,3 +45,5 @@ void CViewBase::visit(CInterfaceElementVisitor *visitor)
CInterfaceElement::visit(visitor);
}
}

View file

@ -1,5 +1,25 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/gui/view_pointer_base.h"
namespace NLGUI
{
CViewPointerBase::CViewPointerBase( const CViewBase::TCtorParam &param ) :
CViewBase( param )
{
@ -118,5 +138,5 @@ std::string CViewPointerBase::getPointerDownString ()
return _PointerDownString;
}
}

View file

@ -25,6 +25,8 @@
#include "nel/gui/group_editbox_base.h"
#include "nel/gui/interface_options.h"
namespace NLGUI
{
CWidgetManager* CWidgetManager::instance = NULL;
std::string CWidgetManager::_CtrlLaunchingModalId= "ctrl_launch_modal";
@ -1399,3 +1401,6 @@ CWidgetManager::~CWidgetManager()
_Pointer = NULL;
curContextHelp = NULL;
}
}

View file

@ -29,6 +29,7 @@
using namespace NLMISC;
using namespace NL3D;
using namespace NLGUI;
// TODO nico : that stuff was coded in a hurry, but could be good to add it to NL3D with a better packaging later...

View file

@ -33,6 +33,8 @@ using namespace NL3D;
#include "../user_entity.h"
#include "../connection.h"
using namespace NLGUI;
////////////
// GLOBAL //
////////////

View file

@ -23,7 +23,10 @@
#include "nel/gui/action_handler.h"
#include "interface_manager.h"
namespace NLGUI
{
class CInterfaceGroup;
}
// ***************************************************************************

View file

@ -22,7 +22,11 @@
class CBotChatPage;
class CPrerequisitInfos;
namespace NLGUI
{
class CInterfaceGroup;
}
class IMissionPrereqInfosWaiter
{

View file

@ -21,7 +21,11 @@
#include "nel/misc/rgba.h"
namespace NLGUI
{
class CViewBase;
}
class ucstring;
namespace NLMISC{
class CCDBNodeLeaf;
@ -46,7 +50,7 @@ public:
* \param col the color of the text
* \param justified Should be true for justified text (stretch spaces of line to fill the full width)
*/
CViewBase *createMsgText(const ucstring &msg, NLMISC::CRGBA col, bool justified = false);
NLGUI::CViewBase *createMsgText(const ucstring &msg, NLMISC::CRGBA col, bool justified = false);
// Singleton access
static CChatTextManager &getInstance();

View file

@ -24,10 +24,15 @@
#include "game_share/chat_group.h"
namespace NLGUI
{
class CCtrlBase;
}
class CChatWindow;
class CGroupContainer;
class CGroupEditBox;
class CCtrlBase;
class CViewText;
/** Interface to react to a chat box entry
@ -240,7 +245,7 @@ public:
// Remove a chat window by its pointer
void removeChatWindow(CChatWindow *cw);
/// from a ctrl of a chat box that triggered a menu, or an event, retrieve the associated chat box
CChatWindow *getChatWindowFromCaller(CCtrlBase *caller);
CChatWindow *getChatWindowFromCaller(NLGUI::CCtrlBase *caller);
// Singleton pattern applied to the chat window manager
static CChatWindowManager &getInstance();
// try to rename a window

View file

@ -22,7 +22,11 @@
class CDBCtrlSheet;
namespace NLGUI
{
class IActionHandler;
}
/** Infos about a selection group
*/

View file

@ -107,10 +107,6 @@
#include "../npc_icon.h"
#include "nel/gui/lua_helper.h"
namespace NLGUI
{
extern void luaDebuggerMainLoop();
}
using namespace NLGUI;
#include "nel/gui/lua_ihm.h"
#include "lua_ihm_ryzom.h"
@ -128,9 +124,14 @@ using namespace NLGUI;
using namespace NLMISC;
namespace NLGUI
{
extern void luaDebuggerMainLoop();
extern NLMISC::CStringMapper *_UIStringMapper;
}
extern CClientChatManager ChatMngr;
extern CContinentManager ContinentMngr;
extern CStringMapper *_UIStringMapper;
extern bool IsInRingSession;
extern CEventsListener EventsListener;

View file

@ -69,8 +69,12 @@ extern bool g_hidden;
// #define AJM_DEBUG_TRACK_INTERFACE_GROUPS
class CGroupContainer;
namespace NLGUI
{
class CInterfaceOptions;
}
class CGroupContainer;
class CInterfaceAnim;
class CGroupMenu;

View file

@ -20,6 +20,8 @@
#include "nel/gui/interface_options.h"
using namespace NLGUI;
// ***************************************************************************
class COptionsLayer : public CInterfaceOptions
{

View file

@ -29,17 +29,20 @@
#include "nel/gui/widget_manager.h"
using namespace NLGUI;
// ***************************************************************************
namespace NLGUI
{
class CInterfaceElement;
class CInterfaceGroup;
class CInterfaceOptions;
class CInterfaceLink;
class CCtrlBase;
}
class CGroupContainer;
class CGroupList;
class CInterfaceOptions;
class CInterfaceAnim;
class CViewPointer;
class CInterfaceLink;
class CBrickJob;
class CCtrlBase;
// ***************************************************************************
/**

View file

@ -21,7 +21,16 @@
#include "nel/misc/resource_ptr.h"
class CInterfaceElement *getInterfaceResource(const std::string &key);
namespace NLGUI
{
class CInterfaceElement;
class CCtrlBase;
class CInterfaceGroup;
}
using namespace NLGUI;
CInterfaceElement *getInterfaceResource(const std::string &key);
/** Interface element ptr
* This pointer uses the NLMISC::CResourcePtr
@ -47,13 +56,12 @@ public:
};
// Some pointers
typedef CInterfacePtr<class CInterfaceElement>::TInterfacePtr CInterfaceElementPtr;
typedef CInterfacePtr<class CInterfaceGroup>::TInterfacePtr CInterfaceGroupPtr;
typedef CInterfacePtr<CInterfaceElement>::TInterfacePtr CInterfaceElementPtr;
typedef CInterfacePtr<CInterfaceGroup>::TInterfacePtr CInterfaceGroupPtr;
typedef CInterfacePtr<class CCtrlTextButton>::TInterfacePtr CCtrlTextButtonPtr;
typedef CInterfacePtr<class CViewText>::TInterfacePtr CViewTextPtr;
typedef CInterfacePtr<class CViewTextMenu>::TInterfacePtr CViewTextMenuPtr;
typedef CInterfacePtr<class CViewTextMenu>::TInterfacePtr CViewTextMenuPtr;
typedef CInterfacePtr<class CCtrlBase>::TInterfacePtr CCtrlBasePtr;
typedef CInterfacePtr<CCtrlBase>::TInterfacePtr CCtrlBasePtr;
typedef CInterfacePtr<class CCtrlBaseButton>::TInterfacePtr CCtrlBaseButtonPtr;
typedef CInterfacePtr<class CGroupContainer>::TInterfacePtr CGroupContainerPtr;

View file

@ -24,7 +24,11 @@
#include "nel/gui/view_pointer_base.h"
class CGroupContainer;
namespace NLGUI
{
class CCtrlBase;
}
/**
* class describing the pointer

View file

@ -38,7 +38,7 @@ class CObjectTable;
* - one for the ui (displaying instance in the object tree for example)
* - one for the property sheet of the instance
*/
class CDisplayerBase : public NLMISC::IClassable, public CReflectableRefPtrTarget
class CDisplayerBase : public NLMISC::IClassable, public NLGUI::CReflectableRefPtrTarget
{
public:
typedef NLMISC::CSmartPtr<CDisplayerBase> TSmartPtr;