mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
GridCtrl: remove depricated usage of VeiwDraw.
This commit is contained in:
parent
3dc229041e
commit
e8c85a9970
2 changed files with 5 additions and 54 deletions
|
|
@ -972,35 +972,6 @@ void GridCtrl::Nothing()
|
|||
{
|
||||
}
|
||||
|
||||
void GridCtrl::DrawLine(bool iniLine, bool delLine)
|
||||
{
|
||||
if((resizeCol || resizeRow) && resize_paint_mode < 2)
|
||||
{
|
||||
int sx = resize_paint_mode == 1 ? fixed_width : 0;
|
||||
int sy = resize_paint_mode == 1 ? fixed_height : 0;
|
||||
ViewDraw w(this);
|
||||
Size sz = GetSize();
|
||||
|
||||
Point curPnt;
|
||||
static Point oldPnt = curPnt;
|
||||
|
||||
if(resizeCol)
|
||||
{
|
||||
curPnt.x = hitems[splitCol].nRight(sbx) - 1;
|
||||
if(delLine) w.DrawRect(oldPnt.x, sy, 1, sz.cy, InvertColor());
|
||||
if(iniLine) w.DrawRect(curPnt.x, sy, 1, sz.cy, InvertColor());
|
||||
}
|
||||
if(resizeRow)
|
||||
{
|
||||
curPnt.y = vitems[splitRow].nBottom(sby) - 1;
|
||||
if(delLine) w.DrawRect(sx, oldPnt.y, sz.cx, 1, InvertColor());
|
||||
if(iniLine) w.DrawRect(sx, curPnt.y, sz.cx, 1, InvertColor());
|
||||
}
|
||||
|
||||
oldPnt = curPnt;
|
||||
}
|
||||
}
|
||||
|
||||
Value GridCtrl::GetItemValue(const Item& it, int id, const ItemRect& hi, const ItemRect& vi)
|
||||
{
|
||||
Value val = hi.IsConvertion() && vi.IsConvertion()
|
||||
|
|
@ -4164,24 +4135,8 @@ Point GridCtrl::GetCtrlPos(Ctrl * ctrl)
|
|||
return Point(-1, -1);
|
||||
}
|
||||
|
||||
void GridCtrl::Split(int state, bool sync)
|
||||
void GridCtrl::Split(GridState state)
|
||||
{
|
||||
if(resize_paint_mode < 2)
|
||||
{
|
||||
if(resize_paint_mode > 0 && state != GS_DOWN)
|
||||
{
|
||||
if(resizeCol) RefreshTop();
|
||||
if(resizeRow) RefreshLeft();
|
||||
}
|
||||
|
||||
if(state == GS_DOWN)
|
||||
DrawLine(true, false);
|
||||
else if(state == GS_MOVE)
|
||||
DrawLine(true, true);
|
||||
else
|
||||
DrawLine(false, true);
|
||||
}
|
||||
|
||||
if(state == GS_DOWN)
|
||||
{
|
||||
firstCol = firstRow = -1;
|
||||
|
|
@ -4193,7 +4148,6 @@ void GridCtrl::Split(int state, bool sync)
|
|||
UpdateSizes();
|
||||
UpdateHolder();
|
||||
UpdateSb();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
if((resize_paint_mode > 1 && state > GS_UP) || state == GS_UP)
|
||||
|
|
@ -4202,7 +4156,7 @@ void GridCtrl::Split(int state, bool sync)
|
|||
UpdateCtrls(UC_CHECK_VIS | UC_SHOW);
|
||||
}
|
||||
|
||||
if(sync)
|
||||
Refresh();
|
||||
Sync();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1003,7 +1003,6 @@ class GridCtrl : public Ctrl
|
|||
|
||||
bool valid_cursor;
|
||||
|
||||
|
||||
/* Values */
|
||||
|
||||
int curSplitCol, curSplitRow;
|
||||
|
|
@ -1718,7 +1717,7 @@ class GridCtrl : public Ctrl
|
|||
int GetFocusedCtrlIndex();
|
||||
Point GetCtrlPos(Ctrl * ctrl);
|
||||
|
||||
void Split(int state = 0, bool sync = false);
|
||||
void Split(GridState gstate);
|
||||
void Scroll();
|
||||
|
||||
bool IsTopHeader() { return fixed_rows > 0; }
|
||||
|
|
@ -1726,8 +1725,6 @@ class GridCtrl : public Ctrl
|
|||
|
||||
bool IsMouseBody(Point &p);
|
||||
|
||||
void DrawLine(bool iniLine, bool delLine);
|
||||
|
||||
Rect GetItemRect(int r, int c, bool hgrid = false, bool vgrid = false, bool hrel = false, bool vrel = false);
|
||||
|
||||
bool Match(const WString &f, const WString &s, int &fs, int &fe);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue