diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index a254bd153..336e6a0fb 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -1637,6 +1637,8 @@ void ArrayCtrl::MouseLeave() Image ArrayCtrl::CursorImage(Point p, dword) { + if(!IsNull(cursor_override)) + return cursor_override; return header.GetSplit(p.x) < 0 || header.GetMode() == HeaderCtrl::FIXED ? Image::Arrow() : CtrlsImg::HorzPos(); } diff --git a/uppsrc/CtrlLib/ArrayCtrl.h b/uppsrc/CtrlLib/ArrayCtrl.h index b74cf0a7b..8e53e8894 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.h +++ b/uppsrc/CtrlLib/ArrayCtrl.h @@ -238,6 +238,8 @@ private: mutable bool selectiondirty:1; unsigned bains:2; + + Image cursor_override; bool isdrag:1; bool selclick:1; @@ -634,6 +636,8 @@ public: ArrayCtrl& SetScrollBarStyle(const ScrollBar::Style& s) { sb.SetStyle(s); header.SetScrollBarStyle(s); return *this; } ArrayCtrl& SetHeaderCtrlStyle(const HeaderCtrl::Style& s) { header.SetStyle(s); return *this; } + ArrayCtrl& CursorOverride(const Image& arrow) { cursor_override = arrow; return *this; } + ArrayCtrl& NoCursorOverride() { return CursorOverride(Null); } void Reset(); diff --git a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp index 7ec977ef7..10538f33f 100644 --- a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp +++ b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp @@ -1229,6 +1229,16 @@ blank`-separated decimal numbers, e.g. `"1 4 6 4 1`".&] [s7; [*/ Return value]-|[* `*this]&] [s3; &] [s4;%- &] +[s5;:ArrayCtrl`:`:CursorOverride`(const Image`&`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `& +]_[* CursorOverride]([@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 arrow])&] +[s2; Overrides mouse cursor to [%-*@3 arrow]. Setting Null ends override.&] +[s3; &] +[s4;%- &] +[s5;:ArrayCtrl`:`:NoCursorOverride`(`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `&]_[* NoCurs +orOverride]()&] +[s2; Same as CursorOverride(Null).&] +[s3;%- &] +[s4;%- &] [s5;:ArrayCtrl`:`:RowFormat`(const char`*`):%- [_^String^ String]_[* RowFormat]([@(0.0.255) c onst]_[@(0.0.255) char]_`*[*@3 s])&] [s2; Formats a text by substituting [* %s] with the array`-specific @@ -2906,4 +2916,4 @@ of the rows to compare&] row to compare&] [s7; [*/ Return value]-|[* true] `= row1 < row2, [* false] `= row1 >`= row2&] [s3; &] -[s0; ] \ No newline at end of file +[s0; ]] \ No newline at end of file