CHANGED: #1471 The classes moved in the previous commit are now under the NLGUI namespace.
--HG-- branch : gui-refactoringhg/feature/sse2
parent
56a75a90ab
commit
c792abe091
@ -1,42 +1,64 @@
|
|||||||
|
// 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
|
#ifndef CTRL_DRAGGABLE_H
|
||||||
#define CTRL_DRAGGABLE_H
|
#define CTRL_DRAGGABLE_H
|
||||||
|
|
||||||
#include "nel/gui/ctrl_base.h"
|
#include "nel/gui/ctrl_base.h"
|
||||||
|
|
||||||
class CCtrlDraggable : public CCtrlBase
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
DECLARE_UI_CLASS( CCtrlDraggable )
|
class CCtrlDraggable : public CCtrlBase
|
||||||
|
|
||||||
CCtrlDraggable( const TCtorParam ¶m );
|
|
||||||
virtual ~CCtrlDraggable(){};
|
|
||||||
|
|
||||||
static CCtrlDraggable *getDraggedSheet(){ return _LastDraggedSheet; }
|
|
||||||
bool isDragged() const{ return dragged; }
|
|
||||||
void setDragged( bool dragged ){ this->dragged = dragged; }
|
|
||||||
bool isDraggable() const{ return draggable; }
|
|
||||||
void setDraggable( bool draggable ){ this->draggable = draggable; }
|
|
||||||
|
|
||||||
void abortDragging()
|
|
||||||
{
|
{
|
||||||
dragged = false;
|
public:
|
||||||
_LastDraggedSheet = NULL;
|
DECLARE_UI_CLASS( CCtrlDraggable )
|
||||||
}
|
|
||||||
|
CCtrlDraggable( const TCtorParam ¶m );
|
||||||
|
virtual ~CCtrlDraggable(){};
|
||||||
|
|
||||||
|
static CCtrlDraggable *getDraggedSheet(){ return _LastDraggedSheet; }
|
||||||
|
bool isDragged() const{ return dragged; }
|
||||||
|
void setDragged( bool dragged ){ this->dragged = dragged; }
|
||||||
|
bool isDraggable() const{ return draggable; }
|
||||||
|
void setDraggable( bool draggable ){ this->draggable = draggable; }
|
||||||
|
|
||||||
|
void abortDragging()
|
||||||
|
{
|
||||||
|
dragged = false;
|
||||||
|
_LastDraggedSheet = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Necessary because of reflection, no other purpose
|
||||||
|
void draw(){}
|
||||||
|
|
||||||
// Necessary because of reflection, no other purpose
|
REFLECT_EXPORT_START(CCtrlDraggable, CCtrlBase)
|
||||||
void draw(){}
|
REFLECT_BOOL("dragable", isDraggable, setDraggable);
|
||||||
|
REFLECT_EXPORT_END
|
||||||
|
|
||||||
REFLECT_EXPORT_START(CCtrlDraggable, CCtrlBase)
|
protected:
|
||||||
REFLECT_BOOL("dragable", isDraggable, setDraggable);
|
static void setDraggedSheet( CCtrlDraggable *draggable ){ _LastDraggedSheet = draggable; }
|
||||||
REFLECT_EXPORT_END
|
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
static void setDraggedSheet( CCtrlDraggable *draggable ){ _LastDraggedSheet = draggable; }
|
static CCtrlDraggable *_LastDraggedSheet;
|
||||||
|
bool dragged;
|
||||||
|
bool draggable;
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
}
|
||||||
static CCtrlDraggable *_LastDraggedSheet;
|
|
||||||
bool dragged;
|
|
||||||
bool draggable;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,55 +1,77 @@
|
|||||||
|
// 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
|
#ifndef VIEW_POINTER_BASE_H
|
||||||
#define VIEW_POINTER_BASE_H
|
#define VIEW_POINTER_BASE_H
|
||||||
|
|
||||||
#include "nel/gui/view_base.h"
|
#include "nel/gui/view_base.h"
|
||||||
|
|
||||||
class CViewPointerBase : public CViewBase
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
DECLARE_UI_CLASS( CViewPointerBase )
|
|
||||||
|
|
||||||
CViewPointerBase( const TCtorParam ¶m );
|
class CViewPointerBase : public CViewBase
|
||||||
virtual ~CViewPointerBase();
|
{
|
||||||
|
public:
|
||||||
|
DECLARE_UI_CLASS( CViewPointerBase )
|
||||||
|
|
||||||
|
CViewPointerBase( const TCtorParam ¶m );
|
||||||
|
virtual ~CViewPointerBase();
|
||||||
|
|
||||||
|
// Set the pointer position.
|
||||||
|
void setPointerPos (sint32 x, sint32 y);
|
||||||
|
void setPointerDispPos (sint32 x, sint32 y);
|
||||||
|
|
||||||
// Set the pointer position.
|
void resetPointerPos ();
|
||||||
void setPointerPos (sint32 x, sint32 y);
|
void setPointerDown (bool pd);
|
||||||
void setPointerDispPos (sint32 x, sint32 y);
|
void setPointerDownString (const std::string &s);
|
||||||
|
|
||||||
void resetPointerPos ();
|
void getPointerPos (sint32 &x, sint32 &y);
|
||||||
void setPointerDown (bool pd);
|
void getPointerDispPos (sint32 &x, sint32 &y);
|
||||||
void setPointerDownString (const std::string &s);
|
|
||||||
|
|
||||||
void getPointerPos (sint32 &x, sint32 &y);
|
void getPointerOldPos (sint32 &x, sint32 &y);
|
||||||
void getPointerDispPos (sint32 &x, sint32 &y);
|
void getPointerDownPos (sint32 &x, sint32 &y);
|
||||||
|
bool getPointerDown ();
|
||||||
|
std::string getPointerDownString ();
|
||||||
|
bool getPointerDrag ();
|
||||||
|
|
||||||
void getPointerOldPos (sint32 &x, sint32 &y);
|
/// Is the pointer visible ?
|
||||||
void getPointerDownPos (sint32 &x, sint32 &y);
|
bool show() const {return _PointerVisible;}
|
||||||
bool getPointerDown ();
|
|
||||||
std::string getPointerDownString ();
|
|
||||||
bool getPointerDrag ();
|
|
||||||
|
|
||||||
/// Is the pointer visible ?
|
void draw(){}
|
||||||
bool show() const {return _PointerVisible;}
|
|
||||||
|
|
||||||
void draw(){}
|
protected:
|
||||||
|
// (x,y) is from the TopLeft corner of the window
|
||||||
|
sint32 _PointerX; // Current pointer position (raw, before snapping)
|
||||||
|
sint32 _PointerY;
|
||||||
|
sint32 _PointerOldX; // Previous frame pointer position
|
||||||
|
sint32 _PointerOldY;
|
||||||
|
bool _PointerDown; // Is the pointer down ?
|
||||||
|
sint32 _PointerDownX; // Pointer down position
|
||||||
|
sint32 _PointerDownY;
|
||||||
|
std::string _PointerDownString; // What is under the pointer at the down position
|
||||||
|
bool _PointerDrag; // Is the pointer down and we have moved ?
|
||||||
|
bool _PointerVisible; // Is the pointer visible or hidden ?
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
// (x,y) is from the TopLeft corner of the window
|
|
||||||
sint32 _PointerX; // Current pointer position (raw, before snapping)
|
|
||||||
sint32 _PointerY;
|
|
||||||
sint32 _PointerOldX; // Previous frame pointer position
|
|
||||||
sint32 _PointerOldY;
|
|
||||||
bool _PointerDown; // Is the pointer down ?
|
|
||||||
sint32 _PointerDownX; // Pointer down position
|
|
||||||
sint32 _PointerDownY;
|
|
||||||
std::string _PointerDownString; // What is under the pointer at the down position
|
|
||||||
bool _PointerDrag; // Is the pointer down and we have moved ?
|
|
||||||
bool _PointerVisible; // Is the pointer visible or hidden ?
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,32 @@
|
|||||||
#include "nel/gui/ctrl_draggable.h"
|
// 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/>.
|
||||||
|
|
||||||
|
|
||||||
CCtrlDraggable* CCtrlDraggable::_LastDraggedSheet = NULL;
|
#include "nel/gui/ctrl_draggable.h"
|
||||||
|
|
||||||
CCtrlDraggable::CCtrlDraggable(const TCtorParam ¶m) :
|
namespace NLGUI
|
||||||
CCtrlBase( param )
|
|
||||||
{
|
{
|
||||||
dragged = false;
|
|
||||||
draggable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
CCtrlDraggable* CCtrlDraggable::_LastDraggedSheet = NULL;
|
||||||
|
|
||||||
|
CCtrlDraggable::CCtrlDraggable(const TCtorParam ¶m) :
|
||||||
|
CCtrlBase( param )
|
||||||
|
{
|
||||||
|
dragged = false;
|
||||||
|
draggable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,14 +1,36 @@
|
|||||||
#include "nel/gui/group_editbox_base.h"
|
// 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/>.
|
||||||
|
|
||||||
CGroupEditBoxBase *CGroupEditBoxBase::_CurrSelection = NULL;
|
|
||||||
|
|
||||||
CGroupEditBoxBase::CGroupEditBoxBase( const TCtorParam ¶m ) :
|
#include "nel/gui/group_editbox_base.h"
|
||||||
CInterfaceGroup( param )
|
|
||||||
{
|
|
||||||
_RecoverFocusOnEnter = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGroupEditBoxBase::~CGroupEditBoxBase()
|
namespace NLGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
CGroupEditBoxBase *CGroupEditBoxBase::_CurrSelection = NULL;
|
||||||
|
|
||||||
|
CGroupEditBoxBase::CGroupEditBoxBase( const TCtorParam ¶m ) :
|
||||||
|
CInterfaceGroup( param )
|
||||||
|
{
|
||||||
|
_RecoverFocusOnEnter = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGroupEditBoxBase::~CGroupEditBoxBase()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue