Code polishing no functional changes.

This commit is contained in:
Mark de Wever 2010-05-01 13:28:42 +00:00
parent b37a8c5121
commit 8e60a74d00
2 changed files with 17 additions and 21 deletions

View File

@ -32,17 +32,21 @@ class twidget;
class tgrid;
class twindow;
/**
* Builds a window.
*
* @param video The frame buffer to draw upon.
* @param type The type id string of the window, this window
* must be registered at startup.
*/
twindow* build(CVideo& video, const std::string& type);
/** Contains the info needed to instantiate a widget. */
struct tbuilder_widget : public reference_counted_object
struct tbuilder_widget
: public reference_counted_object
{
private:
tbuilder_widget();
public:
tbuilder_widget(const config& /*cfg*/) {}
explicit tbuilder_widget(const config& /*cfg*/) {}
virtual twidget* build() const = 0;
@ -80,13 +84,11 @@ tbuilder_widget_ptr build_widget(const config& cfg)
return new T(cfg);
}
struct tbuilder_grid : public tbuilder_widget
struct tbuilder_grid
: public tbuilder_widget
{
private:
tbuilder_grid();
public:
tbuilder_grid(const config& cfg);
explicit tbuilder_grid(const config& cfg);
std::string id;
std::string linked_group;
@ -120,11 +122,8 @@ public:
struct tresolution
{
private:
tresolution();
public:
tresolution(const config& cfg);
explicit tresolution(const config& cfg);
unsigned window_width;
unsigned window_height;
@ -170,13 +169,9 @@ public:
private:
std::string id_;
std::string description_;
};
} // namespace gui2
#endif

View File

@ -32,9 +32,10 @@ namespace gui2 {
*
* @todo refactor with the grid builder.
*/
struct tbuilder_gridcell : public tbuilder_widget
struct tbuilder_gridcell
: public tbuilder_widget
{
tbuilder_gridcell(const config& cfg);
explicit tbuilder_gridcell(const config& cfg);
/** The flags for the cell. */
unsigned flags;