mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: WhenArrayAction now gets called on all data changes
git-svn-id: svn://ultimatepp.org/upp/trunk@12945 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c352359c22
commit
c34cc4236a
3 changed files with 12 additions and 1 deletions
|
|
@ -480,6 +480,7 @@ void ArrayCtrl::Set(int ii, const Value& v) {
|
|||
modify.At(ii, false) = true;
|
||||
InvalidateCache(cursor);
|
||||
RefreshRow(cursor);
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::Set(const Id& id, const Value& v) {
|
||||
|
|
@ -492,6 +493,7 @@ void ArrayCtrl::Set0(int i, int ii, const Value& v) {
|
|||
else
|
||||
SetCtrlValue(i, ii, v);
|
||||
array.At(i).line.At(ii) = v;
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::AfterSet(int i)
|
||||
|
|
@ -533,6 +535,7 @@ void ArrayCtrl::SetCount(int n) {
|
|||
SyncCtrls();
|
||||
SetSb();
|
||||
PlaceEdits();
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
Value ArrayCtrl::GetColumn(int row, int col) const {
|
||||
|
|
@ -1197,6 +1200,7 @@ void ArrayCtrl::Remove0(int i) {
|
|||
SyncInfo();
|
||||
SetSb();
|
||||
selectiondirty = true;
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::DisableCtrls() {
|
||||
|
|
@ -2005,6 +2009,7 @@ void ArrayCtrl::Set(int i, const Vector<Value>& v) {
|
|||
InvalidateCache(i);
|
||||
SetSb();
|
||||
RefreshRow(i);
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::Add() {
|
||||
|
|
@ -2023,6 +2028,7 @@ void ArrayCtrl::Add() {
|
|||
InvalidateCache(i);
|
||||
RefreshRow(i);
|
||||
}
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::Add(const Vector<Value>& v)
|
||||
|
|
@ -2147,6 +2153,7 @@ void ArrayCtrl::Insert(int i, int count) {
|
|||
PlaceEdits();
|
||||
SyncCtrls();
|
||||
SyncInfo();
|
||||
WhenArrayAction();
|
||||
}
|
||||
|
||||
void ArrayCtrl::Insert(int i)
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ protected:
|
|||
void ClearModify();
|
||||
|
||||
public:
|
||||
Event<> WhenSel; // the most usual ArrayCtrl callbak
|
||||
Event<> WhenSel; // the most usual ArrayCtrl event
|
||||
|
||||
Event<> WhenLeftDouble;
|
||||
Event<Point> WhenMouseMove;
|
||||
|
|
|
|||
|
|
@ -2563,6 +2563,7 @@ be regenerated. By setting this callback to a different function
|
|||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:ArrayCtrl`:`:WhenEnterRow: [_^Callback^ Callback]_[* WhenEnterRow]&]
|
||||
[s0; [* -|][*/ Deprecated]&]
|
||||
[s2; This callback is called every time the cursor location changes
|
||||
to a different row of the array.&]
|
||||
[s3; &]
|
||||
|
|
@ -2583,6 +2584,7 @@ or generally to an external data source.&]
|
|||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:ArrayCtrl`:`:WhenKillCursor: [_^Callback^ Callback]_[* WhenKillCursor]&]
|
||||
[s0; [* -|][*/ Deprecated]&]
|
||||
[s2; This callback is called whenever the cursor is moved away from
|
||||
the table.&]
|
||||
[s2; [* Note:] internally, when moving the cursor (e.g. by calling the
|
||||
|
|
@ -2593,6 +2595,7 @@ the [* WhenKillCursor] callback is called as a by`-product.&]
|
|||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:ArrayCtrl`:`:WhenCursor: [_^Callback^ Callback]_[* WhenCursor]&]
|
||||
[s0; [* -|][*/ Deprecated]&]
|
||||
[s2; This callback is called every time the cursor row number changes
|
||||
(either when the cursor is removed from the table, or when it
|
||||
has been moved to a different row).&]
|
||||
|
|
@ -2617,6 +2620,7 @@ been committed.&]
|
|||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:ArrayCtrl`:`:WhenSelection: [_^Callback^ Callback]_[* WhenSelection]&]
|
||||
[s0; [* -|][*/ Deprecated]&]
|
||||
[s2; This callback is called whenever the current array selection
|
||||
changes. This includes changes to the cursor location as the
|
||||
cursor is automatically considered part of the selection.&]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue