Crazy Eddies GUI System: CEGUI::ListHeaderSegment Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
CEGUI::ListHeaderSegment Class Reference

Base class for list header segment window. More...

Inheritance diagram for CEGUI::ListHeaderSegment:
[legend]
Collaboration diagram for CEGUI::ListHeaderSegment:
[legend]

List of all members.

## Public Types
enum | SortDirection { None, Ascending, Descending }
| Enumeration of possible values for sorting direction used with ListHeaderSegment classes. More...
## Public Member Functions
bool | isSizingEnabled (void) const
| Return whether this segment can be sized.
SortDirection | getSortDirection (void) const
| Return the current sort direction set for this segment.
bool | isDragMovingEnabled (void) const
| Return whether drag moving is enabled for this segment.
const Point & | getDragMoveOffset (void) const
| Return the current drag move position offset (in pixels relative to the top-left corner of the segment).
bool | isClickable (void) const
| Return whether the segment is clickable.
bool | isSegmentHovering (void) const
| Return whether the segment is currently in its hovering state.
bool | isSegmentPushed (void) const
| Return whether the segment is currently in its pushed state.
bool | isSplitterHovering (void) const
| Return whether the splitter is currently in its hovering state.
bool | isBeingDragMoved (void) const
| Return whether the segment is currently being drag-moved.
bool | isBeingDragSized (void) const
| Return whether the segment is currently being drag-moved.
const Image * | getSizingCursorImage () const
const Image * | getMovingCursorImage () const
void | setSizingEnabled (bool setting)
| Set whether this segment can be sized.
void | setSortDirection (SortDirection sort_dir)
| Set the current sort direction set for this segment.
void | setDragMovingEnabled (bool setting)
| Set whether drag moving is allowed for this segment.
void | setClickable (bool setting)
| Set whether the segment is clickable.
void | setSizingCursorImage (const Image *image)
void | setSizingCursorImage (const String &imageset, const String &image)
void | setMovingCursorImage (const Image *image)
void | setMovingCursorImage (const String &imageset, const String &image)
| ListHeaderSegment (const String &type, const String &name)
| Constructor for list header segment base class.
virtual | ~ListHeaderSegment (void)
| Destructor for list header segment base class.
## Static Public Attributes
static const String | EventNamespace
| Namespace for global events.
static const String | WidgetTypeName
| Window factory name.
static const String | EventSegmentClicked
static const String | EventSplitterDoubleClicked
static const String | EventSizingSettingChanged
static const String | EventSortDirectionChanged
static const String | EventMovableSettingChanged
static const String | EventSegmentDragStart
static const String | EventSegmentDragStop
static const String | EventSegmentDragPositionChanged
static const String | EventSegmentSized
static const String | EventClickableSettingChanged
static const float | DefaultSizingArea
| Default size of the sizing area.
static const float | SegmentMoveThreshold
| Amount the mouse must be dragged before drag-moving is initiated.
## Protected Member Functions
void | doDragSizing (const Point &local_mouse)
| Update state for drag sizing.
void | doDragMoving (const Point &local_mouse)
| Update state for drag moving.
void | initDragMoving (void)
| Initialise the required states to put the widget into drag-moving mode.
void | initSizingHoverState (void)
| Initialise the required states when we are hovering over the sizing area.
void | initSegmentHoverState (void)
| Initialise the required states when we are hovering over the main segment area.
bool | isDragMoveThresholdExceeded (const Point &local_mouse)
| Return whether the required minimum movement threshold before initiating drag-moving has been exceeded.
virtual bool | testClassName_impl (const String &class_name) const
| Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
virtual void | onSegmentClicked (WindowEventArgs &e)
| Handler called when segment is clicked.
virtual void | onSplitterDoubleClicked (WindowEventArgs &e)
| Handler called when the sizer/splitter is double-clicked.
virtual void | onSizingSettingChanged (WindowEventArgs &e)
| Handler called when sizing setting changes.
virtual void | onSortDirectionChanged (WindowEventArgs &e)
| Handler called when the sort direction value changes.
virtual void | onMovableSettingChanged (WindowEventArgs &e)
| Handler called when the drag-movable setting is changed.
virtual void | onSegmentDragStart (WindowEventArgs &e)
| Handler called when the user starts dragging the segment.
virtual void | onSegmentDragStop (WindowEventArgs &e)
| Handler called when the user stops dragging the segment (releases mouse button)
virtual void | onSegmentDragPositionChanged (WindowEventArgs &e)
| Handler called when the drag position changes.
virtual void | onSegmentSized (WindowEventArgs &e)
| Handler called when the segment is sized.
virtual void | onClickableSettingChanged (WindowEventArgs &e)
| Handler called when the clickable setting for the segment changes.
virtual void | onMouseMove (MouseEventArgs &e)
| Handler called when the mouse cursor has been moved within this window's area.
virtual void | onMouseButtonDown (MouseEventArgs &e)
| Handler called when a mouse button has been depressed within this window's area.
virtual void | onMouseButtonUp (MouseEventArgs &e)
| Handler called when a mouse button has been released within this window's area.
virtual void | onMouseDoubleClicked (MouseEventArgs &e)
| Handler called when a mouse button has been double-clicked within this window's area.
virtual void | onMouseLeaves (MouseEventArgs &e)
| Handler called when the mouse cursor is no longer over this window's surface area. This will be called when the mouse is not over a part of this Window's actual surface - even though technically the mouse is still within the Window's area, for example if the mouse moves over a child window.
virtual void | onCaptureLost (WindowEventArgs &e)
| Handler called when this window loses capture of mouse inputs.
## Protected Attributes
const Image * | d_sizingMouseCursor
| Image to use for mouse when sizing (typically set by derived class).
const Image * | d_movingMouseCursor
| Image to use for mouse when moving (typically set by derived class).
float | d_splitterSize
| pixel width of the sizing area.
bool | d_splitterHover
| True if the mouse is over the splitter.
bool | d_dragSizing
| true when we are being sized.
Point | d_dragPoint
| point we are being dragged at when sizing or moving.
SortDirection | d_sortDir
| Direction for sorting (used for deciding what icon to display).
bool | d_segmentHover
| true when the mouse is within the segment area (and not in sizing area).
bool | d_segmentPushed
| true when the left mouse button has been pressed within the confines of the segment.
bool | d_sizingEnabled
| true when sizing is enabled for this segment.
bool | d_movingEnabled
| True when drag-moving is enabled for this segment;.
bool | d_dragMoving
| true when segment is being drag moved.
Point | d_dragPosition
| position of dragged segment.
bool | d_allowClicks
| true if the segment can be clicked.

## Detailed Description

Base class for list header segment window.

## Member Enumeration Documentation

enum CEGUI::ListHeaderSegment::SortDirection

Enumeration of possible values for sorting direction used with ListHeaderSegment classes.

Enumerator:

  None | Items under this segment should not be sorted.
  Ascending | Items under this segment should be sorted in ascending order.
  Descending | Items under this segment should be sorted in descending order.

## Member Function Documentation

void CEGUI::ListHeaderSegment::doDragMoving | ( | const Point & | local_mouse | ) | `[protected]`

Update state for drag moving.

Parameters:

  local_mouse | Mouse position as a pixel offset from the top-left corner of this window.

Returns:
  Nothing.

void CEGUI::ListHeaderSegment::doDragSizing | ( | const Point & | local_mouse | ) | `[protected]`

Update state for drag sizing.

Parameters:

  local_mouse | Mouse position as a pixel offset from the top-left corner of this window.

Returns:
  Nothing.

const Point& CEGUI::ListHeaderSegment::getDragMoveOffset | ( | void |  | ) | const`[inline]`

Return the current drag move position offset (in pixels relative to the top-left corner of the segment).

Returns:
  Point object describing the drag move offset position.

SortDirection CEGUI::ListHeaderSegment::getSortDirection | ( | void |  | ) | const`[inline]`

Return the current sort direction set for this segment.

Note that this has no impact on the way the segment functions (aside from the possibility of varied rendering). This is intended as a 'helper setting' to classes that make use of the ListHeaderSegment objects.

Returns:
  One of the SortDirection enumerated values indicating the current sort direction set for this segment.

bool CEGUI::ListHeaderSegment::isClickable | ( | void |  | ) | const`[inline]`

Return whether the segment is clickable.

Returns:
  true if the segment can be clicked, false of the segment can not be clicked (so no highlighting or events will happen).

bool CEGUI::ListHeaderSegment::isDragMoveThresholdExceeded | ( | const Point & | local_mouse | ) | `[protected]`

Return whether the required minimum movement threshold before initiating drag-moving has been exceeded.

Parameters:

  local_mouse | Mouse position as a pixel offset from the top-left corner of this window.

Returns:
  true if the threshold has been exceeded and drag-moving should be initiated, or false if the threshold has not been exceeded.

bool CEGUI::ListHeaderSegment::isDragMovingEnabled | ( | void |  | ) | const`[inline]`

Return whether drag moving is enabled for this segment.

Returns:
  true if the segment can be drag moved, false if the segment can not be drag moved.

bool CEGUI::ListHeaderSegment::isSizingEnabled | ( | void |  | ) | const`[inline]`

Return whether this segment can be sized.

Returns:
  true if the segment can be horizontally sized, false if the segment can not be horizontally sized.

virtual void CEGUI::ListHeaderSegment::onCaptureLost | ( | WindowEventArgs & | e | ) | `[protected, virtual]`

Handler called when this window loses capture of mouse inputs.

Parameters:

  e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ListHeaderSegment::onMouseButtonDown | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

Handler called when a mouse button has been depressed within this window's area.

Parameters:

  e | MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ListHeaderSegment::onMouseButtonUp | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

Handler called when a mouse button has been released within this window's area.

Parameters:

  e | MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ListHeaderSegment::onMouseDoubleClicked | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

Handler called when a mouse button has been double-clicked within this window's area.

Parameters:

  e | MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ListHeaderSegment::onMouseLeaves | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

Handler called when the mouse cursor is no longer over this window's surface area. This will be called when the mouse is not over a part of this Window's actual surface - even though technically the mouse is still within the Window's area, for example if the mouse moves over a child window.

Parameters:

  e | MouseEventArgs object. All fields are valid.

See also:
  Window::onMouseLeavesArea

Reimplemented from CEGUI::Window.

virtual void CEGUI::ListHeaderSegment::onMouseMove | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

Handler called when the mouse cursor has been moved within this window's area.

Parameters:

  e | MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

void CEGUI::ListHeaderSegment::setClickable | ( | bool | setting | ) |

Set whether the segment is clickable.

Parameters:

  setting | true if the segment may be clicked, false of the segment may not be clicked (so no highlighting or events will happen).

Returns:
  Nothing.

void CEGUI::ListHeaderSegment::setDragMovingEnabled | ( | bool | setting | ) |

Set whether drag moving is allowed for this segment.

Parameters:

  setting | true if the segment may be drag moved, false if the segment may not be drag moved.

Returns:
  Nothing.

void CEGUI::ListHeaderSegment::setSizingEnabled | ( | bool | setting | ) |

Set whether this segment can be sized.

Parameters:

  setting | true if the segment may be horizontally sized, false if the segment may not be horizontally sized.

Returns:
  Nothing.

void CEGUI::ListHeaderSegment::setSortDirection | ( | SortDirection | sort_dir | ) |

Set the current sort direction set for this segment.

Note that this has no impact on the way the segment functions (aside from the possibility of varied rendering). This is intended as a 'helper setting' to classes that make use of the ListHeaderSegment objects.

Parameters:

  sort_dir | One of the SortDirection enumerated values indicating the current sort direction set for this segment.

Returns:
  Nothing

virtual bool CEGUI::ListHeaderSegment::testClassName_impl | ( | const String & | class_name | ) | const`[inline, protected, virtual]`

Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

Parameters:

  class_name | The class name that is to be checked.

Returns:
  true if this window was inherited from class_name. false if not.

Reimplemented from CEGUI::Window.

References CEGUI::Window::testClassName_impl().

## Member Data Documentation

const String CEGUI::ListHeaderSegment::EventClickableSettingChanged`[static]`

Event fired when the clickable setting for the segment is changed. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose setting that controls whether the segment is clickable has been changed.

const String CEGUI::ListHeaderSegment::EventMovableSettingChanged`[static]`

Event fired when the user drag-movable setting is changed. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose user drag-movable setting has been changed.

const String CEGUI::ListHeaderSegment::EventSegmentClicked`[static]`

Event fired when the segment is clicked. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment that was clicked.

const String CEGUI::ListHeaderSegment::EventSegmentDragPositionChanged`[static]`

Event fired when the segment drag position has changed. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose position has changed due to being dragged.

const String CEGUI::ListHeaderSegment::EventSegmentDragStart`[static]`

Event fired when the segment has started to be dragged. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment that has started to be dragged.

const String CEGUI::ListHeaderSegment::EventSegmentDragStop`[static]`

Event fired when segment dragging has stopped (via mouse release). Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment that is no longer being dragged.

const String CEGUI::ListHeaderSegment::EventSegmentSized`[static]`

Event fired when the segment is sized by the user. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment that has been resized by the user dragging.

const String CEGUI::ListHeaderSegment::EventSizingSettingChanged`[static]`

Event fired when the user drag-sizable setting is changed. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose user sizable setting has been changed.

const String CEGUI::ListHeaderSegment::EventSortDirectionChanged`[static]`

Event fired when the sort direction value is changed. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose sort direction has been changed.

const String CEGUI::ListHeaderSegment::EventSplitterDoubleClicked`[static]`

Event fired when the sizer/splitter is double-clicked. Hanlders are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ListHeaderSegment whose sizer / splitter area was double-clicked.