00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(__INCLUDE_GLWSelectorParth_INCLUDE__)
00022 #define __INCLUDE_GLWSelectorParth_INCLUDE__
00023
00024 #include <GLW/GLWSelector.h>
00025
00026 class GLWSelectorPart
00027 {
00028 public:
00029 GLWSelectorPart(GLWSelectorI *user,
00030 int basePosition,
00031 float x, float y,
00032 std::list<GLWSelectorEntry> &entries,
00033 bool transparent,
00034 GLWSelectorPart *parent,
00035 int parentPosition);
00036 virtual ~GLWSelectorPart();
00037
00038 void draw();
00039 void mouseDown(float x, float y, bool &hit);
00040
00041
00042 GLWSelectorPart *getParent() { return parent_; }
00043 GLWSelectorPart *getChild() { return child_; }
00044 int getParentPosition() { return parentPosition_; }
00045
00046 float getSelectedHeight() { return selectedHeight_; }
00047 float getSelectedWidth() { return selectedWidth_; }
00048
00049 protected:
00050 GLWSelectorI *user_;
00051 std::list<GLWSelectorEntry> entries_;
00052 float selectedHeight_, selectedWidth_;
00053 float selectedX_, selectedY_;
00054 float selectedIndent_;
00055 int basePosition_;
00056 bool transparent_;
00057 bool hasSelectedEntry_, hasPopupEntry_;
00058 GLWSelectorPart *parent_;
00059 GLWSelectorPart *child_;
00060 int parentPosition_;
00061
00062 void calculateDimensions(float x, float y);
00063
00064 };
00065
00066 #endif