OWLNext 6.32
Public Types | Public Member Functions | Protected Member Functions
owl::TDragList Class Reference

#include <draglist.h>

Inheritance diagram for owl::TDragList:
owl::TListBox owl::TControl owl::TWindow owl::TEventHandler owl::TStreamableBase

List of all members.

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 ()

Detailed Description

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.


Member Enumeration Documentation

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.

Enumerator:
dlStop 

stop cursor - item cannot be dropped now

dlCopy 

copy cursor - item dragged will be copied

dlMove 

move cursor - item dragged will be moved


Constructor & Destructor Documentation

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.

owl::TDragList::TDragList ( TWindow parent,
int  resourceId,
TModule module = 0 
)

Constructor for creating a drag list from a resource.


Member Function Documentation

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.


The documentation for this class was generated from the following files: