Final and global PRIOR/NEXT change: keep consistency using only PAGE versions, deprecate old ids, remove rest of build problems with case statemets.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-03-27 12:25:17 +00:00
parent aa3310b88d
commit faa94f3ec8
22 changed files with 132 additions and 135 deletions

View File

@@ -1,3 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: keycode.tex
%% Purpose: wxKeyCode values enumerated
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Keycodes}\label{keycodes}
\wxheading{Include files}
@@ -27,8 +38,8 @@ values are the ASCII character codes, plus the following:
WXK_MENU
WXK_PAUSE
WXK_CAPITAL
WXK_PRIOR
WXK_NEXT
WXK_PAGEUP
WXK_PAGEDOWN
WXK_END
WXK_HOME
WXK_LEFT
@@ -98,9 +109,7 @@ values are the ASCII character codes, plus the following:
WXK_NUMPAD_UP,
WXK_NUMPAD_RIGHT,
WXK_NUMPAD_DOWN,
WXK_NUMPAD_PRIOR,
WXK_NUMPAD_PAGEUP,
WXK_NUMPAD_NEXT,
WXK_NUMPAD_PAGEDOWN,
WXK_NUMPAD_END,
WXK_NUMPAD_BEGIN,
@@ -143,4 +152,3 @@ values are the ASCII character codes, plus the following:
WXK_SPECIAL20
\end{verbatim}
}

View File

@@ -2140,8 +2140,10 @@ enum wxKeyCode
WXK_SCROLL,
WXK_PAGEUP,
WXK_PAGEDOWN,
#if WXWIN_COMPATIBILITY_2_6
WXK_PRIOR = WXK_PAGEUP,
WXK_NEXT = WXK_PAGEDOWN,
#endif
WXK_NUMPAD_SPACE,
WXK_NUMPAD_TAB,
@@ -2157,8 +2159,10 @@ enum wxKeyCode
WXK_NUMPAD_DOWN,
WXK_NUMPAD_PAGEUP,
WXK_NUMPAD_PAGEDOWN,
#if WXWIN_COMPATIBILITY_2_6
WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP,
WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN,
#endif
WXK_NUMPAD_END,
WXK_NUMPAD_BEGIN,
WXK_NUMPAD_INSERT,

View File

@@ -174,9 +174,9 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
else if ( current == wxT("ENTER") || current == wxT("RETURN") )
keyCode = WXK_RETURN;
else if ( current == wxT("PGUP") )
keyCode = WXK_PRIOR;
keyCode = WXK_PAGEUP;
else if ( current == wxT("PGDN") )
keyCode = WXK_NEXT;
keyCode = WXK_PAGEDOWN;
else if ( current == wxT("LEFT") )
keyCode = WXK_LEFT;
else if ( current == wxT("RIGHT") )
@@ -250,11 +250,11 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
else if ( current == wxT("KP_DOWN") )
keyCode = WXK_NUMPAD_DOWN;
else if ( current == wxT("KP_PRIOR") )
keyCode = WXK_NUMPAD_PRIOR;
keyCode = WXK_NUMPAD_PAGEUP;
else if ( current == wxT("KP_PAGEUP") )
keyCode = WXK_NUMPAD_PAGEUP;
else if ( current == wxT("KP_NEXT;") )
keyCode = WXK_NUMPAD_NEXT;
keyCode = WXK_NUMPAD_PAGEDOWN;
else if ( current == wxT("KP_PAGEDOWN") )
keyCode = WXK_NUMPAD_PAGEDOWN;
else if ( current == wxT("KP_END") )

View File

@@ -654,9 +654,9 @@ void wxPreviewCanvas::OnChar(wxKeyEvent &event)
switch(event.GetKeyCode())
{
case WXK_NEXT:
case WXK_PAGEDOWN:
controlBar->OnNext(); break;
case WXK_PRIOR:
case WXK_PAGEUP:
controlBar->OnPrevious(); break;
case WXK_HOME:
controlBar->OnFirst(); break;

View File

@@ -1655,13 +1655,13 @@ void wxCalendarCtrl::OnChar(wxKeyEvent& event)
}
break;
case WXK_PRIOR:
case WXK_PAGEUP:
target = m_date - wxDateSpan::Month();
ChangeMonth(&target);
SetDateAndNotify(target); // always
break;
case WXK_NEXT:
case WXK_PAGEDOWN:
target = m_date + wxDateSpan::Month();
ChangeMonth(&target);
SetDateAndNotify(target); // always

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// Name: generic/grid.cpp
// Name: src/generic/grid.cpp
// Purpose: wxGrid and related classes
// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn)
// Modified by: Robin Dunn, Vadim Zeitlin
@@ -6609,11 +6609,11 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
}
break;
case WXK_PRIOR:
case WXK_PAGEUP:
MovePageUp();
break;
case WXK_NEXT:
case WXK_PAGEDOWN:
MovePageDown();
break;
@@ -7665,7 +7665,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
wxString eol = wxTextFile::GetEOL( wxTextFileType_Unix );
wxString tVal = wxTextFile::Translate( value, wxTextFileType_Unix );
while ( startPos < (int)tVal.Length() )
while ( startPos < (int)tVal.length() )
{
pos = tVal.Mid(startPos).Find( eol );
if ( pos < 0 )
@@ -7683,7 +7683,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
startPos += pos + 1;
}
if ( startPos < (int)value.Length() )
if ( startPos < (int)value.length() )
{
lines.Add( value.Mid( startPos ) );
}
@@ -10648,4 +10648,3 @@ wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type,
}
#endif // wxUSE_GRID

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: generic/listctrl.cpp
// Name: src/generic/listctrl.cpp
// Purpose: generic implementation of wxListCtrl
// Author: Robert Roebling
// Vadim Zeitlin (virtual list control support)
@@ -1583,7 +1583,7 @@ void wxListLineData::DrawTextFormatted(wxDC *dc,
// continue until we have enough space or only one character left
wxCoord w_c, h_c;
size_t len = text.Length();
size_t len = text.length();
wxString drawntext = text.Left(len);
while (len > 1)
{
@@ -1596,9 +1596,9 @@ void wxListLineData::DrawTextFormatted(wxDC *dc,
}
// if still not enough space, remove ellipsis characters
while (ellipsis.Length() > 0 && w + base_w > width)
while (ellipsis.length() > 0 && w + base_w > width)
{
ellipsis = ellipsis.Left(ellipsis.Length() - 1);
ellipsis = ellipsis.Left(ellipsis.length() - 1);
dc->GetTextExtent(ellipsis, &base_w, &h);
}
@@ -3262,7 +3262,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
OnArrowChar( 0, event );
break;
case WXK_PRIOR:
case WXK_PAGEUP:
{
int steps = InReportView() ? m_linesPerPage - 1 : m_current % m_linesPerPage;
@@ -3274,7 +3274,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
}
break;
case WXK_NEXT:
case WXK_PAGEDOWN:
{
int steps = InReportView()
? m_linesPerPage - 1
@@ -5626,4 +5626,3 @@ void wxGenericListCtrl::Thaw()
}
#endif // wxUSE_LISTCTRL

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/window.cpp
// Name: src/gtk/window.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@@ -651,11 +651,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
break;
case GDK_Prior: // == GDK_Page_Up
key_code = WXK_PRIOR;
key_code = WXK_PAGEUP;
break;
case GDK_Next: // == GDK_Page_Down
key_code = WXK_NEXT;
key_code = WXK_PAGEDOWN;
break;
case GDK_End:
@@ -734,11 +734,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
break;
case GDK_KP_Prior: // == GDK_KP_Page_Up
key_code = isChar ? WXK_PRIOR : WXK_NUMPAD_PRIOR;
key_code = isChar ? WXK_PAGEUP : WXK_NUMPAD_PAGEUP;
break;
case GDK_KP_Next: // == GDK_KP_Page_Down
key_code = isChar ? WXK_NEXT : WXK_NUMPAD_NEXT;
key_code = isChar ? WXK_PAGEDOWN : WXK_NUMPAD_PAGEDOWN;
break;
case GDK_KP_End:
@@ -4429,4 +4429,3 @@ void wxWinModule::OnExit()
if (g_eraseGC)
gdk_gc_unref( g_eraseGC );
}

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/window.cpp
// Name: src/gtk1/window.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@@ -739,11 +739,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
break;
case GDK_Prior: // == GDK_Page_Up
key_code = WXK_PRIOR;
key_code = WXK_PAGEUP;
break;
case GDK_Next: // == GDK_Page_Down
key_code = WXK_NEXT;
key_code = WXK_PAGEDOWN;
break;
case GDK_End:
@@ -822,11 +822,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
break;
case GDK_KP_Prior: // == GDK_KP_Page_Up
key_code = isChar ? WXK_PRIOR : WXK_NUMPAD_PRIOR;
key_code = isChar ? WXK_PAGEUP : WXK_NUMPAD_PAGEUP;
break;
case GDK_KP_Next: // == GDK_KP_Page_Down
key_code = isChar ? WXK_NEXT : WXK_NUMPAD_NEXT;
key_code = isChar ? WXK_NEXT : WXK_NUMPAD_PAGEDOWN;
break;
case GDK_KP_End:
@@ -4232,4 +4232,3 @@ void wxWinModule::OnExit()
if (g_eraseGC)
gdk_gc_unref( g_eraseGC );
}

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: textctrl.cpp
// Name: src/mac/carbon/textctrl.cpp
// Purpose: wxTextCtrl
// Author: Stefan Csomor
// Modified by: Ryan Norton (MLTE GetLineLength and GetLineText)
@@ -886,7 +886,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB &&
!( key == WXK_RETURN && ( (m_windowStyle & wxPROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
// && key != WXK_PRIOR && key != WXK_NEXT && key != WXK_HOME && key != WXK_END
// && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END
)
{
// eat it
@@ -895,7 +895,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
// Check if we have reached the max # of chars (if it is set), but still
// allow navigation and deletion
if ( !IsMultiLine() && m_maxLength && GetValue().Length() >= m_maxLength &&
if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxPROCESS_ENTER) )
)
@@ -1208,7 +1208,7 @@ void wxMacTextControl::SetEditable(bool editable)
wxTextPos wxMacTextControl::GetLastPosition() const
{
return GetStringValue().Length() ;
return GetStringValue().length() ;
}
void wxMacTextControl::Replace( long from , long to , const wxString &val )
@@ -1266,7 +1266,7 @@ int wxMacTextControl::GetNumberOfLines() const
wxString content = GetStringValue() ;
lines = 1;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (content[i] == '\r')
lines++;
@@ -1282,14 +1282,14 @@ wxString wxMacTextControl::GetLineText(long lineNo) const
// Find line first
int count = 0;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Add chars in line then
wxString tmp;
for (size_t j = i; j < content.Length(); j++)
for (size_t j = i; j < content.length(); j++)
{
if (content[j] == '\n')
return tmp;
@@ -1314,13 +1314,13 @@ int wxMacTextControl::GetLineLength(long lineNo) const
// Find line first
int count = 0;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Count chars in line then
count = 0;
for (size_t j = i; j < content.Length(); j++)
for (size_t j = i; j < content.length(); j++)
{
count++;
if (content[j] == '\n')
@@ -1484,7 +1484,7 @@ void wxMacUnicodeTextControl::WriteText( const wxString& str )
val.Remove( start , end - start ) ;
val.insert( start , str ) ;
SetStringValue( val ) ;
SetSelection( start + str.Length() , start + str.Length() ) ;
SetSelection( start + str.length() , start + str.length() ) ;
#endif
}

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: uma.cpp
// Name: src/mac/carbon/uma.cpp
// Purpose: UMA support
// Author: Stefan Csomor
// Modified by:
@@ -358,12 +358,12 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
glyph = kMenuClearGlyph ;
break ;
case WXK_PRIOR : // PAGE UP
case WXK_PAGEUP :
macKey = kPageUpCharCode ;
glyph = kMenuPageUpGlyph ;
break ;
case WXK_NEXT :
case WXK_PAGEDOWN :
macKey = kPageDownCharCode ;
glyph = kMenuPageDownGlyph ;
break ;
@@ -885,4 +885,3 @@ void UMASetSystemIsInitialized(bool val)
}
#endif // wxUSE_BASE

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: textctrl.cpp
// Name: src/mac/classic/textctrl.cpp
// Purpose: wxTextCtrl
// Author: Stefan Csomor
// Modified by:
@@ -1192,7 +1192,7 @@ void wxTextCtrl::Replace(long from, long to, const wxString& str)
::SetControlData((ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
TEDelete( ((TEHandle) m_macTE) ) ;
TEInsert( value , value.Length() , ((TEHandle) m_macTE) ) ;
TEInsert( value , value.length() , ((TEHandle) m_macTE) ) ;
}
else
{
@@ -1448,7 +1448,7 @@ int wxTextCtrl::GetNumberOfLines() const
wxString content = GetValue() ;
int count = 1;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (content[i] == '\r') count++;
}
@@ -1499,13 +1499,13 @@ int wxTextCtrl::GetLineLength(long lineNo) const
// Find line first
int count = 0;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Count chars in line then
count = 0;
for (size_t j = i; j < content.Length(); j++)
for (size_t j = i; j < content.length(); j++)
{
count++;
if (content[j] == '\n') return count;
@@ -1525,14 +1525,14 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
// Find line first
int count = 0;
for (size_t i = 0; i < content.Length() ; i++)
for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Add chars in line then
wxString tmp;
for (size_t j = i; j < content.Length(); j++)
for (size_t j = i; j < content.length(); j++)
{
if (content[j] == '\n')
return tmp;
@@ -1580,7 +1580,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB &&
!( key == WXK_RETURN && ( (m_windowStyle & wxPROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
/* && key != WXK_PRIOR && key != WXK_NEXT && key != WXK_HOME && key != WXK_END */
/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
)
{
// eat it

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: uma.cpp
// Name: src/mac/classic/uma.cpp
// Purpose: UMA support
// Author: Stefan Csomor
// Modified by:
@@ -363,11 +363,11 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
macKey = kClearCharCode ;
glyph = kMenuClearGlyph ;
break ;
case WXK_PRIOR : // PAGE UP
case WXK_PAGEUP :
macKey = kPageUpCharCode ;
glyph = kMenuPageUpGlyph ;
break ;
case WXK_NEXT :
case WXK_PAGEDOWN :
macKey = kPageDownCharCode ;
glyph = kMenuPageDownGlyph ;
break ;

View File

@@ -440,13 +440,13 @@ void wxHIDKeyboard::BuildCookies(wxCFArray& Array)
AddCookie(Array[i], WXK_SPACE);
break;
case kHIDUsage_KeyboardPageUp:
AddCookie(Array[i], WXK_PRIOR);
AddCookie(Array[i], WXK_PAGEUP);
break;
case kHIDUsage_KeyboardEnd:
AddCookie(Array[i], WXK_END);
break;
case kHIDUsage_KeyboardPageDown:
AddCookie(Array[i], WXK_NEXT);
AddCookie(Array[i], WXK_PAGEDOWN);
break;
case kHIDUsage_KeyboardRightArrow:
AddCookie(Array[i], WXK_RIGHT);

View File

@@ -311,9 +311,7 @@ static long wxScanToKeyCode(event_t *event, bool translate)
KEY (KB_padHome, WXK_NUMPAD_HOME)
KEY (KB_padEnd, WXK_NUMPAD_END)
KEY (KB_padPageUp, WXK_NUMPAD_PAGEUP)
//KEY (KB_padPageUp, WXK_NUMPAD_PRIOR)
KEY (KB_padPageDown, WXK_NUMPAD_PAGEDOWN)
//KEY (KB_padPageDown, WXK_NUMPAD_NEXT)
KEY (KB_1, '1')
KEY (KB_2, '2')
KEY (KB_3, '3')

View File

@@ -5380,10 +5380,10 @@ int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam)
// handle extended keys
case VK_PRIOR:
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PRIOR, WXK_PRIOR);
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PAGEUP, WXK_PAGEUP);
break;
case VK_NEXT:
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_NEXT, WXK_NEXT);
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PAGEDOWN, WXK_PAGEDOWN);
break;
case VK_END:
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_END, WXK_END);
@@ -5435,8 +5435,8 @@ WXWORD wxCharCodeWXToMSW(int id, bool *isVirtual)
case WXK_ALT: keySym = VK_MENU; break;
case WXK_PAUSE: keySym = VK_PAUSE; break;
case WXK_CAPITAL: keySym = VK_CAPITAL; break;
case WXK_PRIOR: keySym = VK_PRIOR; break;
case WXK_NEXT : keySym = VK_NEXT; break;
case WXK_PAGEUP: keySym = VK_PRIOR; break;
case WXK_PAGEDOWN: keySym = VK_NEXT; break;
case WXK_END: keySym = VK_END; break;
case WXK_HOME : keySym = VK_HOME; break;
case WXK_LEFT : keySym = VK_LEFT; break;

View File

@@ -4379,8 +4379,8 @@ int wxCharCodeOS2ToWX(
case VK_CTRL: nId = WXK_CONTROL; break;
case VK_PAUSE: nId = WXK_PAUSE; break;
case VK_SPACE: nId = WXK_SPACE; break;
case VK_PAGEUP: nId = WXK_PRIOR; break;
case VK_PAGEDOWN: nId = WXK_NEXT; break;
case VK_PAGEUP: nId = WXK_PAGEUP; break;
case VK_PAGEDOWN: nId = WXK_PAGEDOWN; break;
case VK_ESC: nId = WXK_ESCAPE; break;
case VK_END: nId = WXK_END; break;
case VK_HOME : nId = WXK_HOME; break;
@@ -4449,8 +4449,8 @@ int wxCharCodeWXToOS2( int nId,
case WXK_SHIFT: nKeySym = VK_SHIFT; break;
case WXK_CONTROL: nKeySym = VK_CTRL; break;
case WXK_PAUSE: nKeySym = VK_PAUSE; break;
case WXK_PRIOR: nKeySym = VK_PAGEUP; break;
case WXK_NEXT : nKeySym = VK_PAGEDOWN; break;
case WXK_PAGEUP: nKeySym = VK_PAGEUP; break;
case WXK_PAGEDOWN: nKeySym = VK_PAGEDOWN; break;
case WXK_END: nKeySym = VK_END; break;
case WXK_HOME : nKeySym = VK_HOME; break;
case WXK_LEFT : nKeySym = VK_LEFT; break;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: richtext/richeditctrl.cpp
// Name: src/richtext/richeditctrl.cpp
// Purpose: A rich edit control
// Author: Julian Smart
// Modified by:
@@ -429,8 +429,6 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
event.GetKeyCode() == WXK_HOME ||
event.GetKeyCode() == WXK_PAGEUP ||
event.GetKeyCode() == WXK_PAGEDOWN ||
event.GetKeyCode() == WXK_PRIOR ||
event.GetKeyCode() == WXK_NEXT ||
event.GetKeyCode() == WXK_END)
{
KeyboardNavigate(event.GetKeyCode(), flags);
@@ -618,11 +616,11 @@ bool wxRichTextCtrl::KeyboardNavigate(int keyCode, int flags)
else
success = MoveDown(1, flags);
}
else if (keyCode == WXK_PAGEUP || keyCode == WXK_PRIOR)
else if (keyCode == WXK_PAGEUP)
{
success = PageUp(1, flags);
}
else if (keyCode == WXK_PAGEDOWN || keyCode == WXK_NEXT)
else if (keyCode == WXK_PAGEDOWN)
{
success = PageDown(1, flags);
}
@@ -716,7 +714,7 @@ bool wxRichTextCtrl::ScrollIntoView(long position, int keyCode)
wxSize clientSize = GetClientSize();
// Going down
if (keyCode == WXK_DOWN || keyCode == WXK_RIGHT || keyCode == WXK_END || keyCode == WXK_NEXT || keyCode == WXK_PAGEDOWN)
if (keyCode == WXK_DOWN || keyCode == WXK_RIGHT || keyCode == WXK_END || keyCode == WXK_PAGEDOWN)
{
if ((rect.y + rect.height) > (clientSize.y + startY))
{
@@ -746,7 +744,7 @@ bool wxRichTextCtrl::ScrollIntoView(long position, int keyCode)
}
}
// Going up
else if (keyCode == WXK_UP || keyCode == WXK_LEFT || keyCode == WXK_HOME || keyCode == WXK_PRIOR || keyCode == WXK_PAGEUP)
else if (keyCode == WXK_UP || keyCode == WXK_LEFT || keyCode == WXK_HOME || keyCode == WXK_PAGEUP )
{
if (rect.y < startY)
{
@@ -2533,4 +2531,3 @@ long wxRichTextCtrl::GetFirstVisiblePosition() const
#endif
// wxUSE_RICHTEXT

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: univ/slider.cpp
// Name: src/univ/slider.cpp
// Purpose: implementation of the universal version of wxSlider
// Author: Vadim Zeitlin
// Modified by:
@@ -1009,12 +1009,10 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
action = wxACTION_SLIDER_LINE_DOWN;
break;
case WXK_PRIOR:
case WXK_PAGEUP:
action = wxACTION_SLIDER_PAGE_UP;
break;
case WXK_NEXT:
case WXK_PAGEDOWN:
action = wxACTION_SLIDER_PAGE_DOWN;
break;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: univ/textctrl.cpp
// Name: src/univ/textctrl.cpp
// Purpose: wxTextCtrl
// Author: Vadim Zeitlin
// Modified by:
@@ -4814,14 +4814,12 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer,
break;
case WXK_PAGEDOWN:
case WXK_NEXT:
// we don't map Ctrl-PgUp/Dn to anything special - what should it
// to? for now, it's the same as without control
action << wxACTION_TEXT_PAGE_DOWN;
break;
case WXK_PAGEUP:
case WXK_PRIOR:
action << wxACTION_TEXT_PAGE_UP;
break;

View File

@@ -575,9 +575,9 @@ int wxCharCodeXToWX(KeySym keySym)
case XK_Down:
id = WXK_DOWN; break;
case XK_Next:
id = WXK_NEXT; break;
id = WXK_PAGEDOWN; break;
case XK_Prior:
id = WXK_PRIOR; break;
id = WXK_PAGEUP; break;
case XK_Menu:
id = WXK_MENU; break;
case XK_Select:
@@ -704,8 +704,8 @@ KeySym wxCharCodeWXToX(int id)
case WXK_PAUSE: keySym = XK_Pause; break;
case WXK_ESCAPE: keySym = XK_Escape; break;
case WXK_SPACE: keySym = ' '; break;
case WXK_PRIOR: keySym = XK_Prior; break;
case WXK_NEXT : keySym = XK_Next; break;
case WXK_PAGEUP: keySym = XK_Prior; break;
case WXK_PAGEDOWN: keySym = XK_Next; break;
case WXK_END: keySym = XK_End; break;
case WXK_HOME : keySym = XK_Home; break;
case WXK_LEFT : keySym = XK_Left; break;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: textctrl.cpp
// Name: src/x11/textctrl.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@@ -50,7 +50,7 @@ wxSourceUndoStep::wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtr
for (int i = m_y1; i < m_y2+2; i++)
{
if (i >= (int)m_owner->m_lines.GetCount())
m_lines.Add( wxT("") );
m_lines.Add( wxEmptyString );
else
m_lines.Add( m_owner->m_lines[i].m_text );
}
@@ -285,7 +285,7 @@ void wxTextCtrl::SetValue(const wxString& value)
if (value.empty())
{
m_lines.Add( new wxSourceLine( wxT("") ) );
m_lines.Add( new wxSourceLine( wxEmptyString ) );
}
else
{
@@ -350,7 +350,7 @@ int wxTextCtrl::GetLineLength(long lineNo) const
wxString wxTextCtrl::GetLineText(long lineNo) const
{
if (lineNo >= (long)m_lines.GetCount())
return wxT("");
return wxEmptyString;
return m_lines[lineNo].m_text;
}
@@ -393,7 +393,7 @@ void wxTextCtrl::Clear()
ClearSelection();
m_lines.Clear();
m_lines.Add( new wxSourceLine( wxT("") ) );
m_lines.Add( new wxSourceLine( wxEmptyString ) );
SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 );
Refresh();
@@ -1736,7 +1736,7 @@ void wxTextCtrl::OnMouse( wxMouseEvent &event )
#if 0 // there is no middle button on iPAQs
if (event.MiddleDown())
{
Paste( TRUE );
Paste( true );
return;
}
#endif
@@ -1796,8 +1796,8 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
case '8': event.m_keyCode = WXK_UP; break;
case '6': event.m_keyCode = WXK_RIGHT; break;
case '2': event.m_keyCode = WXK_DOWN; break;
case '9': event.m_keyCode = WXK_PRIOR; break;
case '3': event.m_keyCode = WXK_NEXT; break;
case '9': event.m_keyCode = WXK_PAGEUP; break;
case '3': event.m_keyCode = WXK_PAGEDOWN; break;
case '7': event.m_keyCode = WXK_HOME; break;
case '1': event.m_keyCode = WXK_END; break;
case '0': event.m_keyCode = WXK_INSERT; break;
@@ -1868,7 +1868,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
m_ignoreInput = true;
return;
}
case WXK_PRIOR:
case WXK_PAGEUP:
{
if (m_ignoreInput) return;
MoveCursor( m_cursorX, wxMax( 0, m_cursorY-size_y ), event.ShiftDown() );
@@ -2407,4 +2407,3 @@ bool wxTextCtrl::ScrollPages(int pages)
return false;
}