Motif compile fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -1,44 +1,29 @@
 | 
				
			|||||||
wxPython README
 | 
					wxPython README
 | 
				
			||||||
---------------
 | 
					---------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Introduction
 | 
					Welcome to the wonderful world of wxPython!
 | 
				
			||||||
------------
 | 
					 | 
				
			||||||
The code in this subtree is a Python Extension Module that enables the
 | 
					 | 
				
			||||||
use of wxWindows from the Python language.  So what is Python?  Go to
 | 
					 | 
				
			||||||
http://www.python.org to learn more but in a nutshell, it's an
 | 
					 | 
				
			||||||
extremly cool object oriented language.  It's easier than Perl and
 | 
					 | 
				
			||||||
nearly as powerful.  It runs on more platforms than Java, and by some
 | 
					 | 
				
			||||||
reports, is even faster than Java with a JIT compiler!
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
So why would you want to use wxPython over just C++ and wxWindows?
 | 
					Once you have installed the wxPython extension module, you can try it
 | 
				
			||||||
Personally I prefer using Python for everything.  I only use C++ when
 | 
					out by going to the [install dir]\wxPython\demo directory and typing:
 | 
				
			||||||
I absolutly have to eek more performance out of an algorithm, and even
 | 
					 | 
				
			||||||
then I ususally code it as an extension module and leave the majority
 | 
					 | 
				
			||||||
of the program in Python.  Another good thing to use wxPython for is
 | 
					 | 
				
			||||||
quick prototyping of your wxWindows apps.  With C++ you have to
 | 
					 | 
				
			||||||
continuously go though the edit-compile-link-run cycle, which can be
 | 
					 | 
				
			||||||
quite time comsuming.  With Python it is only an edit-run cycle.  You
 | 
					 | 
				
			||||||
can easily build an application in a few hours with Python that would
 | 
					 | 
				
			||||||
normally take a few days with C++.  Converting a wxPython app to a
 | 
					 | 
				
			||||||
C++/wxWindows app should be a straight forward task.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
This extension module attempts to mirror the class heiarchy of
 | 
					    python demo.py
 | 
				
			||||||
wxWindows as closely as possble.  This means that there is a wxFrame
 | 
					 | 
				
			||||||
class in wxPython that looks, smells, tastes and acts almost the same
 | 
					 | 
				
			||||||
as the wxFrame class in the C++ version.  Unfortunatly, I wasn't able
 | 
					 | 
				
			||||||
to match things exactly because of differences in the languages, but
 | 
					 | 
				
			||||||
the differences should be easy to absorb because they are natural to
 | 
					 | 
				
			||||||
Python.  For example, some methods that return mutliple values via
 | 
					 | 
				
			||||||
argument pointers in C++ will return a tuple of values in Python.
 | 
					 | 
				
			||||||
These differences have not been documented yet so if something isn't
 | 
					 | 
				
			||||||
working the same as described in the wxWindows documents the best
 | 
					 | 
				
			||||||
thing to do is to scan through the wxPython sources, especially the .i
 | 
					 | 
				
			||||||
files, as that is where the interfaces for wxPython are defined.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
I have reports of successfully embedding wxPython within a wxWindows
 | 
					There are also some other sample files there for you to play with and
 | 
				
			||||||
C++ app on GTK.  It hasn't yet been attempted on MSW (to my knowledge)
 | 
					learn from.
 | 
				
			||||||
so I don't know how successful such an attempt would be.  However it
 | 
					
 | 
				
			||||||
is certainly possible.
 | 
					If you selected to install the documentation then point your browser
 | 
				
			||||||
 | 
					to [install dir]\wxPython\docs\index.htm and you will then be looking
 | 
				
			||||||
 | 
					at the docs for wxWindows.  For the most part you can use the C++ docs
 | 
				
			||||||
 | 
					as most classes and methods are used identically.  Where there are
 | 
				
			||||||
 | 
					differences they are documented with a "wxPython Note."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					On Win32 systems the binary self-installer creates a program group on
 | 
				
			||||||
 | 
					the Start Menu that contains a link to running the demo and a link to
 | 
				
			||||||
 | 
					the help file.  To help you save disk space I'm now using Microsoft's
 | 
				
			||||||
 | 
					HTML Help format.  If your system doesn't know what to do with the help
 | 
				
			||||||
 | 
					file, you can install the HTML Help Viewer as part of IE 4+, NT
 | 
				
			||||||
 | 
					Service Pack 4+, or the HTML Workshop at
 | 
				
			||||||
 | 
					http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -57,6 +42,33 @@ Or you can send mail directly to the list using this address:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
       wxpython-users@starship.python.net
 | 
					       wxpython-users@starship.python.net
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					----------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					What's new in 2.1b1
 | 
				
			||||||
 | 
					--------------------
 | 
				
			||||||
 | 
					Fixed wxComboBox.SetSelection so that it actually sets the selected
 | 
				
			||||||
 | 
					item.  (Actually just removed it from wxPython and let it default to
 | 
				
			||||||
 | 
					wxChoice.SetSelection which was already doing the right thing.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Added the Printing Framework.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Switched back to using the wxWindows DLL for the pre-built Win32
 | 
				
			||||||
 | 
					version.  The problem was needing to reinitialize static class info
 | 
				
			||||||
 | 
					data after loading each extension module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Lots of little tweaks and additions to reflect changes to various
 | 
				
			||||||
 | 
					wxWindows classes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Fixed a bug with attaching objects to tree items.  Actually was a
 | 
				
			||||||
 | 
					symptom of a larger problem with not obtaining the interpreter lock
 | 
				
			||||||
 | 
					when doing any Py_DECREFs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxSizer and friends.  Sizers are layout tools that manage a colection
 | 
				
			||||||
 | 
					of windows and sizers.  Different types of sizers apply different
 | 
				
			||||||
 | 
					types of layout algorithms.  You saw it here first!  These classes are
 | 
				
			||||||
 | 
					not even in the wxWindows C++ library yet!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
What's new in 2.0b9
 | 
					What's new in 2.0b9
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,8 +36,8 @@ TARGETDIR=$(BINLIBDEST)/wxPython
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
wxc	wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
 | 
					wxc	wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
 | 
				
			||||||
	mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
 | 
						mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
 | 
				
			||||||
	frames.cpp stattool.cpp windows3.cpp image.cpp \
 | 
						frames.cpp stattool.cpp windows3.cpp image.cpp misc2.cpp \
 | 
				
			||||||
	utils.cpp \
 | 
						utils.cpp printfw.cpp \
 | 
				
			||||||
	## comment out the next line to disable wxGLCanvas
 | 
						## comment out the next line to disable wxGLCanvas
 | 
				
			||||||
	##_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
 | 
						##_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
 | 
				
			||||||
	-I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
 | 
						-I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -269,6 +269,8 @@ cp ./src/gtk/* ~/wxgtk_dist/wxGTK/utils/wxPython/src/gtk
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 | 
					mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 | 
				
			||||||
cp ./lib/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 | 
					cp ./lib/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 | 
				
			||||||
 | 
					mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/lib/sizers
 | 
				
			||||||
 | 
					cp ./lib/sizers/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/lib/sizers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 | 
					mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 | 
				
			||||||
cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 | 
					cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,53 +13,6 @@
 | 
				
			|||||||
#define _WX_DATAOBJ_H_BASE_
 | 
					#define _WX_DATAOBJ_H_BASE_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__WXMSW__)
 | 
					#if defined(__WXMSW__)
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
// wxDataFormat identifies the single format of data
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class WXDLLEXPORT wxDataFormat
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    // the clipboard formats under Win32 are UINTs
 | 
					 | 
				
			||||||
    typedef unsigned int NativeFormat;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
 | 
					 | 
				
			||||||
    wxDataFormat& operator=(NativeFormat format)
 | 
					 | 
				
			||||||
        { m_format = format; return *this; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // defautl copy ctor/assignment operators ok
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // comparison (must have both versions)
 | 
					 | 
				
			||||||
    bool operator==(wxDataFormatId format) const
 | 
					 | 
				
			||||||
        { return m_format == (NativeFormat)format; }
 | 
					 | 
				
			||||||
    bool operator!=(wxDataFormatId format) const
 | 
					 | 
				
			||||||
        { return m_format != (NativeFormat)format; }
 | 
					 | 
				
			||||||
    bool operator==(const wxDataFormat& format) const
 | 
					 | 
				
			||||||
        { return m_format == format.m_format; }
 | 
					 | 
				
			||||||
    bool operator!=(const wxDataFormat& format) const
 | 
					 | 
				
			||||||
        { return m_format != format.m_format; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // explicit and implicit conversions to NativeFormat which is one of
 | 
					 | 
				
			||||||
    // standard data types (implicit conversion is useful for preserving the
 | 
					 | 
				
			||||||
    // compatibility with old code)
 | 
					 | 
				
			||||||
    NativeFormat GetFormatId() const { return m_format; }
 | 
					 | 
				
			||||||
    operator NativeFormat() const { return m_format; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // this only works with standard ids
 | 
					 | 
				
			||||||
    void SetId(wxDataFormatId format) { m_format = format; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // string ids are used for custom types - this SetId() must be used for
 | 
					 | 
				
			||||||
    // application-specific formats
 | 
					 | 
				
			||||||
    wxString GetId() const;
 | 
					 | 
				
			||||||
    void SetId(const wxChar *format);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
    // returns TRUE if the format is one of those defined in wxDataFormatId
 | 
					 | 
				
			||||||
    bool IsStandard() const { return m_format > 0 && m_format < wxDF_MAX; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    NativeFormat m_format;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #include "wx/msw/ole/dataobj.h"
 | 
					    #include "wx/msw/ole/dataobj.h"
 | 
				
			||||||
#elif defined(__WXMOTIF__)
 | 
					#elif defined(__WXMOTIF__)
 | 
				
			||||||
    #include "wx/motif/dataobj.h"
 | 
					    #include "wx/motif/dataobj.h"
 | 
				
			||||||
@@ -81,7 +34,7 @@ private:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxPrivateDataObject : public wxDataObject
 | 
					class WXDLLEXPORT wxPrivateDataObject : public wxDataObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef __WXGTK__
 | 
					#if defined(__WXGTK__) || defined(__WXMOTIF__)
 | 
				
			||||||
    DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
 | 
					    DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1347,6 +1347,9 @@ typedef void*           WXFont;
 | 
				
			|||||||
typedef void*           WXImage;
 | 
					typedef void*           WXImage;
 | 
				
			||||||
typedef void*           WXCursor;
 | 
					typedef void*           WXCursor;
 | 
				
			||||||
typedef void*           WXFontList;
 | 
					typedef void*           WXFontList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef unsigned long   Atom;  /* this might fail on a few architectures */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // Motif
 | 
					#endif // Motif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __WXGTK__
 | 
					#ifdef __WXGTK__
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,8 @@
 | 
				
			|||||||
#include "wx/defs.h"
 | 
					#include "wx/defs.h"
 | 
				
			||||||
#include "wx/setup.h"
 | 
					#include "wx/setup.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/dataobj.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/list.h"
 | 
					#include "wx/list.h"
 | 
				
			||||||
#include "wx/module.h"
 | 
					#include "wx/module.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,10 +71,15 @@ public:
 | 
				
			|||||||
  // clears wxTheClipboard and the system's clipboard if possible
 | 
					  // clears wxTheClipboard and the system's clipboard if possible
 | 
				
			||||||
  virtual void Clear();
 | 
					  virtual void Clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /// If primary == TRUE, use primary selection in all further ops,
 | 
				
			||||||
 | 
					  /// primary=FALSE resets it.
 | 
				
			||||||
 | 
					  inline void UsePrimarySelection(bool primary = TRUE) { m_usePrimary = primary; }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 // implementation 
 | 
					 // implementation 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
  bool              m_open;
 | 
					  bool              m_open;
 | 
				
			||||||
  wxList            m_data;
 | 
					  wxList            m_data;
 | 
				
			||||||
 | 
					  bool              m_usePrimary;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* The clipboard */
 | 
					/* The clipboard */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,149 +23,124 @@
 | 
				
			|||||||
// classes
 | 
					// classes
 | 
				
			||||||
//-------------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxDataObject;
 | 
					class wxDataFormat;
 | 
				
			||||||
class WXDLLEXPORT wxTextDataObject;
 | 
					class wxDataObject;
 | 
				
			||||||
class WXDLLEXPORT wxBitmapDataObject;
 | 
					class wxTextDataObject;
 | 
				
			||||||
class WXDLLEXPORT wxPrivateDataObject;
 | 
					 | 
				
			||||||
class WXDLLEXPORT wxFileDataObject;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-------------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
// wxDataObject
 | 
					// wxDataFormat
 | 
				
			||||||
//-------------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxDataObject: public wxObject
 | 
					class wxDataFormat : public wxObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  DECLARE_ABSTRACT_CLASS( wxDataObject )
 | 
					    DECLARE_CLASS( wxDataFormat )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					    wxDataFormat();
 | 
				
			||||||
 | 
					    wxDataFormat( wxDataFormatId type );
 | 
				
			||||||
 | 
					    wxDataFormat( const wxString &id );
 | 
				
			||||||
 | 
					    wxDataFormat( const wxChar *id );
 | 
				
			||||||
 | 
					    wxDataFormat( const wxDataFormat &format );
 | 
				
			||||||
 | 
					    wxDataFormat( const Atom atom );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void SetType( wxDataFormatId type );
 | 
				
			||||||
 | 
					    wxDataFormatId GetType() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* the string Id identifies the format of clipboard or DnD data. a word
 | 
				
			||||||
 | 
					     * processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
 | 
				
			||||||
 | 
					     * to the clipboard - the latter with the Id "application/wxword", an
 | 
				
			||||||
 | 
					     * image manipulation program would put a wxBitmapDataObject and a
 | 
				
			||||||
 | 
					     * wxPrivateDataObject to the clipboard - the latter with "image/png". */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxString GetId() const;
 | 
				
			||||||
 | 
					    void SetId( const wxChar *id );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Atom GetAtom();
 | 
				
			||||||
 | 
					    void SetAtom(Atom atom) { m_hasAtom = TRUE; m_atom = atom; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // implicit conversion to wxDataFormatId
 | 
				
			||||||
 | 
					    operator wxDataFormatId() const { return m_type; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    bool operator==(wxDataFormatId type) const { return m_type == type; }
 | 
				
			||||||
 | 
					    bool operator!=(wxDataFormatId type) const { return m_type != type; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
					    wxDataFormatId  m_type;
 | 
				
			||||||
 | 
					    wxString    m_id;
 | 
				
			||||||
 | 
					    bool        m_hasAtom;
 | 
				
			||||||
 | 
					    Atom        m_atom;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// wxDataObject to be placed in wxDataBroker
 | 
				
			||||||
 | 
					//----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class wxDataObject : public wxObject
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  DECLARE_DYNAMIC_CLASS( wxDataObject )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxDataObject() {}
 | 
					  /* constructor */
 | 
				
			||||||
  ~wxDataObject() {}
 | 
					  wxDataObject();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual wxDataFormat GetFormat() const = 0;
 | 
					  /* destructor */
 | 
				
			||||||
 | 
					  ~wxDataObject();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // implementation
 | 
					  /* write data to dest */
 | 
				
			||||||
 | 
					  virtual void WriteData( void *dest ) const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* get size of data */
 | 
				
			||||||
 | 
					  virtual size_t GetSize() const = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* implementation */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  wxDataFormat &GetFormat();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  wxDataFormatId GetFormatType() const;
 | 
				
			||||||
 | 
					  wxString   GetFormatId() const;
 | 
				
			||||||
 | 
					  Atom    GetFormatAtom() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  wxDataFormat m_format;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//----------------------------------------------------------------------------
 | 
					//----------------------------------------------------------------------------
 | 
				
			||||||
// wxTextDataObject is a specialization of wxDataObject for text data
 | 
					// wxTextDataObject is a specialization of wxDataObject for text data
 | 
				
			||||||
//----------------------------------------------------------------------------
 | 
					//----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxTextDataObject : public wxDataObject
 | 
					class wxTextDataObject : public wxDataObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  DECLARE_DYNAMIC_CLASS( wxTextDataObject )
 | 
					  DECLARE_DYNAMIC_CLASS( wxTextDataObject )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxTextDataObject() {}
 | 
					  /* default constructor. call SetText() later or override
 | 
				
			||||||
  wxTextDataObject( const wxString& strText ) 
 | 
					     WriteData() and GetSize() for working on-demand */
 | 
				
			||||||
    : m_strText(strText) { }
 | 
					  wxTextDataObject();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual wxDataFormat GetFormat() const
 | 
					  /* constructor */
 | 
				
			||||||
    { return wxDF_TEXT; }
 | 
					  wxTextDataObject( const wxString& data );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void SetText( const wxString& strText) 
 | 
					  /* set current text data */
 | 
				
			||||||
    { m_strText = strText; }
 | 
					  void SetText( const wxString& data );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wxString GetText() const
 | 
					  /* get current text data */
 | 
				
			||||||
    { return m_strText; }
 | 
					  wxString GetText() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					  /* by default calls WriteString() with string set by constructor or
 | 
				
			||||||
  wxString  m_strText;
 | 
					     by SetText(). can be overridden for working on-demand */
 | 
				
			||||||
 | 
					  virtual void WriteData( void *dest ) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					  /* by default, returns length of string as set by constructor or
 | 
				
			||||||
 | 
					     by SetText(). can be overridden for working on-demand */
 | 
				
			||||||
 | 
					  virtual size_t GetSize() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					  /* write string to dest */
 | 
				
			||||||
// wxFileDataObject is a specialization of wxDataObject for file names
 | 
					  void WriteString( const wxString &str, void *dest ) const;
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WXDLLEXPORT wxFileDataObject : public wxDataObject
 | 
					  /* implementation */
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  DECLARE_DYNAMIC_CLASS( wxFileDataObject )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					  wxString  m_data;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  wxFileDataObject(void) {}
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  virtual wxDataFormat GetFormat() const
 | 
					 | 
				
			||||||
    { return wxDF_FILENAME; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  void AddFile( const wxString &file )
 | 
					 | 
				
			||||||
    { m_files += file; m_files += (char)0; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  wxString GetFiles() const
 | 
					 | 
				
			||||||
    { return m_files; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
  wxString  m_files;
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class WXDLLEXPORT wxBitmapDataObject : public wxDataObject
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  DECLARE_DYNAMIC_CLASS( wxBitmapDataObject )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wxBitmapDataObject(void) {}
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  virtual wxDataFormat GetFormat() const
 | 
					 | 
				
			||||||
    { return wxDF_BITMAP; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  void SetBitmap( const wxBitmap &bitmap )
 | 
					 | 
				
			||||||
    { m_bitmap = bitmap; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  wxBitmap GetBitmap() const
 | 
					 | 
				
			||||||
    { return m_bitmap; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
  wxBitmap  m_bitmap;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
// wxPrivateDataObject is a specialization of wxDataObject for app specific data
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class WXDLLEXPORT wxPrivateDataObject : public wxDataObject
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wxPrivateDataObject();
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  ~wxPrivateDataObject();
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  virtual wxDataFormat GetFormat() const
 | 
					 | 
				
			||||||
    { return wxDF_PRIVATE; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  // the string ID identifies the format of clipboard or DnD data. a word
 | 
					 | 
				
			||||||
  // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
 | 
					 | 
				
			||||||
  // to the clipboard - the latter with the Id "WXWORD_FORMAT".
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  void SetId( const wxString& id )
 | 
					 | 
				
			||||||
    { m_id = id; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  wxString GetId() const
 | 
					 | 
				
			||||||
    { return m_id; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // will make internal copy
 | 
					 | 
				
			||||||
  void SetData( const char *data, size_t size );
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  size_t GetDataSize() const
 | 
					 | 
				
			||||||
    { return m_size; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  char* GetData() const
 | 
					 | 
				
			||||||
    { return m_data; }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
  size_t     m_size;
 | 
					 | 
				
			||||||
  char*      m_data;
 | 
					 | 
				
			||||||
  wxString   m_id;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,6 +84,9 @@ public:
 | 
				
			|||||||
    virtual int ShowModal();
 | 
					    virtual int ShowModal();
 | 
				
			||||||
    virtual void EndModal(int retCode);
 | 
					    virtual void EndModal(int retCode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
 | 
				
			||||||
 | 
					    int GetReturnCode() const { return m_returnCode; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Standard buttons
 | 
					    // Standard buttons
 | 
				
			||||||
    void OnOK(wxCommandEvent& event);
 | 
					    void OnOK(wxCommandEvent& event);
 | 
				
			||||||
    void OnApply(wxCommandEvent& event);
 | 
					    void OnApply(wxCommandEvent& event);
 | 
				
			||||||
@@ -104,6 +107,7 @@ public:
 | 
				
			|||||||
    //// Motif-specific
 | 
					    //// Motif-specific
 | 
				
			||||||
    bool          m_modalShowing;
 | 
					    bool          m_modalShowing;
 | 
				
			||||||
    wxString      m_dialogTitle;
 | 
					    wxString      m_dialogTitle;
 | 
				
			||||||
 | 
					    int           m_returnCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    virtual void DoSetSize(int x, int y,
 | 
					    virtual void DoSetSize(int x, int y,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -209,6 +209,7 @@ protected:
 | 
				
			|||||||
    int GetPixmapWidth() const { return m_pixmapWidth; }
 | 
					    int GetPixmapWidth() const { return m_pixmapWidth; }
 | 
				
			||||||
    int GetPixmapHeight() const { return m_pixmapHeight; }
 | 
					    int GetPixmapHeight() const { return m_pixmapHeight; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
    // Change properties
 | 
					    // Change properties
 | 
				
			||||||
    virtual void ChangeFont(bool keepOriginalSize = TRUE);             // Change to the current font (often overridden)
 | 
					    virtual void ChangeFont(bool keepOriginalSize = TRUE);             // Change to the current font (often overridden)
 | 
				
			||||||
    virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
 | 
					    virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
 | 
				
			||||||
@@ -220,6 +221,7 @@ protected:
 | 
				
			|||||||
    // Change foreground colour using current foreground colour setting
 | 
					    // Change foreground colour using current foreground colour setting
 | 
				
			||||||
    virtual void ChangeForegroundColour();
 | 
					    virtual void ChangeForegroundColour();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					protected:
 | 
				
			||||||
    // Adds the widget to the hash table and adds event handlers.
 | 
					    // Adds the widget to the hash table and adds event handlers.
 | 
				
			||||||
    bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
 | 
					    bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
 | 
				
			||||||
                      WXWidget formWidget, int x, int y, int width, int height);
 | 
					                      WXWidget formWidget, int x, int y, int width, int height);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,53 @@
 | 
				
			|||||||
#ifndef   _WX_OLEDATAOBJ_H
 | 
					#ifndef   _WX_OLEDATAOBJ_H
 | 
				
			||||||
#define   _WX_OLEDATAOBJ_H
 | 
					#define   _WX_OLEDATAOBJ_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// wxDataFormat identifies the single format of data
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class WXDLLEXPORT wxDataFormat
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					    // the clipboard formats under Win32 are UINTs
 | 
				
			||||||
 | 
					    typedef unsigned int NativeFormat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
 | 
				
			||||||
 | 
					    wxDataFormat& operator=(NativeFormat format)
 | 
				
			||||||
 | 
					        { m_format = format; return *this; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // defautl copy ctor/assignment operators ok
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // comparison (must have both versions)
 | 
				
			||||||
 | 
					    bool operator==(wxDataFormatId format) const
 | 
				
			||||||
 | 
					        { return m_format == (NativeFormat)format; }
 | 
				
			||||||
 | 
					    bool operator!=(wxDataFormatId format) const
 | 
				
			||||||
 | 
					        { return m_format != (NativeFormat)format; }
 | 
				
			||||||
 | 
					    bool operator==(const wxDataFormat& format) const
 | 
				
			||||||
 | 
					        { return m_format == format.m_format; }
 | 
				
			||||||
 | 
					    bool operator!=(const wxDataFormat& format) const
 | 
				
			||||||
 | 
					        { return m_format != format.m_format; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // explicit and implicit conversions to NativeFormat which is one of
 | 
				
			||||||
 | 
					    // standard data types (implicit conversion is useful for preserving the
 | 
				
			||||||
 | 
					    // compatibility with old code)
 | 
				
			||||||
 | 
					    NativeFormat GetFormatId() const { return m_format; }
 | 
				
			||||||
 | 
					    operator NativeFormat() const { return m_format; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // this only works with standard ids
 | 
				
			||||||
 | 
					    void SetId(wxDataFormatId format) { m_format = format; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // string ids are used for custom types - this SetId() must be used for
 | 
				
			||||||
 | 
					    // application-specific formats
 | 
				
			||||||
 | 
					    wxString GetId() const;
 | 
				
			||||||
 | 
					    void SetId(const wxChar *format);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
					    // returns TRUE if the format is one of those defined in wxDataFormatId
 | 
				
			||||||
 | 
					    bool IsStandard() const { return m_format > 0 && m_format < wxDF_MAX; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    NativeFormat m_format;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
// forward declarations
 | 
					// forward declarations
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -149,7 +149,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
 | 
				
			|||||||
    SetIcon(wxICON(mondrian));
 | 
					    SetIcon(wxICON(mondrian));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // create a menu bar
 | 
					    // create a menu bar
 | 
				
			||||||
    wxMenu *menuFile = new wxMenu(wxMENU_TEAROFF);
 | 
					    wxMenu *menuFile = new wxMenu;
 | 
				
			||||||
 | 
					//    wxMenu *menuFile = new wxMenu(wxMENU_TEAROFF);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    menuFile->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog");
 | 
					    menuFile->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog");
 | 
				
			||||||
    menuFile->AppendSeparator();
 | 
					    menuFile->AppendSeparator();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -178,13 +178,11 @@ libwx_motif_la_SOURCES = \
 | 
				
			|||||||
 spinbutt.cpp \
 | 
					 spinbutt.cpp \
 | 
				
			||||||
 statbmp.cpp \
 | 
					 statbmp.cpp \
 | 
				
			||||||
 statbox.cpp \
 | 
					 statbox.cpp \
 | 
				
			||||||
 statline.cpp \
 | 
					 | 
				
			||||||
 stattext.cpp \
 | 
					 stattext.cpp \
 | 
				
			||||||
 textctrl.cpp \
 | 
					 textctrl.cpp \
 | 
				
			||||||
 timer.cpp \
 | 
					 timer.cpp \
 | 
				
			||||||
 tooltip.cpp \
 | 
					 toolbar.cpp \
 | 
				
			||||||
 utilsres.cpp \
 | 
					 utils.cpp \
 | 
				
			||||||
 wave.cpp \
 | 
					 | 
				
			||||||
 window.cpp
 | 
					 window.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# propform.cpp \
 | 
					# propform.cpp \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    m_mainWidget = (WXWidget) buttonWidget;
 | 
					    m_mainWidget = (WXWidget) buttonWidget;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ChangeBackgroundColour ();
 | 
					    ChangeBackgroundColour ();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,7 +40,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 | 
				
			|||||||
    m_windowStyle = style;
 | 
					    m_windowStyle = style;
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    parent->AddChild((wxButton *)this);
 | 
					    parent->AddChild((wxButton *)this);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -54,7 +54,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 | 
				
			|||||||
    XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
					    XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
				
			||||||
    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
					    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    /*
 | 
					    /*
 | 
				
			||||||
    * Patch Note (important)
 | 
					    * Patch Note (important)
 | 
				
			||||||
@@ -89,8 +89,11 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 | 
				
			|||||||
void wxButton::SetDefault()
 | 
					void wxButton::SetDefault()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxWindow *parent = (wxWindow *)GetParent();
 | 
					    wxWindow *parent = (wxWindow *)GetParent();
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					    TODO
 | 
				
			||||||
    if (parent)
 | 
					    if (parent)
 | 
				
			||||||
        parent->SetDefaultItem(this);
 | 
					        parent->SetDefaultItem(this);
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // We initially do not set XmNdefaultShadowThickness, to have small buttons.
 | 
					    // We initially do not set XmNdefaultShadowThickness, to have small buttons.
 | 
				
			||||||
    // Unfortunately, buttons are now mis-aligned. We try to correct this
 | 
					    // Unfortunately, buttons are now mis-aligned. We try to correct this
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,7 +43,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 | 
				
			|||||||
    m_windowStyle = style;
 | 
					    m_windowStyle = style;
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (parent) parent->AddChild(this);
 | 
					    if (parent) parent->AddChild(this);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -56,7 +56,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    XmString text = XmStringCreateSimple (label1);
 | 
					    XmString text = XmStringCreateSimple (label1);
 | 
				
			||||||
    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
					    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
 | 
					    m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
 | 
				
			||||||
        xmToggleButtonWidgetClass, parentWidget,
 | 
					        xmToggleButtonWidgetClass, parentWidget,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -66,7 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
					    Widget parentWidget = (Widget) parent->GetClientWidget();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -174,9 +174,9 @@ void wxChoice::Append(const wxString& item)
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    DoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
 | 
					    DoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (m_windowFont.Ok())
 | 
					    if (m_font.Ok())
 | 
				
			||||||
        XtVaSetValues (w,
 | 
					        XtVaSetValues (w,
 | 
				
			||||||
        XmNfontList, (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_formWidget)),
 | 
					        XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_formWidget)),
 | 
				
			||||||
        NULL);
 | 
					        NULL);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    WXWidget *new_widgetList = new WXWidget[m_noStrings + 1];
 | 
					    WXWidget *new_widgetList = new WXWidget[m_noStrings + 1];
 | 
				
			||||||
@@ -436,12 +436,12 @@ void wxChoice::ChangeFont(bool keepOriginalSize)
 | 
				
			|||||||
    // Note that this causes the widget to be resized back
 | 
					    // Note that this causes the widget to be resized back
 | 
				
			||||||
    // to its original size! We therefore have to set the size
 | 
					    // to its original size! We therefore have to set the size
 | 
				
			||||||
    // back again. TODO: a better way in Motif?
 | 
					    // back again. TODO: a better way in Motif?
 | 
				
			||||||
    if (m_windowFont.Ok())
 | 
					    if (m_font.Ok())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        int width, height, width1, height1;
 | 
					        int width, height, width1, height1;
 | 
				
			||||||
        GetSize(& width, & height);
 | 
					        GetSize(& width, & height);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_mainWidget));
 | 
					        XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_mainWidget));
 | 
				
			||||||
        XtVaSetValues ((Widget) m_mainWidget, XmNfontList, fontList, NULL);
 | 
					        XtVaSetValues ((Widget) m_mainWidget, XmNfontList, fontList, NULL);
 | 
				
			||||||
        XtVaSetValues ((Widget) m_buttonWidget, XmNfontList, fontList, NULL);
 | 
					        XtVaSetValues ((Widget) m_buttonWidget, XmNfontList, fontList, NULL);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -203,16 +203,16 @@ wxObject *wxGetClipboardData(wxDataFormat dataFormat, long *len)
 | 
				
			|||||||
wxDataFormat  wxEnumClipboardFormats(wxDataFormat dataFormat)
 | 
					wxDataFormat  wxEnumClipboardFormats(wxDataFormat dataFormat)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // Only wxDF_TEXT supported
 | 
					    // Only wxDF_TEXT supported
 | 
				
			||||||
    if (dataFormat == (wxDataFormat) 0)
 | 
					    if (dataFormat == wxDF_TEXT)
 | 
				
			||||||
       return wxDF_TEXT;
 | 
					       return wxDF_TEXT;
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
       return (wxDataFormat) 0;
 | 
					       return wxDF_INVALID;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxDataFormat  wxRegisterClipboardFormat(char *formatName)
 | 
					wxDataFormat  wxRegisterClipboardFormat(char *formatName)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // Not supported
 | 
					    // Not supported
 | 
				
			||||||
    return (wxDataFormat) 0;
 | 
					    return (wxDataFormat) wxDF_INVALID;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount)
 | 
					bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount)
 | 
				
			||||||
@@ -281,6 +281,7 @@ bool wxClipboard::SetData( wxDataObject *data )
 | 
				
			|||||||
            return wxSetClipboardData(data->GetFormat(), (wxObject*) (const char*) str);
 | 
					            return wxSetClipboardData(data->GetFormat(), (wxObject*) (const char*) str);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
        case wxDF_BITMAP:
 | 
					        case wxDF_BITMAP:
 | 
				
			||||||
        case wxDF_DIB:
 | 
					        case wxDF_DIB:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -289,6 +290,7 @@ bool wxClipboard::SetData( wxDataObject *data )
 | 
				
			|||||||
            return wxSetClipboardData(data->GetFormat(), & bitmap);
 | 
					            return wxSetClipboardData(data->GetFormat(), & bitmap);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return FALSE;
 | 
					            return FALSE;
 | 
				
			||||||
@@ -332,6 +334,7 @@ bool wxClipboard::GetData( wxDataObject *data )
 | 
				
			|||||||
                return FALSE;
 | 
					                return FALSE;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
        case wxDF_BITMAP:
 | 
					        case wxDF_BITMAP:
 | 
				
			||||||
        case wxDF_DIB:
 | 
					        case wxDF_DIB:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -347,6 +350,7 @@ bool wxClipboard::GetData( wxDataObject *data )
 | 
				
			|||||||
                return FALSE;
 | 
					                return FALSE;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return FALSE;
 | 
					            return FALSE;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,7 +84,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    SetValue(value);
 | 
					    SetValue(value);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,12 +38,15 @@ wxControl::~wxControl()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    // If we delete an item, we should initialize the parent panel,
 | 
					    // If we delete an item, we should initialize the parent panel,
 | 
				
			||||||
    // because it could now be invalid.
 | 
					    // because it could now be invalid.
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					    TODO
 | 
				
			||||||
    wxWindow *parent = (wxWindow *)GetParent();
 | 
					    wxWindow *parent = (wxWindow *)GetParent();
 | 
				
			||||||
    if (parent)
 | 
					    if (parent)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (parent->GetDefaultItem() == (wxButton*) this)
 | 
					        if (parent->GetDefaultItem() == (wxButton*) this)
 | 
				
			||||||
            parent->SetDefaultItem((wxButton*) NULL);
 | 
					            parent->SetDefaultItem((wxButton*) NULL);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxControl::SetLabel(const wxString& label)
 | 
					void wxControl::SetLabel(const wxString& label)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,29 +14,241 @@
 | 
				
			|||||||
#include "wx/dataobj.h"
 | 
					#include "wx/dataobj.h"
 | 
				
			||||||
#include "wx/app.h"
 | 
					#include "wx/app.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <Xm/Xm.h>
 | 
				
			||||||
 | 
					#include "wx/utils.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// global data
 | 
				
			||||||
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Atom  g_textAtom        = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// wxDataFormat
 | 
				
			||||||
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					IMPLEMENT_CLASS(wxDataFormat, wxObject)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    m_type = wxDF_INVALID;
 | 
				
			||||||
 | 
					    m_hasAtom = FALSE;
 | 
				
			||||||
 | 
					    m_atom = (Atom) 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat( wxDataFormatId type )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    SetType( type );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat( const wxChar *id )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    SetId( id );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat( const wxString &id )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    SetId( id );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat( const wxDataFormat &format )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    m_type = format.GetType();
 | 
				
			||||||
 | 
					    m_id = format.GetId();
 | 
				
			||||||
 | 
					    m_hasAtom = TRUE;
 | 
				
			||||||
 | 
					    m_atom = ((wxDataFormat &)format).GetAtom();    // const_cast
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat::wxDataFormat( const Atom atom )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
 | 
				
			||||||
 | 
					    m_hasAtom = TRUE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    m_atom = atom;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (m_atom == g_textAtom)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_type = wxDF_TEXT;
 | 
				
			||||||
 | 
					    } else
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					    if (m_atom == GDK_TARGET_BITMAP)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_type = wxDF_BITMAP;
 | 
				
			||||||
 | 
					    } else
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_type = wxDF_PRIVATE;
 | 
				
			||||||
 | 
						m_id = XGetAtomName( (Display*) wxGetDisplay(),  m_atom );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (m_id == _T("file:ALL"))
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						    m_type = wxDF_FILENAME;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxDataFormat::SetType( wxDataFormatId type )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    m_type = type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (m_type == wxDF_TEXT)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_id = _T("STRING");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    if (m_type == wxDF_BITMAP)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_id = _T("BITMAP");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    if (m_type == wxDF_FILENAME)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_id = _T("file:ALL");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					       wxFAIL_MSG( _T("invalid dataformat") );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    m_hasAtom = FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormatId wxDataFormat::GetType() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_type;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxString wxDataFormat::GetId() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_id;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxDataFormat::SetId( const wxChar *id )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    m_type = wxDF_PRIVATE;
 | 
				
			||||||
 | 
					    m_id = id;
 | 
				
			||||||
 | 
					    m_hasAtom = FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Atom wxDataFormat::GetAtom()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (!m_hasAtom)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_hasAtom = TRUE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (m_type == wxDF_TEXT)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
					            m_atom = g_textAtom;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					        if (m_type == wxDF_BITMAP)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            m_atom = GDK_TARGET_BITMAP;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					        if (m_type == wxDF_PRIVATE)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            m_atom = XInternAtom( (Display*) wxGetDisplay(), MBSTRINGCAST m_id.mbc_str(), FALSE );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
						if (m_type == wxDF_FILENAME)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						    m_atom = XInternAtom( (Display*) wxGetDisplay(), "file:ALL", FALSE );
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						    m_hasAtom = FALSE;
 | 
				
			||||||
 | 
						    m_atom = (Atom) 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return m_atom;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-------------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
// wxDataObject
 | 
					// wxDataObject
 | 
				
			||||||
//-------------------------------------------------------------------------
 | 
					//-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject )
 | 
					IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataObject::wxDataObject()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataObject::~wxDataObject()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormat &wxDataObject::GetFormat()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_format;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxDataFormatId wxDataObject::GetFormatType() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_format.GetType();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxString wxDataObject::GetFormatId() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_format.GetId();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Atom wxDataObject::GetFormatAtom() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    Atom ret = ((wxDataObject*) this)->m_format.GetAtom();
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
// wxTextDataObject
 | 
					// wxTextDataObject
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
 | 
					IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					wxTextDataObject::wxTextDataObject()
 | 
				
			||||||
// wxFileDataObject
 | 
					{
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					    m_format.SetType( wxDF_TEXT );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_DYNAMIC_CLASS( wxFileDataObject, wxDataObject )
 | 
					wxTextDataObject::wxTextDataObject( const wxString& data )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    m_format.SetType( wxDF_TEXT );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					    m_data = data;
 | 
				
			||||||
// wxBitmapDataObject
 | 
					}
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject, wxDataObject )
 | 
					void wxTextDataObject::SetText( const wxString& data )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    m_data = data;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxString wxTextDataObject::GetText() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_data;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxTextDataObject::WriteData( void *dest ) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    WriteString( m_data, dest );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t wxTextDataObject::GetSize() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_data.Len() + 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxTextDataObject::WriteString( const wxString &str, void *dest ) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    memcpy( dest, str.mb_str(), str.Len()+1 );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
// wxPrivateDataObject
 | 
					// wxPrivateDataObject
 | 
				
			||||||
@@ -44,26 +256,45 @@ IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject, wxDataObject )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_DYNAMIC_CLASS( wxPrivateDataObject, wxDataObject )
 | 
					IMPLEMENT_DYNAMIC_CLASS( wxPrivateDataObject, wxDataObject )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxPrivateDataObject::Free()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if ( m_data )
 | 
				
			||||||
 | 
					        free(m_data);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxPrivateDataObject::wxPrivateDataObject()
 | 
					wxPrivateDataObject::wxPrivateDataObject()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    wxString id = _T("application/");
 | 
				
			||||||
 | 
					    id += wxTheApp->GetAppName();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    m_format.SetId( id );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_size = 0;
 | 
					    m_size = 0;
 | 
				
			||||||
    m_data = (char*) NULL; 
 | 
					    m_data = (void *)NULL;
 | 
				
			||||||
    m_id = wxTheApp->GetAppName();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxPrivateDataObject::~wxPrivateDataObject()
 | 
					void wxPrivateDataObject::SetData( const void *data, size_t size )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (m_data) delete[] m_data; 
 | 
					    Free();
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxPrivateDataObject::SetData( const char *data, size_t size )
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    m_size = size;
 | 
					    m_size = size;
 | 
				
			||||||
    
 | 
					    m_data = malloc(size);
 | 
				
			||||||
    if (m_data) delete[] m_data;
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    m_data = new char[size];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    memcpy( m_data, data, size );
 | 
					    memcpy( m_data, data, size );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxPrivateDataObject::WriteData( void *dest ) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    WriteData( m_data, dest );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t wxPrivateDataObject::GetSize() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_size;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxPrivateDataObject::WriteData( const void *data, void *dest ) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    memcpy( dest, data, GetSize() );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,6 +60,8 @@ wxList wxModalDialogs;
 | 
				
			|||||||
wxList wxModelessWindows;  // Frames and modeless dialogs
 | 
					wxList wxModelessWindows;  // Frames and modeless dialogs
 | 
				
			||||||
extern wxList wxPendingDelete;
 | 
					extern wxList wxPendingDelete;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern wxHashTable *wxWidgetHashTable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define wxUSE_INVISIBLE_RESIZE 1
 | 
					#define wxUSE_INVISIBLE_RESIZE 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if !USE_SHARED_LIBRARY
 | 
					#if !USE_SHARED_LIBRARY
 | 
				
			||||||
@@ -139,7 +141,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
        XmStringFree(str);
 | 
					        XmStringFree(str);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
					    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    wxAddWindowToTable(dialogShell, this);
 | 
					    wxAddWindowToTable(dialogShell, this);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,6 +50,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "wx/motif/private.h"
 | 
					#include "wx/motif/private.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern wxHashTable *wxWidgetHashTable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxCloseFrameCallback(Widget, XtPointer, XmAnyCallbackStruct *cbs);
 | 
					void wxCloseFrameCallback(Widget, XtPointer, XmAnyCallbackStruct *cbs);
 | 
				
			||||||
void wxFrameFocusProc(Widget workArea, XtPointer clientData, 
 | 
					void wxFrameFocusProc(Widget workArea, XtPointer clientData, 
 | 
				
			||||||
                      XmAnyCallbackStruct *cbs);
 | 
					                      XmAnyCallbackStruct *cbs);
 | 
				
			||||||
@@ -91,7 +93,7 @@ wxFrame::wxFrame()
 | 
				
			|||||||
    m_frameMenuBar = NULL;
 | 
					    m_frameMenuBar = NULL;
 | 
				
			||||||
    m_frameStatusBar = NULL;
 | 
					    m_frameStatusBar = NULL;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowParent = NULL;
 | 
					    m_parent = NULL;
 | 
				
			||||||
    m_iconized = FALSE;
 | 
					    m_iconized = FALSE;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    //// Motif-specific
 | 
					    //// Motif-specific
 | 
				
			||||||
@@ -133,7 +135,7 @@ bool wxFrame::Create(wxWindow *parent,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
 | 
					    m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
 | 
				
			||||||
    m_foregroundColour = *wxBLACK;
 | 
					    m_foregroundColour = *wxBLACK;
 | 
				
			||||||
    m_windowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
					    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if ( id > -1 )
 | 
					    if ( id > -1 )
 | 
				
			||||||
        m_windowId = id;
 | 
					        m_windowId = id;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -123,7 +123,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    if (height == -1)
 | 
					    if (height == -1)
 | 
				
			||||||
        height = 80;
 | 
					        height = 80;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,7 +111,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    XtAddCallback (listWidget, XmNdefaultActionCallback, (XtCallbackProc) wxListBoxDefaultActionProc,
 | 
					    XtAddCallback (listWidget, XmNdefaultActionCallback, (XtCallbackProc) wxListBoxDefaultActionProc,
 | 
				
			||||||
        (XtPointer) this);
 | 
					        (XtPointer) this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -302,7 +302,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
 | 
					    m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
 | 
				
			||||||
    m_foregroundColour = *wxBLACK;
 | 
					    m_foregroundColour = *wxBLACK;
 | 
				
			||||||
    m_windowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
					    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if ( id > -1 )
 | 
					    if ( id > -1 )
 | 
				
			||||||
        m_windowId = id;
 | 
					        m_windowId = id;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,7 +63,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 | 
				
			|||||||
    m_radioButtonLabels = (wxString*) NULL;
 | 
					    m_radioButtonLabels = (wxString*) NULL;
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetName(name);
 | 
					    SetName(name);
 | 
				
			||||||
    SetValidator(val);
 | 
					    SetValidator(val);
 | 
				
			||||||
@@ -98,7 +98,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    m_formWidget = (WXWidget) formWidget;
 | 
					    m_formWidget = (WXWidget) formWidget;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
    if (label1 != "")
 | 
					    if (label1 != "")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
					        text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
				
			||||||
@@ -177,7 +177,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    SetSelection (0);
 | 
					    SetSelection (0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //    XtManageChild((Widget) m_formWidget);
 | 
					    //    XtManageChild((Widget) m_formWidget);
 | 
				
			||||||
@@ -424,7 +424,7 @@ void wxRadioBox::ChangeFont(bool keepOriginalSize)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxWindow::ChangeFont(keepOriginalSize);
 | 
					    wxWindow::ChangeFont(keepOriginalSize);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) GetTopWidget()));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) GetTopWidget()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    for (i = 0; i < m_noItems; i++)
 | 
					    for (i = 0; i < m_noItems; i++)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,7 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    SetValidator(validator);
 | 
					    SetValidator(validator);
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (parent) parent->AddChild(this);
 | 
					    if (parent) parent->AddChild(this);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -64,7 +64,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
					    XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
 | 
					    Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
 | 
				
			||||||
#if wxUSE_GADGETS
 | 
					#if wxUSE_GADGETS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,7 +99,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
 | 
					    XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -66,7 +66,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
                    XmNlabelType, XmPIXMAP,
 | 
					                    XmNlabelType, XmPIXMAP,
 | 
				
			||||||
                    NULL);
 | 
					                    NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
 | 
					IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
 | 
					BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
 | 
				
			||||||
	EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
 | 
					//	EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
 | 
				
			||||||
END_EVENT_TABLE()
 | 
					END_EVENT_TABLE()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -53,7 +53,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
    m_labelWidget = (WXWidget) 0;
 | 
					    m_labelWidget = (WXWidget) 0;
 | 
				
			||||||
    m_backgroundColour = parent->GetBackgroundColour();
 | 
					    m_backgroundColour = parent->GetBackgroundColour();
 | 
				
			||||||
    m_foregroundColour = parent->GetForegroundColour();
 | 
					    m_foregroundColour = parent->GetForegroundColour();
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetName(name);
 | 
					    SetName(name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -79,7 +79,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (hasLabel)
 | 
					    if (hasLabel)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					        XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        wxString label1(wxStripMenuCodes(label));
 | 
					        wxString label1(wxStripMenuCodes(label));
 | 
				
			||||||
        XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
					        XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,7 +45,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
	    m_windowId = id;
 | 
						    m_windowId = id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_windowStyle = style;
 | 
					    m_windowStyle = style;
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
 | 
					    char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,7 +56,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 | 
				
			|||||||
//    XmString text = XmStringCreateSimple (label1);
 | 
					//    XmString text = XmStringCreateSimple (label1);
 | 
				
			||||||
    XmString text = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET);
 | 
					    XmString text = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
 | 
					    XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
 | 
					    m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
 | 
				
			||||||
                                         xmLabelWidgetClass,
 | 
					                                         xmLabelWidgetClass,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -185,7 +185,7 @@ bool wxTextCtrl::Create(wxWindow *parent,
 | 
				
			|||||||
    XtAddCallback((Widget) m_mainWidget, XmNlosingFocusCallback, (XtCallbackProc)wxTextWindowLoseFocusProc, (XtPointer)this);
 | 
					    XtAddCallback((Widget) m_mainWidget, XmNlosingFocusCallback, (XtCallbackProc)wxTextWindowLoseFocusProc, (XtPointer)this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // font
 | 
					    // font
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -106,7 +106,7 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    m_mainWidget = (WXWidget) toolbar;
 | 
					    m_mainWidget = (WXWidget) toolbar;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_windowFont = parent->GetFont();
 | 
					    m_font = parent->GetFont();
 | 
				
			||||||
    ChangeFont(FALSE);
 | 
					    ChangeFont(FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SetCanAddEventHandler(TRUE);
 | 
					    SetCanAddEventHandler(TRUE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -541,8 +541,8 @@ wxXSetBusyCursor (wxWindow * win, wxCursor * cursor)
 | 
				
			|||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // Restore old cursor
 | 
					        // Restore old cursor
 | 
				
			||||||
        if (win->GetCursor()->Ok())
 | 
					        if (win->GetCursor().Ok())
 | 
				
			||||||
            attrs.cursor = (Cursor) win->GetCursor()->GetXCursor(display);
 | 
					            attrs.cursor = (Cursor) win->GetCursor().GetXCursor(display);
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            attrs.cursor = None;
 | 
					            attrs.cursor = None;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user