~ubuntu-branches/ubuntu/vivid/manaplus/vivid-proposed

« back to all changes in this revision

Viewing changes to src/gui/widgets/layouthelper.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Andrei Karas, Patrick Matthäi
  • Date: 2014-03-06 09:57:20 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20140306095720-wmv8yg5s180fcnmx
Tags: 1.4.3.1.1-1
[ Andrei Karas ]
* Remove guichan from dependency.

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "gui/widgets/layouthelper.h"
24
24
 
 
25
#include "gui/base/widgets/container.hpp"
 
26
 
25
27
#include "debug.h"
26
28
 
27
29
LayoutHelper::LayoutHelper(gcn::Container *const container) :
28
 
    gcn::WidgetListener(),
 
30
    WidgetListener(),
29
31
    mLayout(),
30
32
    mContainer(container)
31
33
{
43
45
}
44
46
 
45
47
LayoutCell &LayoutHelper::place(const int x, const int y,
46
 
                                gcn::Widget *const wg,
 
48
                                Widget *const wg,
47
49
                                const int w, const int h)
48
50
{
49
51
    mContainer->add(wg);
61
63
    mContainer->setSize(w, h);
62
64
}
63
65
 
64
 
void LayoutHelper::widgetResized(const gcn::Event &event A_UNUSED)
 
66
void LayoutHelper::widgetResized(const Event &event A_UNUSED)
65
67
{
66
 
    const gcn::Rectangle area = mContainer->getChildrenArea();
 
68
    const Rect area = mContainer->getChildrenArea();
67
69
    int w = area.width;
68
70
    int h = area.height;
69
71
    mLayout.reflow(w, h);