Add C++11 override markers.

This commit is contained in:
Mark de Wever 2013-03-29 22:02:55 +01:00
parent 4f2e9e3e1a
commit ac53b13c84
16 changed files with 53 additions and 48 deletions

View file

@ -82,8 +82,8 @@ public:
void demand_reduce_height(const unsigned maximum_height);
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */

View file

@ -153,8 +153,8 @@ public:
virtual void request_reduce_width(const unsigned maximum_width) OVERRIDE;
protected:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */

View file

@ -27,6 +27,13 @@ namespace gui2 {
REGISTER_WIDGET(drawing)
tpoint tdrawing::calculate_best_size() const
{
return best_size_ != tpoint(0, 0)
? best_size_
: tcontrol::calculate_best_size();
}
const std::string& tdrawing::get_control_type() const
{
static const std::string type = "drawing";

View file

@ -38,12 +38,8 @@ public:
/***** ***** ***** ***** layout functions ***** ***** ***** *****/
private:
/** Inherited from tcontrol. */
tpoint calculate_best_size() const
{
return best_size_ != tpoint(0, 0)
? best_size_ : tcontrol::calculate_best_size();
}
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/***** ***** ***** ***** Inherited ***** ***** ***** *****/

View file

@ -247,8 +247,8 @@ public:
/** Inherited from twidget. */
virtual void request_reduce_height(const unsigned maximum_height) = 0;
/** Inherited from twidget. */
virtual tpoint calculate_best_size() const = 0;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE = 0;
/** Inherited from twidget. */
virtual void place(const tpoint& origin, const tpoint& size) = 0;

View file

@ -191,12 +191,8 @@ struct thorizontal_list
{
}
/**
* Calculates the best size for the generator.
*
* @return The best size,
*/
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
/**
* Sets the size of the generator.
@ -278,8 +274,8 @@ struct tvertical_list
{
}
/** See thorizontal_list::calculate_best_size(). */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
/** See thorizontal_list::place(). */
void place(const tpoint& origin, const tpoint& size);
@ -354,9 +350,11 @@ struct tmatrix
{
}
/** See thorizontal_list::calculate_best_size(). */
tpoint calculate_best_size() const
{ ERROR_LOG(false); }
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE
{
ERROR_LOG(false);
}
/** See thorizontal_list::place(). */
void place(const tpoint& /*origin*/, const tpoint& /*size*/)
@ -418,8 +416,8 @@ struct tindependent
/** See thorizontal_list::request_reduce_height. */
virtual void request_reduce_height(const unsigned maximum_height);
/** See thorizontal_list::calculate_best_size(). */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
/** See thorizontal_list::place(). */
void place(const tpoint& origin, const tpoint& size);
@ -775,8 +773,8 @@ public:
placement::request_reduce_height(maximum_height);
}
/** Inherited from tgenerator_. */
tpoint calculate_best_size() const
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE
{
return placement::calculate_best_size();
}

View file

@ -223,8 +223,8 @@ public:
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */

View file

@ -58,8 +58,8 @@ public:
/***** ***** ***** ***** layout functions ***** ***** ***** *****/
private:
/** Inherited from tcontrol. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/***** ***** ***** ***** Inherited ***** ***** ***** *****/

View file

@ -172,8 +172,8 @@ public:
}
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */

View file

@ -121,8 +121,8 @@ public:
void filter(const tfilter_functor& filter_functor);
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */

View file

@ -103,8 +103,8 @@ public:
}
private:
/** Inherited from tcontainer_. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from tcontainer_. */

View file

@ -30,8 +30,8 @@ public:
/***** ***** ***** ***** layout functions ***** ***** ***** *****/
private:
/** Inherited from tcontrol. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/***** ***** ***** ***** Inherited ***** ***** ***** *****/

View file

@ -27,6 +27,13 @@ namespace gui2 {
REGISTER_WIDGET(spacer)
tpoint tspacer::calculate_best_size() const
{
return best_size_ != tpoint(0, 0)
? best_size_
: tcontrol::calculate_best_size();
}
const std::string& tspacer::get_control_type() const
{
static const std::string type = "spacer";

View file

@ -40,12 +40,8 @@ public:
/***** ***** ***** ***** layout functions ***** ***** ***** *****/
private:
/** Inherited from tcontrol. */
tpoint calculate_best_size() const
{
return best_size_ != tpoint(0, 0)
? best_size_ : tcontrol::calculate_best_size();
}
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/***** ***** ***** ***** Inherited ***** ***** ***** *****/

View file

@ -227,7 +227,8 @@ private:
void impl_populate_dirty_list(twindow& caller,
const std::vector<twidget*>& call_stack);
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
bool disable_click_dismiss() const { return true; }

View file

@ -80,8 +80,8 @@ public:
const twidget* find(const std::string& id, const bool must_be_active) const;
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;
/** See @ref twidget::calculate_best_size. */
virtual tpoint calculate_best_size() const OVERRIDE;
public:
/** Inherited from twidget. */