summaryrefslogtreecommitdiff
path: root/src/interface/Component.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-15 17:13:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-15 17:13:17 (GMT)
commit136675b56a8a1862afb41ccee5c14e93e483b964 (patch)
tree8f679477c5e1c0984a5cb9c169e339c1ca0d6e0c /src/interface/Component.h
parent45563e97e813cfd21724ad1111e5de3e04679e1a (diff)
downloadpowder-136675b56a8a1862afb41ccee5c14e93e483b964.zip
powder-136675b56a8a1862afb41ccee5c14e93e483b964.tar.gz
Move style into Component
Diffstat (limited to 'src/interface/Component.h')
-rw-r--r--src/interface/Component.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/interface/Component.h b/src/interface/Component.h
index 2735736..a4fde39 100644
--- a/src/interface/Component.h
+++ b/src/interface/Component.h
@@ -1,5 +1,6 @@
#pragma once
+#include "Appearance.h"
#include "Point.h"
#include "Window.h"
#include "Platform.h"
@@ -15,7 +16,14 @@ namespace ui
* *See sys::XComponent
*/
class Component
- {
+ {
+ private:
+ Window* parentstate_;
+ Panel* _parent;
+ protected:
+ bool drawn;
+ ui::Point textPosition;
+ ui::Point iconPosition;
public:
Component(Window* parent_state);
Component(Point position, Point size);
@@ -31,6 +39,13 @@ namespace ui
bool Locked;
bool Visible;
+ ui::Appearance Appearance;
+ //virtual void SetAppearance(ui::Appearance);
+ //ui::Appearance GetAppearance();
+ virtual void TextPosition(std::string);
+
+ void Refresh();
+
/* See the parent of this component.
* If new_parent is NULL, this component will have no parent. (THIS DOES NOT delete THE COMPONENT. See XComponent::RemoveChild)
*/
@@ -196,9 +211,5 @@ namespace ui
// alt: Alternate key is released.
///
virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
-
- private:
- Window* parentstate_;
- Panel* _parent;
};
}