git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38409
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
13 files changed:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: contrib/src/deprecated/proplist.cpp
// Purpose: Property list classes
// Author: Julian Smart
// Modified by:
// Purpose: Property list classes
// Author: Julian Smart
// Modified by:
wxString theString(name);
int nameWidth = 25;
wxString theString(name);
int nameWidth = 25;
- int padWith = nameWidth - theString.Length();
+ int padWith = nameWidth - theString.length();
if (padWith < 0)
padWith = 0;
if (padWith < 0)
padWith = 0;
}
m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, wxEmptyString,
}
m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, wxEmptyString,
- wxDefaultPosition, wxSize(wxDefaultCoord, smallButtonSize.y), wxPROCESS_ENTER);
+ wxDefaultPosition, wxSize(wxDefaultCoord, smallButtonSize.y), wxTE_PROCESS_ENTER);
m_valueText->Disable();
topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder );
m_valueText->Disable();
topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder );
dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
wxID_PROP_SL_TEXT, wxEmptyString, wxPoint(5, 240),
dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
wxID_PROP_SL_TEXT, wxEmptyString, wxPoint(5, 240),
- wxSize(300, wxDefaultCoord), wxPROCESS_ENTER);
+ wxSize(300, wxDefaultCoord), wxTE_PROCESS_ENTER);
dialog->m_stringText->Disable();
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxDefaultPosition, wxSize(largeButtonWidth, largeButtonHeight));
dialog->m_stringText->Disable();
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxDefaultPosition, wxSize(largeButtonWidth, largeButtonHeight));
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: contrib/src/deprecated/resource.cpp
// Purpose: Resource system
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Purpose: Resource system
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
{ wxT("wxGA_VERTICAL"), wxGA_VERTICAL },
/* wxTextCtrl */
{ wxT("wxGA_VERTICAL"), wxGA_VERTICAL },
/* wxTextCtrl */
- { wxT("wxPASSWORD"), wxPASSWORD},
- { wxT("wxPROCESS_ENTER"), wxPROCESS_ENTER},
+#if WXWIN_COMPATIBILITY_2_6
+ { wxT("wxPASSWORD"), wxTE_PASSWORD},
+ { wxT("wxPROCESS_ENTER"), wxTE_PROCESS_ENTER},
+#endif
{ wxT("wxTE_PASSWORD"), wxTE_PASSWORD},
{ wxT("wxTE_READONLY"), wxTE_READONLY},
{ wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER},
{ wxT("wxTE_PASSWORD"), wxTE_PASSWORD},
{ wxT("wxTE_READONLY"), wxTE_READONLY},
{ wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER},
#endif // VC++
#endif // wxUSE_WX_RESOURCES
#endif // VC++
#endif // wxUSE_WX_RESOURCES
-#else // !wxUSE_LONGLONG
+#else /* !wxUSE_LONGLONG */
/* always show an entire number of rows */
#define wxLB_INT_HEIGHT 0x0800
/* always show an entire number of rows */
#define wxLB_INT_HEIGHT 0x0800
-/* deprecated synonyms */
-#define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */
-#define wxPASSWORD 0x0800 /* wxTE_PASSWORD */
+#if WXWIN_COMPATIBILITY_2_6
+ /* deprecated synonyms */
+ #define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */
+ #define wxPASSWORD 0x0800 /* wxTE_PASSWORD */
+#endif
/*
* wxComboBox style flags
/*
* wxComboBox style flags
m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
wxPoint(20,25), wxSize(120, wxDefaultCoord),
5, choices,
m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
wxPoint(20,25), wxSize(120, wxDefaultCoord),
5, choices,
(void)new wxButton( panel, ID_COMBO_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) );
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
- m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER );
+ m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 );
mainsizer->Add( textsizer, 0, wxEXPAND );
textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 );
mainsizer->Add( textsizer, 0, wxEXPAND );
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
- m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER );
+ m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
textsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
mainsizer->Add( textsizer, 0, wxEXPAND );
textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
textsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
mainsizer->Add( textsizer, 0, wxEXPAND );
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/gtk/spinbutt.cpp
// Purpose: wxSpinCtrl
// Author: Robert
// Modified by:
// Purpose: wxSpinCtrl
// Author: Robert
// Modified by:
int min, int max, int initial,
const wxString& name)
{
int min, int max, int initial,
const wxString& name)
{
- m_needParent = TRUE;
- m_acceptsFocus = TRUE;
+ m_needParent = true;
+ m_acceptsFocus = true;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
}
void wxSpinCtrl::GtkDisableEvents()
}
void wxSpinCtrl::GtkDisableEvents()
- if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
+ if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{
- if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE;
+ if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return true;
- if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE;
+ if (GTK_SPIN_BUTTON(m_widget)->panel == window) return true;
}
wxSize wxSpinCtrl::DoGetBestSize() const
}
wxSize wxSpinCtrl::DoGetBestSize() const
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/gtk/textctrl.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Purpose:
// Author: Robert Roebling
// Id: $Id$
else
{
wxString str = GetLineText (lineNo);
else
{
wxString str = GetLineText (lineNo);
- return (int) str.Length();
+ return (int) str.length();
// If the last character in the text buffer is a newline,
// gtk_text_view_forward_display_line() will return false without that
// line being counted. Must add one manually in that case.
// If the last character in the text buffer is a newline,
// gtk_text_view_forward_display_line() will return false without that
// line being counted. Must add one manually in that case.
- GtkTextIter lastCharIter;
+ GtkTextIter lastCharIter;
gtk_text_buffer_get_iter_at_offset
(
m_buffer,
gtk_text_buffer_get_iter_at_offset
(
m_buffer,
if (from == -1 && to == -1)
{
from = 0;
if (from == -1 && to == -1)
{
from = 0;
- to = GetValue().Length();
+ to = GetValue().length();
}
if (m_windowStyle & wxTE_MULTILINE)
}
if (m_windowStyle & wxTE_MULTILINE)
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
- if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
+ if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/gtk1/spinbutt.cpp
// Purpose: wxSpinCtrl
// Author: Robert
// Modified by:
// Purpose: wxSpinCtrl
// Author: Robert
// Modified by:
int min, int max, int initial,
const wxString& name)
{
int min, int max, int initial,
const wxString& name)
{
- m_needParent = TRUE;
- m_acceptsFocus = TRUE;
+ m_needParent = true;
+ m_acceptsFocus = true;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
}
void wxSpinCtrl::GtkDisableEvents()
}
void wxSpinCtrl::GtkDisableEvents()
- if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
+ if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
{
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this);
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{
- if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE;
+ if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return true;
- if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE;
+ if (GTK_SPIN_BUTTON(m_widget)->panel == window) return true;
}
wxSize wxSpinCtrl::DoGetBestSize() const
}
wxSize wxSpinCtrl::DoGetBestSize() const
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/gtk1/textctrl.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Purpose:
// Author: Robert Roebling
// Id: $Id$
wxWX2MBbuf val = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), val, strlen(val), &tmp );
#else
wxWX2MBbuf val = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), val, strlen(val), &tmp );
#else
- gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &tmp );
+ gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.length(), &tmp );
gint len = gtk_text_get_length( GTK_TEXT(m_text) );
gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len );
len = 0;
gint len = gtk_text_get_length( GTK_TEXT(m_text) );
gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len );
len = 0;
- gtk_editable_insert_text( GTK_EDITABLE(m_text), value.mbc_str(), value.Length(), &len );
+ gtk_editable_insert_text( GTK_EDITABLE(m_text), value.mbc_str(), value.length(), &len );
int wxTextCtrl::GetLineLength(long lineNo) const
{
wxString str = GetLineText (lineNo);
int wxTextCtrl::GetLineLength(long lineNo) const
{
wxString str = GetLineText (lineNo);
- return (int) str.Length();
+ return (int) str.length();
}
int wxTextCtrl::GetNumberOfLines() const
}
int wxTextCtrl::GetNumberOfLines() const
if (from == -1 && to == -1)
{
from = 0;
if (from == -1 && to == -1)
{
from = 0;
- to = GetValue().Length();
+ to = GetValue().length();
}
if ( (m_windowStyle & wxTE_MULTILINE) &&
}
if ( (m_windowStyle & wxTE_MULTILINE) &&
wxWX2MBbuf buf = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), buf, strlen(buf), &pos );
#else
wxWX2MBbuf buf = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), buf, strlen(buf), &pos );
#else
- gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
+ gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.length(), &pos );
#endif // wxUSE_UNICODE
}
}
#endif // wxUSE_UNICODE
}
}
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
- if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
+ if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);
}
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 & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
// && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END
)
{
// && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END
)
{
// allow navigation and deletion
if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
// allow navigation and deletion
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) )
+ key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) )
)
{
// eat it, we don't want to add more than allowed # of characters
)
{
// eat it, we don't want to add more than allowed # of characters
switch ( key )
{
case WXK_RETURN:
switch ( key )
{
case WXK_RETURN:
- if (m_windowStyle & wxPROCESS_ENTER)
+ if (m_windowStyle & wxTE_PROCESS_ENTER)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
}
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 & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
)
{
/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
)
{
switch ( key )
{
case WXK_RETURN:
switch ( key )
{
case WXK_RETURN:
- if (m_windowStyle & wxPROCESS_ENTER)
+ if (m_windowStyle & wxTE_PROCESS_ENTER)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );
{
wxCHECK_MSG( win, 0, _T("should have a parent") );
{
wxCHECK_MSG( win, 0, _T("should have a parent") );
- if ( win->GetWindowStyle() & wxPROCESS_ENTER )
+ if ( win->GetWindowStyle() & wxTE_PROCESS_ENTER )
{
// need to return a custom dlg code or we'll never get it
return DLGC_WANTMESSAGE;
{
// need to return a custom dlg code or we'll never get it
return DLGC_WANTMESSAGE;
- if (m_windowStyle & wxPROCESS_ENTER)
+ if (m_windowStyle & wxTE_PROCESS_ENTER)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this);