Beispiel #1
0
bool  ToolButton::HotKey(dword key)
{
	if(key == accel) {
		WhenAction();
		return true;
	}
	return false;
}
Beispiel #2
0
void ValueSlider::LeftDown(Point p, dword keyflags)
{
	pos = minValue + (p.x * (maxValue - minValue)) / (float) GetSize().cx;
	Refresh();
	SetCapture();
	if(immediate)
		WhenAction();
}
Beispiel #3
0
bool TopMenuItem::Key(dword key, int count)
{
	if(isenabled && key == K_ENTER) {
		WhenAction();
		return true;
	}
	return false;
}
Beispiel #4
0
bool MenuItem::Key(dword key, int count)
{
	if(key == K_ENTER && isenabled) {
		WhenAction();
		return true;
	}
	return false;
}
Beispiel #5
0
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();
	}	
}
Beispiel #6
0
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;
}
Beispiel #7
0
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");
}
Beispiel #8
0
void ValueSlider::LeftUp(Point p, dword keyflags)
{
	ReleaseCapture();
	if(!immediate)
		WhenAction();
}
Beispiel #9
0
void  ToolButton::LeftUp(Point, dword)
{
	Refresh();
	if(!repeat)
		WhenAction();
}
Beispiel #10
0
void TopMenuItem::LeftUp(Point, dword)
{
	if(!isenabled) return;
	WhenAction();
	Refresh();
}
Beispiel #11
0
void ReportView::Sb() {
	Refresh();
	WhenAction();
}