wxMotif fixes and common fixes for socket compilation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-07-27 20:12:16 +00:00
parent 2d61b48d14
commit 813c20a67e
8 changed files with 33 additions and 16 deletions

View File

@ -55,8 +55,8 @@ public:
~wxListBox();
virtual void Append(const wxString& item);
virtual void Append(const wxString& item, char *clientData);
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
virtual void Append(const wxString& item, void *clientData);
virtual void Set(int n, const wxString* choices, void **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear();
virtual void SetSelection(int n, bool select = TRUE);
@ -66,9 +66,9 @@ public:
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
virtual char *GetClientData(int n) const ;
virtual void *GetClientData(int n) const ;
virtual void *GetClientData() { return wxWindow::GetClientData(); }
virtual void SetClientData(int n, char *clientData);
virtual void SetClientData(int n, void *clientData);
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
virtual void SetString(int n, const wxString& s);

View File

@ -20,7 +20,7 @@ WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// Single-line text item
class WXDLLEXPORT wxTextCtrl : public wxControl
class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
{
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
@ -95,7 +95,7 @@ public:
virtual bool IsModified() const;
virtual long XYToPosition(long x, long y) const;
virtual void PositionToXY(long pos, long *x, long *y) const;
virtual bool PositionToXY(long pos, long *x, long *y) const;
virtual void ShowPosition(long pos);
virtual void Clear();

View File

@ -1146,7 +1146,7 @@ void wxListMainWindow::DeleteLine( wxListLineData *line )
void wxListMainWindow::EditLabel( long item )
{
wxNode *node = m_lines.Nth( item );
wxCHECK_MSG( node, (wxTextCtrl *)NULL, _T("wrong index in wxListCtrl::Edit()") );
wxCHECK_RET( node, _T("wrong index in wxListCtrl::Edit()") );
m_currentEdit = (wxListLineData*) node->Data();

View File

@ -4,6 +4,11 @@
// Purpose: GSocket: Motif part
// CVSID: $Id$
// -------------------------------------------------------------------------
#include "wx/setup.h"
#if wxUSE_SOCKETS
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <wx/gsocket.h>
@ -113,3 +118,5 @@ unsigned long GSocket_GetEventID(GSocket *socket)
void GSocket_DoEvent(unsigned long evt_id)
{
}
#endif // wxUSE_SOCKETS

View File

@ -226,7 +226,7 @@ void wxListBox::Append(const wxString& item)
m_noItems ++;
}
void wxListBox::Append(const wxString& item, char *clientData)
void wxListBox::Append(const wxString& item, void *clientData)
{
int width1, height1;
int width2, height2;
@ -272,7 +272,7 @@ void wxListBox::Append(const wxString& item, char *clientData)
m_noItems ++;
}
void wxListBox::Set(int n, const wxString *choices, char** clientData)
void wxListBox::Set(int n, const wxString *choices, void** clientData)
{
m_clientDataList.Clear();
int width1, height1;
@ -427,16 +427,16 @@ void wxListBox::Deselect(int N)
XmListDeselectPos ((Widget) m_mainWidget, N + 1);
}
char *wxListBox::GetClientData(int N) const
void *wxListBox::GetClientData(int N) const
{
wxNode *node = m_clientDataList.Find ((long) N);
if (node)
return (char *) node->Data ();
return (void *) node->Data ();
else
return NULL;
}
void wxListBox::SetClientData(int N, char *Client_data)
void wxListBox::SetClientData(int N, void *Client_data)
{
wxNode *node = m_clientDataList.Find ((long) N);
if (node)

View File

@ -522,11 +522,16 @@ long wxTextCtrl::XYToPosition(long x, long y) const
return r+x;
}
void wxTextCtrl::PositionToXY(long pos, long *x, long *y) const
bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const
{
Position xx, yy;
XmTextPosToXY((Widget) m_mainWidget, pos, &xx, &yy);
*x = xx; *y = yy;
if ( x )
*x = xx;
if ( y )
*y = yy;
return TRUE;
}
void wxTextCtrl::ShowPosition(long pos)

View File

@ -217,7 +217,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
{
wxCHECK_MSG( parent, FALSE, "can't create wxWindow without parent" );
CreateBase(parent, id, pos, size, style, name);
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
parent->AddChild(this);

View File

@ -6,6 +6,10 @@
* -------------------------------------------------------------------------
*/
#include "wx/setup.h"
#if wxUSE_SOCKETS
#include <assert.h>
#include <sys/ioctl.h>
#include <sys/types.h>
@ -35,7 +39,6 @@
#include <signal.h>
#include "wx/setup.h"
#include "wx/gsocket.h"
#include "gsockunx.h"
@ -968,3 +971,5 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
return GSOCK_NOERROR;
}
#endif // wxUSE_SOCKETS