29 #ifndef _CEGUIListHeaderSegment_h_
30 #define _CEGUIListHeaderSegment_h_
33 #include "../Window.h"
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
49 class CEGUIEXPORT ListHeaderSegment :
public Window
52 static const String EventNamespace;
53 static const String WidgetTypeName;
64 static const String EventSegmentClicked;
70 static const String EventSplitterDoubleClicked;
76 static const String EventSizingSettingChanged;
82 static const String EventSortDirectionChanged;
88 static const String EventMovableSettingChanged;
94 static const String EventSegmentDragStart;
100 static const String EventSegmentDragStop;
106 static const String EventSegmentDragPositionChanged;
112 static const String EventSegmentSized;
118 static const String EventClickableSettingChanged;
121 static const float DefaultSizingArea;
122 static const float SegmentMoveThreshold;
150 bool isSizingEnabled(
void)
const {
return d_sizingEnabled;}
165 SortDirection getSortDirection(
void)
const {
return d_sortDir;}
175 bool isDragMovingEnabled(
void)
const {
return d_movingEnabled;}
185 const Vector2f& getDragMoveOffset(
void)
const {
return d_dragPosition;}
195 bool isClickable(
void)
const {
return d_allowClicks;}
202 bool isSegmentHovering(
void)
const {
return d_segmentHover;}
209 bool isSegmentPushed(
void)
const {
return d_segmentPushed;}
216 bool isSplitterHovering(
void)
const {
return d_splitterHover;}
223 bool isBeingDragMoved(
void)
const {
return d_dragMoving;}
230 bool isBeingDragSized(
void)
const {
return d_dragSizing;}
233 const Image* getSizingCursorImage()
const;
234 const Image* getMovingCursorImage()
const;
250 void setSizingEnabled(
bool setting);
281 void setDragMovingEnabled(
bool setting);
294 void setClickable(
bool setting);
297 void setSizingCursorImage(
const Image* image);
298 void setSizingCursorImage(
const String& name);
299 void setMovingCursorImage(
const Image* image);
300 void setMovingCursorImage(
const String& name);
334 void doDragSizing(
const Vector2f& local_mouse);
347 void doDragMoving(
const Vector2f& local_mouse);
354 void initDragMoving(
void);
361 void initSizingHoverState(
void);
368 void initSegmentHoverState(
void);
383 bool isDragMoveThresholdExceeded(
const Vector2f& local_mouse);
472 const Image* d_sizingMouseCursor;
473 const Image* d_movingMouseCursor;
475 float d_splitterSize;
476 bool d_splitterHover;
484 bool d_segmentPushed;
485 bool d_sizingEnabled;
486 bool d_movingEnabled;
495 void addHeaderSegmentProperties(
void);
504 typedef return_type safe_method_return_type;
506 typedef String string_return_type;
508 static const String& getDataTypeName()
515 static return_type fromString(
const String& str)
517 if (str ==
"Ascending")
521 else if (str ==
"Descending")
531 static string_return_type toString(pass_type val)
547 assert(
false &&
"Invalid Sort Direction");
555 #if defined(_MSC_VER)
556 # pragma warning(pop)
559 #endif // end of guard _CEGUIListHeaderSegment_h_