git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder 1999-05-19 16:47:38 +00:00
parent 43191e0c5a
commit 11604fb890
5 changed files with 21 additions and 6 deletions

View File

@ -21,6 +21,9 @@ TODO
- selection highlighting is a bit broken - selection highlighting is a bit broken
Improve speed! (See layout problem below!) 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 The following two probs can probably be fixed by adding the
RecalculateLayout() method: RecalculateLayout() method:
Funny re-layout shows again in sample text. Funny re-layout shows again in sample text.

View File

@ -228,8 +228,8 @@ wxLayoutObjectText::Draw(wxDC &dc, wxPoint const &coords,
long width, height, descent; long width, height, descent;
if(begin < 0) begin = 0; 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); str = m_Text.Mid(0, begin);
dc.DrawText(str, xpos, ypos); dc.DrawText(str, xpos, ypos);

View File

@ -1058,7 +1058,7 @@ public:
wxLayoutDataObject(void) wxLayoutDataObject(void)
{ {
SetId("application/wxlayoutlist"); SetId("application/wxlayoutlist");
m_format.SetAtom((GdkAtom) 222222); //m_format.SetAtom((GdkAtom) 222222);
} }
}; };

View File

@ -168,7 +168,7 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event)
{ {
// found is only true if we are really over an object, not just // found is only true if we are really over an object, not just
// behind it // behind it
if(found && u) if(found && u && ! m_Selecting)
{ {
if(!m_HandCursor) if(!m_HandCursor)
SetCursor(wxCURSOR_HAND); SetCursor(wxCURSOR_HAND);
@ -331,6 +331,9 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
{ {
switch(keyCode) switch(keyCode)
{ {
case WXK_INSERT:
Copy();
break;
case WXK_DELETE : case WXK_DELETE :
case 'd': case 'd':
m_llist->Delete(1); m_llist->Delete(1);
@ -350,6 +353,12 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
case 'v': case 'v':
Paste(); Paste();
break; break;
case 'c':
Copy();
break;
case 'x':
Cut();
break;
#ifdef WXLAYOUT_DEBUG #ifdef WXLAYOUT_DEBUG
case WXK_F1: case WXK_F1:
m_llist->SetFont(-1,-1,-1,-1,true); // underlined m_llist->SetFont(-1,-1,-1,-1,true); // underlined
@ -382,7 +391,10 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
Paste(); Paste();
break; break;
case WXK_DELETE : case WXK_DELETE :
m_llist->Delete(1); if(event.ShiftDown())
Cut();
else
m_llist->Delete(1);
break; break;
case WXK_BACK: // backspace case WXK_BACK: // backspace
if(m_llist->MoveCursorHorizontally(-1)) m_llist->Delete(1); if(m_llist->MoveCursorHorizontally(-1)) m_llist->Delete(1);

View File

@ -169,7 +169,7 @@ public:
@param labelfield field to use in statusbar for URLs/userdata labels, or -1 to disable @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 @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 labelfield = -1,
int cursorfield = -1) int cursorfield = -1)
{ {