Patch level : 2.0 424

Files correlati     : *.exe
Ricompilazione Demo : [ ]
Commento            :
Migliorata gestione scrollbar


git-svn-id: svn://10.65.10.50/trunk@10919 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-03-17 11:29:38 +00:00
parent a8e31fbd95
commit 9f96c9182c

View File

@ -870,31 +870,37 @@ static SCROLL_CONTROL ConvertScrollToXVT(wxEventType et)
void TwxWindow::OnScroll(wxScrollEvent& event)
{
EVENT e; memset(&e, 0, sizeof(EVENT));
const SCROLL_CONTROL sc = ConvertScrollToXVT(event.GetEventType());
if (sc != SC_NONE)
{
EVENT e; memset(&e, 0, sizeof(EVENT));
const wxScrollBar* sb = (wxScrollBar*)event.GetEventObject();
const wxSize sz = sb->GetSize();
const wxScrollBar* sb = (wxScrollBar*)event.GetEventObject();
const wxSize sz = sb->GetSize();
e.type = E_CONTROL;
e.v.ctl.id = event.GetId();
e.v.ctl.ci.type = sz.x > sz.y ? WC_HSCROLL : WC_VSCROLL;
e.v.ctl.ci.win = (WINDOW)sb;
e.v.ctl.ci.v.scroll.pos = event.GetPosition();
e.v.ctl.ci.v.scroll.what = ConvertScrollToXVT(event.GetEventType());
DoXvtEvent(e);
e.type = E_CONTROL;
e.v.ctl.id = event.GetId();
e.v.ctl.ci.type = sz.x > sz.y ? WC_HSCROLL : WC_VSCROLL;
e.v.ctl.ci.win = (WINDOW)sb;
e.v.ctl.ci.v.scroll.pos = event.GetPosition();
e.v.ctl.ci.v.scroll.what = sc;
DoXvtEvent(e);
}
}
void TwxWindow::OnScrollWin(wxScrollWinEvent& event)
{
EVENT e; memset(&e, 0, sizeof(EVENT));
e.type = event.GetOrientation() == wxHORIZONTAL ? E_HSCROLL : E_VSCROLL;
e.v.scroll.pos = event.GetPosition();
wxEventType et = event.GetEventType();
et -= (wxEVT_SCROLLWIN_TOP - wxEVT_SCROLL_TOP);
e.v.scroll.what = ConvertScrollToXVT(et);
DoXvtEvent(e);
const SCROLL_CONTROL sc = ConvertScrollToXVT(et);
if (sc != SC_NONE)
{
EVENT e; memset(&e, 0, sizeof(EVENT));
e.type = event.GetOrientation() == wxHORIZONTAL ? E_HSCROLL : E_VSCROLL;
e.v.scroll.pos = event.GetPosition();
e.v.scroll.what = sc;
DoXvtEvent(e);
}
}
void TwxWindow::OnSetFocus(wxFocusEvent& event)