diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
| commit | 4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch) | |
| tree | 3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/interface/Component.cpp | |
| parent | 6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff) | |
| download | powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz | |
Some minor changes
Diffstat (limited to 'src/interface/Component.cpp')
| -rw-r--r-- | src/interface/Component.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 49ff7f8..75e9c40 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -2,12 +2,12 @@ #include "interface/Component.h" #include "interface/Engine.h" #include "interface/Point.h" -#include "interface/State.h" +#include "interface/Window.h" #include "interface/Panel.h" using namespace ui; -Component::Component(State* parent_state): +Component::Component(Window* parent_state): parentstate_(parent_state), _parent(NULL), Position(Point(0,0)), @@ -45,9 +45,9 @@ bool Component::IsFocused() const return parentstate_->IsFocused(this); } -void Component::SetParentState(State* state) +void Component::SetParentWindow(Window* window) { - parentstate_ = state; + parentstate_ = window; } void Component::SetParent(Panel* new_parent) @@ -65,7 +65,7 @@ void Component::SetParent(Panel* new_parent) _parent->RemoveChild(i, false); // add ourself to the parent state - GetParentState()->AddComponent(this); + GetParentWindow()->AddComponent(this); //done in this loop. break; @@ -76,8 +76,8 @@ void Component::SetParent(Panel* new_parent) else { // remove from parent state (if in parent state) and place in new parent - if(GetParentState()) - GetParentState()->RemoveComponent(this); + if(GetParentWindow()) + GetParentWindow()->RemoveComponent(this); new_parent->children.push_back(this); } this->_parent = new_parent; |
