diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index 9f66d8e3c..ea29aa907 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -724,7 +724,7 @@ void ArrayCtrl::SyncPageCtrls() ctrl_high = 0; p = NULL; for(int i = min_visible_line; i <= min(max_visible_line, GetCount() - 1); i++) - p = SyncLineCtrls(i, p); + p = SyncLineCtrls(i, p); } void ArrayCtrl::SyncCtrls() @@ -835,36 +835,37 @@ Size ArrayCtrl::DoPaint(Draw& w, bool sample) { r.bottom = r.top + GetLineCy(i); int x = xs; dword st = 0; - for(int j = js; j < column.GetCount(); j++) { - int cw = header.GetTabWidth(j); - int jj = header.GetTabIndex(j); - int cm = column[jj].margin; - if(cm < 0) - cm = header.Tab(j).GetMargin(); - if(x > size.cx) break; - r.left = x; - r.right = x + cw - vertgrid + (j == column.GetCount() - 1); - dword st; - Color fg, bg; - Value q; - const Display& d = GetCellInfo(i, jj, hasfocus0, q, fg, bg, st); - if(sample || w.IsPainting(r)) { - if(cw < 2 * cm || editmode && i == cursor && column[jj].edit) - d.PaintBackground(w, r, q, fg, bg, st); - else { - d.PaintBackground(w, RectC(r.left, r.top, cm, r.Height()), q, fg, bg, st); - r.left += cm; - r.right -= cm; - d.PaintBackground(w, RectC(r.right, r.top, cm, r.Height()), q, fg, bg, st); - w.Clip(r); - GetDisplay(i, jj).Paint(w, r, q, fg, bg, st); - w.End(); + if(r.bottom > r.top) + for(int j = js; j < column.GetCount(); j++) { + int cw = header.GetTabWidth(j); + int jj = header.GetTabIndex(j); + int cm = column[jj].margin; + if(cm < 0) + cm = header.Tab(j).GetMargin(); + if(x > size.cx) break; + r.left = x; + r.right = x + cw - vertgrid + (j == column.GetCount() - 1); + dword st; + Color fg, bg; + Value q; + const Display& d = GetCellInfo(i, jj, hasfocus0, q, fg, bg, st); + if(sample || w.IsPainting(r)) { + if(cw < 2 * cm || editmode && i == cursor && column[jj].edit) + d.PaintBackground(w, r, q, fg, bg, st); + else { + d.PaintBackground(w, RectC(r.left, r.top, cm, r.Height()), q, fg, bg, st); + r.left += cm; + r.right -= cm; + d.PaintBackground(w, RectC(r.right, r.top, cm, r.Height()), q, fg, bg, st); + w.Clip(r); + GetDisplay(i, jj).Paint(w, r, q, fg, bg, st); + w.End(); + } } + x += cw; + if(vertgrid) + w.DrawRect(x - 1, r.top, 1, r.Height(), gridcolor); } - x += cw; - if(vertgrid) - w.DrawRect(x - 1, r.top, 1, r.Height(), gridcolor); - } if(horzgrid) w.DrawRect(0, r.bottom, size.cx, 1, gridcolor); r.left = 0; diff --git a/uppsrc/CtrlLib/DropChoice.h b/uppsrc/CtrlLib/DropChoice.h index 0e7eb46fb..b496550c4 100644 --- a/uppsrc/CtrlLib/DropChoice.h +++ b/uppsrc/CtrlLib/DropChoice.h @@ -74,7 +74,7 @@ public: Callback WhenDrop; - DropList& Add(const Value& key, const Value& value); + DropList& Add(const Value& key, const Value& value, bool enable = true); DropList& Add(const Value& value) { return Add(value, value); } void Remove(int i); void ClearList(); @@ -118,6 +118,7 @@ public: DropList& SetConvert(const Convert& cv); DropList& SetDisplay(int i, const Display& d); DropList& SetDisplay(const Display& d); + DropList& SetLineCy(int i, int lcy) { list.SetLineCy(i, lcy); return *this; } DropList& SetLineCy(int lcy) { list.SetLineCy(lcy); return *this; } DropList& SetDisplay(const Display& d, int lcy); DropList& ValueDisplay(const Display& d); diff --git a/uppsrc/CtrlLib/DropList.cpp b/uppsrc/CtrlLib/DropList.cpp index 2dfcb1215..7bce0872a 100644 --- a/uppsrc/CtrlLib/DropList.cpp +++ b/uppsrc/CtrlLib/DropList.cpp @@ -118,10 +118,12 @@ void DropList::Clear() { Update(); } -DropList& DropList::Add(const Value& _key, const Value& text) +DropList& DropList::Add(const Value& _key, const Value& text, bool enable) { key.Add(_key); list.Add(text); + if(!enable) + list.SetLineCy(list.GetCount() - 1, 0); list.Refresh(); EnableDrop(); Sync(); diff --git a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp index d49229774..920c3c9bc 100644 --- a/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp +++ b/uppsrc/CtrlLib/src.tpp/ArrayCtrl$en-us.tpp @@ -2104,6 +2104,27 @@ t]_[*@3 i])_[@(0.0.255) const]&] is selected, otherwise returns true if cursor is at [%-*@3 i].&] [s3; &] [s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:EnableLine`(int`,bool`):%- [@(0.0.255) void]_[* EnableLine]([@(0.0.255) i +nt]_[*@3 i], [@(0.0.255) bool]_[*@3 e])&] +[s2; Enables line to be selected by cursor. Lines are enabled by +default.&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:DisableLine`(int`):%- [@(0.0.255) void]_[* DisableLine]([@(0.0.255) i +nt]_[*@3 i])&] +[s2; Same as EnableLine(false).&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:IsLineEnabled`(int`)const:%- [@(0.0.255) bool]_[* IsLineEnabled]( +[@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&] +[s2; Returns true if line is enabled.&] +[s3; &] +[s4;%- &] +[s5;:Upp`:`:ArrayCtrl`:`:IsLineDisabled`(int`)const:%- [@(0.0.255) bool]_[* IsLineDisable +d]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&] +[s2; Returns true if line is not enabled.&] +[s3; &] +[s4;%- &] [s5;:ArrayCtrl`:`:ClearSelection`(`):%- [@(0.0.255) void]_[* ClearSelection]()&] [s2; Clears the current selection (unselects all selected rows).&] [s3; &] diff --git a/uppsrc/CtrlLib/src.tpp/DropList$en-us.tpp b/uppsrc/CtrlLib/src.tpp/DropList$en-us.tpp index 814cf904b..d5411efd4 100644 --- a/uppsrc/CtrlLib/src.tpp/DropList$en-us.tpp +++ b/uppsrc/CtrlLib/src.tpp/DropList$en-us.tpp @@ -17,10 +17,7 @@ ultiButton][3 , ][@(0.0.255)3 public][3 _][*@3;3 Convert]&] [s0;%% &] [s2;%% @@image:337&143 -€ƒ¶€—€€€ƒéÿ€€€€ø¯œí×ω°ޘ‡áì玎ÛàÕ™ÜÀ©¼ÎùÕŠ•ªÑ±©¨˜¼©•±˜‰Ä´ðÁ¨‰Ùâ×­þ‚˜ÞÚÃ’–úÐÃÿ -¥èÜéÿÕÔè”õ‚̑ރ›½ß—Êí­Ý½ð²ç„ôéêÎæÌ”ð¢®óœ˜Â¡„³¤»ñ‰ð¼ÑœÞŒŠý̳ùÙᓲ¾ðúãžÖ”¥œ­òªÖï -çÚ¹¿ƒ”ÆË£³Éà¨Úú»âÀ᰽іäÕÌ© ð°¸Ú¬Œªž‚Š£ÜùÖÌòœý å°¿Û»™ž¿˜‰üžö¦»ÎÁÀ÷ʤ•§ Ò°–©§”°ü -Žï›²Ã—†˜Çü×ãçú€ãÖó± +(AzYAFwAAAOn/AAAAAHic7dfPCcIwGIfh7OcOjuDVGdzAKbx51YqVKlGxqBg8qRWxGMQNNPBBKAniVy3+ghjeQ5IW+tBD/+hc6X9V1Gh1AswR3gMb3xfK7a3dPXAyZ0KEdGlO5kyUcKKunJhCIYSzpPGJcLzRnF4KfcyzeVlhsr5weuMeViUcrXKqVm/aub8DFMbLs8lgKFr6O0DhMD1RluTMKaBwsDjaLIwqHgIKo3lWzPKcfaCwP9s7GZ6/CXwe9qY7TsB3SiQVJ6AwliknlDD8b5uywxcGGPzX42d6AOPWczE=) &] [s0;%% &] [s9;%% This widget provides the selection of values from the drop`-down @@ -55,12 +52,15 @@ base class.&] code can (re)create the list in the callback.&] [s3; &] [s4; &] -[s5;:DropList`:`:Add`(const Value`&`,const Value`&`): [_^DropList^ DropList][@(0.0.255) `& -]_[* Add]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 key], -[@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 value])&] +[s5;:Upp`:`:DropList`:`:Add`(const Upp`:`:Value`&`,const Upp`:`:Value`&`,bool`): [_^Upp`:`:DropList^ D +ropList][@(0.0.255) `&]_[* Add]([@(0.0.255) const]_[_^Upp`:`:Value^ Value][@(0.0.255) `&]_[*@3 k +ey], [@(0.0.255) const]_[_^Upp`:`:Value^ Value][@(0.0.255) `&]_[*@3 value], +[@(0.0.255) bool]_[*@3 enable] `= [@(0.0.255) true])&] [s2;%% Adds a new item to the list, [%-*@3 key] determines the value of item, [%-*@3 value] is displayed in the value area and in the -list.&] +list. If [%-*@3 enable] is false, DropList can be assigned this +[%-*@3 key]and displays corresponding [%-*@3 value], but does not +include it in drop list popup.&] [s3; &] [s4; &] [s5;:DropList`:`:Add`(const Value`&`): [_^DropList^ DropList][@(0.0.255) `&]_[* Add]([@(0.0.255) c diff --git a/uppsrc/ide/ide.lay b/uppsrc/ide/ide.lay index 2189fe4c5..f559bced4 100644 --- a/uppsrc/ide/ide.lay +++ b/uppsrc/ide/ide.lay @@ -572,7 +572,7 @@ LAYOUT(SetupEditorLayout, 544, 296) END_LAYOUT LAYOUT(SetupAssistLayout, 532, 212) - ITEM(Option, check, SetLabel(t_("Automatic checks of source files")).LeftPosZ(4, 252).TopPosZ(4, 16)) + ITEM(Option, check, SetLabel(t_("Automatic scans of source files")).LeftPosZ(4, 252).TopPosZ(4, 16)) ITEM(Option, assist, SetLabel(t_("Automatic assist")).LeftPosZ(4, 252).TopPosZ(24, 16)) ITEM(Option, rescan, SetLabel(t_("Rescan file when editing")).LeftPosZ(4, 252).TopPosZ(44, 16)) ITEM(Option, commentdp, SetLabel(t_("Comment out default parameters")).Tip(t_("Comment out default parameters when converting declaration to definition instead of removing them")).LeftPosZ(4, 252).TopPosZ(64, 16))