From 11604fb890b028a1ceb58a8fc75960176f9ca9d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Wed, 19 May 1999 16:47:38 +0000 Subject: [PATCH] updated git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- user/wxLayout/TODO | 3 +++ user/wxLayout/wxllist.cpp | 4 ++-- user/wxLayout/wxllist.h | 2 +- user/wxLayout/wxlwindow.cpp | 16 ++++++++++++++-- user/wxLayout/wxlwindow.h | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/user/wxLayout/TODO b/user/wxLayout/TODO index 6d3df47b67..b54081413b 100644 --- a/user/wxLayout/TODO +++ b/user/wxLayout/TODO @@ -21,6 +21,9 @@ TODO - selection highlighting is a bit broken Improve speed! (See layout problem below!) + - wxlwindow needs to shrink scrollbar range when window contents get removed + - When selecting with the mouse, scroll window if pointer is outside. + The following two probs can probably be fixed by adding the RecalculateLayout() method: Funny re-layout shows again in sample text. diff --git a/user/wxLayout/wxllist.cpp b/user/wxLayout/wxllist.cpp index a0248d4ce1..caf366bcb2 100644 --- a/user/wxLayout/wxllist.cpp +++ b/user/wxLayout/wxllist.cpp @@ -228,8 +228,8 @@ wxLayoutObjectText::Draw(wxDC &dc, wxPoint const &coords, long width, height, descent; if(begin < 0) begin = 0; - if(end > m_Text.Length()) end = m_Text.Length(); - + if( end > (signed)m_Text.Length() ) + end = m_Text.Length(); str = m_Text.Mid(0, begin); dc.DrawText(str, xpos, ypos); diff --git a/user/wxLayout/wxllist.h b/user/wxLayout/wxllist.h index 267447465a..84a1e1c7c6 100644 --- a/user/wxLayout/wxllist.h +++ b/user/wxLayout/wxllist.h @@ -1058,7 +1058,7 @@ public: wxLayoutDataObject(void) { SetId("application/wxlayoutlist"); - m_format.SetAtom((GdkAtom) 222222); + //m_format.SetAtom((GdkAtom) 222222); } }; diff --git a/user/wxLayout/wxlwindow.cpp b/user/wxLayout/wxlwindow.cpp index 80d47b9f80..4331bd51bf 100644 --- a/user/wxLayout/wxlwindow.cpp +++ b/user/wxLayout/wxlwindow.cpp @@ -168,7 +168,7 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event) { // found is only true if we are really over an object, not just // behind it - if(found && u) + if(found && u && ! m_Selecting) { if(!m_HandCursor) SetCursor(wxCURSOR_HAND); @@ -331,6 +331,9 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) { switch(keyCode) { + case WXK_INSERT: + Copy(); + break; case WXK_DELETE : case 'd': m_llist->Delete(1); @@ -350,6 +353,12 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) case 'v': Paste(); break; + case 'c': + Copy(); + break; + case 'x': + Cut(); + break; #ifdef WXLAYOUT_DEBUG case WXK_F1: m_llist->SetFont(-1,-1,-1,-1,true); // underlined @@ -382,7 +391,10 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) Paste(); break; case WXK_DELETE : - m_llist->Delete(1); + if(event.ShiftDown()) + Cut(); + else + m_llist->Delete(1); break; case WXK_BACK: // backspace if(m_llist->MoveCursorHorizontally(-1)) m_llist->Delete(1); diff --git a/user/wxLayout/wxlwindow.h b/user/wxLayout/wxlwindow.h index ead3310cf7..881dc66e65 100644 --- a/user/wxLayout/wxlwindow.h +++ b/user/wxLayout/wxlwindow.h @@ -169,7 +169,7 @@ public: @param labelfield field to use in statusbar for URLs/userdata labels, or -1 to disable @param cursorfield field to use for cursor position, or -1 to disable */ - inline SetStatusBar(class wxStatusBar *bar, + void SetStatusBar(class wxStatusBar *bar, int labelfield = -1, int cursorfield = -1) { -- 2.45.2