wxTextCtrl work:

1. horz scrolling (not perfect yet)
2. more actions (clipboard, double click)
3. wxCaret fixes
4. clipboard support
5. wxTE_PASSWORD support

wxScrolledWindow/wxlistBox:

better hit test calculation: take into account GetClientAreaOrigin()

fix for wxGTK bug in wxDC::Blit() in wxWindow::ScrollWindow

draw transparent radio bitmaps under GTK

wxWindow::ScrollWindow() can now scroll a part of window only


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-22 22:49:15 +00:00
parent 634b9eb4e4
commit 025f9ba319
31 changed files with 943 additions and 377 deletions

View File

@@ -524,15 +524,20 @@ void wxListBox::DoDraw(wxControlRenderer *renderer)
PrepareDC(dc);
dc.SetFont(GetFont());
// get the items which must be redrawn
wxCoord lineHeight = GetLineHeight();
// get the update rect
wxRegion rgnUpdate = GetUpdateRegion();
rgnUpdate.Intersect(GetClientRect());
wxRect rectUpdate = rgnUpdate.GetBox();
wxPoint ptOrigin = GetClientAreaOrigin();
rectUpdate.x -= ptOrigin.x;
rectUpdate.y -= ptOrigin.y;
int yTop, yBottom;
CalcUnscrolledPosition(0, rectUpdate.GetTop(), NULL, &yTop);
CalcUnscrolledPosition(0, rectUpdate.GetBottom(), NULL, &yBottom);
// get the items which must be redrawn
wxCoord lineHeight = GetLineHeight();
size_t itemFirst = yTop / lineHeight,
itemLast = (yBottom + lineHeight - 1) / lineHeight,
itemMax = m_strings.GetCount();
@@ -934,8 +939,10 @@ wxStdListboxInputHandler::wxStdListboxInputHandler(wxInputHandler *handler,
int wxStdListboxInputHandler::HitTest(const wxListBox *lbox,
const wxMouseEvent& event)
{
wxPoint pt = event.GetPosition();
pt -= lbox->GetClientAreaOrigin();
int y;
lbox->CalcUnscrolledPosition(0, event.GetPosition().y, NULL, &y);
lbox->CalcUnscrolledPosition(0, pt.y, NULL, &y);
int item = y / lbox->GetLineHeight();
return (item >= 0) && (item < lbox->GetCount()) ? item : -1;