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:
@@ -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}
|
\section{Keycodes}\label{keycodes}
|
||||||
|
|
||||||
\wxheading{Include files}
|
\wxheading{Include files}
|
||||||
@@ -27,8 +38,8 @@ values are the ASCII character codes, plus the following:
|
|||||||
WXK_MENU
|
WXK_MENU
|
||||||
WXK_PAUSE
|
WXK_PAUSE
|
||||||
WXK_CAPITAL
|
WXK_CAPITAL
|
||||||
WXK_PRIOR
|
WXK_PAGEUP
|
||||||
WXK_NEXT
|
WXK_PAGEDOWN
|
||||||
WXK_END
|
WXK_END
|
||||||
WXK_HOME
|
WXK_HOME
|
||||||
WXK_LEFT
|
WXK_LEFT
|
||||||
@@ -82,7 +93,7 @@ values are the ASCII character codes, plus the following:
|
|||||||
WXK_F23
|
WXK_F23
|
||||||
WXK_F24
|
WXK_F24
|
||||||
WXK_NUMLOCK
|
WXK_NUMLOCK
|
||||||
WXK_SCROLL
|
WXK_SCROLL
|
||||||
WXK_PAGEUP,
|
WXK_PAGEUP,
|
||||||
WXK_PAGEDOWN,
|
WXK_PAGEDOWN,
|
||||||
|
|
||||||
@@ -98,9 +109,7 @@ values are the ASCII character codes, plus the following:
|
|||||||
WXK_NUMPAD_UP,
|
WXK_NUMPAD_UP,
|
||||||
WXK_NUMPAD_RIGHT,
|
WXK_NUMPAD_RIGHT,
|
||||||
WXK_NUMPAD_DOWN,
|
WXK_NUMPAD_DOWN,
|
||||||
WXK_NUMPAD_PRIOR,
|
|
||||||
WXK_NUMPAD_PAGEUP,
|
WXK_NUMPAD_PAGEUP,
|
||||||
WXK_NUMPAD_NEXT,
|
|
||||||
WXK_NUMPAD_PAGEDOWN,
|
WXK_NUMPAD_PAGEDOWN,
|
||||||
WXK_NUMPAD_END,
|
WXK_NUMPAD_END,
|
||||||
WXK_NUMPAD_BEGIN,
|
WXK_NUMPAD_BEGIN,
|
||||||
@@ -143,4 +152,3 @@ values are the ASCII character codes, plus the following:
|
|||||||
WXK_SPECIAL20
|
WXK_SPECIAL20
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -76,7 +76,7 @@
|
|||||||
/* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
|
/* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
|
||||||
/* is buggy, and occurs for code that does actually get executed */
|
/* is buggy, and occurs for code that does actually get executed */
|
||||||
# if !defined __WXDEBUG__ && __VISUALC__ <= 1100
|
# if !defined __WXDEBUG__ && __VISUALC__ <= 1100
|
||||||
# pragma warning(disable:4702) /* unreachable code */
|
# pragma warning(disable:4702) /* unreachable code */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Deprecated functions such as sprintf, localtime */
|
/* Deprecated functions such as sprintf, localtime */
|
||||||
@@ -2140,8 +2140,10 @@ enum wxKeyCode
|
|||||||
WXK_SCROLL,
|
WXK_SCROLL,
|
||||||
WXK_PAGEUP,
|
WXK_PAGEUP,
|
||||||
WXK_PAGEDOWN,
|
WXK_PAGEDOWN,
|
||||||
|
#if WXWIN_COMPATIBILITY_2_6
|
||||||
WXK_PRIOR = WXK_PAGEUP,
|
WXK_PRIOR = WXK_PAGEUP,
|
||||||
WXK_NEXT = WXK_PAGEDOWN,
|
WXK_NEXT = WXK_PAGEDOWN,
|
||||||
|
#endif
|
||||||
|
|
||||||
WXK_NUMPAD_SPACE,
|
WXK_NUMPAD_SPACE,
|
||||||
WXK_NUMPAD_TAB,
|
WXK_NUMPAD_TAB,
|
||||||
@@ -2157,8 +2159,10 @@ enum wxKeyCode
|
|||||||
WXK_NUMPAD_DOWN,
|
WXK_NUMPAD_DOWN,
|
||||||
WXK_NUMPAD_PAGEUP,
|
WXK_NUMPAD_PAGEUP,
|
||||||
WXK_NUMPAD_PAGEDOWN,
|
WXK_NUMPAD_PAGEDOWN,
|
||||||
|
#if WXWIN_COMPATIBILITY_2_6
|
||||||
WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP,
|
WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP,
|
||||||
WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN,
|
WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN,
|
||||||
|
#endif
|
||||||
WXK_NUMPAD_END,
|
WXK_NUMPAD_END,
|
||||||
WXK_NUMPAD_BEGIN,
|
WXK_NUMPAD_BEGIN,
|
||||||
WXK_NUMPAD_INSERT,
|
WXK_NUMPAD_INSERT,
|
||||||
|
@@ -174,9 +174,9 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
|
|||||||
else if ( current == wxT("ENTER") || current == wxT("RETURN") )
|
else if ( current == wxT("ENTER") || current == wxT("RETURN") )
|
||||||
keyCode = WXK_RETURN;
|
keyCode = WXK_RETURN;
|
||||||
else if ( current == wxT("PGUP") )
|
else if ( current == wxT("PGUP") )
|
||||||
keyCode = WXK_PRIOR;
|
keyCode = WXK_PAGEUP;
|
||||||
else if ( current == wxT("PGDN") )
|
else if ( current == wxT("PGDN") )
|
||||||
keyCode = WXK_NEXT;
|
keyCode = WXK_PAGEDOWN;
|
||||||
else if ( current == wxT("LEFT") )
|
else if ( current == wxT("LEFT") )
|
||||||
keyCode = WXK_LEFT;
|
keyCode = WXK_LEFT;
|
||||||
else if ( current == wxT("RIGHT") )
|
else if ( current == wxT("RIGHT") )
|
||||||
@@ -250,11 +250,11 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
|
|||||||
else if ( current == wxT("KP_DOWN") )
|
else if ( current == wxT("KP_DOWN") )
|
||||||
keyCode = WXK_NUMPAD_DOWN;
|
keyCode = WXK_NUMPAD_DOWN;
|
||||||
else if ( current == wxT("KP_PRIOR") )
|
else if ( current == wxT("KP_PRIOR") )
|
||||||
keyCode = WXK_NUMPAD_PRIOR;
|
keyCode = WXK_NUMPAD_PAGEUP;
|
||||||
else if ( current == wxT("KP_PAGEUP") )
|
else if ( current == wxT("KP_PAGEUP") )
|
||||||
keyCode = WXK_NUMPAD_PAGEUP;
|
keyCode = WXK_NUMPAD_PAGEUP;
|
||||||
else if ( current == wxT("KP_NEXT;") )
|
else if ( current == wxT("KP_NEXT;") )
|
||||||
keyCode = WXK_NUMPAD_NEXT;
|
keyCode = WXK_NUMPAD_PAGEDOWN;
|
||||||
else if ( current == wxT("KP_PAGEDOWN") )
|
else if ( current == wxT("KP_PAGEDOWN") )
|
||||||
keyCode = WXK_NUMPAD_PAGEDOWN;
|
keyCode = WXK_NUMPAD_PAGEDOWN;
|
||||||
else if ( current == wxT("KP_END") )
|
else if ( current == wxT("KP_END") )
|
||||||
|
@@ -654,9 +654,9 @@ void wxPreviewCanvas::OnChar(wxKeyEvent &event)
|
|||||||
|
|
||||||
switch(event.GetKeyCode())
|
switch(event.GetKeyCode())
|
||||||
{
|
{
|
||||||
case WXK_NEXT:
|
case WXK_PAGEDOWN:
|
||||||
controlBar->OnNext(); break;
|
controlBar->OnNext(); break;
|
||||||
case WXK_PRIOR:
|
case WXK_PAGEUP:
|
||||||
controlBar->OnPrevious(); break;
|
controlBar->OnPrevious(); break;
|
||||||
case WXK_HOME:
|
case WXK_HOME:
|
||||||
controlBar->OnFirst(); break;
|
controlBar->OnFirst(); break;
|
||||||
|
@@ -857,7 +857,7 @@ void wxCalendarCtrl::RecalcGeometry()
|
|||||||
{
|
{
|
||||||
// 1.5 times the width gives nice margins even if the weekday
|
// 1.5 times the width gives nice margins even if the weekday
|
||||||
// names are short
|
// names are short
|
||||||
m_widthCol = width+width/2;
|
m_widthCol = width+width/2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxDateTime::WeekDay wd;
|
wxDateTime::WeekDay wd;
|
||||||
@@ -1451,7 +1451,7 @@ wxCalendarHitTestResult wxCalendarCtrl::HitTest(const wxPoint& pos,
|
|||||||
wxDateTime::WeekDay *wd)
|
wxDateTime::WeekDay *wd)
|
||||||
{
|
{
|
||||||
RecalcGeometry();
|
RecalcGeometry();
|
||||||
// use the correct x-pos
|
// use the correct x-pos
|
||||||
wxCoord x0 = wxMax((GetSize().x - m_widthCol*7) /2, 0);
|
wxCoord x0 = wxMax((GetSize().x - m_widthCol*7) /2, 0);
|
||||||
wxPoint pos_corr = pos;
|
wxPoint pos_corr = pos;
|
||||||
pos_corr.x -= x0;
|
pos_corr.x -= x0;
|
||||||
@@ -1655,13 +1655,13 @@ void wxCalendarCtrl::OnChar(wxKeyEvent& event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PRIOR:
|
case WXK_PAGEUP:
|
||||||
target = m_date - wxDateSpan::Month();
|
target = m_date - wxDateSpan::Month();
|
||||||
ChangeMonth(&target);
|
ChangeMonth(&target);
|
||||||
SetDateAndNotify(target); // always
|
SetDateAndNotify(target); // always
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NEXT:
|
case WXK_PAGEDOWN:
|
||||||
target = m_date + wxDateSpan::Month();
|
target = m_date + wxDateSpan::Month();
|
||||||
ChangeMonth(&target);
|
ChangeMonth(&target);
|
||||||
SetDateAndNotify(target); // always
|
SetDateAndNotify(target); // always
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// Name: generic/grid.cpp
|
// Name: src/generic/grid.cpp
|
||||||
// Purpose: wxGrid and related classes
|
// Purpose: wxGrid and related classes
|
||||||
// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn)
|
// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn)
|
||||||
// Modified by: Robin Dunn, Vadim Zeitlin
|
// Modified by: Robin Dunn, Vadim Zeitlin
|
||||||
@@ -1616,7 +1616,7 @@ void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
// get the widths of all cells previous to this one
|
// get the widths of all cells previous to this one
|
||||||
int colXPos = 0;
|
int colXPos = 0;
|
||||||
for ( int i = 0; i < col; i++ )
|
for ( int i = 0; i < col; i++ )
|
||||||
{
|
{
|
||||||
colXPos += m_grid->GetColSize(i);
|
colXPos += m_grid->GetColSize(i);
|
||||||
}
|
}
|
||||||
@@ -1667,7 +1667,7 @@ void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
// get the widths of all cells previous to this one
|
// get the widths of all cells previous to this one
|
||||||
int colXPos = 0;
|
int colXPos = 0;
|
||||||
for ( int i = 0; i < col; i++ )
|
for ( int i = 0; i < col; i++ )
|
||||||
{
|
{
|
||||||
colXPos += m_grid->GetColSize(i);
|
colXPos += m_grid->GetColSize(i);
|
||||||
}
|
}
|
||||||
@@ -6609,11 +6609,11 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PRIOR:
|
case WXK_PAGEUP:
|
||||||
MovePageUp();
|
MovePageUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NEXT:
|
case WXK_PAGEDOWN:
|
||||||
MovePageDown();
|
MovePageDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -7665,7 +7665,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
|
|||||||
wxString eol = wxTextFile::GetEOL( wxTextFileType_Unix );
|
wxString eol = wxTextFile::GetEOL( wxTextFileType_Unix );
|
||||||
wxString tVal = wxTextFile::Translate( value, 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 );
|
pos = tVal.Mid(startPos).Find( eol );
|
||||||
if ( pos < 0 )
|
if ( pos < 0 )
|
||||||
@@ -7683,7 +7683,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
|
|||||||
startPos += pos + 1;
|
startPos += pos + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( startPos < (int)value.Length() )
|
if ( startPos < (int)value.length() )
|
||||||
{
|
{
|
||||||
lines.Add( value.Mid( startPos ) );
|
lines.Add( value.Mid( startPos ) );
|
||||||
}
|
}
|
||||||
@@ -7964,7 +7964,7 @@ void wxGrid::ShowCellEditControl()
|
|||||||
editor->Show( true, attr );
|
editor->Show( true, attr );
|
||||||
|
|
||||||
int colXPos = 0;
|
int colXPos = 0;
|
||||||
for (int i = 0; i < m_currentCellCoords.GetCol(); i++)
|
for (int i = 0; i < m_currentCellCoords.GetCol(); i++)
|
||||||
{
|
{
|
||||||
colXPos += GetColSize(i);
|
colXPos += GetColSize(i);
|
||||||
}
|
}
|
||||||
@@ -8305,7 +8305,7 @@ void wxGrid::MakeCellVisible( int row, int col )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// special handling for wide cells - show always left part of the cell!
|
// special handling for wide cells - show always left part of the cell!
|
||||||
// Otherwise, e.g. when stepping from row to row, it would jump between
|
// Otherwise, e.g. when stepping from row to row, it would jump between
|
||||||
// left and right part of the cell on every step!
|
// left and right part of the cell on every step!
|
||||||
// if ( left < 0 )
|
// if ( left < 0 )
|
||||||
if ( left < 0 || (right-left) >= cw )
|
if ( left < 0 || (right-left) >= cw )
|
||||||
@@ -10648,4 +10648,3 @@ wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_GRID
|
#endif // wxUSE_GRID
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: generic/listctrl.cpp
|
// Name: src/generic/listctrl.cpp
|
||||||
// Purpose: generic implementation of wxListCtrl
|
// Purpose: generic implementation of wxListCtrl
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Vadim Zeitlin (virtual list control support)
|
// 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
|
// continue until we have enough space or only one character left
|
||||||
wxCoord w_c, h_c;
|
wxCoord w_c, h_c;
|
||||||
size_t len = text.Length();
|
size_t len = text.length();
|
||||||
wxString drawntext = text.Left(len);
|
wxString drawntext = text.Left(len);
|
||||||
while (len > 1)
|
while (len > 1)
|
||||||
{
|
{
|
||||||
@@ -1596,9 +1596,9 @@ void wxListLineData::DrawTextFormatted(wxDC *dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if still not enough space, remove ellipsis characters
|
// 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);
|
dc->GetTextExtent(ellipsis, &base_w, &h);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3262,7 +3262,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
OnArrowChar( 0, event );
|
OnArrowChar( 0, event );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PRIOR:
|
case WXK_PAGEUP:
|
||||||
{
|
{
|
||||||
int steps = InReportView() ? m_linesPerPage - 1 : m_current % m_linesPerPage;
|
int steps = InReportView() ? m_linesPerPage - 1 : m_current % m_linesPerPage;
|
||||||
|
|
||||||
@@ -3274,7 +3274,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NEXT:
|
case WXK_PAGEDOWN:
|
||||||
{
|
{
|
||||||
int steps = InReportView()
|
int steps = InReportView()
|
||||||
? m_linesPerPage - 1
|
? m_linesPerPage - 1
|
||||||
@@ -5344,10 +5344,10 @@ void wxGenericListCtrl::ResizeReportView(bool showHeader)
|
|||||||
{
|
{
|
||||||
m_headerWin->SetSize( 0, 0, cw, m_headerHeight );
|
m_headerWin->SetSize( 0, 0, cw, m_headerHeight );
|
||||||
if(ch > m_headerHeight)
|
if(ch > m_headerHeight)
|
||||||
m_mainWin->SetSize( 0, m_headerHeight + 1,
|
m_mainWin->SetSize( 0, m_headerHeight + 1,
|
||||||
cw, ch - m_headerHeight - 1 );
|
cw, ch - m_headerHeight - 1 );
|
||||||
else
|
else
|
||||||
m_mainWin->SetSize( 0, m_headerHeight + 1,
|
m_mainWin->SetSize( 0, m_headerHeight + 1,
|
||||||
cw, 0);
|
cw, 0);
|
||||||
}
|
}
|
||||||
else // no header window
|
else // no header window
|
||||||
@@ -5626,4 +5626,3 @@ void wxGenericListCtrl::Thaw()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTCTRL
|
#endif // wxUSE_LISTCTRL
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gtk/window.cpp
|
// Name: src/gtk/window.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -651,11 +651,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Prior: // == GDK_Page_Up
|
case GDK_Prior: // == GDK_Page_Up
|
||||||
key_code = WXK_PRIOR;
|
key_code = WXK_PAGEUP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Next: // == GDK_Page_Down
|
case GDK_Next: // == GDK_Page_Down
|
||||||
key_code = WXK_NEXT;
|
key_code = WXK_PAGEDOWN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_End:
|
case GDK_End:
|
||||||
@@ -734,11 +734,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_KP_Prior: // == GDK_KP_Page_Up
|
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;
|
break;
|
||||||
|
|
||||||
case GDK_KP_Next: // == GDK_KP_Page_Down
|
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;
|
break;
|
||||||
|
|
||||||
case GDK_KP_End:
|
case GDK_KP_End:
|
||||||
@@ -4429,4 +4429,3 @@ void wxWinModule::OnExit()
|
|||||||
if (g_eraseGC)
|
if (g_eraseGC)
|
||||||
gdk_gc_unref( g_eraseGC );
|
gdk_gc_unref( g_eraseGC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gtk/window.cpp
|
// Name: src/gtk1/window.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -739,11 +739,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Prior: // == GDK_Page_Up
|
case GDK_Prior: // == GDK_Page_Up
|
||||||
key_code = WXK_PRIOR;
|
key_code = WXK_PAGEUP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Next: // == GDK_Page_Down
|
case GDK_Next: // == GDK_Page_Down
|
||||||
key_code = WXK_NEXT;
|
key_code = WXK_PAGEDOWN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_End:
|
case GDK_End:
|
||||||
@@ -822,11 +822,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_KP_Prior: // == GDK_KP_Page_Up
|
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;
|
break;
|
||||||
|
|
||||||
case GDK_KP_Next: // == GDK_KP_Page_Down
|
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;
|
break;
|
||||||
|
|
||||||
case GDK_KP_End:
|
case GDK_KP_End:
|
||||||
@@ -4232,4 +4232,3 @@ void wxWinModule::OnExit()
|
|||||||
if (g_eraseGC)
|
if (g_eraseGC)
|
||||||
gdk_gc_unref( g_eraseGC );
|
gdk_gc_unref( g_eraseGC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.cpp
|
// Name: src/mac/carbon/textctrl.cpp
|
||||||
// Purpose: wxTextCtrl
|
// Purpose: wxTextCtrl
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by: Ryan Norton (MLTE GetLineLength and GetLineText)
|
// 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 &&
|
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_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
|
// 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
|
// Check if we have reached the max # of chars (if it is set), but still
|
||||||
// allow navigation and deletion
|
// 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_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
|
||||||
key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxPROCESS_ENTER) )
|
key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxPROCESS_ENTER) )
|
||||||
)
|
)
|
||||||
@@ -1109,7 +1109,7 @@ void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event)
|
|||||||
m_privateContextMenu->AppendSeparator();
|
m_privateContextMenu->AppendSeparator();
|
||||||
m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
|
m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_privateContextMenu != NULL)
|
if (m_privateContextMenu != NULL)
|
||||||
PopupMenu(m_privateContextMenu);
|
PopupMenu(m_privateContextMenu);
|
||||||
}
|
}
|
||||||
@@ -1208,7 +1208,7 @@ void wxMacTextControl::SetEditable(bool editable)
|
|||||||
|
|
||||||
wxTextPos wxMacTextControl::GetLastPosition() const
|
wxTextPos wxMacTextControl::GetLastPosition() const
|
||||||
{
|
{
|
||||||
return GetStringValue().Length() ;
|
return GetStringValue().length() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacTextControl::Replace( long from , long to , const wxString &val )
|
void wxMacTextControl::Replace( long from , long to , const wxString &val )
|
||||||
@@ -1266,7 +1266,7 @@ int wxMacTextControl::GetNumberOfLines() const
|
|||||||
wxString content = GetStringValue() ;
|
wxString content = GetStringValue() ;
|
||||||
lines = 1;
|
lines = 1;
|
||||||
|
|
||||||
for (size_t i = 0; i < content.Length() ; i++)
|
for (size_t i = 0; i < content.length() ; i++)
|
||||||
{
|
{
|
||||||
if (content[i] == '\r')
|
if (content[i] == '\r')
|
||||||
lines++;
|
lines++;
|
||||||
@@ -1282,14 +1282,14 @@ wxString wxMacTextControl::GetLineText(long lineNo) const
|
|||||||
|
|
||||||
// Find line first
|
// Find line first
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (size_t i = 0; i < content.Length() ; i++)
|
for (size_t i = 0; i < content.length() ; i++)
|
||||||
{
|
{
|
||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Add chars in line then
|
// Add chars in line then
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
|
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.length(); j++)
|
||||||
{
|
{
|
||||||
if (content[j] == '\n')
|
if (content[j] == '\n')
|
||||||
return tmp;
|
return tmp;
|
||||||
@@ -1314,13 +1314,13 @@ int wxMacTextControl::GetLineLength(long lineNo) const
|
|||||||
|
|
||||||
// Find line first
|
// Find line first
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (size_t i = 0; i < content.Length() ; i++)
|
for (size_t i = 0; i < content.length() ; i++)
|
||||||
{
|
{
|
||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Count chars in line then
|
// Count chars in line then
|
||||||
count = 0;
|
count = 0;
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.length(); j++)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
if (content[j] == '\n')
|
if (content[j] == '\n')
|
||||||
@@ -1484,7 +1484,7 @@ void wxMacUnicodeTextControl::WriteText( const wxString& str )
|
|||||||
val.Remove( start , end - start ) ;
|
val.Remove( start , end - start ) ;
|
||||||
val.insert( start , str ) ;
|
val.insert( start , str ) ;
|
||||||
SetStringValue( val ) ;
|
SetStringValue( val ) ;
|
||||||
SetSelection( start + str.Length() , start + str.Length() ) ;
|
SetSelection( start + str.length() , start + str.length() ) ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: uma.cpp
|
// Name: src/mac/carbon/uma.cpp
|
||||||
// Purpose: UMA support
|
// Purpose: UMA support
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -358,12 +358,12 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
|
|||||||
glyph = kMenuClearGlyph ;
|
glyph = kMenuClearGlyph ;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case WXK_PRIOR : // PAGE UP
|
case WXK_PAGEUP :
|
||||||
macKey = kPageUpCharCode ;
|
macKey = kPageUpCharCode ;
|
||||||
glyph = kMenuPageUpGlyph ;
|
glyph = kMenuPageUpGlyph ;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case WXK_NEXT :
|
case WXK_PAGEDOWN :
|
||||||
macKey = kPageDownCharCode ;
|
macKey = kPageDownCharCode ;
|
||||||
glyph = kMenuPageDownGlyph ;
|
glyph = kMenuPageDownGlyph ;
|
||||||
break ;
|
break ;
|
||||||
@@ -424,7 +424,7 @@ void UMAAppendMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc
|
|||||||
{
|
{
|
||||||
MacAppendMenu(menu, "\pA");
|
MacAppendMenu(menu, "\pA");
|
||||||
|
|
||||||
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
||||||
ChangeMenuItemAttributes( menu , ::CountMenuItems(menu), kMenuItemAttrIgnoreMeta , 0 ) ;
|
ChangeMenuItemAttributes( menu , ::CountMenuItems(menu), kMenuItemAttrIgnoreMeta , 0 ) ;
|
||||||
UMASetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
UMASetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), title , encoding );
|
||||||
UMASetMenuItemShortcut( menu , (SInt16) ::CountMenuItems(menu), entry ) ;
|
UMASetMenuItemShortcut( menu , (SInt16) ::CountMenuItems(menu), entry ) ;
|
||||||
@@ -434,7 +434,7 @@ void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc
|
|||||||
{
|
{
|
||||||
MacInsertMenuItem( menu , "\pA" , item) ;
|
MacInsertMenuItem( menu , "\pA" , item) ;
|
||||||
|
|
||||||
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
// don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise)
|
||||||
ChangeMenuItemAttributes( menu , item+1, kMenuItemAttrIgnoreMeta , 0 ) ;
|
ChangeMenuItemAttributes( menu , item+1, kMenuItemAttrIgnoreMeta , 0 ) ;
|
||||||
UMASetMenuItemText(menu, item+1 , title , encoding );
|
UMASetMenuItemText(menu, item+1 , title , encoding );
|
||||||
UMASetMenuItemShortcut( menu , item+1 , entry ) ;
|
UMASetMenuItemShortcut( menu , item+1 , entry ) ;
|
||||||
@@ -593,7 +593,7 @@ void UMAActivateControl( ControlRef inControl )
|
|||||||
InvalWindowRect( GetControlOwner(inControl), UMAGetControlBoundsInWindowCoords(inControl, &ctrlBounds) ) ;
|
InvalWindowRect( GetControlOwner(inControl), UMAGetControlBoundsInWindowCoords(inControl, &ctrlBounds) ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAMoveControl( ControlRef inControl , short x , short y )
|
void UMAMoveControl( ControlRef inControl , short x , short y )
|
||||||
@@ -885,4 +885,3 @@ void UMASetSystemIsInitialized(bool val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.cpp
|
// Name: src/mac/classic/textctrl.cpp
|
||||||
// Purpose: wxTextCtrl
|
// Purpose: wxTextCtrl
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// 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 ) ;
|
::SetControlData((ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
|
||||||
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
|
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
|
||||||
TEDelete( ((TEHandle) m_macTE) ) ;
|
TEDelete( ((TEHandle) m_macTE) ) ;
|
||||||
TEInsert( value , value.Length() , ((TEHandle) m_macTE) ) ;
|
TEInsert( value , value.length() , ((TEHandle) m_macTE) ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1448,7 +1448,7 @@ int wxTextCtrl::GetNumberOfLines() const
|
|||||||
wxString content = GetValue() ;
|
wxString content = GetValue() ;
|
||||||
|
|
||||||
int count = 1;
|
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++;
|
if (content[i] == '\r') count++;
|
||||||
}
|
}
|
||||||
@@ -1499,13 +1499,13 @@ int wxTextCtrl::GetLineLength(long lineNo) const
|
|||||||
|
|
||||||
// Find line first
|
// Find line first
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (size_t i = 0; i < content.Length() ; i++)
|
for (size_t i = 0; i < content.length() ; i++)
|
||||||
{
|
{
|
||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Count chars in line then
|
// Count chars in line then
|
||||||
count = 0;
|
count = 0;
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.length(); j++)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
if (content[j] == '\n') return count;
|
if (content[j] == '\n') return count;
|
||||||
@@ -1525,14 +1525,14 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
|
|
||||||
// Find line first
|
// Find line first
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (size_t i = 0; i < content.Length() ; i++)
|
for (size_t i = 0; i < content.length() ; i++)
|
||||||
{
|
{
|
||||||
if (count == lineNo)
|
if (count == lineNo)
|
||||||
{
|
{
|
||||||
// Add chars in line then
|
// Add chars in line then
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
|
|
||||||
for (size_t j = i; j < content.Length(); j++)
|
for (size_t j = i; j < content.length(); j++)
|
||||||
{
|
{
|
||||||
if (content[j] == '\n')
|
if (content[j] == '\n')
|
||||||
return tmp;
|
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 &&
|
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_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
|
// eat it
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: uma.cpp
|
// Name: src/mac/classic/uma.cpp
|
||||||
// Purpose: UMA support
|
// Purpose: UMA support
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -363,11 +363,11 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
|
|||||||
macKey = kClearCharCode ;
|
macKey = kClearCharCode ;
|
||||||
glyph = kMenuClearGlyph ;
|
glyph = kMenuClearGlyph ;
|
||||||
break ;
|
break ;
|
||||||
case WXK_PRIOR : // PAGE UP
|
case WXK_PAGEUP :
|
||||||
macKey = kPageUpCharCode ;
|
macKey = kPageUpCharCode ;
|
||||||
glyph = kMenuPageUpGlyph ;
|
glyph = kMenuPageUpGlyph ;
|
||||||
break ;
|
break ;
|
||||||
case WXK_NEXT :
|
case WXK_PAGEDOWN :
|
||||||
macKey = kPageDownCharCode ;
|
macKey = kPageDownCharCode ;
|
||||||
glyph = kMenuPageDownGlyph ;
|
glyph = kMenuPageDownGlyph ;
|
||||||
break ;
|
break ;
|
||||||
|
@@ -440,13 +440,13 @@ void wxHIDKeyboard::BuildCookies(wxCFArray& Array)
|
|||||||
AddCookie(Array[i], WXK_SPACE);
|
AddCookie(Array[i], WXK_SPACE);
|
||||||
break;
|
break;
|
||||||
case kHIDUsage_KeyboardPageUp:
|
case kHIDUsage_KeyboardPageUp:
|
||||||
AddCookie(Array[i], WXK_PRIOR);
|
AddCookie(Array[i], WXK_PAGEUP);
|
||||||
break;
|
break;
|
||||||
case kHIDUsage_KeyboardEnd:
|
case kHIDUsage_KeyboardEnd:
|
||||||
AddCookie(Array[i], WXK_END);
|
AddCookie(Array[i], WXK_END);
|
||||||
break;
|
break;
|
||||||
case kHIDUsage_KeyboardPageDown:
|
case kHIDUsage_KeyboardPageDown:
|
||||||
AddCookie(Array[i], WXK_NEXT);
|
AddCookie(Array[i], WXK_PAGEDOWN);
|
||||||
break;
|
break;
|
||||||
case kHIDUsage_KeyboardRightArrow:
|
case kHIDUsage_KeyboardRightArrow:
|
||||||
AddCookie(Array[i], WXK_RIGHT);
|
AddCookie(Array[i], WXK_RIGHT);
|
||||||
|
@@ -311,9 +311,7 @@ static long wxScanToKeyCode(event_t *event, bool translate)
|
|||||||
KEY (KB_padHome, WXK_NUMPAD_HOME)
|
KEY (KB_padHome, WXK_NUMPAD_HOME)
|
||||||
KEY (KB_padEnd, WXK_NUMPAD_END)
|
KEY (KB_padEnd, WXK_NUMPAD_END)
|
||||||
KEY (KB_padPageUp, WXK_NUMPAD_PAGEUP)
|
KEY (KB_padPageUp, WXK_NUMPAD_PAGEUP)
|
||||||
//KEY (KB_padPageUp, WXK_NUMPAD_PRIOR)
|
|
||||||
KEY (KB_padPageDown, WXK_NUMPAD_PAGEDOWN)
|
KEY (KB_padPageDown, WXK_NUMPAD_PAGEDOWN)
|
||||||
//KEY (KB_padPageDown, WXK_NUMPAD_NEXT)
|
|
||||||
KEY (KB_1, '1')
|
KEY (KB_1, '1')
|
||||||
KEY (KB_2, '2')
|
KEY (KB_2, '2')
|
||||||
KEY (KB_3, '3')
|
KEY (KB_3, '3')
|
||||||
|
@@ -1164,10 +1164,10 @@ void wxWindowMSW::SetWindowStyleFlag(long flags)
|
|||||||
|
|
||||||
// If any of the style changes changed any of the frame styles:
|
// If any of the style changes changed any of the frame styles:
|
||||||
// MSDN: SetWindowLong:
|
// MSDN: SetWindowLong:
|
||||||
// Certain window data is cached, so changes you make using
|
// Certain window data is cached, so changes you make using
|
||||||
// SetWindowLong will not take effect until you call the
|
// SetWindowLong will not take effect until you call the
|
||||||
// SetWindowPos function. Specifically, if you change any of
|
// SetWindowPos function. Specifically, if you change any of
|
||||||
// the frame styles, you must call SetWindowPos with the
|
// the frame styles, you must call SetWindowPos with the
|
||||||
// SWP_FRAMECHANGED flag for the cache to be updated properly.
|
// SWP_FRAMECHANGED flag for the cache to be updated properly.
|
||||||
|
|
||||||
callSWP = ((styleOld ^ style ) & (WS_BORDER |
|
callSWP = ((styleOld ^ style ) & (WS_BORDER |
|
||||||
@@ -2610,22 +2610,22 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
|||||||
if (IsContextMenuEnabled() && message == WM_LBUTTONDOWN)
|
if (IsContextMenuEnabled() && message == WM_LBUTTONDOWN)
|
||||||
{
|
{
|
||||||
SHRGINFO shrgi = {0};
|
SHRGINFO shrgi = {0};
|
||||||
|
|
||||||
shrgi.cbSize = sizeof(SHRGINFO);
|
shrgi.cbSize = sizeof(SHRGINFO);
|
||||||
shrgi.hwndClient = (HWND) GetHWND();
|
shrgi.hwndClient = (HWND) GetHWND();
|
||||||
shrgi.ptDown.x = x;
|
shrgi.ptDown.x = x;
|
||||||
shrgi.ptDown.y = y;
|
shrgi.ptDown.y = y;
|
||||||
|
|
||||||
shrgi.dwFlags = SHRG_RETURNCMD;
|
shrgi.dwFlags = SHRG_RETURNCMD;
|
||||||
// shrgi.dwFlags = SHRG_NOTIFYPARENT;
|
// shrgi.dwFlags = SHRG_NOTIFYPARENT;
|
||||||
|
|
||||||
if (GN_CONTEXTMENU == ::SHRecognizeGesture(&shrgi))
|
if (GN_CONTEXTMENU == ::SHRecognizeGesture(&shrgi))
|
||||||
{
|
{
|
||||||
wxPoint pt(x, y);
|
wxPoint pt(x, y);
|
||||||
pt = ClientToScreen(pt);
|
pt = ClientToScreen(pt);
|
||||||
|
|
||||||
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
|
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
|
||||||
|
|
||||||
evtCtx.SetEventObject(this);
|
evtCtx.SetEventObject(this);
|
||||||
if (GetEventHandler()->ProcessEvent(evtCtx))
|
if (GetEventHandler()->ProcessEvent(evtCtx))
|
||||||
{
|
{
|
||||||
@@ -5380,10 +5380,10 @@ int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam)
|
|||||||
|
|
||||||
// handle extended keys
|
// handle extended keys
|
||||||
case VK_PRIOR:
|
case VK_PRIOR:
|
||||||
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PRIOR, WXK_PRIOR);
|
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PAGEUP, WXK_PAGEUP);
|
||||||
break;
|
break;
|
||||||
case VK_NEXT:
|
case VK_NEXT:
|
||||||
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_NEXT, WXK_NEXT);
|
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_PAGEDOWN, WXK_PAGEDOWN);
|
||||||
break;
|
break;
|
||||||
case VK_END:
|
case VK_END:
|
||||||
id = ChooseNormalOrExtended(lParam, WXK_NUMPAD_END, WXK_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_ALT: keySym = VK_MENU; break;
|
||||||
case WXK_PAUSE: keySym = VK_PAUSE; break;
|
case WXK_PAUSE: keySym = VK_PAUSE; break;
|
||||||
case WXK_CAPITAL: keySym = VK_CAPITAL; break;
|
case WXK_CAPITAL: keySym = VK_CAPITAL; break;
|
||||||
case WXK_PRIOR: keySym = VK_PRIOR; break;
|
case WXK_PAGEUP: keySym = VK_PRIOR; break;
|
||||||
case WXK_NEXT : keySym = VK_NEXT; break;
|
case WXK_PAGEDOWN: keySym = VK_NEXT; break;
|
||||||
case WXK_END: keySym = VK_END; break;
|
case WXK_END: keySym = VK_END; break;
|
||||||
case WXK_HOME : keySym = VK_HOME; break;
|
case WXK_HOME : keySym = VK_HOME; break;
|
||||||
case WXK_LEFT : keySym = VK_LEFT; break;
|
case WXK_LEFT : keySym = VK_LEFT; break;
|
||||||
|
@@ -4379,8 +4379,8 @@ int wxCharCodeOS2ToWX(
|
|||||||
case VK_CTRL: nId = WXK_CONTROL; break;
|
case VK_CTRL: nId = WXK_CONTROL; break;
|
||||||
case VK_PAUSE: nId = WXK_PAUSE; break;
|
case VK_PAUSE: nId = WXK_PAUSE; break;
|
||||||
case VK_SPACE: nId = WXK_SPACE; break;
|
case VK_SPACE: nId = WXK_SPACE; break;
|
||||||
case VK_PAGEUP: nId = WXK_PRIOR; break;
|
case VK_PAGEUP: nId = WXK_PAGEUP; break;
|
||||||
case VK_PAGEDOWN: nId = WXK_NEXT; break;
|
case VK_PAGEDOWN: nId = WXK_PAGEDOWN; break;
|
||||||
case VK_ESC: nId = WXK_ESCAPE; break;
|
case VK_ESC: nId = WXK_ESCAPE; break;
|
||||||
case VK_END: nId = WXK_END; break;
|
case VK_END: nId = WXK_END; break;
|
||||||
case VK_HOME : nId = WXK_HOME; 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_SHIFT: nKeySym = VK_SHIFT; break;
|
||||||
case WXK_CONTROL: nKeySym = VK_CTRL; break;
|
case WXK_CONTROL: nKeySym = VK_CTRL; break;
|
||||||
case WXK_PAUSE: nKeySym = VK_PAUSE; break;
|
case WXK_PAUSE: nKeySym = VK_PAUSE; break;
|
||||||
case WXK_PRIOR: nKeySym = VK_PAGEUP; break;
|
case WXK_PAGEUP: nKeySym = VK_PAGEUP; break;
|
||||||
case WXK_NEXT : nKeySym = VK_PAGEDOWN; break;
|
case WXK_PAGEDOWN: nKeySym = VK_PAGEDOWN; break;
|
||||||
case WXK_END: nKeySym = VK_END; break;
|
case WXK_END: nKeySym = VK_END; break;
|
||||||
case WXK_HOME : nKeySym = VK_HOME; break;
|
case WXK_HOME : nKeySym = VK_HOME; break;
|
||||||
case WXK_LEFT : nKeySym = VK_LEFT; break;
|
case WXK_LEFT : nKeySym = VK_LEFT; break;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: richtext/richeditctrl.cpp
|
// Name: src/richtext/richeditctrl.cpp
|
||||||
// Purpose: A rich edit control
|
// Purpose: A rich edit control
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -429,8 +429,6 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
event.GetKeyCode() == WXK_HOME ||
|
event.GetKeyCode() == WXK_HOME ||
|
||||||
event.GetKeyCode() == WXK_PAGEUP ||
|
event.GetKeyCode() == WXK_PAGEUP ||
|
||||||
event.GetKeyCode() == WXK_PAGEDOWN ||
|
event.GetKeyCode() == WXK_PAGEDOWN ||
|
||||||
event.GetKeyCode() == WXK_PRIOR ||
|
|
||||||
event.GetKeyCode() == WXK_NEXT ||
|
|
||||||
event.GetKeyCode() == WXK_END)
|
event.GetKeyCode() == WXK_END)
|
||||||
{
|
{
|
||||||
KeyboardNavigate(event.GetKeyCode(), flags);
|
KeyboardNavigate(event.GetKeyCode(), flags);
|
||||||
@@ -618,11 +616,11 @@ bool wxRichTextCtrl::KeyboardNavigate(int keyCode, int flags)
|
|||||||
else
|
else
|
||||||
success = MoveDown(1, flags);
|
success = MoveDown(1, flags);
|
||||||
}
|
}
|
||||||
else if (keyCode == WXK_PAGEUP || keyCode == WXK_PRIOR)
|
else if (keyCode == WXK_PAGEUP)
|
||||||
{
|
{
|
||||||
success = PageUp(1, flags);
|
success = PageUp(1, flags);
|
||||||
}
|
}
|
||||||
else if (keyCode == WXK_PAGEDOWN || keyCode == WXK_NEXT)
|
else if (keyCode == WXK_PAGEDOWN)
|
||||||
{
|
{
|
||||||
success = PageDown(1, flags);
|
success = PageDown(1, flags);
|
||||||
}
|
}
|
||||||
@@ -716,7 +714,7 @@ bool wxRichTextCtrl::ScrollIntoView(long position, int keyCode)
|
|||||||
wxSize clientSize = GetClientSize();
|
wxSize clientSize = GetClientSize();
|
||||||
|
|
||||||
// Going down
|
// 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))
|
if ((rect.y + rect.height) > (clientSize.y + startY))
|
||||||
{
|
{
|
||||||
@@ -746,7 +744,7 @@ bool wxRichTextCtrl::ScrollIntoView(long position, int keyCode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Going up
|
// 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)
|
if (rect.y < startY)
|
||||||
{
|
{
|
||||||
@@ -2533,4 +2531,3 @@ long wxRichTextCtrl::GetFirstVisiblePosition() const
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_RICHTEXT
|
// wxUSE_RICHTEXT
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: univ/slider.cpp
|
// Name: src/univ/slider.cpp
|
||||||
// Purpose: implementation of the universal version of wxSlider
|
// Purpose: implementation of the universal version of wxSlider
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -1009,12 +1009,10 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
|||||||
action = wxACTION_SLIDER_LINE_DOWN;
|
action = wxACTION_SLIDER_LINE_DOWN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PRIOR:
|
|
||||||
case WXK_PAGEUP:
|
case WXK_PAGEUP:
|
||||||
action = wxACTION_SLIDER_PAGE_UP;
|
action = wxACTION_SLIDER_PAGE_UP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NEXT:
|
|
||||||
case WXK_PAGEDOWN:
|
case WXK_PAGEDOWN:
|
||||||
action = wxACTION_SLIDER_PAGE_DOWN;
|
action = wxACTION_SLIDER_PAGE_DOWN;
|
||||||
break;
|
break;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: univ/textctrl.cpp
|
// Name: src/univ/textctrl.cpp
|
||||||
// Purpose: wxTextCtrl
|
// Purpose: wxTextCtrl
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -4685,7 +4685,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
int keycode = event.GetKeyCode();
|
int keycode = event.GetKeyCode();
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
wxChar unicode = event.GetUnicodeKey();
|
wxChar unicode = event.GetUnicodeKey();
|
||||||
#endif
|
#endif
|
||||||
if ( keycode == WXK_RETURN )
|
if ( keycode == WXK_RETURN )
|
||||||
{
|
{
|
||||||
if ( IsSingleLine() || (GetWindowStyle() & wxTE_PROCESS_ENTER) )
|
if ( IsSingleLine() || (GetWindowStyle() & wxTE_PROCESS_ENTER) )
|
||||||
@@ -4714,7 +4714,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
// Ctrl-R refreshes the control in debug mode
|
// Ctrl-R refreshes the control in debug mode
|
||||||
@@ -4814,14 +4814,12 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PAGEDOWN:
|
case WXK_PAGEDOWN:
|
||||||
case WXK_NEXT:
|
|
||||||
// we don't map Ctrl-PgUp/Dn to anything special - what should it
|
// we don't map Ctrl-PgUp/Dn to anything special - what should it
|
||||||
// to? for now, it's the same as without control
|
// to? for now, it's the same as without control
|
||||||
action << wxACTION_TEXT_PAGE_DOWN;
|
action << wxACTION_TEXT_PAGE_DOWN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PAGEUP:
|
case WXK_PAGEUP:
|
||||||
case WXK_PRIOR:
|
|
||||||
action << wxACTION_TEXT_PAGE_UP;
|
action << wxACTION_TEXT_PAGE_UP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -575,9 +575,9 @@ int wxCharCodeXToWX(KeySym keySym)
|
|||||||
case XK_Down:
|
case XK_Down:
|
||||||
id = WXK_DOWN; break;
|
id = WXK_DOWN; break;
|
||||||
case XK_Next:
|
case XK_Next:
|
||||||
id = WXK_NEXT; break;
|
id = WXK_PAGEDOWN; break;
|
||||||
case XK_Prior:
|
case XK_Prior:
|
||||||
id = WXK_PRIOR; break;
|
id = WXK_PAGEUP; break;
|
||||||
case XK_Menu:
|
case XK_Menu:
|
||||||
id = WXK_MENU; break;
|
id = WXK_MENU; break;
|
||||||
case XK_Select:
|
case XK_Select:
|
||||||
@@ -704,8 +704,8 @@ KeySym wxCharCodeWXToX(int id)
|
|||||||
case WXK_PAUSE: keySym = XK_Pause; break;
|
case WXK_PAUSE: keySym = XK_Pause; break;
|
||||||
case WXK_ESCAPE: keySym = XK_Escape; break;
|
case WXK_ESCAPE: keySym = XK_Escape; break;
|
||||||
case WXK_SPACE: keySym = ' '; break;
|
case WXK_SPACE: keySym = ' '; break;
|
||||||
case WXK_PRIOR: keySym = XK_Prior; break;
|
case WXK_PAGEUP: keySym = XK_Prior; break;
|
||||||
case WXK_NEXT : keySym = XK_Next; break;
|
case WXK_PAGEDOWN: keySym = XK_Next; break;
|
||||||
case WXK_END: keySym = XK_End; break;
|
case WXK_END: keySym = XK_End; break;
|
||||||
case WXK_HOME : keySym = XK_Home; break;
|
case WXK_HOME : keySym = XK_Home; break;
|
||||||
case WXK_LEFT : keySym = XK_Left; break;
|
case WXK_LEFT : keySym = XK_Left; break;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: textctrl.cpp
|
// Name: src/x11/textctrl.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// 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++)
|
for (int i = m_y1; i < m_y2+2; i++)
|
||||||
{
|
{
|
||||||
if (i >= (int)m_owner->m_lines.GetCount())
|
if (i >= (int)m_owner->m_lines.GetCount())
|
||||||
m_lines.Add( wxT("") );
|
m_lines.Add( wxEmptyString );
|
||||||
else
|
else
|
||||||
m_lines.Add( m_owner->m_lines[i].m_text );
|
m_lines.Add( m_owner->m_lines[i].m_text );
|
||||||
}
|
}
|
||||||
@@ -285,7 +285,7 @@ void wxTextCtrl::SetValue(const wxString& value)
|
|||||||
|
|
||||||
if (value.empty())
|
if (value.empty())
|
||||||
{
|
{
|
||||||
m_lines.Add( new wxSourceLine( wxT("") ) );
|
m_lines.Add( new wxSourceLine( wxEmptyString ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -350,7 +350,7 @@ int wxTextCtrl::GetLineLength(long lineNo) const
|
|||||||
wxString wxTextCtrl::GetLineText(long lineNo) const
|
wxString wxTextCtrl::GetLineText(long lineNo) const
|
||||||
{
|
{
|
||||||
if (lineNo >= (long)m_lines.GetCount())
|
if (lineNo >= (long)m_lines.GetCount())
|
||||||
return wxT("");
|
return wxEmptyString;
|
||||||
|
|
||||||
return m_lines[lineNo].m_text;
|
return m_lines[lineNo].m_text;
|
||||||
}
|
}
|
||||||
@@ -393,7 +393,7 @@ void wxTextCtrl::Clear()
|
|||||||
ClearSelection();
|
ClearSelection();
|
||||||
|
|
||||||
m_lines.Clear();
|
m_lines.Clear();
|
||||||
m_lines.Add( new wxSourceLine( wxT("") ) );
|
m_lines.Add( new wxSourceLine( wxEmptyString ) );
|
||||||
|
|
||||||
SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 );
|
SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 );
|
||||||
Refresh();
|
Refresh();
|
||||||
@@ -1736,7 +1736,7 @@ void wxTextCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
#if 0 // there is no middle button on iPAQs
|
#if 0 // there is no middle button on iPAQs
|
||||||
if (event.MiddleDown())
|
if (event.MiddleDown())
|
||||||
{
|
{
|
||||||
Paste( TRUE );
|
Paste( true );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1792,15 +1792,15 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
|
|||||||
{
|
{
|
||||||
switch (event.GetKeyCode())
|
switch (event.GetKeyCode())
|
||||||
{
|
{
|
||||||
case '4': event.m_keyCode = WXK_LEFT; break;
|
case '4': event.m_keyCode = WXK_LEFT; break;
|
||||||
case '8': event.m_keyCode = WXK_UP; break;
|
case '8': event.m_keyCode = WXK_UP; break;
|
||||||
case '6': event.m_keyCode = WXK_RIGHT; break;
|
case '6': event.m_keyCode = WXK_RIGHT; break;
|
||||||
case '2': event.m_keyCode = WXK_DOWN; break;
|
case '2': event.m_keyCode = WXK_DOWN; break;
|
||||||
case '9': event.m_keyCode = WXK_PRIOR; break;
|
case '9': event.m_keyCode = WXK_PAGEUP; break;
|
||||||
case '3': event.m_keyCode = WXK_NEXT; break;
|
case '3': event.m_keyCode = WXK_PAGEDOWN; break;
|
||||||
case '7': event.m_keyCode = WXK_HOME; break;
|
case '7': event.m_keyCode = WXK_HOME; break;
|
||||||
case '1': event.m_keyCode = WXK_END; break;
|
case '1': event.m_keyCode = WXK_END; break;
|
||||||
case '0': event.m_keyCode = WXK_INSERT; break;
|
case '0': event.m_keyCode = WXK_INSERT; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1868,7 +1868,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
|
|||||||
m_ignoreInput = true;
|
m_ignoreInput = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case WXK_PRIOR:
|
case WXK_PAGEUP:
|
||||||
{
|
{
|
||||||
if (m_ignoreInput) return;
|
if (m_ignoreInput) return;
|
||||||
MoveCursor( m_cursorX, wxMax( 0, m_cursorY-size_y ), event.ShiftDown() );
|
MoveCursor( m_cursorX, wxMax( 0, m_cursorY-size_y ), event.ShiftDown() );
|
||||||
@@ -2407,4 +2407,3 @@ bool wxTextCtrl::ScrollPages(int pages)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user