diff --git a/uppsrc/CtrlLib/ArrayCtrl.h b/uppsrc/CtrlLib/ArrayCtrl.h index 54a5a6d90..6905b4032 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.h +++ b/uppsrc/CtrlLib/ArrayCtrl.h @@ -269,8 +269,6 @@ private: int GetClickColumn(int ii, Point p); void ClickColumn(Point p); void ClickSel(dword flags); - Rect GetCellRect(int i, int col) const; - Rect GetCellRectM(int i, int col) const; Point FindCellCtrl(Ctrl *c); Ctrl *SyncLineCtrls(int i, Ctrl *p = NULL); @@ -578,6 +576,8 @@ public: void SetLineColor(int i, Color c); + Rect GetCellRect(int i, int col) const; + Rect GetCellRectM(int i, int col) const; Rect GetScreenCellRect(int i, int col) const; Rect GetScreenCellRectM(int i, int col) const; diff --git a/uppsrc/CtrlLib/Progress.cpp b/uppsrc/CtrlLib/Progress.cpp index 1b8e9493c..4c646dc3d 100644 --- a/uppsrc/CtrlLib/Progress.cpp +++ b/uppsrc/CtrlLib/Progress.cpp @@ -57,7 +57,7 @@ void ProgressIndicator::Paint(Draw& w) { w.DrawRect(r2, SColorPaper); w.DrawRect(r3, SColorPaper); if(percent) { - String pt = Format("%d %%", 100 * actual / max(total, 1)); + String pt = Format("%d %%", (int)(100L * actual / max(total, 1))); Size psz = GetTextSize(pt, StdFont()); int px = (sz.cx - psz.cx) / 2 + 2; int py = (sz.cy - psz.cy) / 2 + 2; diff --git a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp index 5f9275e6f..cdc9fba84 100644 --- a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp +++ b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp @@ -1570,6 +1570,30 @@ GetLineCy(r) > y]).&] eColor]([@(0.0.255) int]_[*@3 i], [_^Upp`:`:Color^ Color]_[*@3 c])&] [s2; Sets the background color of line [%-*@3 i] to [%-*@3 c].&] [s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:GetCellRect`(int`,int`)const:%- [_^Upp`:`:Rect^ Rect]_[* GetCell +Rect]([@(0.0.255) int]_[*@3 i], [@(0.0.255) int]_[*@3 col])_[@(0.0.255) const]&] +[s2; Returns rectangle of cell at [%-*@3 i],[%-*@3 col] in view coordinates. +Cell left and right margins are included in rectangle.&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:GetCellRectM`(int`,int`)const:%- [_^Upp`:`:Rect^ Rect]_[* GetCel +lRectM]([@(0.0.255) int]_[*@3 i], [@(0.0.255) int]_[*@3 col])_[@(0.0.255) const]&] +[s2; Returns rectangle of cell at [%-*@3 i],[%-*@3 col] in view coordinates. +Cell left and right margins are not included in rectangle.&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:GetScreenCellRect`(int`,int`)const:%- [_^Upp`:`:Rect^ Rect]_[* G +etScreenCellRect]([@(0.0.255) int]_[*@3 i], [@(0.0.255) int]_[*@3 col])_[@(0.0.255) const]&] +[s2; Returns rectangle of cell at [%-*@3 i],[%-*@3 col] in screen coordinates. +Cell left and right margins are included in rectangle.&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:GetScreenCellRectM`(int`,int`)const:%- [_^Upp`:`:Rect^ Rect]_[* G +etScreenCellRectM]([@(0.0.255) int]_[*@3 i], [@(0.0.255) int]_[*@3 col])_[@(0.0.255) const]&] +[s2; Returns rectangle of cell at [%-*@3 i],[%-*@3 col] in screen coordinates. +Cell left and right margins are not included in rectangle.&] +[s3; &] [s4; &] [s5;:ArrayCtrl`:`:GetClickColumn`(`)const: [@(0.0.255) int]_[* GetClickColumn]()_[@(0.0.255) c onst]&]