Include order is wxprec.h=>defs.h=>platform.h=>setup.h so remove explicit setup.h inclusion not touched by chckconf.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/dcscreen.h"
|
#include "wx/dcscreen.h"
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -1048,4 +1047,3 @@ bool wxFont::IsFixedWidth() const
|
|||||||
|
|
||||||
return wxFontBase::IsFixedWidth();
|
return wxFontBase::IsFixedWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gdiobj.cpp
|
// Name: src/msw/gdiobj.cpp
|
||||||
// Purpose: wxGDIObject class
|
// Purpose: wxGDIObject class
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -58,4 +57,3 @@ void wxGDIObject::DecrementResourceUsage(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
* Project: GSocket (Generic Socket)
|
* Project: GSocket (Generic Socket)
|
||||||
* Name: gsocket.cpp
|
* Name: src/msw/gsocket.cpp
|
||||||
* Copyright: (c) Guilhem Lavaux
|
* Copyright: (c) Guilhem Lavaux
|
||||||
* Licence: wxWindows Licence
|
* Licence: wxWindows Licence
|
||||||
* Author: Guillermo Rodriguez Garcia <guille@iies.es>
|
* Author: Guillermo Rodriguez Garcia <guille@iies.es>
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
# include "wx/platform.h"
|
# include "wx/platform.h"
|
||||||
# include "wx/setup.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
||||||
@@ -1562,4 +1561,3 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *WXUNUSED(path), size
|
|||||||
typedef void (*wxDummy)();
|
typedef void (*wxDummy)();
|
||||||
|
|
||||||
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
||||||
|
|
||||||
|
@@ -52,7 +52,6 @@
|
|||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
# include "wx/platform.h"
|
# include "wx/platform.h"
|
||||||
# include "wx/setup.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#if wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
#if wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: msw/metafile.cpp
|
// Name: src/msw/metafile.cpp
|
||||||
// Purpose: wxMetafileDC etc.
|
// Purpose: wxMetafileDC etc.
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by: VZ 07.01.00: implemented wxMetaFileDataObject
|
// Modified by: VZ 07.01.00: implemented wxMetaFileDataObject
|
||||||
@@ -24,10 +24,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -197,7 +193,7 @@ wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, i
|
|||||||
m_minY = 10000;
|
m_minY = 10000;
|
||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
if ( !file.IsEmpty() && wxFileExists(file))
|
if ( !file.empty() && wxFileExists(file))
|
||||||
wxRemoveFile(file);
|
wxRemoveFile(file);
|
||||||
m_hDC = (WXHDC) CreateMetaFile(file);
|
m_hDC = (WXHDC) CreateMetaFile(file);
|
||||||
|
|
||||||
@@ -521,4 +517,3 @@ bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf)
|
|||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
#endif // wxUSE_METAFILE
|
#endif // wxUSE_METAFILE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: msw/ole/access.cpp
|
// Name: src/msw/ole/access.cpp
|
||||||
// Purpose: implementation of wxIAccessible and wxAccessible
|
// Purpose: implementation of wxIAccessible and wxAccessible
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -23,11 +23,10 @@
|
|||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/window.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/setup.h"
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/window.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_OLE && wxUSE_ACCESSIBILITY
|
#if wxUSE_OLE && wxUSE_ACCESSIBILITY
|
||||||
|
|
||||||
@@ -962,7 +961,7 @@ STDMETHODIMP wxIAccessible::get_accDescription ( VARIANT varID, BSTR* pszDescrip
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (description.IsEmpty())
|
if (description.empty())
|
||||||
{
|
{
|
||||||
* pszDescription = NULL;
|
* pszDescription = NULL;
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
@@ -1019,7 +1018,7 @@ STDMETHODIMP wxIAccessible::get_accHelp ( VARIANT varID, BSTR* pszHelp)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (helpString.IsEmpty())
|
if (helpString.empty())
|
||||||
{
|
{
|
||||||
* pszHelp = NULL;
|
* pszHelp = NULL;
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
@@ -1124,7 +1123,7 @@ STDMETHODIMP wxIAccessible::get_accKeyboardShortcut ( VARIANT varID, BSTR* pszKe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (keyboardShortcut.IsEmpty())
|
if (keyboardShortcut.empty())
|
||||||
{
|
{
|
||||||
* pszKeyboardShortcut = NULL;
|
* pszKeyboardShortcut = NULL;
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: msw/ole/dropsrc.cpp
|
// Name: src/msw/ole/dropsrc.cpp
|
||||||
// Purpose: implementation of wxIDropSource and wxDropSource
|
// Purpose: implementation of wxIDropSource and wxDropSource
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -23,11 +23,10 @@
|
|||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/window.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/setup.h"
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/window.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
|
#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: ole/droptgt.cpp
|
// Name: src/msw/ole/droptgt.cpp
|
||||||
// Purpose: wxDropTarget implementation
|
// Purpose: wxDropTarget implementation
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -24,8 +24,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
|
#if wxUSE_OLE && wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: ole/oleutils.cpp
|
// Name: src/msw/ole/oleutils.cpp
|
||||||
// Purpose: implementation of OLE helper functions
|
// Purpose: implementation of OLE helper functions
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -24,7 +24,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
#if wxUSE_OLE
|
#if wxUSE_OLE
|
||||||
@@ -109,9 +108,9 @@ wxBasicString::wxBasicString(const char *sz)
|
|||||||
wxBasicString::wxBasicString(const wxString& str)
|
wxBasicString::wxBasicString(const wxString& str)
|
||||||
{
|
{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
m_wzBuf = new OLECHAR[str.Length() + 1];
|
m_wzBuf = new OLECHAR[str.length() + 1];
|
||||||
memcpy(m_wzBuf, str.c_str(), str.Length()*2);
|
memcpy(m_wzBuf, str.c_str(), str.length()*2);
|
||||||
m_wzBuf[str.Length()] = L'\0';
|
m_wzBuf[str.length()] = L'\0';
|
||||||
#else
|
#else
|
||||||
Init(str.c_str());
|
Init(str.c_str());
|
||||||
#endif
|
#endif
|
||||||
@@ -306,4 +305,3 @@ void wxLogRelease(const char *szInterface, ULONG cRef)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_OLE
|
// wxUSE_OLE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: ole/uuid.cpp
|
// Name: src/msw/ole/uuid.cpp
|
||||||
// Purpose: implements Uuid class, see uuid.h for details
|
// Purpose: implements Uuid class, see uuid.h for details
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -20,8 +20,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if wxUSE_OLE && ( wxUSE_DRAG_AND_DROP || (defined(__WXDEBUG__) && wxUSE_DATAOBJ) )
|
#if wxUSE_OLE && ( wxUSE_DRAG_AND_DROP || (defined(__WXDEBUG__) && wxUSE_DATAOBJ) )
|
||||||
|
|
||||||
// standard headers
|
// standard headers
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: penwin.cpp
|
// Name: src/msw/penwin.cpp
|
||||||
// Purpose: PenWindows code
|
// Purpose: PenWindows code
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -17,8 +17,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
#include "wx/window.h"
|
||||||
#include "wx/window.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
@@ -113,4 +112,3 @@ void wxCleanUpPenWin(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
@@ -307,7 +306,7 @@ void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
// if other windows are size deferred
|
// if other windows are size deferred
|
||||||
::SetWindowPos(GetHwnd(), NULL, x, y, width, height,
|
::SetWindowPos(GetHwnd(), NULL, x, y, width, height,
|
||||||
SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE
|
SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE
|
||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
| SWP_NOCOPYBITS | SWP_NOSENDCHANGING
|
| SWP_NOCOPYBITS | SWP_NOSENDCHANGING
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
#include "wx/msw/wrapwin.h"
|
#include "wx/msw/wrapwin.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/accel.h"
|
#include "wx/accel.h"
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
@@ -941,7 +940,7 @@ void wxWindowMSW::SetScrollbar(int orient,
|
|||||||
// We have to set the variables here to make them valid in events
|
// We have to set the variables here to make them valid in events
|
||||||
// triggered by ::SetScrollInfo()
|
// triggered by ::SetScrollInfo()
|
||||||
*(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize;
|
*(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize;
|
||||||
|
|
||||||
::SetScrollInfo(hWnd, orient == wxHORIZONTAL ? SB_HORZ : SB_VERT,
|
::SetScrollInfo(hWnd, orient == wxHORIZONTAL ? SB_HORZ : SB_VERT,
|
||||||
&info, refresh);
|
&info, refresh);
|
||||||
}
|
}
|
||||||
@@ -1095,8 +1094,8 @@ bool wxCheckWindowWndProc(WXHWND hWnd,
|
|||||||
// TODO: This list of window class names should be factored out so they can be
|
// TODO: This list of window class names should be factored out so they can be
|
||||||
// managed in one place and then accessed from here and other places, such as
|
// managed in one place and then accessed from here and other places, such as
|
||||||
// wxApp::RegisterWindowClasses() and wxApp::UnregisterWindowClasses()
|
// wxApp::RegisterWindowClasses() and wxApp::UnregisterWindowClasses()
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
extern wxChar *wxCanvasClassName;
|
extern wxChar *wxCanvasClassName;
|
||||||
extern wxChar *wxCanvasClassNameNR;
|
extern wxChar *wxCanvasClassNameNR;
|
||||||
#else
|
#else
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: accel.cpp
|
// Name: src/os2/accel.cpp
|
||||||
// Purpose: wxAcceleratorTable
|
// Purpose: wxAcceleratorTable
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
@@ -12,10 +12,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: cursor.cpp
|
// Name: src/os2/cursor.cpp
|
||||||
// Purpose: wxCursor class
|
// Purpose: wxCursor class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: font.cpp
|
// Name: src/os2/font.cpp
|
||||||
// Purpose: wxFont class
|
// Purpose: wxFont class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -1115,7 +1114,7 @@ bool wxFont::GetUnderlined() const
|
|||||||
|
|
||||||
wxString wxFont::GetFaceName() const
|
wxString wxFont::GetFaceName() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
|
wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
|
||||||
|
|
||||||
return M_FONTDATA->GetFaceName();
|
return M_FONTDATA->GetFaceName();
|
||||||
} // end of wxFont::GetFaceName
|
} // end of wxFont::GetFaceName
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: metafile.cpp
|
// Name: src/os2/metafile.cpp
|
||||||
// Purpose: wxMetaFile, wxMetaFileDC etc. These classes are optional.
|
// Purpose: wxMetaFile, wxMetaFileDC etc. These classes are optional.
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -12,10 +12,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_METAFILE
|
#if wxUSE_METAFILE
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -62,7 +58,7 @@ wxMetafile::wxMetafile(const wxString& file)
|
|||||||
|
|
||||||
M_METAFILEDATA->m_windowsMappingMode = wxMM_ANISOTROPIC;
|
M_METAFILEDATA->m_windowsMappingMode = wxMM_ANISOTROPIC;
|
||||||
M_METAFILEDATA->m_metafile = 0;
|
M_METAFILEDATA->m_metafile = 0;
|
||||||
if (!file.IsNull() && (file.Cmp(wxT("")) == 0))
|
if (!file.empty())
|
||||||
M_METAFILEDATA->m_metafile = (WXHANDLE)0; // TODO: GetMetaFile(file);
|
M_METAFILEDATA->m_metafile = (WXHANDLE)0; // TODO: GetMetaFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +140,7 @@ wxMetafileDC::wxMetafileDC(const wxString& file)
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
/*
|
/*
|
||||||
if (!file.IsNull() && (file != wxT("")))
|
if (!file.empty())
|
||||||
m_hDC = (WXHDC) CreateMetaFile(file);
|
m_hDC = (WXHDC) CreateMetaFile(file);
|
||||||
else
|
else
|
||||||
m_hDC = (WXHDC) CreateMetaFile(NULL);
|
m_hDC = (WXHDC) CreateMetaFile(NULL);
|
||||||
@@ -170,7 +166,7 @@ wxMetafileDC::wxMetafileDC( const wxString& file,
|
|||||||
m_minY = 10000;
|
m_minY = 10000;
|
||||||
m_maxX = -10000;
|
m_maxX = -10000;
|
||||||
m_maxY = -10000;
|
m_maxY = -10000;
|
||||||
if (file != wxT("") && wxFileExists(file))
|
if (!file.empty() && wxFileExists(file))
|
||||||
wxRemoveFile(file);
|
wxRemoveFile(file);
|
||||||
|
|
||||||
// m_hDC = (WXHDC) CreateMetaFile(file);
|
// m_hDC = (WXHDC) CreateMetaFile(file);
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/os2/private.h"
|
#include "wx/os2/private.h"
|
||||||
#include "wx/palette.h"
|
#include "wx/palette.h"
|
||||||
|
@@ -13,13 +13,12 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
#include "wx/list.h"
|
||||||
#include "wx/list.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/app.h"
|
||||||
#include "wx/app.h"
|
#include "wx/pen.h"
|
||||||
#include "wx/pen.h"
|
#include "wx/log.h"
|
||||||
#include "wx/log.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/os2/private.h"
|
#include "wx/os2/private.h"
|
||||||
|
@@ -12,11 +12,10 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
#include "wx/list.h"
|
||||||
#include "wx/list.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/app.h"
|
||||||
#include "wx/app.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_PRINTING_ARCHITECTURE
|
#if wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/wxchar.h"
|
#include "wx/wxchar.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
@@ -86,7 +85,7 @@ wxRadioBox::~wxRadioBox()
|
|||||||
wxRemoveHandleAssociation(pWin);
|
wxRemoveHandleAssociation(pWin);
|
||||||
|
|
||||||
::WinDestroyWindow((HWND)m_ahRadioButtons[i]);
|
::WinDestroyWindow((HWND)m_ahRadioButtons[i]);
|
||||||
}
|
}
|
||||||
delete[] m_ahRadioButtons;
|
delete[] m_ahRadioButtons;
|
||||||
}
|
}
|
||||||
if (m_pnRadioWidth)
|
if (m_pnRadioWidth)
|
||||||
@@ -620,11 +619,9 @@ void wxRadioBox::GetSize( int* pnWidth, int* pnHeight ) const
|
|||||||
} // end of wxRadioBox::GetSize
|
} // end of wxRadioBox::GetSize
|
||||||
|
|
||||||
// Find string for position
|
// Find string for position
|
||||||
wxString wxRadioBox::GetString(
|
wxString wxRadioBox::GetString( int nNum ) const
|
||||||
int nNum
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IsValid(nNum), wxString(""), wxT("invalid radiobox index") );
|
wxCHECK_MSG( IsValid(nNum), wxEmptyString, wxT("invalid radiobox index") );
|
||||||
return wxGetWindowText(m_ahRadioButtons[nNum]);
|
return wxGetWindowText(m_ahRadioButtons[nNum]);
|
||||||
} // end of wxRadioBox::GetString
|
} // end of wxRadioBox::GetString
|
||||||
|
|
||||||
@@ -655,8 +652,8 @@ wxSize wxRadioBox::GetTotalButtonSize( const wxSize& rSizeBtn ) const
|
|||||||
//
|
//
|
||||||
// And also wide enough for its label
|
// And also wide enough for its label
|
||||||
//
|
//
|
||||||
wxString sStr = wxGetWindowText(GetHwnd());
|
wxString sStr = wxGetWindowText(GetHwnd());
|
||||||
if (!sStr.IsEmpty())
|
if (!sStr.empty())
|
||||||
{
|
{
|
||||||
GetTextExtent( sStr
|
GetTextExtent( sStr
|
||||||
,&nWidthLabel
|
,&nWidthLabel
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: radiobut.cpp
|
// Name: src/os2/radiobut.cpp
|
||||||
// Purpose: wxRadioButton
|
// Purpose: wxRadioButton
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -17,12 +17,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
#include "wx/radiobut.h"
|
||||||
#include "wx/radiobut.h"
|
#include "wx/brush.h"
|
||||||
#include "wx/brush.h"
|
#include "wx/dcscreen.h"
|
||||||
#include "wx/dcscreen.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/settings.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/os2/private.h"
|
#include "wx/os2/private.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: timer.cpp
|
// Name: src/os2/timer.cpp
|
||||||
// Purpose: wxTimer implementation
|
// Purpose: wxTimer implementation
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -12,16 +12,14 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/window.h"
|
|
||||||
#include "wx/os2/private.h"
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
#include "wx/window.h"
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/os2/private.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
@@ -206,4 +204,3 @@ ULONG wxTimerProc(
|
|||||||
wxProcessTimer(*(node->second));
|
wxProcessTimer(*(node->second));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: utilsexec.cpp
|
// Name: src/os2/utilsexec.cpp
|
||||||
// Purpose: Various utilities
|
// Purpose: Various utilities
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -13,10 +13,9 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/app.h"
|
||||||
#include "wx/app.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/intl.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: os2/utilsgui.cpp
|
// Name: src/os2/utilsgui.cpp
|
||||||
// Purpose: Various utility functions only available in GUI
|
// Purpose: Various utility functions only available in GUI
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
@@ -69,7 +68,7 @@ bool wxWriteResource(
|
|||||||
HAB hab = 0;
|
HAB hab = 0;
|
||||||
HINI hIni = 0;
|
HINI hIni = 0;
|
||||||
|
|
||||||
if (rFile != "")
|
if (!rFile.empty())
|
||||||
{
|
{
|
||||||
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
||||||
if (hIni != 0L)
|
if (hIni != 0L)
|
||||||
@@ -153,7 +152,7 @@ bool wxGetResource(
|
|||||||
wxChar zDefunkt[] = _T("$$default");
|
wxChar zDefunkt[] = _T("$$default");
|
||||||
char zBuf[1000];
|
char zBuf[1000];
|
||||||
|
|
||||||
if (rFile != "")
|
if (!rFile.empty())
|
||||||
{
|
{
|
||||||
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST rFile);
|
||||||
if (hIni != 0L)
|
if (hIni != 0L)
|
||||||
@@ -484,7 +483,7 @@ void wxGUIAppTraits::TerminateGui(unsigned long ulHab)
|
|||||||
|
|
||||||
wxToolkitInfo & wxGUIAppTraits::GetToolkitInfo()
|
wxToolkitInfo & wxGUIAppTraits::GetToolkitInfo()
|
||||||
{
|
{
|
||||||
static wxToolkitInfo vInfo;
|
static wxToolkitInfo vInfo;
|
||||||
ULONG ulSysInfo[QSV_MAX] = {0};
|
ULONG ulSysInfo[QSV_MAX] = {0};
|
||||||
APIRET ulrc;
|
APIRET ulrc;
|
||||||
|
|
||||||
@@ -512,44 +511,40 @@ wxToolkitInfo & wxGUIAppTraits::GetToolkitInfo()
|
|||||||
// window information functions
|
// window information functions
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
wxString WXDLLEXPORT wxGetWindowText(
|
wxString WXDLLEXPORT wxGetWindowText( WXHWND hWnd )
|
||||||
WXHWND hWnd
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
wxString vStr;
|
wxString vStr;
|
||||||
|
|
||||||
if ( hWnd )
|
if ( hWnd )
|
||||||
{
|
{
|
||||||
long lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
|
long lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
|
||||||
::WinQueryWindowText((HWND)hWnd, lLen, (PSZ)(wxChar*)wxStringBuffer(vStr, lLen));
|
::WinQueryWindowText((HWND)hWnd, lLen, (PSZ)(wxChar*)wxStringBuffer(vStr, lLen));
|
||||||
}
|
}
|
||||||
|
|
||||||
return vStr;
|
return vStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString WXDLLEXPORT wxGetWindowClass(
|
wxString WXDLLEXPORT wxGetWindowClass( WXHWND hWnd )
|
||||||
WXHWND hWnd
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
wxString vStr;
|
wxString vStr;
|
||||||
if ( hWnd )
|
if ( hWnd )
|
||||||
{
|
{
|
||||||
int nLen = 256; // some starting value
|
int nLen = 256; // some starting value
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
int nCount = ::WinQueryClassName((HWND)hWnd, nLen, (PSZ)(wxChar*)wxStringBuffer(vStr, nLen));
|
int nCount = ::WinQueryClassName((HWND)hWnd, nLen, (PSZ)(wxChar*)wxStringBuffer(vStr, nLen));
|
||||||
|
|
||||||
if (nCount == nLen )
|
if (nCount == nLen )
|
||||||
{
|
{
|
||||||
// the class name might have been truncated, retry with larger
|
// the class name might have been truncated, retry with larger
|
||||||
// buffer
|
// buffer
|
||||||
nLen *= 2;
|
nLen *= 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return vStr;
|
return vStr;
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/accel.h"
|
#include "wx/accel.h"
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
@@ -24,10 +24,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -203,4 +199,3 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_CLIPBOARD
|
#endif // wxUSE_CLIPBOARD
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/dcscreen.h"
|
#include "wx/dcscreen.h"
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -523,4 +522,3 @@ bool wxFont::IsFixedWidth() const
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -38,4 +37,3 @@ void wxGDIObject::DecrementResourceUsage(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#if wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
#if wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -407,4 +406,3 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
#endif // wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
||||||
|
|
||||||
|
@@ -24,10 +24,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
@@ -190,4 +186,3 @@ bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf)
|
|||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
#endif // wxUSE_METAFILE
|
#endif // wxUSE_METAFILE
|
||||||
|
|
||||||
|
@@ -17,12 +17,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "wx/setup.h"
|
#include "wx/list.h"
|
||||||
#include "wx/list.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/app.h"
|
||||||
#include "wx/app.h"
|
#include "wx/pen.h"
|
||||||
#include "wx/pen.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int wx2msPenStyle(int wx_style);
|
static int wx2msPenStyle(int wx_style);
|
||||||
|
@@ -17,10 +17,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/setup.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/dcclient.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_NATIVE_STATUSBAR
|
#if wxUSE_NATIVE_STATUSBAR
|
||||||
@@ -269,4 +268,3 @@ void wxStatusBarPalm::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_NATIVE_STATUSBAR
|
#endif // wxUSE_NATIVE_STATUSBAR
|
||||||
|
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/accel.h"
|
#include "wx/accel.h"
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// -*- c++ -*- ////////////////////////////////////////////////////////////////
|
// -*- c++ -*- ////////////////////////////////////////////////////////////////
|
||||||
// Name: unix/dialup.cpp
|
// Name: src/unix/dialup.cpp
|
||||||
// Purpose: Network related wxWidgets classes and functions
|
// Purpose: Network related wxWidgets classes and functions
|
||||||
// Author: Karsten Ball<6C>der
|
// Author: Karsten Ball<6C>der
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if wxUSE_DIALUP_MANAGER
|
#if wxUSE_DIALUP_MANAGER
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -400,7 +398,7 @@ void wxDialUpManagerImpl::DisableAutoCheckOnlineStatus()
|
|||||||
|
|
||||||
void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
|
void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
|
||||||
{
|
{
|
||||||
if(hostname.Length() == 0)
|
if(hostname.length() == 0)
|
||||||
{
|
{
|
||||||
m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST;
|
m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST;
|
||||||
m_BeaconPort = 80;
|
m_BeaconPort = 80;
|
||||||
@@ -409,7 +407,7 @@ void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
|
|||||||
|
|
||||||
// does hostname contain a port number?
|
// does hostname contain a port number?
|
||||||
wxString port = hostname.After(wxT(':'));
|
wxString port = hostname.After(wxT(':'));
|
||||||
if(port.Length())
|
if(port.length())
|
||||||
{
|
{
|
||||||
m_BeaconHost = hostname.Before(wxT(':'));
|
m_BeaconHost = hostname.Before(wxT(':'));
|
||||||
m_BeaconPort = wxAtoi(port);
|
m_BeaconPort = wxAtoi(port);
|
||||||
@@ -766,9 +764,9 @@ wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckPing()
|
|||||||
if (wxFileExists( wxT("SYS$SYSTEM:TCPIP$PING.EXE") ))
|
if (wxFileExists( wxT("SYS$SYSTEM:TCPIP$PING.EXE") ))
|
||||||
m_PingPath = wxT("$SYS$SYSTEM:TCPIP$PING");
|
m_PingPath = wxT("$SYS$SYSTEM:TCPIP$PING");
|
||||||
#elif defined(__AIX__)
|
#elif defined(__AIX__)
|
||||||
m_PingPath = _T("/etc/ping");
|
m_PingPath = _T("/etc/ping");
|
||||||
#elif defined(__SGI__)
|
#elif defined(__SGI__)
|
||||||
m_PingPath = _T("/usr/etc/ping");
|
m_PingPath = _T("/usr/etc/ping");
|
||||||
#else
|
#else
|
||||||
if (wxFileExists( wxT("/bin/ping") ))
|
if (wxFileExists( wxT("/bin/ping") ))
|
||||||
m_PingPath = wxT("/bin/ping");
|
m_PingPath = wxT("/bin/ping");
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: sound.cpp
|
// Name: src/unix/sound.cpp
|
||||||
// Purpose: wxSound
|
// Purpose: wxSound
|
||||||
// Author: Marcel Rasche, Vaclav Slavik
|
// Author: Marcel Rasche, Vaclav Slavik
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,19 +1,17 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: sound_sdl.cpp
|
// Name: src/unix/sound_sdl.cpp
|
||||||
// Purpose: wxSound backend using SDL
|
// Purpose: wxSound backend using SDL
|
||||||
// Author: Vaclav Slavik
|
// Author: Vaclav Slavik
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 2004/01/31
|
// Created: 2004/01/31
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2004, Open Source Applications Foundation
|
// Copyright: (c) 2004, Open Source Applications Foundation
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
@@ -42,7 +40,7 @@ class wxSoundBackendSDLNotification : public wxEvent
|
|||||||
public:
|
public:
|
||||||
DECLARE_DYNAMIC_CLASS(wxSoundBackendSDLNotification)
|
DECLARE_DYNAMIC_CLASS(wxSoundBackendSDLNotification)
|
||||||
wxSoundBackendSDLNotification();
|
wxSoundBackendSDLNotification();
|
||||||
wxEvent *Clone() const { return new wxSoundBackendSDLNotification(*this); }
|
wxEvent *Clone() const { return new wxSoundBackendSDLNotification(*this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSoundBackendSDLNotificationFunction)
|
typedef void (wxEvtHandler::*wxSoundBackendSDLNotificationFunction)
|
||||||
@@ -72,11 +70,11 @@ class wxSoundBackendSDLEvtHandler;
|
|||||||
class wxSoundBackendSDL : public wxSoundBackend
|
class wxSoundBackendSDL : public wxSoundBackend
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxSoundBackendSDL()
|
wxSoundBackendSDL()
|
||||||
: m_initialized(false), m_playing(false), m_audioOpen(false),
|
: m_initialized(false), m_playing(false), m_audioOpen(false),
|
||||||
m_data(NULL), m_evtHandler(NULL) {}
|
m_data(NULL), m_evtHandler(NULL) {}
|
||||||
virtual ~wxSoundBackendSDL();
|
virtual ~wxSoundBackendSDL();
|
||||||
|
|
||||||
wxString GetName() const { return _T("Simple DirectMedia Layer"); }
|
wxString GetName() const { return _T("Simple DirectMedia Layer"); }
|
||||||
int GetPriority() const { return 9; }
|
int GetPriority() const { return 9; }
|
||||||
bool IsAvailable() const;
|
bool IsAvailable() const;
|
||||||
@@ -86,14 +84,14 @@ public:
|
|||||||
|
|
||||||
void FillAudioBuffer(Uint8 *stream, int len);
|
void FillAudioBuffer(Uint8 *stream, int len);
|
||||||
void FinishedPlayback();
|
void FinishedPlayback();
|
||||||
|
|
||||||
void Stop();
|
void Stop();
|
||||||
bool IsPlaying() const { return m_playing; }
|
bool IsPlaying() const { return m_playing; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool OpenAudio();
|
bool OpenAudio();
|
||||||
void CloseAudio();
|
void CloseAudio();
|
||||||
|
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
bool m_playing, m_audioOpen;
|
bool m_playing, m_audioOpen;
|
||||||
// playback information:
|
// playback information:
|
||||||
@@ -205,19 +203,19 @@ bool wxSoundBackendSDL::OpenAudio()
|
|||||||
{
|
{
|
||||||
if (!m_evtHandler)
|
if (!m_evtHandler)
|
||||||
m_evtHandler = new wxSoundBackendSDLEvtHandler(this);
|
m_evtHandler = new wxSoundBackendSDLEvtHandler(this);
|
||||||
|
|
||||||
m_spec.silence = 0;
|
m_spec.silence = 0;
|
||||||
m_spec.samples = 4096;
|
m_spec.samples = 4096;
|
||||||
m_spec.size = 0;
|
m_spec.size = 0;
|
||||||
m_spec.callback = wx_sdl_audio_callback;
|
m_spec.callback = wx_sdl_audio_callback;
|
||||||
m_spec.userdata = (void*)this;
|
m_spec.userdata = (void*)this;
|
||||||
|
|
||||||
wxLogTrace(_T("sound"), _T("opening SDL audio..."));
|
wxLogTrace(_T("sound"), _T("opening SDL audio..."));
|
||||||
if (SDL_OpenAudio(&m_spec, NULL) >= 0)
|
if (SDL_OpenAudio(&m_spec, NULL) >= 0)
|
||||||
{
|
{
|
||||||
#if wxUSE_LOG_DEBUG
|
#if wxUSE_LOG_DEBUG
|
||||||
char driver[256];
|
char driver[256];
|
||||||
SDL_AudioDriverName(driver, 256);
|
SDL_AudioDriverName(driver, 256);
|
||||||
wxLogTrace(_T("sound"), _T("opened audio, driver '%s'"),
|
wxLogTrace(_T("sound"), _T("opened audio, driver '%s'"),
|
||||||
wxString(driver, wxConvLocal).c_str());
|
wxString(driver, wxConvLocal).c_str());
|
||||||
#endif
|
#endif
|
||||||
@@ -248,7 +246,7 @@ bool wxSoundBackendSDL::Play(wxSoundData *data, unsigned flags,
|
|||||||
volatile wxSoundPlaybackStatus *WXUNUSED(status))
|
volatile wxSoundPlaybackStatus *WXUNUSED(status))
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
int format;
|
int format;
|
||||||
if (data->m_bitsPerSample == 8)
|
if (data->m_bitsPerSample == 8)
|
||||||
format = AUDIO_U8;
|
format = AUDIO_U8;
|
||||||
@@ -271,7 +269,7 @@ bool wxSoundBackendSDL::Play(wxSoundData *data, unsigned flags,
|
|||||||
CloseAudio();
|
CloseAudio();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsOpen)
|
if (needsOpen)
|
||||||
{
|
{
|
||||||
m_spec.format = format;
|
m_spec.format = format;
|
||||||
@@ -280,7 +278,7 @@ bool wxSoundBackendSDL::Play(wxSoundData *data, unsigned flags,
|
|||||||
if (!OpenAudio())
|
if (!OpenAudio())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_LockAudio();
|
SDL_LockAudio();
|
||||||
wxLogTrace(_T("sound"), _T("playing new sound"));
|
wxLogTrace(_T("sound"), _T("playing new sound"));
|
||||||
m_playing = true;
|
m_playing = true;
|
||||||
|
@@ -1,13 +1,18 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dnd.cpp
|
// Name: src/x11/dnd.cpp
|
||||||
// Purpose: wxDropTarget, wxDropSource classes
|
// Purpose: wxDropTarget, wxDropSource classes
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
// Copyright: (c) 1998 Julian Smart
|
// Copyright: (c) 1998 Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/setup.h"
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
@@ -44,14 +49,14 @@ wxDropTarget::~wxDropTarget()
|
|||||||
bool wxTextDropTarget::OnDrop( long x, long y, const void *data, size_t WXUNUSED(size) )
|
bool wxTextDropTarget::OnDrop( long x, long y, const void *data, size_t WXUNUSED(size) )
|
||||||
{
|
{
|
||||||
OnDropText( x, y, (const char*)data );
|
OnDropText( x, y, (const char*)data );
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
|
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
|
||||||
{
|
{
|
||||||
wxLogDebug( "Got dropped text: %s.", psz );
|
wxLogDebug( "Got dropped text: %s.", psz );
|
||||||
wxLogDebug( "At x: %d, y: %d.", (int)x, (int)y );
|
wxLogDebug( "At x: %d, y: %d.", (int)x, (int)y );
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxTextDropTarget::GetFormatCount() const
|
size_t wxTextDropTarget::GetFormatCount() const
|
||||||
@@ -77,7 +82,7 @@ bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char *
|
|||||||
{
|
{
|
||||||
wxLogDebug( aszFiles[i] );
|
wxLogDebug( aszFiles[i] );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
||||||
@@ -88,10 +93,10 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
|||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
if (text[i] == 0) number++;
|
if (text[i] == 0) number++;
|
||||||
|
|
||||||
if (number == 0) return TRUE;
|
if (number == 0) return true;
|
||||||
|
|
||||||
char **files = new char*[number];
|
char **files = new char*[number];
|
||||||
|
|
||||||
text = (char*) data;
|
text = (char*) data;
|
||||||
for ( i = 0; i < number; i++)
|
for ( i = 0; i < number; i++)
|
||||||
{
|
{
|
||||||
@@ -100,10 +105,10 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
|||||||
text += len+1;
|
text += len+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = OnDropFiles( x, y, 1, files );
|
bool ret = OnDropFiles( x, y, 1, files );
|
||||||
|
|
||||||
free( files );
|
free( files );
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,13 +141,13 @@ wxDropSource::wxDropSource( wxWindow *win )
|
|||||||
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
|
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
g_blockEventsOnDrag = TRUE;
|
g_blockEventsOnDrag = true;
|
||||||
|
|
||||||
m_window = win;
|
m_window = win;
|
||||||
m_widget = win->m_widget;
|
m_widget = win->m_widget;
|
||||||
if (win->m_wxwindow) m_widget = win->m_wxwindow;
|
if (win->m_wxwindow) m_widget = win->m_wxwindow;
|
||||||
m_retValue = wxDragCancel;
|
m_retValue = wxDragCancel;
|
||||||
|
|
||||||
m_data = &data;
|
m_data = &data;
|
||||||
|
|
||||||
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
||||||
@@ -159,7 +164,7 @@ wxDropSource::~wxDropSource(void)
|
|||||||
{
|
{
|
||||||
// if (m_data) delete m_data;
|
// if (m_data) delete m_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) )
|
wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) )
|
||||||
{
|
{
|
||||||
// wxASSERT_MSG( m_data, "wxDragSource: no data" );
|
// wxASSERT_MSG( m_data, "wxDragSource: no data" );
|
||||||
@@ -168,15 +173,15 @@ wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) )
|
|||||||
#if 0
|
#if 0
|
||||||
if (!m_data) return (wxDragResult) wxDragNone;
|
if (!m_data) return (wxDragResult) wxDragNone;
|
||||||
if (m_data->GetDataSize() == 0) return (wxDragResult) wxDragNone;
|
if (m_data->GetDataSize() == 0) return (wxDragResult) wxDragNone;
|
||||||
|
|
||||||
RegisterWindow();
|
RegisterWindow();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
UnregisterWindow();
|
UnregisterWindow();
|
||||||
|
|
||||||
g_blockEventsOnDrag = FALSE;
|
g_blockEventsOnDrag = FALSE;
|
||||||
|
|
||||||
return m_retValue;
|
return m_retValue;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -187,30 +192,30 @@ void wxDropSource::RegisterWindow(void)
|
|||||||
if (!m_data) return;
|
if (!m_data) return;
|
||||||
|
|
||||||
wxString formats;
|
wxString formats;
|
||||||
|
|
||||||
wxDataFormat df = m_data->GetPreferredFormat();
|
wxDataFormat df = m_data->GetPreferredFormat();
|
||||||
|
|
||||||
switch (df)
|
switch (df)
|
||||||
{
|
{
|
||||||
case wxDF_TEXT:
|
case wxDF_TEXT:
|
||||||
formats += "text/plain";
|
formats += "text/plain";
|
||||||
break;
|
break;
|
||||||
case wxDF_FILENAME:
|
case wxDF_FILENAME:
|
||||||
formats += "file:ALL";
|
formats += "file:ALL";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *str = WXSTRINGCAST formats;
|
char *str = WXSTRINGCAST formats;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDropSource::UnregisterWindow(void)
|
void wxDropSource::UnregisterWindow(void)
|
||||||
{
|
{
|
||||||
if (!m_widget) return;
|
if (!m_widget) return;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -219,7 +224,7 @@ wxPrivateDropTarget::wxPrivateDropTarget()
|
|||||||
{
|
{
|
||||||
m_id = wxTheApp->GetAppName();
|
m_id = wxTheApp->GetAppName();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxPrivateDropTarget::GetFormatCount() const
|
size_t wxPrivateDropTarget::GetFormatCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: glcanvas.cpp
|
// Name: src/x11/glcanvas.cpp
|
||||||
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets
|
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets
|
||||||
// Uses the GLX extension.
|
// Uses the GLX extension.
|
||||||
// Author: Julian Smart and Wolfram Gloger
|
// Author: Julian Smart and Wolfram Gloger
|
||||||
@@ -7,10 +7,15 @@
|
|||||||
// Created: 1995, 1999
|
// Created: 1995, 1999
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart, Wolfram Gloger
|
// Copyright: (c) Julian Smart, Wolfram Gloger
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/setup.h"
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_GLCANVAS
|
#if wxUSE_GLCANVAS
|
||||||
|
|
||||||
@@ -46,9 +51,10 @@ static inline WXWindow wxGetClientAreaWindow(wxWindow* win)
|
|||||||
static int bitcount( unsigned long n )
|
static int bitcount( unsigned long n )
|
||||||
{
|
{
|
||||||
int bits;
|
int bits;
|
||||||
for (bits=0; n>0;) {
|
for (bits=0; n>0;)
|
||||||
if(n & 1) bits++;
|
{
|
||||||
n = n >> 1;
|
if(n & 1) bits++;
|
||||||
|
n = n >> 1;
|
||||||
}
|
}
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
@@ -60,7 +66,7 @@ static int bitcount( unsigned long n )
|
|||||||
|
|
||||||
IMPLEMENT_CLASS(wxGLContext,wxObject)
|
IMPLEMENT_CLASS(wxGLContext,wxObject)
|
||||||
|
|
||||||
wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win,
|
wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win,
|
||||||
const wxPalette& WXUNUSED(palette) )
|
const wxPalette& WXUNUSED(palette) )
|
||||||
{
|
{
|
||||||
m_window = win;
|
m_window = win;
|
||||||
@@ -68,17 +74,17 @@ wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win,
|
|||||||
|
|
||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
|
wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
|
||||||
|
|
||||||
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
||||||
None, GL_TRUE);
|
None, GL_TRUE);
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
|
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::wxGLContext(
|
wxGLContext::wxGLContext(
|
||||||
bool WXUNUSED(isRGB), wxWindow *win,
|
bool WXUNUSED(isRGB), wxWindow *win,
|
||||||
const wxPalette& WXUNUSED(palette),
|
const wxPalette& WXUNUSED(palette),
|
||||||
const wxGLContext *other /* for sharing display lists */
|
const wxGLContext *other /* for sharing display lists */
|
||||||
)
|
)
|
||||||
@@ -88,28 +94,28 @@ wxGLContext::wxGLContext(
|
|||||||
|
|
||||||
wxGLCanvas *gc = (wxGLCanvas*) win;
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
|
wxCHECK_RET( vi, wxT("invalid visual for OpenGL") );
|
||||||
|
|
||||||
if( other != 0 )
|
if( other != 0 )
|
||||||
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
||||||
other->m_glContext, GL_TRUE );
|
other->m_glContext, GL_TRUE );
|
||||||
else
|
else
|
||||||
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
m_glContext = glXCreateContext( (Display *)wxGetDisplay(), vi,
|
||||||
None, GL_TRUE );
|
None, GL_TRUE );
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
|
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGL context") );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLContext::~wxGLContext()
|
wxGLContext::~wxGLContext()
|
||||||
{
|
{
|
||||||
if (!m_glContext) return;
|
if (!m_glContext) return;
|
||||||
|
|
||||||
if (m_glContext == glXGetCurrentContext())
|
if (m_glContext == glXGetCurrentContext())
|
||||||
{
|
{
|
||||||
glXMakeCurrent( (Display*) wxGetDisplay(), None, NULL);
|
glXMakeCurrent( (Display*) wxGetDisplay(), None, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
glXDestroyContext( (Display*) wxGetDisplay(), m_glContext );
|
glXDestroyContext( (Display*) wxGetDisplay(), m_glContext );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,10 +130,10 @@ void wxGLContext::SwapBuffers()
|
|||||||
|
|
||||||
void wxGLContext::SetCurrent()
|
void wxGLContext::SetCurrent()
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
{
|
{
|
||||||
Display* display = (Display*) wxGetDisplay();
|
Display* display = (Display*) wxGetDisplay();
|
||||||
glXMakeCurrent(display, (Window) wxGetClientAreaWindow(m_window),
|
glXMakeCurrent(display, (Window) wxGetClientAreaWindow(m_window),
|
||||||
m_glContext );
|
m_glContext );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,36 +197,36 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
: wxScrolledWindow(parent, id, pos, size, style, name)
|
: wxScrolledWindow(parent, id, pos, size, style, name)
|
||||||
{
|
{
|
||||||
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
||||||
const wxGLContext *shared,
|
const wxGLContext *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
: wxScrolledWindow(parent, id, pos, size, style, name)
|
: wxScrolledWindow(parent, id, pos, size, style, name)
|
||||||
{
|
{
|
||||||
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
Create( parent, shared, NULL, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
||||||
const wxGLCanvas *shared,
|
const wxGLCanvas *shared,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette )
|
const wxPalette& palette )
|
||||||
: wxScrolledWindow(parent, id, pos, size, style, name)
|
: wxScrolledWindow(parent, id, pos, size, style, name)
|
||||||
{
|
{
|
||||||
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
Create( parent, NULL, shared, id, pos, size, style, name, attribList, palette );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,19 +235,19 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent,
|
|||||||
bool wxGLCanvas::Create(wxWindow *parent,
|
bool wxGLCanvas::Create(wxWindow *parent,
|
||||||
const wxGLContext *shared, const wxGLCanvas *shared_context_of,
|
const wxGLContext *shared, const wxGLCanvas *shared_context_of,
|
||||||
wxWindowID id = -1, const wxPoint& pos,
|
wxWindowID id = -1, const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
const wxString& name, int *attribList, const wxPalette& palette):
|
const wxString& name, int *attribList, const wxPalette& palette):
|
||||||
wxScrolledWindow(parent, id, pos, size, style, name)
|
wxScrolledWindow(parent, id, pos, size, style, name)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool wxGLCanvas::Create( wxWindow *parent,
|
bool wxGLCanvas::Create( wxWindow *parent,
|
||||||
const wxGLContext *shared,
|
const wxGLContext *shared,
|
||||||
const wxGLCanvas *shared_context_of,
|
const wxGLCanvas *shared_context_of,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name,
|
long style, const wxString& name,
|
||||||
int *attribList,
|
int *attribList,
|
||||||
const wxPalette& palette)
|
const wxPalette& palette)
|
||||||
{
|
{
|
||||||
XVisualInfo *vi, vi_templ;
|
XVisualInfo *vi, vi_templ;
|
||||||
XWindowAttributes xwa;
|
XWindowAttributes xwa;
|
||||||
@@ -254,14 +260,15 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
Display* display = (Display*) wxGetDisplay();
|
Display* display = (Display*) wxGetDisplay();
|
||||||
|
|
||||||
// Check for the presence of the GLX extension
|
// Check for the presence of the GLX extension
|
||||||
if(!glXQueryExtension(display, NULL, NULL)) {
|
if(!glXQueryExtension(display, NULL, NULL))
|
||||||
wxLogDebug(wxT("wxGLCanvas: GLX extension is missing\n"));
|
{
|
||||||
return FALSE;
|
wxLogDebug(wxT("wxGLCanvas: GLX extension is missing\n"));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(attribList) {
|
if(attribList) {
|
||||||
int data[512], arg=0, p=0;
|
int data[512], arg=0, p=0;
|
||||||
|
|
||||||
while( (attribList[arg]!=0) && (p<512) )
|
while( (attribList[arg]!=0) && (p<512) )
|
||||||
{
|
{
|
||||||
switch( attribList[arg++] )
|
switch( attribList[arg++] )
|
||||||
@@ -283,9 +290,9 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
data[p++]=GLX_BLUE_SIZE; data[p++]=attribList[arg++]; break;
|
data[p++]=GLX_BLUE_SIZE; data[p++]=attribList[arg++]; break;
|
||||||
case WX_GL_MIN_ALPHA:
|
case WX_GL_MIN_ALPHA:
|
||||||
data[p++]=GLX_ALPHA_SIZE; data[p++]=attribList[arg++]; break;
|
data[p++]=GLX_ALPHA_SIZE; data[p++]=attribList[arg++]; break;
|
||||||
case WX_GL_DEPTH_SIZE:
|
case WX_GL_DEPTH_SIZE:
|
||||||
data[p++]=GLX_DEPTH_SIZE; data[p++]=attribList[arg++]; break;
|
data[p++]=GLX_DEPTH_SIZE; data[p++]=attribList[arg++]; break;
|
||||||
case WX_GL_STENCIL_SIZE:
|
case WX_GL_STENCIL_SIZE:
|
||||||
data[p++]=GLX_STENCIL_SIZE; data[p++]=attribList[arg++]; break;
|
data[p++]=GLX_STENCIL_SIZE; data[p++]=attribList[arg++]; break;
|
||||||
case WX_GL_MIN_ACCUM_RED:
|
case WX_GL_MIN_ACCUM_RED:
|
||||||
data[p++]=GLX_ACCUM_RED_SIZE; data[p++]=attribList[arg++]; break;
|
data[p++]=GLX_ACCUM_RED_SIZE; data[p++]=attribList[arg++]; break;
|
||||||
@@ -298,64 +305,64 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data[p] = 0;
|
data[p] = 0;
|
||||||
|
|
||||||
attribList = (int*) data;
|
attribList = (int*) data;
|
||||||
// Get an appropriate visual
|
// Get an appropriate visual
|
||||||
vi = glXChooseVisual(display, DefaultScreen(display), attribList);
|
vi = glXChooseVisual(display, DefaultScreen(display), attribList);
|
||||||
if(!vi) return FALSE;
|
if(!vi) return FALSE;
|
||||||
|
|
||||||
// Here we should make sure that vi is the same visual as the
|
// Here we should make sure that vi is the same visual as the
|
||||||
// one used by the xwindow drawable in wxCanvas. However,
|
// one used by the xwindow drawable in wxCanvas. However,
|
||||||
// there is currently no mechanism for this in wx_canvs.cc.
|
// there is currently no mechanism for this in wx_canvs.cc.
|
||||||
} else {
|
} else {
|
||||||
// By default, we use the visual of xwindow
|
// By default, we use the visual of xwindow
|
||||||
// NI: is this really senseful ? opengl in e.g. color index mode ?
|
// NI: is this really senseful ? opengl in e.g. color index mode ?
|
||||||
XGetWindowAttributes(display, (Window)wxGetClientAreaWindow(this), &xwa);
|
XGetWindowAttributes(display, (Window)wxGetClientAreaWindow(this), &xwa);
|
||||||
vi_templ.visualid = XVisualIDFromVisual(xwa.visual);
|
vi_templ.visualid = XVisualIDFromVisual(xwa.visual);
|
||||||
vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n);
|
vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n);
|
||||||
if(!vi) return FALSE;
|
if(!vi) return FALSE;
|
||||||
glXGetConfig(display, vi, GLX_USE_GL, &val);
|
glXGetConfig(display, vi, GLX_USE_GL, &val);
|
||||||
if(!val) return FALSE;
|
if(!val) return FALSE;
|
||||||
// Basically, this is it. It should be possible to use vi
|
// Basically, this is it. It should be possible to use vi
|
||||||
// in glXCreateContext() below. But this fails with Mesa.
|
// in glXCreateContext() below. But this fails with Mesa.
|
||||||
// I notified the Mesa author about it; there may be a fix.
|
// I notified the Mesa author about it; there may be a fix.
|
||||||
#ifdef OLD_MESA
|
#ifdef OLD_MESA
|
||||||
// Construct an attribute list matching the visual
|
// Construct an attribute list matching the visual
|
||||||
int a_list[32];
|
int a_list[32];
|
||||||
n = 0;
|
n = 0;
|
||||||
if(vi->c_class==TrueColor || vi->c_class==DirectColor) { // RGBA visual
|
if(vi->c_class==TrueColor || vi->c_class==DirectColor) { // RGBA visual
|
||||||
a_list[n++] = GLX_RGBA;
|
a_list[n++] = GLX_RGBA;
|
||||||
a_list[n++] = GLX_RED_SIZE;
|
a_list[n++] = GLX_RED_SIZE;
|
||||||
a_list[n++] = bitcount(vi->red_mask);
|
a_list[n++] = bitcount(vi->red_mask);
|
||||||
a_list[n++] = GLX_GREEN_SIZE;
|
a_list[n++] = GLX_GREEN_SIZE;
|
||||||
a_list[n++] = bitcount(vi->green_mask);
|
a_list[n++] = bitcount(vi->green_mask);
|
||||||
a_list[n++] = GLX_BLUE_SIZE;
|
a_list[n++] = GLX_BLUE_SIZE;
|
||||||
a_list[n++] = bitcount(vi->blue_mask);
|
a_list[n++] = bitcount(vi->blue_mask);
|
||||||
glXGetConfig(display, vi, GLX_ALPHA_SIZE, &val);
|
glXGetConfig(display, vi, GLX_ALPHA_SIZE, &val);
|
||||||
a_list[n++] = GLX_ALPHA_SIZE;
|
a_list[n++] = GLX_ALPHA_SIZE;
|
||||||
a_list[n++] = val;
|
a_list[n++] = val;
|
||||||
} else { // Color index visual
|
} else { // Color index visual
|
||||||
glXGetConfig(display, vi, GLX_BUFFER_SIZE, &val);
|
glXGetConfig(display, vi, GLX_BUFFER_SIZE, &val);
|
||||||
a_list[n++] = GLX_BUFFER_SIZE;
|
a_list[n++] = GLX_BUFFER_SIZE;
|
||||||
a_list[n++] = val;
|
a_list[n++] = val;
|
||||||
}
|
}
|
||||||
a_list[n] = None;
|
a_list[n] = None;
|
||||||
// XFree(vi);
|
// XFree(vi);
|
||||||
vi = glXChooseVisual(display, DefaultScreen(display), a_list);
|
vi = glXChooseVisual(display, DefaultScreen(display), a_list);
|
||||||
if(!vi) return FALSE;
|
if(!vi) return FALSE;
|
||||||
#endif /* OLD_MESA */
|
#endif /* OLD_MESA */
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vi = vi; // safe for later use
|
m_vi = vi; // safe for later use
|
||||||
|
|
||||||
wxCHECK_MSG( m_vi, FALSE, wxT("required visual couldn't be found") );
|
wxCHECK_MSG( m_vi, FALSE, wxT("required visual couldn't be found") );
|
||||||
|
|
||||||
// Create the GLX context and make it current
|
// Create the GLX context and make it current
|
||||||
|
|
||||||
wxGLContext *share= m_sharedContext;
|
wxGLContext *share= m_sharedContext;
|
||||||
if (share==NULL && m_sharedContextOf)
|
if (share==NULL && m_sharedContextOf)
|
||||||
share = m_sharedContextOf->GetContext();
|
share = m_sharedContextOf->GetContext();
|
||||||
|
|
||||||
m_glContext = new wxGLContext( TRUE, this, wxNullPalette, share );
|
m_glContext = new wxGLContext( TRUE, this, wxNullPalette, share );
|
||||||
@@ -365,13 +372,13 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
#endif
|
#endif
|
||||||
SetCurrent();
|
SetCurrent();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLCanvas::~wxGLCanvas(void)
|
wxGLCanvas::~wxGLCanvas(void)
|
||||||
{
|
{
|
||||||
XVisualInfo *vi = (XVisualInfo *) m_vi;
|
XVisualInfo *vi = (XVisualInfo *) m_vi;
|
||||||
|
|
||||||
if (vi) XFree( vi );
|
if (vi) XFree( vi );
|
||||||
if (m_glContext) delete m_glContext;
|
if (m_glContext) delete m_glContext;
|
||||||
|
|
||||||
@@ -402,4 +409,3 @@ void wxGLCanvas::SetColour(const wxChar *col)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_GLCANVAS
|
// wxUSE_GLCANVAS
|
||||||
|
|
||||||
|
@@ -1,12 +1,17 @@
|
|||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
* Project: GSocket (Generic Socket) for WX
|
* Project: GSocket (Generic Socket) for WX
|
||||||
* Name: gsockmot.c
|
* Name: src/x11/gsockx11.cpp
|
||||||
* Purpose: GSocket: X11 part
|
* Purpose: GSocket: X11 part
|
||||||
* Licence: The wxWindows licence
|
* Licence: The wxWindows licence
|
||||||
* CVSID: $Id$
|
* CVSID: $Id$
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "wx/setup.h"
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_SOCKETS
|
#if wxUSE_SOCKETS
|
||||||
|
|
||||||
@@ -31,7 +36,7 @@ extern "C" void wxUnregisterSocketCallback(int fd, wxSocketTableType socketType)
|
|||||||
static void _GSocket_X11_Input(int *fid, void* data)
|
static void _GSocket_X11_Input(int *fid, void* data)
|
||||||
{
|
{
|
||||||
GSocket *socket = (GSocket *)data;
|
GSocket *socket = (GSocket *)data;
|
||||||
|
|
||||||
socket->Detected_Read();
|
socket->Detected_Read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: reparent.cpp
|
// Name: src/x11/reparent.cpp
|
||||||
// Purpose: wxWindow
|
// Purpose: wxWindow
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -9,6 +9,13 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// declarations
|
// declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -17,8 +24,6 @@
|
|||||||
// headers
|
// headers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
|
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
|
|
||||||
#include "wx/x11/reparent.h"
|
#include "wx/x11/reparent.h"
|
||||||
@@ -88,7 +93,7 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent)
|
|||||||
&children, &numchildren) || Xerror)
|
&children, &numchildren) || Xerror)
|
||||||
{
|
{
|
||||||
XSetErrorHandler(old);
|
XSetErrorHandler(old);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numchildren > 0)
|
if (numchildren > 0)
|
||||||
@@ -118,7 +123,7 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XSetErrorHandler(old);
|
XSetErrorHandler(old);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for an appropriate window to be created.
|
// Wait for an appropriate window to be created.
|
||||||
@@ -132,7 +137,7 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar
|
|||||||
sm_toReparent = toReparent;
|
sm_toReparent = toReparent;
|
||||||
sm_exactMatch = exactMatch;
|
sm_exactMatch = exactMatch;
|
||||||
sm_name = windowName;
|
sm_name = windowName;
|
||||||
|
|
||||||
Display* display = wxGlobalDisplay();
|
Display* display = wxGlobalDisplay();
|
||||||
XSelectInput(display,
|
XSelectInput(display,
|
||||||
RootWindowOfScreen(DefaultScreenOfDisplay(display)),
|
RootWindowOfScreen(DefaultScreenOfDisplay(display)),
|
||||||
@@ -142,10 +147,10 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar
|
|||||||
WM_STATE = XInternAtom(display, "WM_STATE", False);
|
WM_STATE = XInternAtom(display, "WM_STATE", False);
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
if (!windowName.IsEmpty())
|
if (!windowName.empty())
|
||||||
wxLogDebug(_T("Waiting for window %s"), windowName.c_str());
|
wxLogDebug(_T("Waiting for window %s"), windowName.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sm_done = FALSE;
|
sm_done = FALSE;
|
||||||
|
|
||||||
wxEventLoop eventLoop;
|
wxEventLoop eventLoop;
|
||||||
@@ -169,7 +174,7 @@ bool wxReparenter::WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toRepar
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxReparenter::ProcessXEvent(WXEvent* event)
|
bool wxReparenter::ProcessXEvent(WXEvent* event)
|
||||||
@@ -183,13 +188,13 @@ bool wxReparenter::ProcessXEvent(WXEvent* event)
|
|||||||
{
|
{
|
||||||
wxLogDebug(_T("Window was mapped"));
|
wxLogDebug(_T("Window was mapped"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xevent->type == MapNotify && !xevent->xmap.override_redirect &&
|
if (xevent->type == MapNotify && !xevent->xmap.override_redirect &&
|
||||||
(client = (Window) FindAClientWindow((WXWindow) xevent->xmap.window, sm_name)))
|
(client = (Window) FindAClientWindow((WXWindow) xevent->xmap.window, sm_name)))
|
||||||
{
|
{
|
||||||
wxLogDebug(_T("Found a client window, about to reparent"));
|
wxLogDebug(_T("Found a client window, about to reparent"));
|
||||||
wxASSERT(sm_toReparent->GetParent() == NULL);
|
wxASSERT(sm_toReparent->GetParent() == NULL);
|
||||||
|
|
||||||
sm_toReparent->SetHandle((WXWindow) client);
|
sm_toReparent->SetHandle((WXWindow) client);
|
||||||
sm_newParent->AddChild(sm_toReparent);
|
sm_newParent->AddChild(sm_toReparent);
|
||||||
sm_done = Reparent(sm_newParent, sm_toReparent);
|
sm_done = Reparent(sm_newParent, sm_toReparent);
|
||||||
@@ -202,7 +207,7 @@ bool wxReparenter::ProcessXEvent(WXEvent* event)
|
|||||||
sm_toReparent->SetHandle((WXWindow) xevent->xmap.window);
|
sm_toReparent->SetHandle((WXWindow) xevent->xmap.window);
|
||||||
sm_newParent->AddChild(sm_toReparent);
|
sm_newParent->AddChild(sm_toReparent);
|
||||||
wxASSERT(sm_toReparent->GetParent() == NULL);
|
wxASSERT(sm_toReparent->GetParent() == NULL);
|
||||||
|
|
||||||
sm_done = Reparent(sm_newParent, sm_toReparent);
|
sm_done = Reparent(sm_newParent, sm_toReparent);
|
||||||
return sm_done;
|
return sm_done;
|
||||||
}
|
}
|
||||||
@@ -223,7 +228,7 @@ WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name)
|
|||||||
Window result = 0;
|
Window result = 0;
|
||||||
XErrorHandler old;
|
XErrorHandler old;
|
||||||
char *clientName;
|
char *clientName;
|
||||||
|
|
||||||
Xerror = False;
|
Xerror = False;
|
||||||
old = XSetErrorHandler(ErrorHandler);
|
old = XSetErrorHandler(ErrorHandler);
|
||||||
rvalue = XGetWindowProperty((Display*) wxGetDisplay(),
|
rvalue = XGetWindowProperty((Display*) wxGetDisplay(),
|
||||||
@@ -241,26 +246,26 @@ WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name)
|
|||||||
XFree((char *) propreturn);
|
XFree((char *) propreturn);
|
||||||
}
|
}
|
||||||
XFetchName((Display*) wxGetDisplay(), (Window) window, &clientName);
|
XFetchName((Display*) wxGetDisplay(), (Window) window, &clientName);
|
||||||
|
|
||||||
wxString str1(name);
|
wxString str1(name);
|
||||||
wxString str2 = wxString::FromAscii(clientName);
|
wxString str2 = wxString::FromAscii(clientName);
|
||||||
str1.Lower();
|
str1.Lower();
|
||||||
str2.Lower();
|
str2.Lower();
|
||||||
|
|
||||||
bool matches;
|
bool matches;
|
||||||
if (sm_exactMatch)
|
if (sm_exactMatch)
|
||||||
matches = (name == wxString::FromAscii(clientName));
|
matches = (name == wxString::FromAscii(clientName));
|
||||||
else
|
else
|
||||||
matches = (str1.Contains(str2) || str2.Contains(str1));
|
matches = (str1.Contains(str2) || str2.Contains(str1));
|
||||||
|
|
||||||
XFree(clientName);
|
XFree(clientName);
|
||||||
|
|
||||||
if (matches)
|
if (matches)
|
||||||
return (WXWindow) window;
|
return (WXWindow) window;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
old = XSetErrorHandler(ErrorHandler);
|
old = XSetErrorHandler(ErrorHandler);
|
||||||
if (!XQueryTree((Display*) wxGetDisplay(), (Window) window, &returnroot, &returnparent,
|
if (!XQueryTree((Display*) wxGetDisplay(), (Window) window, &returnroot, &returnparent,
|
||||||
&children, &numchildren) || Xerror)
|
&children, &numchildren) || Xerror)
|
||||||
@@ -269,7 +274,7 @@ WXWindow wxReparenter::FindAClientWindow(WXWindow window, const wxString& name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
XSetErrorHandler(old);
|
XSetErrorHandler(old);
|
||||||
|
|
||||||
result = 0;
|
result = 0;
|
||||||
for (i=0; i<(int)numchildren && !result ;i++) {
|
for (i=0; i<(int)numchildren && !result ;i++) {
|
||||||
result = (Window) FindAClientWindow((WXWindow) children[i], name);
|
result = (Window) FindAClientWindow((WXWindow) children[i], name);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: utils.cpp
|
// Name: src/x11/utils.cpp
|
||||||
// Purpose: Various utilities
|
// Purpose: Various utilities
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -9,6 +9,13 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// declarations
|
// declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -17,7 +24,6 @@
|
|||||||
// headers
|
// headers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/apptrait.h"
|
#include "wx/apptrait.h"
|
||||||
@@ -198,11 +204,11 @@ bool wxSetDisplay(const wxString& display_name)
|
|||||||
{
|
{
|
||||||
gs_displayName = display_name;
|
gs_displayName = display_name;
|
||||||
|
|
||||||
if ( display_name.IsEmpty() )
|
if ( display_name.empty() )
|
||||||
{
|
{
|
||||||
gs_currentDisplay = NULL;
|
gs_currentDisplay = NULL;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -211,7 +217,7 @@ bool wxSetDisplay(const wxString& display_name)
|
|||||||
if (display)
|
if (display)
|
||||||
{
|
{
|
||||||
gs_currentDisplay = (WXDisplay*) display;
|
gs_currentDisplay = (WXDisplay*) display;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -351,20 +357,20 @@ wxString wxGetXEventName(XEvent& event)
|
|||||||
return str;
|
return str;
|
||||||
#else
|
#else
|
||||||
int type = event.xany.type;
|
int type = event.xany.type;
|
||||||
static char* event_name[] = {
|
static char* event_name[] = {
|
||||||
"", "unknown(-)", // 0-1
|
"", "unknown(-)", // 0-1
|
||||||
"KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
|
"KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
|
||||||
"MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", // 6-9
|
"MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", // 6-9
|
||||||
"FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", // 10-13
|
"FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", // 10-13
|
||||||
"NoExpose", "VisibilityNotify", "CreateNotify", // 14-16
|
"NoExpose", "VisibilityNotify", "CreateNotify", // 14-16
|
||||||
"DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
|
"DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
|
||||||
"ReparentNotify", "ConfigureNotify", "ConfigureRequest", // 21-23
|
"ReparentNotify", "ConfigureNotify", "ConfigureRequest", // 21-23
|
||||||
"GravityNotify", "ResizeRequest", "CirculateNotify", // 24-26
|
"GravityNotify", "ResizeRequest", "CirculateNotify", // 24-26
|
||||||
"CirculateRequest", "PropertyNotify", "SelectionClear", // 27-29
|
"CirculateRequest", "PropertyNotify", "SelectionClear", // 27-29
|
||||||
"SelectionRequest", "SelectionNotify", "ColormapNotify", // 30-32
|
"SelectionRequest", "SelectionNotify", "ColormapNotify", // 30-32
|
||||||
"ClientMessage", "MappingNotify", // 33-34
|
"ClientMessage", "MappingNotify", // 33-34
|
||||||
"unknown(+)"}; // 35
|
"unknown(+)"}; // 35
|
||||||
type = wxMin(35, type); type = wxMax(1, type);
|
type = wxMin(35, type); type = wxMax(1, type);
|
||||||
return wxString::FromAscii(event_name[type]);
|
return wxString::FromAscii(event_name[type]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,13 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// declarations
|
// declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -17,7 +24,6 @@
|
|||||||
// headers
|
// headers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
Reference in New Issue
Block a user