tbx
0.7.6
|
Class with the details of a select, deselect or toggle operation. More...
#include <selection.h>
Public Member Functions | |
SelectionChangedEvent (unsigned int first, unsigned int last, bool selected, bool final=true) | |
Construct a selection changed event. More... | |
SelectionChangedEvent () | |
Default constructor creates a selection of item 0. | |
unsigned int | first () const |
Returns the first selected/deselected item in the range. | |
void | first (unsigned int value) |
Set first selected. | |
unsigned int | last () const |
Returns the last selected/deselected item in the range. | |
void | last (unsigned int value) |
Set last selected. | |
bool | selected () const |
Returns the type of the event. More... | |
void | selected (bool value) |
Set selected flag. | |
bool | final () const |
Returns true if this is the last event in a group of events triggered by a single action. More... | |
void | final (bool value) |
Set final flag. | |
Class with the details of a select, deselect or toggle operation.
|
inline |
Construct a selection changed event.
first | index of first item in selection |
last | index of last item in selection |
selected | true if items are being selected, false if they are being deselected |
final | true if last event generated in one action. |
|
inline |
Returns true if this is the last event in a group of events triggered by a single action.
In a single selection model you would get an event with selected = false, final = false if there was an existing selection, before an event with selected = true, final = true
In a multiple selection model you get final = false for all the events generated by a method that changes the selection except the last which has final = true
|
inline |
Returns the type of the event.