summaryrefslogtreecommitdiff
path: root/src/interface/Label.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-03-22 14:14:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-03-22 14:14:17 (GMT)
commit9abe51526cac2634af0541c3de69834dd30e9f78 (patch)
tree6ae4deadfe00a83094b9d288d8c11d8ce823577a /src/interface/Label.h
parent2c311b9a36a88fadd96f3d39acb1ab2590835d81 (diff)
downloadpowder-9abe51526cac2634af0541c3de69834dd30e9f78.zip
powder-9abe51526cac2634af0541c3de69834dd30e9f78.tar.gz
Move all GUI source files into gui/
Diffstat (limited to 'src/interface/Label.h')
-rw-r--r--src/interface/Label.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/interface/Label.h b/src/interface/Label.h
deleted file mode 100644
index d4e5088..0000000
--- a/src/interface/Label.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef LABEL_H
-#define LABEL_H
-
-#include <string>
-
-#include "Component.h"
-#include "PowderToy.h"
-#include "Colour.h"
-
-namespace ui
-{
- class Label : public Component
- {
- protected:
- std::string textFragments;
- std::string textLines;
- std::string displayText;
- std::string tDisplayText;
-
- std::string text;
- Colour textColour;
- int caret;
- int selectionIndex0;
- int selectionIndex1;
-
- int selectionXL;
- int selectionXH;
- int selectionYL;
- int selectionYH;
- int selectionLineL;
- int selectionLineH;
-
- bool multiline;
- bool selecting;
- bool autoHeight;
-
- void updateMultiline();
- void updateSelection();
-
- int getLowerSelectionBound();
- int getHigherSelectionBound();
-
- virtual void copySelection();
- public:
- //Label(Window* parent_state, std::string labelText);
- Label(Point position, Point size, std::string labelText);
- //Label(std::string labelText);
- virtual ~Label();
-
- virtual void SetMultiline(bool status);
-
- virtual void SetText(std::string text);
- virtual void SetDisplayText(std::string newText);
- virtual std::string GetText();
-
- virtual bool HasSelection();
- virtual void ClearSelection();
- virtual void AutoHeight();
-
- void SetTextColour(Colour textColour) { this->textColour = textColour; }
-
- virtual void OnContextMenuAction(int item);
- virtual void OnMouseClick(int x, int y, unsigned button);
- virtual void OnMouseUp(int x, int y, unsigned button);
- virtual void OnMouseMoved(int localx, int localy, int dx, int dy);
- virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
- virtual void Draw(const Point& screenPos);
- virtual void Tick(float dt);
- };
-}
-
-#endif // LABEL_H