Mana
Loading...
Searching...
No Matches
container.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <guichan/widgets/container.hpp>
25
26class ContainerPlacer;
27class Layout;
28class LayoutCell;
29class LayoutHelper;
30
40class Container : public gcn::Container
41{
42 public:
43 Container();
44 ~Container() override;
45
46 // Overridden to disable drawing of the frame
47 void drawFrame(gcn::Graphics *graphics) override {}
48
49 protected:
54
58 LayoutCell &place(int x, int y, gcn::Widget *wg, int w = 1, int h = 1);
59
63 ContainerPlacer getPlacer(int x, int y);
64
65 private:
67};
This class is a helper for adding widgets to nested tables in a window.
Definition layout.h:34
A widget container.
Definition container.h:41
LayoutHelper * mLayoutHelper
Definition container.h:66
LayoutCell & place(int x, int y, gcn::Widget *wg, int w=1, int h=1)
Adds a widget to the container and sets it at given cell.
Definition container.cpp:46
Layout & getLayout()
Gets the layout handler for this container.
Definition container.cpp:39
void drawFrame(gcn::Graphics *graphics) override
Definition container.h:47
ContainerPlacer getPlacer(int x, int y)
Returns a proxy for adding widgets in an inner table of the layout.
Definition container.cpp:52
~Container() override
Definition container.cpp:31
This class describes the formatting of a widget in the cell of a layout table.
Definition layout.h:159
A helper class for adding a layout to a Guichan container widget.
This class is an helper for setting the position of widgets.
Definition layout.h:281
Graphics * graphics
Definition client.cpp:104