Rename twidget::dirty() to twidget::is_dirty().
This commit is contained in:
parent
2c94d9bf63
commit
0c8f478c61
6 changed files with 12 additions and 12 deletions
|
@ -55,7 +55,7 @@ public:
|
|||
{ return grid_.has_widget(widget); }
|
||||
|
||||
/** Inherited from twidget. */
|
||||
bool dirty() const { return twidget::dirty() || grid_.dirty(); }
|
||||
bool is_dirty() const { return twidget::is_dirty() || grid_.is_dirty(); }
|
||||
|
||||
/** Inherited from tcontrol. */
|
||||
tpoint get_minimum_size() const;
|
||||
|
|
|
@ -148,7 +148,7 @@ void tcontrol::draw(surface& surface, const bool force,
|
|||
{
|
||||
assert(config_);
|
||||
|
||||
if(!dirty() && !force && !invalidate_background) {
|
||||
if(!is_dirty() && !force && !invalidate_background) {
|
||||
return;
|
||||
}
|
||||
if(invalidate_background) {
|
||||
|
|
|
@ -479,7 +479,7 @@ tpoint tgrid::tchild::get_best_size() const
|
|||
return border_space();
|
||||
}
|
||||
|
||||
if(widget_->dirty() || best_size_ == tpoint(0, 0)) {
|
||||
if(widget_->is_dirty() || best_size_ == tpoint(0, 0)) {
|
||||
best_size_ = widget_->get_best_size() + border_space();
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ tpoint tgrid::tchild::get_minimum_size() const
|
|||
return border_space();
|
||||
}
|
||||
|
||||
if(widget_->dirty() || minimum_size_ == tpoint(0, 0)) {
|
||||
if(widget_->is_dirty() || minimum_size_ == tpoint(0, 0)) {
|
||||
minimum_size_ = widget_->get_minimum_size() + border_space();
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ tpoint tgrid::tchild::get_maximum_size() const
|
|||
return tpoint(0, 0);
|
||||
}
|
||||
|
||||
if(widget_->dirty() || maximum_size_ == tpoint(0, 0)) {
|
||||
if(widget_->is_dirty() || maximum_size_ == tpoint(0, 0)) {
|
||||
maximum_size_ = widget_->get_maximum_size();
|
||||
|
||||
// If the widget has no maximum return that
|
||||
|
|
|
@ -57,12 +57,12 @@ void tpanel::draw(surface& surface, const bool force,
|
|||
const bool invalidate_background)
|
||||
{
|
||||
// Need to preserve the state and inherited draw clear the flag.
|
||||
const bool is_dirty = dirty();
|
||||
const bool dirty = is_dirty();
|
||||
|
||||
tcontainer_::draw(surface, force, invalidate_background);
|
||||
|
||||
// foreground
|
||||
if(is_dirty || force) {
|
||||
if(dirty || force) {
|
||||
SDL_Rect rect = get_rect();
|
||||
canvas(1).draw(true);
|
||||
blit_surface(canvas(1).surf(), 0, surface, &rect);
|
||||
|
|
|
@ -484,7 +484,7 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
virtual bool dirty() const { return dirty_; }
|
||||
virtual bool is_dirty() const { return dirty_; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
@ -100,7 +100,7 @@ int twindow::show(const bool restore, void* /*flip_function*/)
|
|||
break;
|
||||
}
|
||||
|
||||
if(dirty() || need_layout_) {
|
||||
if(is_dirty() || need_layout_) {
|
||||
if(need_layout_) {
|
||||
screen = make_neutral_surface(restorer);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void twindow::draw(surface& surface, const bool force,
|
|||
}
|
||||
|
||||
for(tgrid::iterator itor = begin(); itor != end(); ++itor) {
|
||||
if(! *itor || !itor->dirty()) {
|
||||
if(! *itor || !itor->is_dirty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -160,10 +160,10 @@ void twindow::draw(surface& surface, const bool force,
|
|||
canvas(1).draw();
|
||||
blit_surface(canvas(1).surf(), 0, surface, 0);
|
||||
}
|
||||
if(tooltip_.dirty()) {
|
||||
if(tooltip_.is_dirty()) {
|
||||
tooltip_.draw(surface);
|
||||
}
|
||||
if(help_popup_.dirty()) {
|
||||
if(help_popup_.is_dirty()) {
|
||||
help_popup_.draw(surface);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue