1. more wxMotif fixes

2. wxGetNumberFromUser added
3. more compilation fixes when compiling without sockets


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-07-23 21:03:02 +00:00
parent c45a644eda
commit 31528cd3ca
63 changed files with 1153 additions and 1361 deletions

View File

@@ -127,6 +127,7 @@ libwx_gtk_la_SOURCES = \
imaglist.cpp \
laywin.cpp \
listctrl.cpp \
numdlgg.cpp \
panelg.cpp \
printps.cpp \
prntdlgg.cpp \

View File

@@ -59,7 +59,7 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
event.SetInt( combo->GetSelection() );
event.SetString( combo->GetStringSelection() );
event.SetEventObject( combo );
combo->GetEventHandler()->ProcessEvent( event );
}
@@ -71,7 +71,7 @@ static void
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!combo->m_hasVMT) return;
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
@@ -126,7 +126,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
/* don't send first event, which GTK sends aways when
inserting the first item */
m_alreadySent = TRUE;
GtkWidget *list_item = gtk_list_item_new_with_label( choices[i].mbc_str() );
m_clientDataList.Append( (wxObject*)NULL );
@@ -360,8 +360,6 @@ int wxComboBox::GetSelection() const
}
}
wxFAIL_MSG( _T("wxComboBox: no selection") );
return -1;
}
@@ -596,7 +594,7 @@ void wxComboBox::DisableEvents()
GList *child = list->children;
while (child)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
child = child->next;
@@ -619,7 +617,7 @@ void wxComboBox::EnableEvents()
void wxComboBox::OnSize( wxSizeEvent &event )
{
event.Skip();
return;
int w = 21;

View File

@@ -21,15 +21,18 @@
IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow)
wxControl::wxControl(void)
wxControl::wxControl()
{
m_needParent = TRUE;
}
wxControl::wxControl( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name ) :
wxWindow( parent, id, pos, size, style, name )
wxControl::wxControl( wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name )
: wxWindow( parent, id, pos, size, style, name )
{
}
@@ -40,10 +43,10 @@ void wxControl::Command( wxCommandEvent &WXUNUSED(event) )
void wxControl::SetLabel( const wxString &label )
{
m_label = _T("");
for ( const wxChar *pc = label; *pc != _T('\0'); pc++ )
for ( const wxChar *pc = label; *pc != _T('\0'); pc++ )
{
if ( *pc == _T('&') )
{
if ( *pc == _T('&') )
{
pc++; // skip it
#if 0 // it would be unused anyhow for now - kbd interface not done yet
if ( *pc != _T('&') ) m_chAccel = *pc;

View File

@@ -78,17 +78,18 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton,wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent);
BEGIN_EVENT_TABLE(wxSpinButton, wxControl)
EVT_SIZE(wxSpinButton::OnSize)
END_EVENT_TABLE()
wxSpinButton::wxSpinButton()
{
}
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
bool wxSpinButton::Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
m_needParent = TRUE;
@@ -201,15 +202,4 @@ void wxSpinButton::ApplyWidgetStyle()
gtk_widget_set_style( m_widget, m_widgetStyle );
}
//-----------------------------------------------------------------------------
// wxSpinEvent
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
wxSpinEvent::wxSpinEvent(wxEventType commandType, int id):
wxScrollEvent(commandType, id)
{
}
#endif
#endif

View File

@@ -46,7 +46,7 @@ void wxStaticBitmap::CreatePixmapWidget()
/* insert GTK representation */
(*m_parent->m_insertCallback)(m_parent, this);
gtk_widget_show( m_widget );
PostCreation();
@@ -81,7 +81,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
PostCreation();
}
m_parent->DoAddChild( this );
Show( TRUE );
@@ -100,17 +100,17 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
{
gtk_widget_destroy( m_widget );
/* recreate m_widget because we've created a label
and not a bitmap above */
/* recreate m_widget because we've created a label
and not a bitmap above */
CreatePixmapWidget();
}
else
{
else
{
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
}
}
SetSize( m_bitmap.GetWidth(), m_bitmap.GetHeight() );
}
}