// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
EVT_CHAR(wxTextCtrl::OnChar)
EVT_MENU(wxID_CUT, wxTextCtrl::OnCut)
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
EVT_CHAR(wxTextCtrl::OnChar)
EVT_MENU(wxID_CUT, wxTextCtrl::OnCut)
EVT_UPDATE_UI(wxID_UNDO, wxTextCtrl::OnUpdateUndo)
EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
END_EVENT_TABLE()
EVT_UPDATE_UI(wxID_UNDO, wxTextCtrl::OnUpdateUndo)
EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
END_EVENT_TABLE()
static void SetTXNData( TXNObject txn , const wxString& st , TXNOffset start , TXNOffset end )
{
#if wxUSE_UNICODE
#if SIZEOF_WCHAR_T == 2
static void SetTXNData( TXNObject txn , const wxString& st , TXNOffset start , TXNOffset end )
{
#if wxUSE_UNICODE
#if SIZEOF_WCHAR_T == 2
TXNSetData( txn , kTXNUnicodeTextData, (void*)st.wc_str(), len * 2,
start, end);
#else
TXNSetData( txn , kTXNUnicodeTextData, (void*)st.wc_str(), len * 2,
start, end);
#else
::SetControlData((ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
TEDelete( ((TEHandle) m_macTE) ) ;
::SetControlData((ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
TEDelete( ((TEHandle) m_macTE) ) ;
- !( 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_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
+/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
- wxWindow *parent = GetParent();
- while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL ) {
- parent = parent->GetParent() ;
- }
- if ( parent && parent->GetDefaultItem() )
+ wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
+ if ( tlw && tlw->GetDefaultItem() )
if ( def && def->IsEnabled() )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
if ( def && def->IsEnabled() )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );