mirror of https://github.com/axmolengine/axmol.git
Move layout "exe" to cpp
This commit is contained in:
parent
c976791f7d
commit
a05969c395
|
@ -38,6 +38,42 @@ NS_CC_BEGIN
|
|||
|
||||
namespace ui {
|
||||
|
||||
class LayoutExecutant : public Ref
|
||||
{
|
||||
public:
|
||||
LayoutExecutant(){};
|
||||
virtual ~LayoutExecutant(){};
|
||||
static LayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container){};
|
||||
};
|
||||
|
||||
class LinearVerticalLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
LinearVerticalLayoutExecutant(){};
|
||||
virtual ~LinearVerticalLayoutExecutant(){};
|
||||
static LinearVerticalLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
class LinearHorizontalLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
LinearHorizontalLayoutExecutant(){};
|
||||
virtual ~LinearHorizontalLayoutExecutant(){};
|
||||
static LinearHorizontalLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
class RelativeLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
RelativeLayoutExecutant(){};
|
||||
virtual ~RelativeLayoutExecutant(){};
|
||||
static RelativeLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
LayoutExecutant* LayoutExecutant::create()
|
||||
{
|
||||
LayoutExecutant* exe = new LayoutExecutant();
|
||||
|
|
|
@ -50,48 +50,13 @@ typedef enum {
|
|||
LAYOUT_CLIPPING_STENCIL,
|
||||
LAYOUT_CLIPPING_SCISSOR
|
||||
}LayoutClippingType;
|
||||
|
||||
|
||||
class LayoutExecutant : public Ref
|
||||
{
|
||||
public:
|
||||
LayoutExecutant(){};
|
||||
virtual ~LayoutExecutant(){};
|
||||
static LayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container){};
|
||||
};
|
||||
|
||||
class LinearVerticalLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
LinearVerticalLayoutExecutant(){};
|
||||
virtual ~LinearVerticalLayoutExecutant(){};
|
||||
static LinearVerticalLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
class LinearHorizontalLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
LinearHorizontalLayoutExecutant(){};
|
||||
virtual ~LinearHorizontalLayoutExecutant(){};
|
||||
static LinearHorizontalLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
class RelativeLayoutExecutant : public LayoutExecutant
|
||||
{
|
||||
public:
|
||||
RelativeLayoutExecutant(){};
|
||||
virtual ~RelativeLayoutExecutant(){};
|
||||
static RelativeLayoutExecutant* create();
|
||||
virtual void doLayout(const Size& layoutSize, Vector<Node*> container);
|
||||
};
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
class LayoutExecutant;
|
||||
|
||||
class Layout : public Widget
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue