CHANGED: #1471 CGroupContainer is now part of the NELGUI library and is under the NLGUI namespace.
This commit is contained in:
parent
2b4298b269
commit
bdf9c2b7ba
56 changed files with 4738 additions and 4726 deletions
656
code/nel/include/nel/gui/group_container.h
Normal file
656
code/nel/include/nel/gui/group_container.h
Normal file
|
@ -0,0 +1,656 @@
|
||||||
|
// 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 RZ_GROUP_CONTAINER_H
|
||||||
|
#define RZ_GROUP_CONTAINER_H
|
||||||
|
|
||||||
|
#include "nel/gui/interface_group.h"
|
||||||
|
#include "nel/gui/group_container_base.h"
|
||||||
|
#include "nel/misc/smart_ptr.h"
|
||||||
|
|
||||||
|
namespace NLGUI
|
||||||
|
{
|
||||||
|
class CEventDescriptorLocalised;
|
||||||
|
class CCtrlButton;
|
||||||
|
class CCtrlScroll;
|
||||||
|
class CViewText;
|
||||||
|
class CViewBitmap;
|
||||||
|
class CGroupList;
|
||||||
|
class COptionsContainerInsertion;
|
||||||
|
class COptionsContainerMove;
|
||||||
|
class COptionsLayer;
|
||||||
|
class CGroupContainer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
/**
|
||||||
|
* class describing a resizer for the container
|
||||||
|
* \author Matthieu 'TrapII' Besson
|
||||||
|
* \date 2003
|
||||||
|
*/
|
||||||
|
class CCtrlResizer : public CCtrlBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
CCtrlResizer(const TCtorParam ¶m);
|
||||||
|
virtual void draw ();
|
||||||
|
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);
|
||||||
|
// Add a big delta so when the user is over the Resizer, always take it whatever other controls under
|
||||||
|
virtual uint getDeltaDepth() const { return 100; }
|
||||||
|
|
||||||
|
// get real resizer pos : if parent has pop_min_w == pop_max_w, then horizontal resizer will be discarded
|
||||||
|
// if parent has pop_min_h == pop_max_h, then vertical resizer will be discarded
|
||||||
|
THotSpot getRealResizerPos() const;
|
||||||
|
THotSpot getResizerPos() const { return _ResizerPos; }
|
||||||
|
void setResizerPos(THotSpot resizerPos) { _ResizerPos = resizerPos; }
|
||||||
|
|
||||||
|
bool IsMaxH; // Do this resizer is a MaxH resizer ?
|
||||||
|
|
||||||
|
// Max sizes for the parent
|
||||||
|
sint32 WMin, WMax;
|
||||||
|
sint32 HMin, HMax;
|
||||||
|
|
||||||
|
// from CCtrlBase
|
||||||
|
virtual bool canChangeVirtualDesktop() const { return !_MouseDown; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
sint32 resizeW (sint32 dx);
|
||||||
|
sint32 resizeH (sint32 dy);
|
||||||
|
|
||||||
|
private:
|
||||||
|
THotSpot _ResizerPos; // how the resizer should resize its parent
|
||||||
|
bool _MouseDown;
|
||||||
|
sint32 _MouseDownX;
|
||||||
|
sint32 _MouseDownY;
|
||||||
|
sint32 _XBias;
|
||||||
|
sint32 _YBias;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
/**
|
||||||
|
* Class describing a Mover for the container
|
||||||
|
* Clicking on it can also open the container
|
||||||
|
* This can be used to move a container if it is movable.
|
||||||
|
* If the container is popable, it will first pull it of the hierarchy, then it becomes movable.
|
||||||
|
* It can also be used to change the position of a group container that is inserted in the list of another container.
|
||||||
|
* \author Lionel Berenguier
|
||||||
|
* \date 2003
|
||||||
|
*/
|
||||||
|
class CCtrlMover : public CCtrlBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
CCtrlMover(const TCtorParam ¶m, bool canMove, bool canOpen);
|
||||||
|
~CCtrlMover();
|
||||||
|
virtual void draw ();
|
||||||
|
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);
|
||||||
|
bool canMove() { return _CanMove; }
|
||||||
|
|
||||||
|
bool isMoving() const {return _Moving;}
|
||||||
|
bool isMovingInParentList() const { return _MovingInParentList; }
|
||||||
|
|
||||||
|
// from CCtrlBase
|
||||||
|
virtual bool canChangeVirtualDesktop() const { return !_Moving; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
sint32 _MoveStartX, _MoveStartY;
|
||||||
|
sint32 _MoveDeltaXReal, _MoveDeltaYReal;
|
||||||
|
sint64 _ScrollTime;
|
||||||
|
sint32 _StartIndex;
|
||||||
|
sint32 _InsertionIndex;
|
||||||
|
// clip window from parent list
|
||||||
|
sint32 _ParentListTop;
|
||||||
|
sint32 _ParentListBottom;
|
||||||
|
//
|
||||||
|
sint64 _WaitToOpenCloseDate;
|
||||||
|
//
|
||||||
|
bool _CanMove : 1;
|
||||||
|
bool _CanOpen : 1;
|
||||||
|
bool _Moving : 1;
|
||||||
|
bool _MovingInParentList : 1;
|
||||||
|
bool _HasMoved : 1;
|
||||||
|
bool _ParentScrollingUp : 1;
|
||||||
|
bool _ParentScrollingDown : 1;
|
||||||
|
bool _StopScrolling : 1; // stop scrolling at next draw
|
||||||
|
bool _WaitToOpenClose : 1;
|
||||||
|
//
|
||||||
|
static COptionsContainerInsertion *getInsertionOptions();
|
||||||
|
private:
|
||||||
|
void setPoped(CGroupContainer *gc, sint32 x, sint32 y, const NLGUI::CEventDescriptorMouse &eventDesc);
|
||||||
|
void setMovingInParent(CGroupContainer *gc, sint32 x, sint32 y, const NLGUI::CEventDescriptorMouse &eventDesc);
|
||||||
|
void updateInsertionIndex(const CGroupList *gl, sint32 posY);
|
||||||
|
void stopMove();
|
||||||
|
bool runTitleActionHandler();
|
||||||
|
void handleScrolling();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
/**
|
||||||
|
* class describing a group of views controls and other groups
|
||||||
|
* \author Matthieu 'TrapII' Besson
|
||||||
|
* \author Nevrax France
|
||||||
|
* \date 2002
|
||||||
|
*/
|
||||||
|
class CGroupContainer : public CGroupContainerBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum { NumResizers = 8 };
|
||||||
|
public:
|
||||||
|
// observer to know when children have moved. This can be used to keep external datas in sync
|
||||||
|
struct IChildrenObs
|
||||||
|
{
|
||||||
|
virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children) = 0;
|
||||||
|
};
|
||||||
|
public:
|
||||||
|
CGroupContainer(const TCtorParam ¶m);
|
||||||
|
~CGroupContainer();
|
||||||
|
|
||||||
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
|
|
||||||
|
virtual void updateCoords ();
|
||||||
|
|
||||||
|
virtual void draw ();
|
||||||
|
|
||||||
|
virtual void clearViews ();
|
||||||
|
|
||||||
|
virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc);
|
||||||
|
|
||||||
|
virtual void launch ();
|
||||||
|
|
||||||
|
virtual void setActive (bool state);
|
||||||
|
|
||||||
|
virtual bool getViewsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, sint32 clipW, sint32 clipH, std::vector<CViewBase*> &vVB); // Return true if x,y under the group
|
||||||
|
|
||||||
|
virtual bool getCtrlsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, sint32 clipW, sint32 clipH, std::vector<CCtrlBase*> &vICL);
|
||||||
|
|
||||||
|
void open();
|
||||||
|
|
||||||
|
void close();
|
||||||
|
|
||||||
|
void setup(); // Create the container
|
||||||
|
|
||||||
|
/** If insertion order is -1, pIC is added at the end of the container
|
||||||
|
* otherwise it is inserted after containers of a lower order
|
||||||
|
*/
|
||||||
|
void attachContainer (CGroupContainer *pIC, sint insertionOrder = -1);
|
||||||
|
// Insert a container at the given index.
|
||||||
|
bool attachContainerAtIndex(CGroupContainer *pIC, uint index);
|
||||||
|
|
||||||
|
// Before a container is detached from parent, it should be pop in
|
||||||
|
void detachContainer (CGroupContainer *pIC);
|
||||||
|
void removeAllContainers();
|
||||||
|
|
||||||
|
void setOpen(bool opened)
|
||||||
|
{
|
||||||
|
if (opened)
|
||||||
|
{
|
||||||
|
open();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool isOpen() const { return _Opened; }
|
||||||
|
|
||||||
|
// Force Open for container setActive and open()
|
||||||
|
virtual void forceOpen();
|
||||||
|
|
||||||
|
/// Set the title open and close
|
||||||
|
virtual bool isMovable() const {return _Movable;}
|
||||||
|
void setMovable(bool b);
|
||||||
|
|
||||||
|
void setContent (CInterfaceGroup *pC);
|
||||||
|
|
||||||
|
std::string getTitle () const;
|
||||||
|
void setTitle (const std::string &title);
|
||||||
|
std::string getTitleOpened () const;
|
||||||
|
void setTitleOpened (const std::string &title);
|
||||||
|
std::string getTitleClosed () const;
|
||||||
|
void setTitleClosed (const std::string &title);
|
||||||
|
std::string getTitleColorAsString() const;
|
||||||
|
void setTitleColorAsString(const std::string &col);
|
||||||
|
|
||||||
|
void setHeaderColor (const std::string &ptr) { _HeaderColor.link(ptr.c_str()); }
|
||||||
|
|
||||||
|
// Get the header color draw. NB: depends if grayed, and if active.
|
||||||
|
NLMISC::CRGBA getDrawnHeaderColor () const;
|
||||||
|
|
||||||
|
ucstring getUCTitleOpened () const;
|
||||||
|
void setUCTitleOpened (const ucstring &title);
|
||||||
|
ucstring getUCTitleClosed () const;
|
||||||
|
void setUCTitleClosed (const ucstring &title);
|
||||||
|
ucstring getUCTitle () const;
|
||||||
|
void setUCTitle (const ucstring &title);
|
||||||
|
|
||||||
|
void setPopable(bool popable) { _Popable = popable; }
|
||||||
|
bool isPopable() const { return _Popable; }
|
||||||
|
bool isPopuped() const { return _Poped; }
|
||||||
|
|
||||||
|
|
||||||
|
void setMovableInParentList(bool /* movable */) { _MovableInParentList = true; }
|
||||||
|
bool isMovableInParentList() const { return _MovableInParentList; }
|
||||||
|
|
||||||
|
// high light the border of the container
|
||||||
|
void setHighLighted(bool hightlighted, uint8 alpha=255) { _HighLighted = hightlighted; _HighLightedAlpha = alpha; }
|
||||||
|
bool isHighLighted() const { return _HighLighted; }
|
||||||
|
|
||||||
|
// y offset for content of container
|
||||||
|
sint32 getContentYOffset() const { return (sint32) _ContentYOffset; }
|
||||||
|
void setContentYOffset(sint32 value);
|
||||||
|
|
||||||
|
// Window requires attention
|
||||||
|
void requireAttention();
|
||||||
|
|
||||||
|
// Lua exports
|
||||||
|
int luaBlink(CLuaState &ls);
|
||||||
|
int luaSetHeaderColor(CLuaState &ls);
|
||||||
|
|
||||||
|
REFLECT_EXPORT_START(CGroupContainer, CGroupContainerBase)
|
||||||
|
REFLECT_LUA_METHOD("blink", luaBlink);
|
||||||
|
REFLECT_LUA_METHOD("setHeaderColor", luaSetHeaderColor);
|
||||||
|
REFLECT_STRING("title", getTitle, setTitle);
|
||||||
|
REFLECT_STRING("title_opened", getTitleOpened, setTitleOpened);
|
||||||
|
REFLECT_STRING("title_closed", getTitleClosed, setTitleClosed);
|
||||||
|
REFLECT_UCSTRING("uc_title_opened", getUCTitleOpened, setUCTitleOpened);
|
||||||
|
REFLECT_UCSTRING("uc_title_closed", getUCTitleClosed, setUCTitleClosed);
|
||||||
|
REFLECT_UCSTRING("uc_title", getUCTitle, setUCTitle);
|
||||||
|
REFLECT_STRING("title_color", getTitleColorAsString, setTitleColorAsString);
|
||||||
|
REFLECT_SINT32("pop_min_h", getPopupMinH, setPopupMinH);
|
||||||
|
REFLECT_SINT32("pop_max_h", getPopupMaxH, setPopupMaxH);
|
||||||
|
REFLECT_SINT32("pop_min_w", getPopupMinW, setPopupMinW);
|
||||||
|
REFLECT_SINT32("pop_max_w", getPopupMaxW, setPopupMaxW);
|
||||||
|
REFLECT_SINT32("title_delta_max_w", getTitleDeltaMaxW, setTitleDeltaMaxW);
|
||||||
|
REFLECT_SINT32("content_y_offset", getContentYOffset, setContentYOffset);
|
||||||
|
REFLECT_BOOL("openable", isOpenable, setOpenable);
|
||||||
|
REFLECT_BOOL("opened", isOpen, setOpen);
|
||||||
|
REFLECT_BOOL("lockable", isLockable, setLockable);
|
||||||
|
REFLECT_BOOL("locked", isLocked, setLocked);
|
||||||
|
|
||||||
|
REFLECT_BOOL("header_active", getHeaderActive, setHeaderActive);
|
||||||
|
REFLECT_BOOL("right_button_enabled", getRightButtonEnabled, setRightButtonEnabled);
|
||||||
|
REFLECT_EXPORT_END
|
||||||
|
|
||||||
|
sint32 getLayerSetup() const { return _LayerSetup; }
|
||||||
|
|
||||||
|
// if this window is popable, pop it at its actual position
|
||||||
|
void popupCurrentPos();
|
||||||
|
// Popup at previous memorized position
|
||||||
|
void popup();
|
||||||
|
/** Popin the window and possibly put it back in its father container, using the order defined in the list of the container.
|
||||||
|
* \param putBackInFather When true, put the window back in its former father container, otherwise, the container is unliked from the hierachy (parents are NULL)
|
||||||
|
* \param insertPos If this is equal to -1, then the window is inserted at its previous position. Otherwise it is inserted before the given position in the list
|
||||||
|
*/
|
||||||
|
void popin(sint32 insertPos = -1, bool putBackInFatherContainer = true);
|
||||||
|
|
||||||
|
// get the mover control associated with that control, or NULL if none
|
||||||
|
CCtrlMover *getCtrlMover() const { return _Mover; }
|
||||||
|
|
||||||
|
// true if there is a mover and if the window is being moved
|
||||||
|
bool isMoving() const { return _Mover && _Mover->isMoving(); }
|
||||||
|
|
||||||
|
/** Force the container to blink (to tell the user that an event has happened).
|
||||||
|
* This uses the global color, so the container must use it
|
||||||
|
* This state is automatically disabled if the container is opened
|
||||||
|
* \param numBlinks 0 If the container should blink endlessly, the number of blink otherwise
|
||||||
|
*/
|
||||||
|
virtual void enableBlink(uint numBlinks = 0);
|
||||||
|
virtual void disableBlink();
|
||||||
|
virtual bool isBlinking() const { return _Blinking; }
|
||||||
|
|
||||||
|
CGroupList *getList() const { return _List; }
|
||||||
|
|
||||||
|
CInterfaceGroup *getHeaderOpened() const { return _HeaderOpened; }
|
||||||
|
CInterfaceGroup *getHeaderClosed() const { return _HeaderClosed; }
|
||||||
|
CInterfaceGroup *getContent() const { return _Content; }
|
||||||
|
|
||||||
|
void setChildrenObs(IChildrenObs *obs) { _ChildrenObs = obs; }
|
||||||
|
IChildrenObs *getChildrenObs() const { return _ChildrenObs; }
|
||||||
|
|
||||||
|
// Get current father container (if any).
|
||||||
|
CGroupContainer *getFatherContainer() const;
|
||||||
|
// Get current father container (if any). If the container is popup, it gives the proprietary container
|
||||||
|
CGroupContainer *getProprietaryContainer() const;
|
||||||
|
|
||||||
|
|
||||||
|
bool isOpenable() const { return _Openable; }
|
||||||
|
void setOpenable(bool openable);
|
||||||
|
|
||||||
|
bool getHeaderActive() const { return _HeaderActive; }
|
||||||
|
void setHeaderActive(bool active) { _HeaderActive = active; }
|
||||||
|
|
||||||
|
bool getRightButtonEnabled() const { return _EnabledRightButton; }
|
||||||
|
void setRightButtonEnabled(bool enabled);
|
||||||
|
|
||||||
|
CCtrlScroll *getScroll() const { return _ScrollBar; }
|
||||||
|
|
||||||
|
bool isSavable() const { return _Savable; }
|
||||||
|
void setSavable(bool savable) { _Savable = savable; }
|
||||||
|
bool isActiveSavable() const { return _ActiveSavable; }
|
||||||
|
|
||||||
|
bool isLocalize() const { return _Localize; }
|
||||||
|
void setLocalize(bool localize) { _Localize = localize; }
|
||||||
|
|
||||||
|
void setPopupX(sint32 x) { _PopupX = x; }
|
||||||
|
void setPopupY(sint32 y) { _PopupY = y; }
|
||||||
|
void setPopupW(sint32 w) { _PopupW = w; }
|
||||||
|
void setPopupH(sint32 h) { _PopupH = h; }
|
||||||
|
|
||||||
|
sint32 getPopupX() const { return _PopupX; }
|
||||||
|
sint32 getPopupY() const { return _PopupY; }
|
||||||
|
sint32 getPopupW() const { return _PopupW; }
|
||||||
|
sint32 getPopupH() const { return _PopupH; }
|
||||||
|
|
||||||
|
sint32 getRefW() const { return _RefW; }
|
||||||
|
|
||||||
|
/** Increase the rollover alpha for the current frame.
|
||||||
|
* Example of use : an edit box that has focus in a group container
|
||||||
|
*/
|
||||||
|
void rollOverAlphaUp();
|
||||||
|
// force the rollover alpha to its max value, depending on there's keyboard focus or not
|
||||||
|
void forceRolloverAlpha();
|
||||||
|
|
||||||
|
bool isOpenWhenPopup() const { return _OpenWhenPopup; }
|
||||||
|
|
||||||
|
/// Locking of window (prevent it from being moved)
|
||||||
|
void setLockable(bool lockable);
|
||||||
|
bool isLockable() const { return _Lockable; }
|
||||||
|
void setLocked(bool locked);
|
||||||
|
|
||||||
|
// to be called by the 'deactive check' handler
|
||||||
|
static void validateCanDeactivate(bool validate) { _ValidateCanDeactivate = validate; }
|
||||||
|
const std::string &getAHOnDeactiveCheck() const { return CAHManager::getInstance()->getAHName(_AHOnDeactiveCheck); }
|
||||||
|
const std::string &getAHOnDeactiveCheckParams() const { return _AHOnDeactiveCheckParams; }
|
||||||
|
//
|
||||||
|
const std::string &getAHOnCloseButton() const { return CAHManager::getInstance()->getAHName(_AHOnCloseButton); }
|
||||||
|
const std::string &getAHOnCloseButtonParams() const { return _AHOnCloseButtonParams; }
|
||||||
|
//
|
||||||
|
IActionHandler *getAHOnMovePtr() const { return _AHOnMove; }
|
||||||
|
const std::string &getAHOnMove() const { return CAHManager::getInstance()->getAHName(_AHOnMove); }
|
||||||
|
const std::string &getAHOnMoveParams() const { return _AHOnMoveParams; }
|
||||||
|
//
|
||||||
|
IActionHandler *getAHOnResizePtr() const { return _AHOnResize; }
|
||||||
|
const std::string &getAHOnResize() const { return CAHManager::getInstance()->getAHName(_AHOnResize); }
|
||||||
|
const std::string &getAHOnResizeParams() const { return _AHOnResizeParams; }
|
||||||
|
//
|
||||||
|
IActionHandler *getAHOnBeginMovePtr() const { return _AHOnBeginMove; }
|
||||||
|
const std::string &getAHOnBeginMove() const { return CAHManager::getInstance()->getAHName(_AHOnBeginMove); }
|
||||||
|
const std::string &getAHOnBeginMoveParams() const { return _AHOnBeginMoveParams; }
|
||||||
|
|
||||||
|
//
|
||||||
|
void setOnCloseButtonHandler(const std::string &h) { _AHOnCloseButton = CAHManager::getInstance()->getAH(h,_AHOnCloseButtonParams); }
|
||||||
|
void setOnCloseButtonParams(const std::string &p) { _AHOnCloseButtonParams = p; }
|
||||||
|
|
||||||
|
void setModalParentList (const std::string &name);
|
||||||
|
bool checkIfModal(const NLGUI::CEventDescriptor& event); // Return true if we can handle the event (and prevent from selecting a window)
|
||||||
|
bool isGrayed() const;
|
||||||
|
bool blinkAllSons();
|
||||||
|
|
||||||
|
// true if the resizer is enabled.
|
||||||
|
bool getEnabledResizer() const {return _EnabledResizer;}
|
||||||
|
|
||||||
|
sint32 getPopupMinW() const {return _PopupMinW;}
|
||||||
|
sint32 getPopupMaxW() const {return _PopupMaxW;}
|
||||||
|
sint32 getPopupMinH() const {return _PopupMinH;}
|
||||||
|
sint32 getPopupMaxH() const {return _PopupMaxH;}
|
||||||
|
sint32 getMinW() const {return _MinW;}
|
||||||
|
void setMinW(sint32 minW) { _MinW = minW;}
|
||||||
|
void setMaxW(sint32 maxW) { _MaxW = maxW;}
|
||||||
|
sint32 getMaxW() const {return _MaxW;}
|
||||||
|
void setPopupMinW(sint32 minW);
|
||||||
|
void setPopupMaxW(sint32 maxW);
|
||||||
|
void setPopupMinH(sint32 minW);
|
||||||
|
void setPopupMaxH(sint32 maxW);
|
||||||
|
|
||||||
|
|
||||||
|
// backup the current position of this container
|
||||||
|
void backupPosition();
|
||||||
|
// restore the current position of this container
|
||||||
|
void restorePosition();
|
||||||
|
// get x for backup position
|
||||||
|
sint32 getBackupX() const { return _BackupX; }
|
||||||
|
sint32 getBackupY() const { return _BackupY; }
|
||||||
|
// Set backup position
|
||||||
|
void setBackupPosition(sint32 x, sint32 y);
|
||||||
|
// clear backup
|
||||||
|
void clearBackup() { _PositionBackuped = false; }
|
||||||
|
// Test if position has been backuped (flag cleared by 'restorePosition()')
|
||||||
|
bool isPositionBackuped() const { return _PositionBackuped; }
|
||||||
|
// check if the container has been moved, resized, or popuped by the user (and eventually clear that flag)
|
||||||
|
bool getTouchFlag(bool clearFlag) const;
|
||||||
|
// from CInterfaceGroup
|
||||||
|
virtual void restoreAllContainersBackupPosition() { restorePosition(); }
|
||||||
|
|
||||||
|
// when isModal() is true, the whole interface cannot switch desktop
|
||||||
|
bool isModal() const { return _Modal; }
|
||||||
|
void setModal(bool modal) { _Modal = modal; }
|
||||||
|
|
||||||
|
// return true if the container has a modal parent window setuped => the whole interface cannot switch desktop
|
||||||
|
bool isModalSon() const { return !_ModalParents.empty(); }
|
||||||
|
|
||||||
|
// return the help web page of this container. "" if none
|
||||||
|
const std::string &getHelpPage() const { return _HelpPage; }
|
||||||
|
// set the help web page of this container. "" if none. NB: the help button is not updated
|
||||||
|
void setHelpPage(const std::string &newPage);
|
||||||
|
|
||||||
|
void setTitleDeltaMaxW(sint32 delta) { _TitleDeltaMaxW = delta; }
|
||||||
|
sint32 getTitleDeltaMaxW() const { return _TitleDeltaMaxW; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
uint8 _ICurrentRolloverAlphaContainer;
|
||||||
|
uint8 _HighLightedAlpha;
|
||||||
|
float _CurrentRolloverAlphaContainer;
|
||||||
|
float _CurrentRolloverAlphaContent;
|
||||||
|
sint32 _LayerSetup;
|
||||||
|
ucstring _TitleTextOpened;
|
||||||
|
ucstring _TitleTextClosed;
|
||||||
|
CViewText *_TitleOpened;
|
||||||
|
CViewText *_TitleClosed;
|
||||||
|
sint32 _TitleDeltaMaxW;
|
||||||
|
CViewBitmap *_ViewOpenState; // Arrow showing if we are opened or not (if we are openable)
|
||||||
|
CCtrlButton *_RightButton; // Multi usage button : deactive or popup or popin
|
||||||
|
CCtrlButton *_HelpButton; // Help button
|
||||||
|
|
||||||
|
CGroupList *_List;
|
||||||
|
CCtrlScroll *_ScrollBar;
|
||||||
|
CGroupContainer *_OldFatherContainer;
|
||||||
|
|
||||||
|
// NB: _ModalParentNames is a list of modal parent, separated by '|'
|
||||||
|
std::string _ModalParentNames; // Modal handling between container (container can be linked together,
|
||||||
|
std::vector<CGroupContainer*> _ModalSons; // when the son is active the parent is not active
|
||||||
|
std::vector<CGroupContainer*> _ModalParents; // (but the rest of the interface is))
|
||||||
|
|
||||||
|
uint _InsertionOrder;
|
||||||
|
uint _BlinkDT;
|
||||||
|
uint _NumBlinks;
|
||||||
|
|
||||||
|
CInterfaceGroup *_Content; // Read From Script
|
||||||
|
CInterfaceGroup *_HeaderOpened; // Read From Script
|
||||||
|
CInterfaceGroup *_HeaderClosed; // Read From Script
|
||||||
|
|
||||||
|
CCtrlResizer *_Resizer[NumResizers]; // up to 8 resizers are available
|
||||||
|
|
||||||
|
//
|
||||||
|
CCtrlMover *_Mover;
|
||||||
|
|
||||||
|
IChildrenObs *_Obs;
|
||||||
|
|
||||||
|
// If layer==0 constraint on resize
|
||||||
|
sint32 _PopupMinW;
|
||||||
|
sint32 _PopupMaxW;
|
||||||
|
sint32 _PopupMinH;
|
||||||
|
sint32 _PopupMaxH;
|
||||||
|
// If layer>0 constraint on resize
|
||||||
|
sint32 _MinW;
|
||||||
|
sint32 _MaxW;
|
||||||
|
|
||||||
|
// backuped position
|
||||||
|
sint32 _BackupX;
|
||||||
|
sint32 _BackupY;
|
||||||
|
|
||||||
|
// old position at which the window was popup, -1 values means that the window hasn't been turned into a popup yet
|
||||||
|
sint32 _PopupX;
|
||||||
|
sint32 _PopupY;
|
||||||
|
sint32 _PopupW;
|
||||||
|
sint32 _PopupH;
|
||||||
|
//
|
||||||
|
sint32 _RefW;
|
||||||
|
|
||||||
|
|
||||||
|
sint32 _MoverDeltaW;
|
||||||
|
|
||||||
|
// action handler
|
||||||
|
IActionHandler *_AHOnOpen;
|
||||||
|
CStringShared _AHOnOpenParams;
|
||||||
|
IActionHandler *_AHOnClose;
|
||||||
|
CStringShared _AHOnCloseParams;
|
||||||
|
IActionHandler *_AHOnCloseButton;
|
||||||
|
CStringShared _AHOnCloseButtonParams;
|
||||||
|
IActionHandler *_AHOnMove;
|
||||||
|
CStringShared _AHOnMoveParams;
|
||||||
|
IActionHandler *_AHOnResize;
|
||||||
|
CStringShared _AHOnResizeParams;
|
||||||
|
IActionHandler *_AHOnBeginMove;
|
||||||
|
CStringShared _AHOnBeginMoveParams;
|
||||||
|
|
||||||
|
// action handler to test whether the windows can be deactivated (when the close button is pressed)
|
||||||
|
IActionHandler *_AHOnDeactiveCheck;
|
||||||
|
CStringShared _AHOnDeactiveCheckParams;
|
||||||
|
|
||||||
|
|
||||||
|
// Observer to know when children have moved
|
||||||
|
IChildrenObs *_ChildrenObs;
|
||||||
|
|
||||||
|
// list of container that are poped up
|
||||||
|
std::vector<CGroupContainer *> _PopedCont;
|
||||||
|
|
||||||
|
// Open management
|
||||||
|
bool _Openable : 1; // Is the container can be manually opened or closed ?
|
||||||
|
bool _Opened : 1; // Is the container currently opened or closed ?
|
||||||
|
bool _OpenWhenPopup : 1; // Does the container must open when poped up ? (layer>0)
|
||||||
|
// and close when poped in...
|
||||||
|
bool _OpenAtStart : 1; // Mgt : to setup _Opened state at start
|
||||||
|
bool _OpenedBeforePopup : 1; // Mgt : Is the container opened before poped up ? (layer>0)
|
||||||
|
|
||||||
|
// Move management
|
||||||
|
bool _Movable : 1; // Is the container movable ?
|
||||||
|
bool _MovableInParentList: 1;
|
||||||
|
bool _Lockable : 1;
|
||||||
|
bool _MovingInParentList : 1; // Mgt : currently moving ?
|
||||||
|
|
||||||
|
// Pop up / pop in
|
||||||
|
bool _Popable : 1;
|
||||||
|
bool _Poped : 1;
|
||||||
|
|
||||||
|
bool _EnabledResizer : 1;
|
||||||
|
|
||||||
|
bool _HighLighted : 1;
|
||||||
|
bool _Blinking : 1;
|
||||||
|
bool _BlinkState : 1;
|
||||||
|
|
||||||
|
bool _Savable : 1;
|
||||||
|
bool _ActiveSavable : 1;
|
||||||
|
|
||||||
|
// Display title background or not
|
||||||
|
bool _HeaderActive : 1;
|
||||||
|
bool _EnabledRightButton : 1; // Is the Button Deactive/Popup/Popin is enabled ?
|
||||||
|
//
|
||||||
|
enum TTileClass {TitleText=0, TitleTextFormated, TitleTextId, TitleTextDynString};
|
||||||
|
uint8 _TitleClass : 2;
|
||||||
|
//
|
||||||
|
mutable bool _TouchFlag : 1;
|
||||||
|
bool _PositionBackuped : 1;
|
||||||
|
bool _Modal : 1; // the container is modal and prevent from switching virtual desktop
|
||||||
|
//
|
||||||
|
bool _EnabledHelpButton : 1; // Is the Button Help is enabled ?
|
||||||
|
//
|
||||||
|
bool _TitleOverExtendViewText : 1; // Does the title over extend view text
|
||||||
|
bool _Localize : 1;
|
||||||
|
|
||||||
|
CInterfaceProperty _HeaderColor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sint8 _ContentYOffset;
|
||||||
|
|
||||||
|
// Special Top Resizer Height (for Inventory and ChatGroup). <0 (default) => take default option value
|
||||||
|
sint8 _ResizerTopSize;
|
||||||
|
uint8 _ICurrentRolloverAlphaContent;
|
||||||
|
|
||||||
|
|
||||||
|
static bool _ValidateCanDeactivate;
|
||||||
|
|
||||||
|
CStringShared _OptionsName;
|
||||||
|
|
||||||
|
// Web Page used for help
|
||||||
|
CStringShared _HelpPage;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
sint32 getLayer();
|
||||||
|
void updateResizerSize(CCtrlResizer *cr);
|
||||||
|
void updateRightButton();
|
||||||
|
void updateHelpButton();
|
||||||
|
void updateMover();
|
||||||
|
void updateViewOpenState();
|
||||||
|
void updateTitle();
|
||||||
|
|
||||||
|
void createResizer(uint index, THotSpot posRef, THotSpot type, sint32 offsetX, sint32 offsetY, bool bMaxH);
|
||||||
|
void createResizerMaxH();
|
||||||
|
void removeResizerMaxH();
|
||||||
|
|
||||||
|
TTileClass convertTitleClass(const char *ptr);
|
||||||
|
|
||||||
|
static COptionsContainerMove *getMoveOptions();
|
||||||
|
|
||||||
|
COptionsLayer *getContainerOptions(sint32 ls=-1); // Depends if overload by OptionsName or default used
|
||||||
|
|
||||||
|
bool hasKeyboardFocus() const;
|
||||||
|
|
||||||
|
// private for modal system
|
||||||
|
void addModalParent (CGroupContainer *pParent);
|
||||||
|
void addModalSon (CGroupContainer *pSon);
|
||||||
|
|
||||||
|
// Avoid each frame setup layer0, layer1 etc...
|
||||||
|
enum {NumLayerName=10};
|
||||||
|
static const std::string _OptionLayerName[NumLayerName];
|
||||||
|
|
||||||
|
public:
|
||||||
|
// for use by CCtrlMover
|
||||||
|
// Tell that this group is moving in its parent list
|
||||||
|
void setMovingInParentList(bool enable);
|
||||||
|
CGroupList *getPreviousParentList() const { return _OldFatherContainer ? _OldFatherContainer->_List : NULL; }
|
||||||
|
CCtrlScroll *getPreviousParentScrollBar() const { return _OldFatherContainer ? _OldFatherContainer->_ScrollBar : NULL; }
|
||||||
|
CGroupContainer *getPreviousContainer() const { return _OldFatherContainer; }
|
||||||
|
// set the 'hasMoved' flag
|
||||||
|
void touch(bool touched = true) { _TouchFlag = touched; }
|
||||||
|
|
||||||
|
friend class CICDeactive;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // RZ_INTERFACE_CONTAINER_H
|
||||||
|
|
||||||
|
/* End of interface_container.h */
|
4005
code/nel/src/gui/group_container.cpp
Normal file
4005
code/nel/src/gui/group_container.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@
|
||||||
#include "net_manager.h"
|
#include "net_manager.h"
|
||||||
#include "interface_v3/interface_manager.h"
|
#include "interface_v3/interface_manager.h"
|
||||||
#include "interface_v3/interface_3d_scene.h"
|
#include "interface_v3/interface_3d_scene.h"
|
||||||
#include "interface_v3/group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "sheet_manager.h"
|
#include "sheet_manager.h"
|
||||||
#include "interface_v3/inventory_manager.h"
|
#include "interface_v3/inventory_manager.h"
|
||||||
#include "interface_v3/guild_manager.h"
|
#include "interface_v3/guild_manager.h"
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#include "client_cfg.h"
|
#include "client_cfg.h"
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "interface_v3/interface_manager.h"
|
#include "interface_v3/interface_manager.h"
|
||||||
#include "interface_v3/group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "interface_v3/guild_manager.h"
|
#include "interface_v3/guild_manager.h"
|
||||||
#include "interface_v3/skill_manager.h"
|
#include "interface_v3/skill_manager.h"
|
||||||
#include "user_entity.h"
|
#include "user_entity.h"
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
#include "nel/gui/interface_expr.h"
|
#include "nel/gui/interface_expr.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
|
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "interface_3d_scene.h"
|
#include "interface_3d_scene.h"
|
||||||
#include "character_3d.h"
|
#include "character_3d.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "people_interraction.h"
|
#include "people_interraction.h"
|
||||||
|
|
||||||
#include "../r2/editor.h"
|
#include "../r2/editor.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "ctrl_sheet_selection.h"
|
#include "ctrl_sheet_selection.h"
|
||||||
#include "nel/gui/interface_expr.h"
|
#include "nel/gui/interface_expr.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "inventory_manager.h"
|
#include "inventory_manager.h"
|
||||||
#include "guild_manager.h"
|
#include "guild_manager.h"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "skill_manager.h"
|
#include "skill_manager.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "nel/gui/interface_expr.h"
|
#include "nel/gui/interface_expr.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "group_quick_help.h"
|
#include "group_quick_help.h"
|
||||||
#include "nel/gui/view_text_id.h"
|
#include "nel/gui/view_text_id.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "action_handler_misc.h"
|
#include "action_handler_misc.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "people_interraction.h"
|
#include "people_interraction.h"
|
||||||
#include "nel/misc/algo.h"
|
#include "nel/misc/algo.h"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "dbgroup_build_phrase.h"
|
#include "dbgroup_build_phrase.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "sphrase_manager.h"
|
#include "sphrase_manager.h"
|
||||||
#include "sbrick_manager.h"
|
#include "sbrick_manager.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "bot_chat_manager.h"
|
#include "bot_chat_manager.h"
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "macrocmd_manager.h"
|
#include "macrocmd_manager.h"
|
||||||
#include "chat_window.h"
|
#include "chat_window.h"
|
||||||
#include "people_interraction.h"
|
#include "people_interraction.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "../client_cfg.h"
|
#include "../client_cfg.h"
|
||||||
#include "nel/gui/ctrl_base_button.h"
|
#include "nel/gui/ctrl_base_button.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "../string_manager_client.h"
|
#include "../string_manager_client.h"
|
||||||
#include "../net_manager.h"
|
#include "../net_manager.h"
|
||||||
#include "sbrick_manager.h"
|
#include "sbrick_manager.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "bot_chat_page_all.h"
|
#include "bot_chat_page_all.h"
|
||||||
#include "dbgroup_list_sheet_trade.h"
|
#include "dbgroup_list_sheet_trade.h"
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "nel/gui/view_text_id.h"
|
#include "nel/gui/view_text_id.h"
|
||||||
#include "../net_manager.h"
|
#include "../net_manager.h"
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "group_tab.h"
|
#include "group_tab.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "action_handler_help.h"
|
#include "action_handler_help.h"
|
||||||
#include "../string_manager_client.h"
|
#include "../string_manager_client.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "dbgroup_list_sheet_text.h"
|
#include "dbgroup_list_sheet_text.h"
|
||||||
#include "nel/gui/ctrl_text_button.h"
|
#include "nel/gui/ctrl_text_button.h"
|
||||||
#include "../client_cfg.h"
|
#include "../client_cfg.h"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "people_interraction.h"
|
#include "people_interraction.h"
|
||||||
#include "../connection.h"
|
#include "../connection.h"
|
||||||
//
|
//
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "group_tab.h"
|
#include "group_tab.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
|
|
|
@ -31,10 +31,10 @@ namespace NLGUI
|
||||||
class CViewText;
|
class CViewText;
|
||||||
class CGroupList;
|
class CGroupList;
|
||||||
class CGroupEditBox;
|
class CGroupEditBox;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CChatWindow;
|
class CChatWindow;
|
||||||
class CGroupContainer;
|
|
||||||
|
|
||||||
/** Interface to react to a chat box entry
|
/** Interface to react to a chat box entry
|
||||||
* Derivers should define the msgEntered member function to handle entry event.
|
* Derivers should define the msgEntered member function to handle entry event.
|
||||||
|
@ -120,7 +120,7 @@ public:
|
||||||
/** Get the container associated with this chat window
|
/** Get the container associated with this chat window
|
||||||
* NB : you should not change the name of the window ! Use rename instead
|
* NB : you should not change the name of the window ! Use rename instead
|
||||||
*/
|
*/
|
||||||
CGroupContainer *getContainer() const { return _Chat; }
|
NLGUI::CGroupContainer *getContainer() const { return _Chat; }
|
||||||
//
|
//
|
||||||
NLGUI::CGroupEditBox *getEditBox() const;
|
NLGUI::CGroupEditBox *getEditBox() const;
|
||||||
/** try to rename the chat window
|
/** try to rename the chat window
|
||||||
|
@ -162,7 +162,7 @@ protected:
|
||||||
~CChatWindow();
|
~CChatWindow();
|
||||||
protected:
|
protected:
|
||||||
IChatWindowListener *_Listener;
|
IChatWindowListener *_Listener;
|
||||||
NLMISC::CRefPtr<CGroupContainer> _Chat;
|
NLMISC::CRefPtr<NLGUI::CGroupContainer> _Chat;
|
||||||
NLGUI::CGroupEditBox *_EB;
|
NLGUI::CGroupEditBox *_EB;
|
||||||
bool _ParentBlink;
|
bool _ParentBlink;
|
||||||
static CChatWindow *_ChatWindowLaunchingCommand;
|
static CChatWindow *_ChatWindowLaunchingCommand;
|
||||||
|
@ -191,7 +191,7 @@ public:
|
||||||
void setTabIndex(sint32 n);
|
void setTabIndex(sint32 n);
|
||||||
|
|
||||||
// Free Teller
|
// Free Teller
|
||||||
CGroupContainer *createFreeTeller(const ucstring &winName, const std::string &winColor="");
|
NLGUI::CGroupContainer *createFreeTeller(const ucstring &winName, const std::string &winColor="");
|
||||||
void setActiveFreeTeller(const ucstring &winName, bool bActive=true);
|
void setActiveFreeTeller(const ucstring &winName, bool bActive=true);
|
||||||
ucstring getFreeTellerName(const std::string &containerID);
|
ucstring getFreeTellerName(const std::string &containerID);
|
||||||
bool removeFreeTeller(const std::string &containerID); // Return true if free teller found
|
bool removeFreeTeller(const std::string &containerID); // Return true if free teller found
|
||||||
|
@ -205,10 +205,10 @@ public:
|
||||||
protected:
|
protected:
|
||||||
friend class CChatWindowManager;
|
friend class CChatWindowManager;
|
||||||
|
|
||||||
std::vector<CGroupContainer*> _FreeTellers;
|
std::vector<NLGUI::CGroupContainer*> _FreeTellers;
|
||||||
|
|
||||||
void getAssociatedSubWindow(CChatGroup::TGroupType gt, uint32 dynamicChatDbIndex, NLGUI::CGroupList *&gl, class CCtrlTabButton *&tab);
|
void getAssociatedSubWindow(CChatGroup::TGroupType gt, uint32 dynamicChatDbIndex, NLGUI::CGroupList *&gl, class CCtrlTabButton *&tab);
|
||||||
void updateFreeTellerHeader(CGroupContainer &ft);
|
void updateFreeTellerHeader(NLGUI::CGroupContainer &ft);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Get a valid string to use like ui id
|
/** Get a valid string to use like ui id
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "dbgroup_list_sheet.h"
|
#include "dbgroup_list_sheet.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
#include "nel/gui/interface_property.h"
|
#include "nel/gui/interface_property.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
|
|
|
@ -27,10 +27,8 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
class CCtrlBaseButton;
|
class CCtrlBaseButton;
|
||||||
class CCtrlScroll;
|
class CCtrlScroll;
|
||||||
}
|
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
class CGroupContainer;
|
class CGroupContainer;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
#include "dbgroup_list_sheet_text.h"
|
#include "dbgroup_list_sheet_text.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
#include "../sheet_manager.h"
|
#include "../sheet_manager.h"
|
||||||
|
|
|
@ -31,13 +31,13 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
class CCtrlButton;
|
class CCtrlButton;
|
||||||
class CCtrlScroll;
|
class CCtrlScroll;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
class CHandlerListSheetTradeSelect;
|
class CHandlerListSheetTradeSelect;
|
||||||
class CHandlerListSheetTradeRightClick;
|
class CHandlerListSheetTradeRightClick;
|
||||||
class CGroupContainer;
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define NL_GROUP_CAREER_H
|
#define NL_GROUP_CAREER_H
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/vector_2f.h"
|
#include "nel/misc/vector_2f.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "animal_position_state.h"
|
#include "animal_position_state.h"
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,655 +0,0 @@
|
||||||
// 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 RZ_GROUP_CONTAINER_H
|
|
||||||
#define RZ_GROUP_CONTAINER_H
|
|
||||||
|
|
||||||
#include "nel/gui/interface_group.h"
|
|
||||||
#include "nel/gui/group_container_base.h"
|
|
||||||
#include "nel/misc/smart_ptr.h"
|
|
||||||
|
|
||||||
namespace NLGUI
|
|
||||||
{
|
|
||||||
class CEventDescriptorLocalised;
|
|
||||||
class CCtrlButton;
|
|
||||||
class CCtrlScroll;
|
|
||||||
class CViewText;
|
|
||||||
class CViewBitmap;
|
|
||||||
class CGroupList;
|
|
||||||
class COptionsContainerInsertion;
|
|
||||||
class COptionsContainerMove;
|
|
||||||
class COptionsLayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CGroupContainer;
|
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
/**
|
|
||||||
* class describing a resizer for the container
|
|
||||||
* \author Matthieu 'TrapII' Besson
|
|
||||||
* \date 2003
|
|
||||||
*/
|
|
||||||
class CCtrlResizer : public CCtrlBase
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
CCtrlResizer(const TCtorParam ¶m);
|
|
||||||
virtual void draw ();
|
|
||||||
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);
|
|
||||||
// Add a big delta so when the user is over the Resizer, always take it whatever other controls under
|
|
||||||
virtual uint getDeltaDepth() const { return 100; }
|
|
||||||
|
|
||||||
// get real resizer pos : if parent has pop_min_w == pop_max_w, then horizontal resizer will be discarded
|
|
||||||
// if parent has pop_min_h == pop_max_h, then vertical resizer will be discarded
|
|
||||||
THotSpot getRealResizerPos() const;
|
|
||||||
THotSpot getResizerPos() const { return _ResizerPos; }
|
|
||||||
void setResizerPos(THotSpot resizerPos) { _ResizerPos = resizerPos; }
|
|
||||||
|
|
||||||
bool IsMaxH; // Do this resizer is a MaxH resizer ?
|
|
||||||
|
|
||||||
// Max sizes for the parent
|
|
||||||
sint32 WMin, WMax;
|
|
||||||
sint32 HMin, HMax;
|
|
||||||
|
|
||||||
// from CCtrlBase
|
|
||||||
virtual bool canChangeVirtualDesktop() const { return !_MouseDown; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
sint32 resizeW (sint32 dx);
|
|
||||||
sint32 resizeH (sint32 dy);
|
|
||||||
|
|
||||||
private:
|
|
||||||
THotSpot _ResizerPos; // how the resizer should resize its parent
|
|
||||||
bool _MouseDown;
|
|
||||||
sint32 _MouseDownX;
|
|
||||||
sint32 _MouseDownY;
|
|
||||||
sint32 _XBias;
|
|
||||||
sint32 _YBias;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
/**
|
|
||||||
* Class describing a Mover for the container
|
|
||||||
* Clicking on it can also open the container
|
|
||||||
* This can be used to move a container if it is movable.
|
|
||||||
* If the container is popable, it will first pull it of the hierarchy, then it becomes movable.
|
|
||||||
* It can also be used to change the position of a group container that is inserted in the list of another container.
|
|
||||||
* \author Lionel Berenguier
|
|
||||||
* \date 2003
|
|
||||||
*/
|
|
||||||
class CCtrlMover : public CCtrlBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
CCtrlMover(const TCtorParam ¶m, bool canMove, bool canOpen);
|
|
||||||
~CCtrlMover();
|
|
||||||
virtual void draw ();
|
|
||||||
virtual bool handleEvent (const NLGUI::CEventDescriptor &event);
|
|
||||||
bool canMove() { return _CanMove; }
|
|
||||||
|
|
||||||
bool isMoving() const {return _Moving;}
|
|
||||||
bool isMovingInParentList() const { return _MovingInParentList; }
|
|
||||||
|
|
||||||
// from CCtrlBase
|
|
||||||
virtual bool canChangeVirtualDesktop() const { return !_Moving; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
sint32 _MoveStartX, _MoveStartY;
|
|
||||||
sint32 _MoveDeltaXReal, _MoveDeltaYReal;
|
|
||||||
sint64 _ScrollTime;
|
|
||||||
sint32 _StartIndex;
|
|
||||||
sint32 _InsertionIndex;
|
|
||||||
// clip window from parent list
|
|
||||||
sint32 _ParentListTop;
|
|
||||||
sint32 _ParentListBottom;
|
|
||||||
//
|
|
||||||
sint64 _WaitToOpenCloseDate;
|
|
||||||
//
|
|
||||||
bool _CanMove : 1;
|
|
||||||
bool _CanOpen : 1;
|
|
||||||
bool _Moving : 1;
|
|
||||||
bool _MovingInParentList : 1;
|
|
||||||
bool _HasMoved : 1;
|
|
||||||
bool _ParentScrollingUp : 1;
|
|
||||||
bool _ParentScrollingDown : 1;
|
|
||||||
bool _StopScrolling : 1; // stop scrolling at next draw
|
|
||||||
bool _WaitToOpenClose : 1;
|
|
||||||
//
|
|
||||||
static COptionsContainerInsertion *getInsertionOptions();
|
|
||||||
private:
|
|
||||||
void setPoped(CGroupContainer *gc, sint32 x, sint32 y, const NLGUI::CEventDescriptorMouse &eventDesc);
|
|
||||||
void setMovingInParent(CGroupContainer *gc, sint32 x, sint32 y, const NLGUI::CEventDescriptorMouse &eventDesc);
|
|
||||||
void updateInsertionIndex(const CGroupList *gl, sint32 posY);
|
|
||||||
void stopMove();
|
|
||||||
bool runTitleActionHandler();
|
|
||||||
void handleScrolling();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
/**
|
|
||||||
* class describing a group of views controls and other groups
|
|
||||||
* \author Matthieu 'TrapII' Besson
|
|
||||||
* \author Nevrax France
|
|
||||||
* \date 2002
|
|
||||||
*/
|
|
||||||
class CGroupContainer : public CGroupContainerBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
enum { NumResizers = 8 };
|
|
||||||
public:
|
|
||||||
// observer to know when children have moved. This can be used to keep external datas in sync
|
|
||||||
struct IChildrenObs
|
|
||||||
{
|
|
||||||
virtual void childrenMoved(uint srcIndex, uint destIndex, CGroupContainer *children) = 0;
|
|
||||||
};
|
|
||||||
public:
|
|
||||||
CGroupContainer(const TCtorParam ¶m);
|
|
||||||
~CGroupContainer();
|
|
||||||
|
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
|
||||||
|
|
||||||
virtual void updateCoords ();
|
|
||||||
|
|
||||||
virtual void draw ();
|
|
||||||
|
|
||||||
virtual void clearViews ();
|
|
||||||
|
|
||||||
virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc);
|
|
||||||
|
|
||||||
virtual void launch ();
|
|
||||||
|
|
||||||
virtual void setActive (bool state);
|
|
||||||
|
|
||||||
virtual bool getViewsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, sint32 clipW, sint32 clipH, std::vector<CViewBase*> &vVB); // Return true if x,y under the group
|
|
||||||
|
|
||||||
virtual bool getCtrlsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, sint32 clipW, sint32 clipH, std::vector<CCtrlBase*> &vICL);
|
|
||||||
|
|
||||||
void open();
|
|
||||||
|
|
||||||
void close();
|
|
||||||
|
|
||||||
void setup(); // Create the container
|
|
||||||
|
|
||||||
/** If insertion order is -1, pIC is added at the end of the container
|
|
||||||
* otherwise it is inserted after containers of a lower order
|
|
||||||
*/
|
|
||||||
void attachContainer (CGroupContainer *pIC, sint insertionOrder = -1);
|
|
||||||
// Insert a container at the given index.
|
|
||||||
bool attachContainerAtIndex(CGroupContainer *pIC, uint index);
|
|
||||||
|
|
||||||
// Before a container is detached from parent, it should be pop in
|
|
||||||
void detachContainer (CGroupContainer *pIC);
|
|
||||||
void removeAllContainers();
|
|
||||||
|
|
||||||
void setOpen(bool opened)
|
|
||||||
{
|
|
||||||
if (opened)
|
|
||||||
{
|
|
||||||
open();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bool isOpen() const { return _Opened; }
|
|
||||||
|
|
||||||
// Force Open for container setActive and open()
|
|
||||||
virtual void forceOpen();
|
|
||||||
|
|
||||||
/// Set the title open and close
|
|
||||||
virtual bool isMovable() const {return _Movable;}
|
|
||||||
void setMovable(bool b);
|
|
||||||
|
|
||||||
void setContent (CInterfaceGroup *pC);
|
|
||||||
|
|
||||||
std::string getTitle () const;
|
|
||||||
void setTitle (const std::string &title);
|
|
||||||
std::string getTitleOpened () const;
|
|
||||||
void setTitleOpened (const std::string &title);
|
|
||||||
std::string getTitleClosed () const;
|
|
||||||
void setTitleClosed (const std::string &title);
|
|
||||||
std::string getTitleColorAsString() const;
|
|
||||||
void setTitleColorAsString(const std::string &col);
|
|
||||||
|
|
||||||
void setHeaderColor (const std::string &ptr) { _HeaderColor.link(ptr.c_str()); }
|
|
||||||
|
|
||||||
// Get the header color draw. NB: depends if grayed, and if active.
|
|
||||||
NLMISC::CRGBA getDrawnHeaderColor () const;
|
|
||||||
|
|
||||||
ucstring getUCTitleOpened () const;
|
|
||||||
void setUCTitleOpened (const ucstring &title);
|
|
||||||
ucstring getUCTitleClosed () const;
|
|
||||||
void setUCTitleClosed (const ucstring &title);
|
|
||||||
ucstring getUCTitle () const;
|
|
||||||
void setUCTitle (const ucstring &title);
|
|
||||||
|
|
||||||
void setPopable(bool popable) { _Popable = popable; }
|
|
||||||
bool isPopable() const { return _Popable; }
|
|
||||||
bool isPopuped() const { return _Poped; }
|
|
||||||
|
|
||||||
|
|
||||||
void setMovableInParentList(bool /* movable */) { _MovableInParentList = true; }
|
|
||||||
bool isMovableInParentList() const { return _MovableInParentList; }
|
|
||||||
|
|
||||||
// high light the border of the container
|
|
||||||
void setHighLighted(bool hightlighted, uint8 alpha=255) { _HighLighted = hightlighted; _HighLightedAlpha = alpha; }
|
|
||||||
bool isHighLighted() const { return _HighLighted; }
|
|
||||||
|
|
||||||
// y offset for content of container
|
|
||||||
sint32 getContentYOffset() const { return (sint32) _ContentYOffset; }
|
|
||||||
void setContentYOffset(sint32 value);
|
|
||||||
|
|
||||||
// Window requires attention
|
|
||||||
void requireAttention();
|
|
||||||
|
|
||||||
// Lua exports
|
|
||||||
int luaBlink(CLuaState &ls);
|
|
||||||
int luaSetHeaderColor(CLuaState &ls);
|
|
||||||
|
|
||||||
REFLECT_EXPORT_START(CGroupContainer, CGroupContainerBase)
|
|
||||||
REFLECT_LUA_METHOD("blink", luaBlink);
|
|
||||||
REFLECT_LUA_METHOD("setHeaderColor", luaSetHeaderColor);
|
|
||||||
REFLECT_STRING("title", getTitle, setTitle);
|
|
||||||
REFLECT_STRING("title_opened", getTitleOpened, setTitleOpened);
|
|
||||||
REFLECT_STRING("title_closed", getTitleClosed, setTitleClosed);
|
|
||||||
REFLECT_UCSTRING("uc_title_opened", getUCTitleOpened, setUCTitleOpened);
|
|
||||||
REFLECT_UCSTRING("uc_title_closed", getUCTitleClosed, setUCTitleClosed);
|
|
||||||
REFLECT_UCSTRING("uc_title", getUCTitle, setUCTitle);
|
|
||||||
REFLECT_STRING("title_color", getTitleColorAsString, setTitleColorAsString);
|
|
||||||
REFLECT_SINT32("pop_min_h", getPopupMinH, setPopupMinH);
|
|
||||||
REFLECT_SINT32("pop_max_h", getPopupMaxH, setPopupMaxH);
|
|
||||||
REFLECT_SINT32("pop_min_w", getPopupMinW, setPopupMinW);
|
|
||||||
REFLECT_SINT32("pop_max_w", getPopupMaxW, setPopupMaxW);
|
|
||||||
REFLECT_SINT32("title_delta_max_w", getTitleDeltaMaxW, setTitleDeltaMaxW);
|
|
||||||
REFLECT_SINT32("content_y_offset", getContentYOffset, setContentYOffset);
|
|
||||||
REFLECT_BOOL("openable", isOpenable, setOpenable);
|
|
||||||
REFLECT_BOOL("opened", isOpen, setOpen);
|
|
||||||
REFLECT_BOOL("lockable", isLockable, setLockable);
|
|
||||||
REFLECT_BOOL("locked", isLocked, setLocked);
|
|
||||||
|
|
||||||
REFLECT_BOOL("header_active", getHeaderActive, setHeaderActive);
|
|
||||||
REFLECT_BOOL("right_button_enabled", getRightButtonEnabled, setRightButtonEnabled);
|
|
||||||
REFLECT_EXPORT_END
|
|
||||||
|
|
||||||
sint32 getLayerSetup() const { return _LayerSetup; }
|
|
||||||
|
|
||||||
// if this window is popable, pop it at its actual position
|
|
||||||
void popupCurrentPos();
|
|
||||||
// Popup at previous memorized position
|
|
||||||
void popup();
|
|
||||||
/** Popin the window and possibly put it back in its father container, using the order defined in the list of the container.
|
|
||||||
* \param putBackInFather When true, put the window back in its former father container, otherwise, the container is unliked from the hierachy (parents are NULL)
|
|
||||||
* \param insertPos If this is equal to -1, then the window is inserted at its previous position. Otherwise it is inserted before the given position in the list
|
|
||||||
*/
|
|
||||||
void popin(sint32 insertPos = -1, bool putBackInFatherContainer = true);
|
|
||||||
|
|
||||||
// get the mover control associated with that control, or NULL if none
|
|
||||||
CCtrlMover *getCtrlMover() const { return _Mover; }
|
|
||||||
|
|
||||||
// true if there is a mover and if the window is being moved
|
|
||||||
bool isMoving() const { return _Mover && _Mover->isMoving(); }
|
|
||||||
|
|
||||||
/** Force the container to blink (to tell the user that an event has happened).
|
|
||||||
* This uses the global color, so the container must use it
|
|
||||||
* This state is automatically disabled if the container is opened
|
|
||||||
* \param numBlinks 0 If the container should blink endlessly, the number of blink otherwise
|
|
||||||
*/
|
|
||||||
virtual void enableBlink(uint numBlinks = 0);
|
|
||||||
virtual void disableBlink();
|
|
||||||
virtual bool isBlinking() const { return _Blinking; }
|
|
||||||
|
|
||||||
CGroupList *getList() const { return _List; }
|
|
||||||
|
|
||||||
CInterfaceGroup *getHeaderOpened() const { return _HeaderOpened; }
|
|
||||||
CInterfaceGroup *getHeaderClosed() const { return _HeaderClosed; }
|
|
||||||
CInterfaceGroup *getContent() const { return _Content; }
|
|
||||||
|
|
||||||
void setChildrenObs(IChildrenObs *obs) { _ChildrenObs = obs; }
|
|
||||||
IChildrenObs *getChildrenObs() const { return _ChildrenObs; }
|
|
||||||
|
|
||||||
// Get current father container (if any).
|
|
||||||
CGroupContainer *getFatherContainer() const;
|
|
||||||
// Get current father container (if any). If the container is popup, it gives the proprietary container
|
|
||||||
CGroupContainer *getProprietaryContainer() const;
|
|
||||||
|
|
||||||
|
|
||||||
bool isOpenable() const { return _Openable; }
|
|
||||||
void setOpenable(bool openable);
|
|
||||||
|
|
||||||
bool getHeaderActive() const { return _HeaderActive; }
|
|
||||||
void setHeaderActive(bool active) { _HeaderActive = active; }
|
|
||||||
|
|
||||||
bool getRightButtonEnabled() const { return _EnabledRightButton; }
|
|
||||||
void setRightButtonEnabled(bool enabled);
|
|
||||||
|
|
||||||
CCtrlScroll *getScroll() const { return _ScrollBar; }
|
|
||||||
|
|
||||||
bool isSavable() const { return _Savable; }
|
|
||||||
void setSavable(bool savable) { _Savable = savable; }
|
|
||||||
bool isActiveSavable() const { return _ActiveSavable; }
|
|
||||||
|
|
||||||
bool isLocalize() const { return _Localize; }
|
|
||||||
void setLocalize(bool localize) { _Localize = localize; }
|
|
||||||
|
|
||||||
void setPopupX(sint32 x) { _PopupX = x; }
|
|
||||||
void setPopupY(sint32 y) { _PopupY = y; }
|
|
||||||
void setPopupW(sint32 w) { _PopupW = w; }
|
|
||||||
void setPopupH(sint32 h) { _PopupH = h; }
|
|
||||||
|
|
||||||
sint32 getPopupX() const { return _PopupX; }
|
|
||||||
sint32 getPopupY() const { return _PopupY; }
|
|
||||||
sint32 getPopupW() const { return _PopupW; }
|
|
||||||
sint32 getPopupH() const { return _PopupH; }
|
|
||||||
|
|
||||||
sint32 getRefW() const { return _RefW; }
|
|
||||||
|
|
||||||
/** Increase the rollover alpha for the current frame.
|
|
||||||
* Example of use : an edit box that has focus in a group container
|
|
||||||
*/
|
|
||||||
void rollOverAlphaUp();
|
|
||||||
// force the rollover alpha to its max value, depending on there's keyboard focus or not
|
|
||||||
void forceRolloverAlpha();
|
|
||||||
|
|
||||||
bool isOpenWhenPopup() const { return _OpenWhenPopup; }
|
|
||||||
|
|
||||||
/// Locking of window (prevent it from being moved)
|
|
||||||
void setLockable(bool lockable);
|
|
||||||
bool isLockable() const { return _Lockable; }
|
|
||||||
void setLocked(bool locked);
|
|
||||||
|
|
||||||
// to be called by the 'deactive check' handler
|
|
||||||
static void validateCanDeactivate(bool validate) { _ValidateCanDeactivate = validate; }
|
|
||||||
const std::string &getAHOnDeactiveCheck() const { return CAHManager::getInstance()->getAHName(_AHOnDeactiveCheck); }
|
|
||||||
const std::string &getAHOnDeactiveCheckParams() const { return _AHOnDeactiveCheckParams; }
|
|
||||||
//
|
|
||||||
const std::string &getAHOnCloseButton() const { return CAHManager::getInstance()->getAHName(_AHOnCloseButton); }
|
|
||||||
const std::string &getAHOnCloseButtonParams() const { return _AHOnCloseButtonParams; }
|
|
||||||
//
|
|
||||||
IActionHandler *getAHOnMovePtr() const { return _AHOnMove; }
|
|
||||||
const std::string &getAHOnMove() const { return CAHManager::getInstance()->getAHName(_AHOnMove); }
|
|
||||||
const std::string &getAHOnMoveParams() const { return _AHOnMoveParams; }
|
|
||||||
//
|
|
||||||
IActionHandler *getAHOnResizePtr() const { return _AHOnResize; }
|
|
||||||
const std::string &getAHOnResize() const { return CAHManager::getInstance()->getAHName(_AHOnResize); }
|
|
||||||
const std::string &getAHOnResizeParams() const { return _AHOnResizeParams; }
|
|
||||||
//
|
|
||||||
IActionHandler *getAHOnBeginMovePtr() const { return _AHOnBeginMove; }
|
|
||||||
const std::string &getAHOnBeginMove() const { return CAHManager::getInstance()->getAHName(_AHOnBeginMove); }
|
|
||||||
const std::string &getAHOnBeginMoveParams() const { return _AHOnBeginMoveParams; }
|
|
||||||
|
|
||||||
//
|
|
||||||
void setOnCloseButtonHandler(const std::string &h) { _AHOnCloseButton = CAHManager::getInstance()->getAH(h,_AHOnCloseButtonParams); }
|
|
||||||
void setOnCloseButtonParams(const std::string &p) { _AHOnCloseButtonParams = p; }
|
|
||||||
|
|
||||||
void setModalParentList (const std::string &name);
|
|
||||||
bool checkIfModal(const NLGUI::CEventDescriptor& event); // Return true if we can handle the event (and prevent from selecting a window)
|
|
||||||
bool isGrayed() const;
|
|
||||||
bool blinkAllSons();
|
|
||||||
|
|
||||||
// true if the resizer is enabled.
|
|
||||||
bool getEnabledResizer() const {return _EnabledResizer;}
|
|
||||||
|
|
||||||
sint32 getPopupMinW() const {return _PopupMinW;}
|
|
||||||
sint32 getPopupMaxW() const {return _PopupMaxW;}
|
|
||||||
sint32 getPopupMinH() const {return _PopupMinH;}
|
|
||||||
sint32 getPopupMaxH() const {return _PopupMaxH;}
|
|
||||||
sint32 getMinW() const {return _MinW;}
|
|
||||||
void setMinW(sint32 minW) { _MinW = minW;}
|
|
||||||
void setMaxW(sint32 maxW) { _MaxW = maxW;}
|
|
||||||
sint32 getMaxW() const {return _MaxW;}
|
|
||||||
void setPopupMinW(sint32 minW);
|
|
||||||
void setPopupMaxW(sint32 maxW);
|
|
||||||
void setPopupMinH(sint32 minW);
|
|
||||||
void setPopupMaxH(sint32 maxW);
|
|
||||||
|
|
||||||
|
|
||||||
// backup the current position of this container
|
|
||||||
void backupPosition();
|
|
||||||
// restore the current position of this container
|
|
||||||
void restorePosition();
|
|
||||||
// get x for backup position
|
|
||||||
sint32 getBackupX() const { return _BackupX; }
|
|
||||||
sint32 getBackupY() const { return _BackupY; }
|
|
||||||
// Set backup position
|
|
||||||
void setBackupPosition(sint32 x, sint32 y);
|
|
||||||
// clear backup
|
|
||||||
void clearBackup() { _PositionBackuped = false; }
|
|
||||||
// Test if position has been backuped (flag cleared by 'restorePosition()')
|
|
||||||
bool isPositionBackuped() const { return _PositionBackuped; }
|
|
||||||
// check if the container has been moved, resized, or popuped by the user (and eventually clear that flag)
|
|
||||||
bool getTouchFlag(bool clearFlag) const;
|
|
||||||
// from CInterfaceGroup
|
|
||||||
virtual void restoreAllContainersBackupPosition() { restorePosition(); }
|
|
||||||
|
|
||||||
// when isModal() is true, the whole interface cannot switch desktop
|
|
||||||
bool isModal() const { return _Modal; }
|
|
||||||
void setModal(bool modal) { _Modal = modal; }
|
|
||||||
|
|
||||||
// return true if the container has a modal parent window setuped => the whole interface cannot switch desktop
|
|
||||||
bool isModalSon() const { return !_ModalParents.empty(); }
|
|
||||||
|
|
||||||
// return the help web page of this container. "" if none
|
|
||||||
const std::string &getHelpPage() const { return _HelpPage; }
|
|
||||||
// set the help web page of this container. "" if none. NB: the help button is not updated
|
|
||||||
void setHelpPage(const std::string &newPage);
|
|
||||||
|
|
||||||
void setTitleDeltaMaxW(sint32 delta) { _TitleDeltaMaxW = delta; }
|
|
||||||
sint32 getTitleDeltaMaxW() const { return _TitleDeltaMaxW; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
uint8 _ICurrentRolloverAlphaContainer;
|
|
||||||
uint8 _HighLightedAlpha;
|
|
||||||
float _CurrentRolloverAlphaContainer;
|
|
||||||
float _CurrentRolloverAlphaContent;
|
|
||||||
sint32 _LayerSetup;
|
|
||||||
ucstring _TitleTextOpened;
|
|
||||||
ucstring _TitleTextClosed;
|
|
||||||
CViewText *_TitleOpened;
|
|
||||||
CViewText *_TitleClosed;
|
|
||||||
sint32 _TitleDeltaMaxW;
|
|
||||||
CViewBitmap *_ViewOpenState; // Arrow showing if we are opened or not (if we are openable)
|
|
||||||
CCtrlButton *_RightButton; // Multi usage button : deactive or popup or popin
|
|
||||||
CCtrlButton *_HelpButton; // Help button
|
|
||||||
|
|
||||||
CGroupList *_List;
|
|
||||||
CCtrlScroll *_ScrollBar;
|
|
||||||
CGroupContainer *_OldFatherContainer;
|
|
||||||
|
|
||||||
// NB: _ModalParentNames is a list of modal parent, separated by '|'
|
|
||||||
std::string _ModalParentNames; // Modal handling between container (container can be linked together,
|
|
||||||
std::vector<CGroupContainer*> _ModalSons; // when the son is active the parent is not active
|
|
||||||
std::vector<CGroupContainer*> _ModalParents; // (but the rest of the interface is))
|
|
||||||
|
|
||||||
uint _InsertionOrder;
|
|
||||||
uint _BlinkDT;
|
|
||||||
uint _NumBlinks;
|
|
||||||
|
|
||||||
CInterfaceGroup *_Content; // Read From Script
|
|
||||||
CInterfaceGroup *_HeaderOpened; // Read From Script
|
|
||||||
CInterfaceGroup *_HeaderClosed; // Read From Script
|
|
||||||
|
|
||||||
CCtrlResizer *_Resizer[NumResizers]; // up to 8 resizers are available
|
|
||||||
|
|
||||||
//
|
|
||||||
CCtrlMover *_Mover;
|
|
||||||
|
|
||||||
IChildrenObs *_Obs;
|
|
||||||
|
|
||||||
// If layer==0 constraint on resize
|
|
||||||
sint32 _PopupMinW;
|
|
||||||
sint32 _PopupMaxW;
|
|
||||||
sint32 _PopupMinH;
|
|
||||||
sint32 _PopupMaxH;
|
|
||||||
// If layer>0 constraint on resize
|
|
||||||
sint32 _MinW;
|
|
||||||
sint32 _MaxW;
|
|
||||||
|
|
||||||
// backuped position
|
|
||||||
sint32 _BackupX;
|
|
||||||
sint32 _BackupY;
|
|
||||||
|
|
||||||
// old position at which the window was popup, -1 values means that the window hasn't been turned into a popup yet
|
|
||||||
sint32 _PopupX;
|
|
||||||
sint32 _PopupY;
|
|
||||||
sint32 _PopupW;
|
|
||||||
sint32 _PopupH;
|
|
||||||
//
|
|
||||||
sint32 _RefW;
|
|
||||||
|
|
||||||
|
|
||||||
sint32 _MoverDeltaW;
|
|
||||||
|
|
||||||
// action handler
|
|
||||||
IActionHandler *_AHOnOpen;
|
|
||||||
CStringShared _AHOnOpenParams;
|
|
||||||
IActionHandler *_AHOnClose;
|
|
||||||
CStringShared _AHOnCloseParams;
|
|
||||||
IActionHandler *_AHOnCloseButton;
|
|
||||||
CStringShared _AHOnCloseButtonParams;
|
|
||||||
IActionHandler *_AHOnMove;
|
|
||||||
CStringShared _AHOnMoveParams;
|
|
||||||
IActionHandler *_AHOnResize;
|
|
||||||
CStringShared _AHOnResizeParams;
|
|
||||||
IActionHandler *_AHOnBeginMove;
|
|
||||||
CStringShared _AHOnBeginMoveParams;
|
|
||||||
|
|
||||||
// action handler to test whether the windows can be deactivated (when the close button is pressed)
|
|
||||||
IActionHandler *_AHOnDeactiveCheck;
|
|
||||||
CStringShared _AHOnDeactiveCheckParams;
|
|
||||||
|
|
||||||
|
|
||||||
// Observer to know when children have moved
|
|
||||||
IChildrenObs *_ChildrenObs;
|
|
||||||
|
|
||||||
// list of container that are poped up
|
|
||||||
std::vector<CGroupContainer *> _PopedCont;
|
|
||||||
|
|
||||||
// Open management
|
|
||||||
bool _Openable : 1; // Is the container can be manually opened or closed ?
|
|
||||||
bool _Opened : 1; // Is the container currently opened or closed ?
|
|
||||||
bool _OpenWhenPopup : 1; // Does the container must open when poped up ? (layer>0)
|
|
||||||
// and close when poped in...
|
|
||||||
bool _OpenAtStart : 1; // Mgt : to setup _Opened state at start
|
|
||||||
bool _OpenedBeforePopup : 1; // Mgt : Is the container opened before poped up ? (layer>0)
|
|
||||||
|
|
||||||
// Move management
|
|
||||||
bool _Movable : 1; // Is the container movable ?
|
|
||||||
bool _MovableInParentList: 1;
|
|
||||||
bool _Lockable : 1;
|
|
||||||
bool _MovingInParentList : 1; // Mgt : currently moving ?
|
|
||||||
|
|
||||||
// Pop up / pop in
|
|
||||||
bool _Popable : 1;
|
|
||||||
bool _Poped : 1;
|
|
||||||
|
|
||||||
bool _EnabledResizer : 1;
|
|
||||||
|
|
||||||
bool _HighLighted : 1;
|
|
||||||
bool _Blinking : 1;
|
|
||||||
bool _BlinkState : 1;
|
|
||||||
|
|
||||||
bool _Savable : 1;
|
|
||||||
bool _ActiveSavable : 1;
|
|
||||||
|
|
||||||
// Display title background or not
|
|
||||||
bool _HeaderActive : 1;
|
|
||||||
bool _EnabledRightButton : 1; // Is the Button Deactive/Popup/Popin is enabled ?
|
|
||||||
//
|
|
||||||
enum TTileClass {TitleText=0, TitleTextFormated, TitleTextId, TitleTextDynString};
|
|
||||||
uint8 _TitleClass : 2;
|
|
||||||
//
|
|
||||||
mutable bool _TouchFlag : 1;
|
|
||||||
bool _PositionBackuped : 1;
|
|
||||||
bool _Modal : 1; // the container is modal and prevent from switching virtual desktop
|
|
||||||
//
|
|
||||||
bool _EnabledHelpButton : 1; // Is the Button Help is enabled ?
|
|
||||||
//
|
|
||||||
bool _TitleOverExtendViewText : 1; // Does the title over extend view text
|
|
||||||
bool _Localize : 1;
|
|
||||||
|
|
||||||
CInterfaceProperty _HeaderColor;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sint8 _ContentYOffset;
|
|
||||||
|
|
||||||
// Special Top Resizer Height (for Inventory and ChatGroup). <0 (default) => take default option value
|
|
||||||
sint8 _ResizerTopSize;
|
|
||||||
uint8 _ICurrentRolloverAlphaContent;
|
|
||||||
|
|
||||||
|
|
||||||
static bool _ValidateCanDeactivate;
|
|
||||||
|
|
||||||
CStringShared _OptionsName;
|
|
||||||
|
|
||||||
// Web Page used for help
|
|
||||||
CStringShared _HelpPage;
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
sint32 getLayer();
|
|
||||||
void updateResizerSize(CCtrlResizer *cr);
|
|
||||||
void updateRightButton();
|
|
||||||
void updateHelpButton();
|
|
||||||
void updateMover();
|
|
||||||
void updateViewOpenState();
|
|
||||||
void updateTitle();
|
|
||||||
|
|
||||||
void createResizer(uint index, THotSpot posRef, THotSpot type, sint32 offsetX, sint32 offsetY, bool bMaxH);
|
|
||||||
void createResizerMaxH();
|
|
||||||
void removeResizerMaxH();
|
|
||||||
|
|
||||||
TTileClass convertTitleClass(const char *ptr);
|
|
||||||
|
|
||||||
static COptionsContainerMove *getMoveOptions();
|
|
||||||
|
|
||||||
COptionsLayer *getContainerOptions(sint32 ls=-1); // Depends if overload by OptionsName or default used
|
|
||||||
|
|
||||||
bool hasKeyboardFocus() const;
|
|
||||||
|
|
||||||
// private for modal system
|
|
||||||
void addModalParent (CGroupContainer *pParent);
|
|
||||||
void addModalSon (CGroupContainer *pSon);
|
|
||||||
|
|
||||||
// Avoid each frame setup layer0, layer1 etc...
|
|
||||||
enum {NumLayerName=10};
|
|
||||||
static const std::string _OptionLayerName[NumLayerName];
|
|
||||||
|
|
||||||
public:
|
|
||||||
// for use by CCtrlMover
|
|
||||||
// Tell that this group is moving in its parent list
|
|
||||||
void setMovingInParentList(bool enable);
|
|
||||||
CGroupList *getPreviousParentList() const { return _OldFatherContainer ? _OldFatherContainer->_List : NULL; }
|
|
||||||
CCtrlScroll *getPreviousParentScrollBar() const { return _OldFatherContainer ? _OldFatherContainer->_ScrollBar : NULL; }
|
|
||||||
CGroupContainer *getPreviousContainer() const { return _OldFatherContainer; }
|
|
||||||
// set the 'hasMoved' flag
|
|
||||||
void touch(bool touched = true) { _TouchFlag = touched; }
|
|
||||||
|
|
||||||
friend class CICDeactive;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // RZ_INTERFACE_CONTAINER_H
|
|
||||||
|
|
||||||
/* End of interface_container.h */
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
//
|
//
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_header.h"
|
#include "group_header.h"
|
||||||
#include "nel/gui/lua_ihm.h"
|
#include "nel/gui/lua_ihm.h"
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern "C"
|
||||||
|
|
||||||
#include "group_html.h"
|
#include "group_html.h"
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "view_link.h"
|
#include "view_link.h"
|
||||||
#include "nel/gui/ctrl_scroll.h"
|
#include "nel/gui/ctrl_scroll.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define CL_GROUP_IN_SCENE_HELP_H
|
#define CL_GROUP_IN_SCENE_HELP_H
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "../string_manager_client.h"
|
#include "../string_manager_client.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "../dummy_progress.h"
|
#include "../dummy_progress.h"
|
||||||
#include "group_compas.h"
|
#include "group_compas.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "../client_chat_manager.h"
|
#include "../client_chat_manager.h"
|
||||||
#include "nel/gui/view_bitmap.h"
|
#include "nel/gui/view_bitmap.h"
|
||||||
#include "nel/gui/view_text_id.h"
|
#include "nel/gui/view_text_id.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
|
|
||||||
#include "nel/misc/i_xml.h"
|
#include "nel/misc/i_xml.h"
|
||||||
#include "nel/misc/i18n.h"
|
#include "nel/misc/i18n.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "../client_chat_manager.h"
|
#include "../client_chat_manager.h"
|
||||||
#include "nel/gui/view_bitmap.h"
|
#include "nel/gui/view_bitmap.h"
|
||||||
#include "nel/gui/view_text_id.h"
|
#include "nel/gui/view_text_id.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
|
|
||||||
#include "nel/misc/i_xml.h"
|
#include "nel/misc/i_xml.h"
|
||||||
#include "nel/misc/i18n.h"
|
#include "nel/misc/i18n.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "nel/gui/view_text.h"
|
#include "nel/gui/view_text.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "group_html.h"
|
#include "group_html.h"
|
||||||
#include "../init_main_loop.h"
|
#include "../init_main_loop.h"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "interface_config.h"
|
#include "interface_config.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/ctrl_scroll.h"
|
#include "nel/gui/ctrl_scroll.h"
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
|
|
||||||
#include "nel/misc/stream.h"
|
#include "nel/misc/stream.h"
|
||||||
|
|
||||||
|
namespace NLGUI
|
||||||
|
{
|
||||||
class CGroupContainer;
|
class CGroupContainer;
|
||||||
|
}
|
||||||
|
|
||||||
namespace NLMISC{
|
namespace NLMISC{
|
||||||
class CCDBNodeLeaf;
|
class CCDBNodeLeaf;
|
||||||
}
|
}
|
||||||
|
@ -77,8 +81,8 @@ public:
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
void serial (NLMISC::IStream &f);
|
void serial (NLMISC::IStream &f);
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
void setFrom (CGroupContainer *pGC);
|
void setFrom ( NLGUI::CGroupContainer *pGC);
|
||||||
void setTo (CGroupContainer *pGC);
|
void setTo ( NLGUI::CGroupContainer *pGC);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Image of a desktop
|
// Image of a desktop
|
||||||
|
@ -96,7 +100,7 @@ public:
|
||||||
// Set current desktop from this desktop image
|
// Set current desktop from this desktop image
|
||||||
void toCurrentDesktop();
|
void toCurrentDesktop();
|
||||||
// Update image of the given group container (added to the list if it does not exist)
|
// Update image of the given group container (added to the list if it does not exist)
|
||||||
void updateGroupContainerImage(CGroupContainer &gc);
|
void updateGroupContainerImage( NLGUI::CGroupContainer &gc);
|
||||||
// Remove a group container from the image
|
// Remove a group container from the image
|
||||||
void removeGroupContainerImage(const std::string &groupName);
|
void removeGroupContainerImage(const std::string &groupName);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "nel/gui/interface_element.h"
|
#include "nel/gui/interface_element.h"
|
||||||
#include "chat_window.h"
|
#include "chat_window.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
// client
|
// client
|
||||||
#include "../client_chat_manager.h"
|
#include "../client_chat_manager.h"
|
||||||
#include "../sheet_manager.h"
|
#include "../sheet_manager.h"
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
// Group
|
// Group
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_modal.h"
|
#include "nel/gui/group_modal.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "group_in_scene_bubble.h"
|
#include "group_in_scene_bubble.h"
|
||||||
|
|
|
@ -69,9 +69,9 @@ extern bool g_hidden;
|
||||||
namespace NLGUI
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
class CInterfaceOptions;
|
class CInterfaceOptions;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CGroupContainer;
|
|
||||||
class CInterfaceAnim;
|
class CInterfaceAnim;
|
||||||
class CGroupMenu;
|
class CGroupMenu;
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "nel/gui/group_tree.h"
|
#include "nel/gui/group_tree.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_scrolltext.h"
|
#include "group_scrolltext.h"
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "group_skills.h"
|
#include "group_skills.h"
|
||||||
|
|
|
@ -37,9 +37,9 @@ namespace NLGUI
|
||||||
class CInterfaceLink;
|
class CInterfaceLink;
|
||||||
class CCtrlBase;
|
class CCtrlBase;
|
||||||
class CGroupList;
|
class CGroupList;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CGroupContainer;
|
|
||||||
class CInterfaceAnim;
|
class CInterfaceAnim;
|
||||||
class CViewPointer;
|
class CViewPointer;
|
||||||
class CBrickJob;
|
class CBrickJob;
|
||||||
|
|
|
@ -29,6 +29,7 @@ namespace NLGUI
|
||||||
class CInterfaceGroup;
|
class CInterfaceGroup;
|
||||||
class CViewText;
|
class CViewText;
|
||||||
class CCtrlTextButton;
|
class CCtrlTextButton;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace NLGUI;
|
using namespace NLGUI;
|
||||||
|
@ -66,7 +67,7 @@ typedef CInterfacePtr<CViewText>::TInterfacePtr CViewTextPtr;
|
||||||
typedef CInterfacePtr<class CViewTextMenu>::TInterfacePtr CViewTextMenuPtr;
|
typedef CInterfacePtr<class CViewTextMenu>::TInterfacePtr CViewTextMenuPtr;
|
||||||
typedef CInterfacePtr<CCtrlBase>::TInterfacePtr CCtrlBasePtr;
|
typedef CInterfacePtr<CCtrlBase>::TInterfacePtr CCtrlBasePtr;
|
||||||
typedef CInterfacePtr<CCtrlBaseButton>::TInterfacePtr CCtrlBaseButtonPtr;
|
typedef CInterfacePtr<CCtrlBaseButton>::TInterfacePtr CCtrlBaseButtonPtr;
|
||||||
typedef CInterfacePtr<class CGroupContainer>::TInterfacePtr CGroupContainerPtr;
|
typedef CInterfacePtr<CGroupContainer>::TInterfacePtr CGroupContainerPtr;
|
||||||
|
|
||||||
#endif // NL_INTERFACE_POINTER_H
|
#endif // NL_INTERFACE_POINTER_H
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "bot_chat_page_trade.h"
|
#include "bot_chat_page_trade.h"
|
||||||
#include "bot_chat_page_all.h"
|
#include "bot_chat_page_all.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "nel/misc/cdb_leaf.h"
|
#include "nel/misc/cdb_leaf.h"
|
||||||
#include "nel/misc/cdb_branch.h"
|
#include "nel/misc/cdb_branch.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "dbgroup_combo_box.h"
|
#include "dbgroup_combo_box.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_modal_get_key.h"
|
#include "group_modal_get_key.h"
|
||||||
#include "nel/gui/interface_expr.h"
|
#include "nel/gui/interface_expr.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,10 @@
|
||||||
|
|
||||||
#include "../actions_client.h"
|
#include "../actions_client.h"
|
||||||
|
|
||||||
|
namespace NLGUI
|
||||||
|
{
|
||||||
class CGroupContainer;
|
class CGroupContainer;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
#define WIN_EDITCMD_TITLE_NEW_KEY "uiNewKey"
|
#define WIN_EDITCMD_TITLE_NEW_KEY "uiNewKey"
|
||||||
|
@ -47,7 +50,7 @@ public:
|
||||||
void checkCurrentCommandValidity();
|
void checkCurrentCommandValidity();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGroupContainer *Win;
|
NLGUI::CGroupContainer *Win;
|
||||||
std::string WinName;
|
std::string WinName;
|
||||||
bool CanDefineKey;
|
bool CanDefineKey;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "nel/gui/group_editbox.h"
|
#include "nel/gui/group_editbox.h"
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "dbgroup_combo_box.h"
|
#include "dbgroup_combo_box.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "group_modal_get_key.h"
|
#include "group_modal_get_key.h"
|
||||||
#include "task_bar_manager.h"
|
#include "task_bar_manager.h"
|
||||||
#include "sphrase_manager.h"
|
#include "sphrase_manager.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/stream.h"
|
#include "nel/misc/stream.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
#include "people_list.h"
|
#include "people_list.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "nel/gui/view_bitmap.h"
|
#include "nel/gui/view_bitmap.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
// client
|
// client
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "chat_window.h"
|
#include "chat_window.h"
|
||||||
#include "interface_pointer.h"
|
#include "interface_pointer.h"
|
||||||
// NeL
|
// NeL
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "nel/gui/interface_group.h"
|
#include "nel/gui/interface_group.h"
|
||||||
#include "nel/gui/group_frame.h"
|
#include "nel/gui/group_frame.h"
|
||||||
#include "nel/gui/group_container_base.h"
|
#include "nel/gui/group_container_base.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/gui/group_list.h"
|
#include "nel/gui/group_list.h"
|
||||||
#include "dbgroup_select_number.h"
|
#include "dbgroup_select_number.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "dbgroup_list_sheet.h"
|
#include "dbgroup_list_sheet.h"
|
||||||
|
|
||||||
#include "nel/gui/action_handler.h"
|
#include "nel/gui/action_handler.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "../actions_client.h"
|
#include "../actions_client.h"
|
||||||
#include "nel/gui/ctrl_button.h"
|
#include "nel/gui/ctrl_button.h"
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/stream.h"
|
#include "nel/misc/stream.h"
|
||||||
#include "dbctrl_sheet.h"
|
#include "dbctrl_sheet.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
//
|
//
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
//
|
//
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "interface_3d_scene.h"
|
#include "interface_3d_scene.h"
|
||||||
//
|
//
|
||||||
#include "../r2/editor.h"
|
#include "../r2/editor.h"
|
||||||
|
|
|
@ -23,11 +23,10 @@
|
||||||
#include "nel/misc/events.h"
|
#include "nel/misc/events.h"
|
||||||
#include "nel/gui/view_pointer_base.h"
|
#include "nel/gui/view_pointer_base.h"
|
||||||
|
|
||||||
class CGroupContainer;
|
|
||||||
|
|
||||||
namespace NLGUI
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
class CCtrlBase;
|
class CCtrlBase;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "view_radar.h"
|
#include "view_radar.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
#include "group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "../npc_icon.h"
|
#include "../npc_icon.h"
|
||||||
#include "nel/misc/fast_floor.h"
|
#include "nel/misc/fast_floor.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "outpost_manager.h"
|
#include "outpost_manager.h"
|
||||||
#include "net_manager.h"
|
#include "net_manager.h"
|
||||||
#include "interface_v3/interface_manager.h"
|
#include "interface_v3/interface_manager.h"
|
||||||
#include "interface_v3/group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "nel/misc/bit_mem_stream.h"
|
#include "nel/misc/bit_mem_stream.h"
|
||||||
#include "game_share/generic_xml_msg_mngr.h"
|
#include "game_share/generic_xml_msg_mngr.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "tool.h"
|
#include "tool.h"
|
||||||
//
|
//
|
||||||
#include "nel/gui/ctrl_quad.h"
|
#include "nel/gui/ctrl_quad.h"
|
||||||
#include "../interface_v3/group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
//
|
//
|
||||||
#include "nel/misc/i18n.h"
|
#include "nel/misc/i18n.h"
|
||||||
//
|
//
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "../interface_v3/character_3d.h"
|
#include "../interface_v3/character_3d.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "../interface_v3/interface_manager.h"
|
#include "../interface_v3/interface_manager.h"
|
||||||
#include "../interface_v3/group_container.h"
|
#include "nel/gui/group_container.h"
|
||||||
#include "displayer_visual_entity.h"
|
#include "displayer_visual_entity.h"
|
||||||
#include "../interface_v3/dbgroup_combo_box.h"
|
#include "../interface_v3/dbgroup_combo_box.h"
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,12 @@
|
||||||
// Misc
|
// Misc
|
||||||
#include "nel/misc/singleton.h"
|
#include "nel/misc/singleton.h"
|
||||||
|
|
||||||
class CEntityCL;
|
namespace NLGUI
|
||||||
|
{
|
||||||
class CGroupContainer;
|
class CGroupContainer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CEntityCL;
|
||||||
|
|
||||||
namespace R2
|
namespace R2
|
||||||
{
|
{
|
||||||
|
@ -47,7 +51,7 @@ private:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
CDisplayerVisualEntity * _DisplayerVE;
|
CDisplayerVisualEntity * _DisplayerVE;
|
||||||
CGroupContainer * _NPCWindow;
|
NLGUI::CGroupContainer * _NPCWindow;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
class CInterfaceManager;
|
class CInterfaceManager;
|
||||||
class CGroupContainer;
|
|
||||||
|
|
||||||
namespace NLGUI
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
class CEventDescriptor;
|
class CEventDescriptor;
|
||||||
class CLuaObject;
|
class CLuaObject;
|
||||||
|
class CGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CGroupMap;
|
class CGroupMap;
|
||||||
|
|
Loading…
Reference in a new issue