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:
@@ -55,8 +55,8 @@ public:
|
|||||||
~wxListBox();
|
~wxListBox();
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
virtual void Append(const wxString& item, char *clientData);
|
virtual void Append(const wxString& item, void *clientData);
|
||||||
virtual void Set(int n, const wxString* choices, char **clientData = NULL);
|
virtual void Set(int n, const wxString* choices, void **clientData = NULL);
|
||||||
virtual int FindString(const wxString& s) const ;
|
virtual int FindString(const wxString& s) const ;
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
virtual void SetSelection(int n, bool select = TRUE);
|
virtual void SetSelection(int n, bool select = TRUE);
|
||||||
@@ -66,9 +66,9 @@ public:
|
|||||||
// For single choice list item only
|
// For single choice list item only
|
||||||
virtual int GetSelection() const ;
|
virtual int GetSelection() const ;
|
||||||
virtual void Delete(int n);
|
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 *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 SetClientData( void *data ) { wxWindow::SetClientData(data); }
|
||||||
virtual void SetString(int n, const wxString& s);
|
virtual void SetString(int n, const wxString& s);
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
|
|||||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||||
|
|
||||||
// Single-line text item
|
// Single-line text item
|
||||||
class WXDLLEXPORT wxTextCtrl : public wxControl
|
class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
virtual bool IsModified() const;
|
virtual bool IsModified() const;
|
||||||
|
|
||||||
virtual long XYToPosition(long x, long y) 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 ShowPosition(long pos);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
|
@@ -1146,7 +1146,7 @@ void wxListMainWindow::DeleteLine( wxListLineData *line )
|
|||||||
void wxListMainWindow::EditLabel( long item )
|
void wxListMainWindow::EditLabel( long item )
|
||||||
{
|
{
|
||||||
wxNode *node = m_lines.Nth( 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();
|
m_currentEdit = (wxListLineData*) node->Data();
|
||||||
|
|
||||||
|
@@ -4,6 +4,11 @@
|
|||||||
// Purpose: GSocket: Motif part
|
// Purpose: GSocket: Motif part
|
||||||
// CVSID: $Id$
|
// CVSID: $Id$
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "wx/setup.h"
|
||||||
|
|
||||||
|
#if wxUSE_SOCKETS
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <X11/Intrinsic.h>
|
#include <X11/Intrinsic.h>
|
||||||
#include <wx/gsocket.h>
|
#include <wx/gsocket.h>
|
||||||
@@ -113,3 +118,5 @@ unsigned long GSocket_GetEventID(GSocket *socket)
|
|||||||
void GSocket_DoEvent(unsigned long evt_id)
|
void GSocket_DoEvent(unsigned long evt_id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SOCKETS
|
||||||
|
@@ -226,7 +226,7 @@ void wxListBox::Append(const wxString& item)
|
|||||||
m_noItems ++;
|
m_noItems ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::Append(const wxString& item, char *clientData)
|
void wxListBox::Append(const wxString& item, void *clientData)
|
||||||
{
|
{
|
||||||
int width1, height1;
|
int width1, height1;
|
||||||
int width2, height2;
|
int width2, height2;
|
||||||
@@ -272,7 +272,7 @@ void wxListBox::Append(const wxString& item, char *clientData)
|
|||||||
m_noItems ++;
|
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();
|
m_clientDataList.Clear();
|
||||||
int width1, height1;
|
int width1, height1;
|
||||||
@@ -427,16 +427,16 @@ void wxListBox::Deselect(int N)
|
|||||||
XmListDeselectPos ((Widget) m_mainWidget, N + 1);
|
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);
|
wxNode *node = m_clientDataList.Find ((long) N);
|
||||||
if (node)
|
if (node)
|
||||||
return (char *) node->Data ();
|
return (void *) node->Data ();
|
||||||
else
|
else
|
||||||
return NULL;
|
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);
|
wxNode *node = m_clientDataList.Find ((long) N);
|
||||||
if (node)
|
if (node)
|
||||||
|
@@ -522,11 +522,16 @@ long wxTextCtrl::XYToPosition(long x, long y) const
|
|||||||
return r+x;
|
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;
|
Position xx, yy;
|
||||||
XmTextPosToXY((Widget) m_mainWidget, pos, &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)
|
void wxTextCtrl::ShowPosition(long pos)
|
||||||
|
@@ -217,7 +217,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( parent, FALSE, "can't create wxWindow without parent" );
|
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);
|
parent->AddChild(this);
|
||||||
|
|
||||||
|
@@ -6,6 +6,10 @@
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "wx/setup.h"
|
||||||
|
|
||||||
|
#if wxUSE_SOCKETS
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -35,7 +39,6 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/gsocket.h"
|
#include "wx/gsocket.h"
|
||||||
#include "gsockunx.h"
|
#include "gsockunx.h"
|
||||||
|
|
||||||
@@ -968,3 +971,5 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
|
|||||||
|
|
||||||
return GSOCK_NOERROR;
|
return GSOCK_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SOCKETS
|
||||||
|
Reference in New Issue
Block a user