mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
GridCtrl: Added native resizing icons (thx klugier!)
git-svn-id: svn://ultimatepp.org/upp/trunk@5971 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3c07cb83e5
commit
9a7ba33bd8
2 changed files with 23 additions and 4 deletions
|
|
@ -3258,14 +3258,30 @@ void GridCtrl::MouseAccel(const Point &p, bool horz, bool vert, dword keyflags)
|
|||
|
||||
}
|
||||
|
||||
Image GridCtrl::HorzPosImage() {
|
||||
#ifdef PLATFORM_X11
|
||||
return Image::SizeHorz();
|
||||
#else
|
||||
return GridImg::HorzPos();
|
||||
#endif
|
||||
}
|
||||
|
||||
Image GridCtrl::VertPosImage() {
|
||||
#ifdef PLATFORM_X11
|
||||
return Image::SizeVert();
|
||||
#else
|
||||
return GridImg::VertPos();
|
||||
#endif
|
||||
}
|
||||
|
||||
Image GridCtrl::CursorImage(Point p, dword keyflags)
|
||||
{
|
||||
if(!moving_header && !moving_body && HasCapture())
|
||||
{
|
||||
if(resizing_cols && curSplitCol >= 0)
|
||||
return GridImg::HorzPos();
|
||||
return HorzPosImage();
|
||||
if(resizing_rows && curSplitRow >= 0)
|
||||
return GridImg::VertPos();
|
||||
return VertPosImage();
|
||||
else
|
||||
return Image::Arrow();
|
||||
}
|
||||
|
|
@ -3307,7 +3323,7 @@ Image GridCtrl::CursorImage(Point p, dword keyflags)
|
|||
}
|
||||
}
|
||||
curResizeCol = true;
|
||||
return GridImg::HorzPos();
|
||||
return HorzPosImage();
|
||||
}
|
||||
else if(resizing_rows && curSplitRow >= 0 || resizeRow)
|
||||
{
|
||||
|
|
@ -3322,7 +3338,7 @@ Image GridCtrl::CursorImage(Point p, dword keyflags)
|
|||
}
|
||||
}
|
||||
curResizeRow = true;
|
||||
return GridImg::VertPos();
|
||||
return VertPosImage();
|
||||
}
|
||||
return Image::Arrow();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1764,6 +1764,9 @@ class GridCtrl : public Ctrl
|
|||
Value GetItemValue(const Item& it, int id, const ItemRect& hi, const ItemRect& vi);
|
||||
void GetItemAttrs(const Item& it, int r, int c, const ItemRect& vi, const ItemRect& hi, dword& style, GridDisplay*& gd, Color& fg, Color& bg, Font& fnt);
|
||||
Item& GetItemSize(int &r, int &c, int &x, int &y, int &cx, int &cy, bool &skip, bool relx = true, bool rely = true);
|
||||
|
||||
Image HorzPosImage();
|
||||
Image VertPosImage();
|
||||
|
||||
private:
|
||||
bool WhenInsertRow0();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue