/*
* DefaultLayout.h
* Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL++2000
#pragma once
#include <sol/Composite.h>
#include <sol\LinkedList.h>
#include <sol\LayoutManager.h>
namespace SOL {
class View;
class DefaultLayout :public LayoutManager {
private:
LinkedList list;
public:
DefaultLayout()
:list(False)
{
//
}
public:
virtual void add(View* view)
{
if (view) {
list.add(view);
}
}
public:
virtual void layout(int x, int y, int w, int h)
{
ListEntry* ptr = list.getEntry();
while (ptr) {
View* view = (View*)ptr->getObject();
if (view) {
view->reshape(x, y, w, h);
}
ptr = ptr->getNext();
}
}
/* DefaultLayout();
virtual void add(View* view);
virtual void layout(int x, int y, int w, int h);
*/
};
}
|