bool ToolButton::HotKey(dword key) { if(key == accel) { WhenAction(); return true; } return false; }
void ValueSlider::LeftDown(Point p, dword keyflags) { pos = minValue + (p.x * (maxValue - minValue)) / (float) GetSize().cx; Refresh(); SetCapture(); if(immediate) WhenAction(); }
bool TopMenuItem::Key(dword key, int count) { if(isenabled && key == K_ENTER) { WhenAction(); return true; } return false; }
bool MenuItem::Key(dword key, int count) { if(key == K_ENTER && isenabled) { WhenAction(); return true; } return false; }
void ValueSlider::MouseMove(Point p, dword keyflags) { if(HasCapture()) { pos = minValue + (p.x * (maxValue - minValue)) / (float) GetSize().cx; if(pos > maxValue) pos = maxValue; if(pos < minValue) pos = minValue; Refresh(); if(immediate) WhenAction(); } }
bool MenuItem::HotKey(dword key) { if(isenabled && (key == accel || CompareAccessKey(accesskey, key) || key < 256 && IsAlNum((char)key) && CompareAccessKey(accesskey, ToUpper((char)key) + K_DELTA + K_ALT))) { LLOG("MenuItem::HotKey(" << key << ") -> SetFocus"); SetFocus(); Sync(); Sleep(50); WhenAction(); return true; } return false; }
void MenuItem::LeftUp(Point, dword) { if(!isenabled) return; #ifdef PLATFORM_WIN32 #ifdef PLATFORM_WINCE PlaySound(L"MenuCommand", NULL, SND_ASYNC|SND_NODEFAULT); //TODO? #else PlaySound("MenuCommand", NULL, SND_ASYNC|SND_NODEFAULT); #endif #endif LLOG("Menu Item pre Action"); WhenAction(); LLOG("Menu Item post Action"); }
void ValueSlider::LeftUp(Point p, dword keyflags) { ReleaseCapture(); if(!immediate) WhenAction(); }
void ToolButton::LeftUp(Point, dword) { Refresh(); if(!repeat) WhenAction(); }
void TopMenuItem::LeftUp(Point, dword) { if(!isenabled) return; WhenAction(); Refresh(); }
void ReportView::Sb() { Refresh(); WhenAction(); }