|
OWLNext 6.32
|
#include <draglist.h>
Public Types | |
| enum | TCursorType { dlStop = DL_STOPCURSOR, dlCopy = DL_COPYCURSOR, dlMove = DL_MOVECURSOR } |
Public Member Functions | |
| TDragList (TWindow *parent, int id, int x, int y, int w, int h, TModule *module=0) | |
| TDragList (TWindow *parent, int resourceId, TModule *module=0) | |
| virtual bool | BeginDrag (int item, const TPoint &point) |
| virtual TCursorType | Dragging (int item, const TPoint &point) |
| virtual void | Dropped (int item, const TPoint &point) |
| virtual void | CancelDrag (int item, const TPoint &point) |
| void | DrawInsert (int item) |
| int | ItemFromPoint (const TPoint &p, bool scroll=true) |
Protected Member Functions | |
| void | SetupWindow () |
TDragList is a draggable list box. A draggable list box is a list box which can be used to drag items to change their position. The program responds to drag events accordingly. Typical usage includes a list of fields that can be reordered.
Enumeration used to specify the type of cursor to be displayed during a drag operation. The cursor provides feedback to the user about whether the object being dragged can be dropped and the operation resulting from the drop.
| owl::TDragList::TDragList | ( | TWindow * | parent, |
| int | id, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| TModule * | module = 0 |
||
| ) |
Constructor for creating a drag list dynamically.
Constructor for creating a drag list from a resource.
| bool owl::TDragList::BeginDrag | ( | int | item, |
| const TPoint & | point | ||
| ) | [virtual] |
The drag UI has started. Return true to allow drag.
| void owl::TDragList::CancelDrag | ( | int | item, |
| const TPoint & | point | ||
| ) | [virtual] |
User has cancelled the drag.
| TDragList::TCursorType owl::TDragList::Dragging | ( | int | item, |
| const TPoint & | point | ||
| ) | [virtual] |
User has moved the mouse. Return the type of cursor to represent the allowable action.
References dlStop.
| void owl::TDragList::DrawInsert | ( | int | item | ) |
Draws the drag cursor.
References owl::TWindow::GetParentO().
| void owl::TDragList::Dropped | ( | int | item, |
| const TPoint & | point | ||
| ) | [virtual] |
User has dropped the item.
| int owl::TDragList::ItemFromPoint | ( | const TPoint & | p, |
| bool | scroll = true |
||
| ) |
Retrieve the item from the specified point. Return -1 if the point is not on an item. 'scroll' determines whether the listbox will scroll if the point is above or below the listbox.
| void owl::TDragList::SetupWindow | ( | ) | [protected, virtual] |
SetupWindow for the drag listbox must call MakeDragList().
Reimplemented from owl::TWindow.
1.7.4