mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 15:49:08 +00:00
gui2::tbuilder_image to its own file.
This commit is contained in:
parent
4d6b8c00ed
commit
f1a1fd322f
@ -8,6 +8,7 @@ src/gui/auxiliary/canvas.cpp
|
||||
src/gui/auxiliary/log.cpp
|
||||
src/gui/auxiliary/window_builder/button.cpp
|
||||
src/gui/auxiliary/window_builder/control.cpp
|
||||
src/gui/auxiliary/window_builder/image.cpp
|
||||
src/gui/auxiliary/window_builder.cpp
|
||||
src/gui/dialogs/addon_connect.cpp
|
||||
src/gui/dialogs/addon_list.cpp
|
||||
|
@ -265,6 +265,7 @@ SET(wesnoth-main_SRC
|
||||
gui/auxiliary/log.cpp
|
||||
gui/auxiliary/window_builder/button.cpp
|
||||
gui/auxiliary/window_builder/control.cpp
|
||||
gui/auxiliary/window_builder/image.cpp
|
||||
gui/auxiliary/window_builder.cpp
|
||||
gui/dialogs/addon_connect.cpp
|
||||
gui/dialogs/addon_list.cpp
|
||||
|
@ -90,6 +90,7 @@ wesnoth_source = \
|
||||
gui/auxiliary/log.cpp \
|
||||
gui/auxiliary/window_builder/button.cpp \
|
||||
gui/auxiliary/window_builder/control.cpp \
|
||||
gui/auxiliary/window_builder/image.cpp \
|
||||
gui/auxiliary/window_builder.cpp \
|
||||
gui/dialogs/addon_connect.cpp \
|
||||
gui/dialogs/addon_list.cpp \
|
||||
|
@ -246,6 +246,7 @@ wesnoth_sources = Split("""
|
||||
gui/auxiliary/log.cpp
|
||||
gui/auxiliary/window_builder/button.cpp
|
||||
gui/auxiliary/window_builder/control.cpp
|
||||
gui/auxiliary/window_builder/image.cpp
|
||||
gui/auxiliary/window_builder.cpp
|
||||
gui/dialogs/addon_connect.cpp
|
||||
gui/dialogs/addon_list.cpp
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "gettext.hpp"
|
||||
#include "gui/auxiliary/log.hpp"
|
||||
#include "gui/auxiliary/window_builder/button.hpp"
|
||||
#include "gui/auxiliary/window_builder/image.hpp"
|
||||
#include "gui/widgets/button.hpp"
|
||||
#include "gui/widgets/horizontal_scrollbar.hpp"
|
||||
#include "gui/widgets/image.hpp"
|
||||
@ -563,18 +564,6 @@ twidget* tbuilder_horizontal_scrollbar::build() const
|
||||
return horizontal_scrollbar;
|
||||
}
|
||||
|
||||
twidget* tbuilder_image::build() const
|
||||
{
|
||||
timage* widget = new timage();
|
||||
|
||||
init_control(widget);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed image '" << id << "' with defintion '"
|
||||
<< definition << "'.\n";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
tbuilder_gridcell::tbuilder_gridcell(const config& cfg) :
|
||||
tbuilder_widget(cfg),
|
||||
flags(read_flags(cfg)),
|
||||
|
57
src/gui/auxiliary/window_builder/image.cpp
Normal file
57
src/gui/auxiliary/window_builder/image.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
Copyright (C) 2008 - 2009 by Mark de Wever <koraq@xs4all.nl>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/auxiliary/window_builder/image.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
#include "gui/auxiliary/log.hpp"
|
||||
#include "gui/widgets/image.hpp"
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
namespace implementation {
|
||||
|
||||
tbuilder_image::tbuilder_image(const config& cfg)
|
||||
: tbuilder_control(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
twidget* tbuilder_image::build() const
|
||||
{
|
||||
timage* widget = new timage();
|
||||
|
||||
init_control(widget);
|
||||
|
||||
DBG_GUI_G << "Window builder: placed image '"
|
||||
<< id << "' with defintion '"
|
||||
<< definition << "'.\n";
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
|
||||
} // namespace gui2
|
||||
|
||||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_image
|
||||
*
|
||||
* == Image ==
|
||||
*
|
||||
* An image has no extra fields.
|
||||
*/
|
||||
|
40
src/gui/auxiliary/window_builder/image.hpp
Normal file
40
src/gui/auxiliary/window_builder/image.hpp
Normal file
@ -0,0 +1,40 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
Copyright (C) 2008 - 2009 by Mark de Wever <koraq@xs4all.nl>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#ifndef GUI_AUXILIARY_WINDOW_BUILDER_IMAGE_HPP_INCLUDED
|
||||
#define GUI_AUXILIARY_WINDOW_BUILDER_IMAGE_HPP_INCLUDED
|
||||
|
||||
#include "gui/auxiliary/window_builder/control.hpp"
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
namespace implementation {
|
||||
|
||||
struct tbuilder_image
|
||||
: public tbuilder_control
|
||||
{
|
||||
|
||||
tbuilder_image(const config& cfg);
|
||||
|
||||
twidget* build () const;
|
||||
};
|
||||
|
||||
|
||||
} // namespace implementation
|
||||
|
||||
} // namespace gui2
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -30,25 +30,6 @@
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
struct tbuilder_image : public implementation::tbuilder_control
|
||||
{
|
||||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_image
|
||||
*
|
||||
* == Image ==
|
||||
*
|
||||
* An image has no extra fields.
|
||||
*/
|
||||
|
||||
tbuilder_image(const config& cfg)
|
||||
: implementation::tbuilder_control(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
twidget* build () const;
|
||||
};
|
||||
|
||||
/**
|
||||
* A temporary helper class.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user