Minor improvements in TreeCtrl - WhenLeftClick, GetItemClickPos, SetDisplay & RefreshItem

git-svn-id: svn://ultimatepp.org/upp/trunk@560 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2008-10-22 07:55:28 +00:00
parent 3c94aa98b1
commit 2188c6d72e
8 changed files with 52 additions and 4 deletions

View file

@ -26,7 +26,7 @@ void Pusher::LostFocus() {
}
void Pusher::LeftDown(Point, dword) {
if(Ctrl::ClickFocus()) SetWantFocus();
if(Ctrl::ClickFocus() || clickfocus) SetWantFocus();
if(IsReadOnly()) return;
push = true;
RefreshPush();
@ -138,6 +138,12 @@ Pusher& Pusher::SetFont(Font fnt) {
return *this;
}
Pusher& Pusher::ClickFocus(bool cf)
{
clickfocus = cf;
return *this;
}
String Pusher::GetDesc()
{
return label;
@ -162,7 +168,7 @@ int Pusher::GetVisualState() const
}
Pusher::Pusher() {
keypush = push = false;
keypush = push = clickfocus = false;
accesskey = 0;
font = Null;
NoInitFocus();