mirror of https://github.com/buggins/dlangui.git
fixes for dlangide
This commit is contained in:
parent
289dfa0749
commit
73314752e2
|
@ -448,10 +448,10 @@ class FileDialog : Dialog, CustomGridCellAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
_fileList.customCellAdapter = this;
|
_fileList.customCellAdapter = this;
|
||||||
_fileList.onCellActivated = delegate(GridWidgetBase source, int col, int row) {
|
_fileList.cellActivated = delegate(GridWidgetBase source, int col, int row) {
|
||||||
onItemActivated(row);
|
onItemActivated(row);
|
||||||
};
|
};
|
||||||
_fileList.onCellSelected = delegate(GridWidgetBase source, int col, int row) {
|
_fileList.cellSelected = delegate(GridWidgetBase source, int col, int row) {
|
||||||
onItemSelected(row);
|
onItemSelected(row);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -241,13 +241,9 @@ interface ViewScrolledHandler {
|
||||||
class GridWidgetBase : ScrollWidgetBase, GridModelAdapter {
|
class GridWidgetBase : ScrollWidgetBase, GridModelAdapter {
|
||||||
/// Callback to handle selection change
|
/// Callback to handle selection change
|
||||||
Listener!CellSelectedHandler cellSelected;
|
Listener!CellSelectedHandler cellSelected;
|
||||||
/// cellSelected signal alias for backward compatibility; will be deprecated in future
|
|
||||||
alias onCellSelected = cellSelected;
|
|
||||||
|
|
||||||
/// Callback to handle cell double click
|
/// Callback to handle cell double click
|
||||||
Listener!CellActivatedHandler cellActivated;
|
Listener!CellActivatedHandler cellActivated;
|
||||||
/// cellActivated signal alias for backward compatibility; will be deprecated in future
|
|
||||||
alias onCellActivated = cellActivated;
|
|
||||||
|
|
||||||
/// Callback for handling of view scroll (top left visible cell change)
|
/// Callback for handling of view scroll (top left visible cell change)
|
||||||
Listener!ViewScrolledHandler viewScrolled;
|
Listener!ViewScrolledHandler viewScrolled;
|
||||||
|
@ -685,8 +681,8 @@ class GridWidgetBase : ScrollWidgetBase, GridModelAdapter {
|
||||||
calcScrollableAreaPos();
|
calcScrollableAreaPos();
|
||||||
if (makeVisible)
|
if (makeVisible)
|
||||||
makeCellVisible(_col, _row);
|
makeCellVisible(_col, _row);
|
||||||
if (needNotification && onCellSelected.assigned)
|
if (needNotification && cellSelected.assigned)
|
||||||
onCellSelected(source, _col - _headerCols, _row - _headerRows);
|
cellSelected(source, _col - _headerCols, _row - _headerRows);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,8 +691,8 @@ class GridWidgetBase : ScrollWidgetBase, GridModelAdapter {
|
||||||
if (_col != col || _row != row) {
|
if (_col != col || _row != row) {
|
||||||
selectCell(col, row, true);
|
selectCell(col, row, true);
|
||||||
}
|
}
|
||||||
if (onCellActivated.assigned)
|
if (cellActivated.assigned)
|
||||||
onCellActivated(this, this.col, this.row);
|
cellActivated(this, this.col, this.row);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,8 +872,8 @@ class GridWidgetBase : ScrollWidgetBase, GridModelAdapter {
|
||||||
|
|
||||||
switch (actionId) {
|
switch (actionId) {
|
||||||
case GridActions.ActivateCell:
|
case GridActions.ActivateCell:
|
||||||
if (onCellActivated.assigned) {
|
if (cellActivated.assigned) {
|
||||||
onCellActivated(this, col, row);
|
cellActivated(this, col, row);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -121,6 +121,9 @@ class ScrollWidgetBase : WidgetGroup, OnScrollHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// returns client area rectangle
|
||||||
|
@property Rect clientRect() { return _clientRect; }
|
||||||
|
|
||||||
/// process horizontal scrollbar event
|
/// process horizontal scrollbar event
|
||||||
bool onHScroll(ScrollEvent event) {
|
bool onHScroll(ScrollEvent event) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue