mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
GridCtrl: fixed for C++11
git-svn-id: svn://ultimatepp.org/upp/trunk@7177 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e2263ed301
commit
34a6a0b443
4 changed files with 11 additions and 5 deletions
|
|
@ -114,7 +114,13 @@ define interface contract using&]
|
||||||
[s7; -|struct Distribution : [* Moveable]<Distribution> `{&]
|
[s7; -|struct Distribution : [* Moveable]<Distribution> `{&]
|
||||||
[s7; -|-|String text;&]
|
[s7; -|-|String text;&]
|
||||||
[s7; -|-|Vector<int> data;&]
|
[s7; -|-|Vector<int> data;&]
|
||||||
|
[s7; &]
|
||||||
|
[s7; -|-|rval`_default(Distribution);&]
|
||||||
|
[s7; -|-|Distribution() `{`}&]
|
||||||
[s7; -|`};&]
|
[s7; -|`};&]
|
||||||
|
[s5; Note that rval`_default macro is helper to restore default deleted
|
||||||
|
r`-value constructor in C`+`+11 and default constructor is also
|
||||||
|
default deleted in C`+`+11.&]
|
||||||
[s5; Now to add Distribution elements you cannot use Add with parameter,
|
[s5; Now to add Distribution elements you cannot use Add with parameter,
|
||||||
because it requires elements to have default deep`-copy constructor
|
because it requires elements to have default deep`-copy constructor
|
||||||
`- and Distribution does not have one, as Vector<int> has default
|
`- and Distribution does not have one, as Vector<int> has default
|
||||||
|
|
@ -667,7 +673,7 @@ and operators <, <`=, >, >`=:&]
|
||||||
[s7; -|&]
|
[s7; -|&]
|
||||||
[s7; -|y.b `= `"a`";&]
|
[s7; -|y.b `= `"a`";&]
|
||||||
[s7; -|&]
|
[s7; -|&]
|
||||||
[s7; -|DUMP(SgnCompare(y));&]
|
[s7; -|DUMP(SgnCompare(x, y));&]
|
||||||
[s7; -|DUMP(x < y);&]
|
[s7; -|DUMP(x < y);&]
|
||||||
[s7; -|&]
|
[s7; -|&]
|
||||||
[s7; &]
|
[s7; &]
|
||||||
|
|
|
||||||
|
|
@ -1826,8 +1826,6 @@ void GridCtrl::RemoveColumn(int n, int count)
|
||||||
r.Add(hitems[n + i].id);
|
r.Add(hitems[n + i].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int id = hitems[n].id;
|
|
||||||
|
|
||||||
hitems.Remove(n, count);
|
hitems.Remove(n, count);
|
||||||
rowbkp.Remove(r);
|
rowbkp.Remove(r);
|
||||||
summary.Remove(r);
|
summary.Remove(r);
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,9 @@ class CtrlsHolder : public Ctrl
|
||||||
class GridClipboard : Moveable<GridClipboard>
|
class GridClipboard : Moveable<GridClipboard>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
rval_default(GridClipboard);
|
||||||
|
GridClipboard() {}
|
||||||
|
|
||||||
struct ClipboardData : Moveable<ClipboardData>
|
struct ClipboardData : Moveable<ClipboardData>
|
||||||
{
|
{
|
||||||
int col, row;
|
int col, row;
|
||||||
|
|
@ -1860,7 +1863,6 @@ class GridText : Ctrl
|
||||||
const Id* column;
|
const Id* column;
|
||||||
Color fg, bg;
|
Color fg, bg;
|
||||||
Font fnt;
|
Font fnt;
|
||||||
int align;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ class GridDisplay
|
||||||
|
|
||||||
void SetDefault();
|
void SetDefault();
|
||||||
|
|
||||||
~GridDisplay() {};
|
virtual ~GridDisplay() {};
|
||||||
|
|
||||||
void SetLeftImage(const Image &img) { leftImg = img; }
|
void SetLeftImage(const Image &img) { leftImg = img; }
|
||||||
void SetRightImage(const Image &img) { rightImg = img; }
|
void SetRightImage(const Image &img) { rightImg = img; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue