]> git.saurik.com Git - wxWidgets.git/commitdiff
Motif compile fixes
authorRobert Roebling <robert@roebling.de>
Wed, 23 Jun 1999 10:03:44 +0000 (10:03 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 23 Jun 1999 10:03:44 +0000 (10:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

34 files changed:
distrib/gtk/README.txt
distrib/gtk/Setup
distrib/gtk/copy_src
include/wx/dataobj.h
include/wx/defs.h
include/wx/motif/clipbrd.h
include/wx/motif/dataobj.h
include/wx/motif/dialog.h
include/wx/motif/window.h
include/wx/msw/ole/dataobj.h
samples/minimal/minimal.cpp
src/motif/Makefile.am
src/motif/bmpbuttn.cpp
src/motif/button.cpp
src/motif/checkbox.cpp
src/motif/choice.cpp
src/motif/clipbrd.cpp
src/motif/combobox.cpp
src/motif/control.cpp
src/motif/dataobj.cpp
src/motif/dialog.cpp
src/motif/frame.cpp
src/motif/gauge.cpp
src/motif/listbox.cpp
src/motif/mdi.cpp
src/motif/radiobox.cpp
src/motif/radiobut.cpp
src/motif/slider.cpp
src/motif/statbmp.cpp
src/motif/statbox.cpp
src/motif/stattext.cpp
src/motif/textctrl.cpp
src/motif/toolbar.cpp
src/motif/utils.cpp

index 843b2cff75e6536dbcc60e52ca075821bba382b8..5f4af286bc1fb6994fdaba042ef3373e3e99abc2 100644 (file)
@@ -1,44 +1,29 @@
 wxPython README
 ---------------
 
 wxPython README
 ---------------
 
-Introduction
-------------
-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?
-Personally I prefer using Python for everything.  I only use C++ when
-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
-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
-C++ app on GTK.  It hasn't yet been attempted on MSW (to my knowledge)
-so I don't know how successful such an attempt would be.  However it
-is certainly possible.
+Welcome to the wonderful world of wxPython!
+
+Once you have installed the wxPython extension module, you can try it
+out by going to the [install dir]\wxPython\demo directory and typing:
+
+    python demo.py
+
+There are also some other sample files there for you to play with and
+learn from.
+
+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
index ed7cf93ccd944d11aa5c06b6b235dc9beec063c1..60f8fd0db16d3194cb720f1c0dad7c94f00512df 100644 (file)
@@ -36,8 +36,8 @@ TARGETDIR=$(BINLIBDEST)/wxPython
 
 wxc    wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
        mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
 
 wxc    wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
        mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
-       frames.cpp stattool.cpp windows3.cpp image.cpp \
-       utils.cpp \
+       frames.cpp stattool.cpp windows3.cpp image.cpp misc2.cpp \
+       utils.cpp printfw.cpp \
        ## comment out the next line to disable wxGLCanvas
        ##_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
        -I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
        ## comment out the next line to disable wxGLCanvas
        ##_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
        -I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
index 6e6c75236fe0654f280ece925ae06791a0b967b3..67c68fa076dd1d1f85042d5a6c2a490f9fc21878 100755 (executable)
@@ -269,6 +269,8 @@ cp ./src/gtk/* ~/wxgtk_dist/wxGTK/utils/wxPython/src/gtk
 
 mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 cp ./lib/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/lib
 
 mkdir ~/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
 cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 
 mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/tests
index 20428c455e3da920645b1489f9123f85abf64bb4..b109dc64fe7b0dbc7145bfbc9152193abaedc8b5 100644 (file)
 #define _WX_DATAOBJ_H_BASE_
 
 #if defined(__WXMSW__)
 #define _WX_DATAOBJ_H_BASE_
 
 #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"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/dataobj.h"
     #include "wx/msw/ole/dataobj.h"
 #elif defined(__WXMOTIF__)
     #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 )
 #endif
 
     DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
 #endif
 
index 1cc239db8b365464d3ed04dca932d92eda9758e4..7ed90835ba741cfe97310f72fb69150e2fcb7e73 100644 (file)
@@ -1347,6 +1347,9 @@ typedef void*           WXFont;
 typedef void*           WXImage;
 typedef void*           WXCursor;
 typedef void*           WXFontList;
 typedef void*           WXImage;
 typedef void*           WXCursor;
 typedef void*           WXFontList;
+
+typedef unsigned long   Atom;  /* this might fail on a few architectures */
+
 #endif // Motif
 
 #ifdef __WXGTK__
 #endif // Motif
 
 #ifdef __WXGTK__
index a86215aeabbbb12cba2ccc79676cc7de61da7b74..dceeabcfaac0e0b152baeea1a09b47c291e8fc11 100644 (file)
@@ -22,6 +22,8 @@
 #include "wx/defs.h"
 #include "wx/setup.h"
 
 #include "wx/defs.h"
 #include "wx/setup.h"
 
+#include "wx/dataobj.h"
+
 #include "wx/list.h"
 #include "wx/module.h"
 
 #include "wx/list.h"
 #include "wx/module.h"
 
@@ -69,10 +71,15 @@ public:
   // clears wxTheClipboard and the system's clipboard if possible
   virtual void Clear();
 
   // clears wxTheClipboard and the system's clipboard if possible
   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 
  
   bool              m_open;
   wxList            m_data;
  // implementation 
  
   bool              m_open;
   wxList            m_data;
+  bool              m_usePrimary;
 };
 
 /* The clipboard */
 };
 
 /* The clipboard */
index 02daba2b373b3d67e1f976f435bf12519d08180b..fc0c3216af319d79f6ac599eba5576de860d93e9 100644 (file)
 // classes
 //-------------------------------------------------------------------------
 
 // classes
 //-------------------------------------------------------------------------
 
-class WXDLLEXPORT wxDataObject;
-class WXDLLEXPORT wxTextDataObject;
-class WXDLLEXPORT wxBitmapDataObject;
-class WXDLLEXPORT wxPrivateDataObject;
-class WXDLLEXPORT wxFileDataObject;
+class wxDataFormat;
+class wxDataObject;
+class wxTextDataObject;
 
 //-------------------------------------------------------------------------
 
 //-------------------------------------------------------------------------
-// wxDataObject
+// wxDataFormat
 //-------------------------------------------------------------------------
 
 //-------------------------------------------------------------------------
 
-class WXDLLEXPORT wxDataObject: public wxObject
+class wxDataFormat : public wxObject
 {
 {
-  DECLARE_ABSTRACT_CLASS( wxDataObject )
+    DECLARE_CLASS( wxDataFormat )
 
 public:
 
 public:
+    wxDataFormat();
+    wxDataFormat( wxDataFormatId type );
+    wxDataFormat( const wxString &id );
+    wxDataFormat( const wxChar *id );
+    wxDataFormat( const wxDataFormat &format );
+    wxDataFormat( const Atom atom );
 
 
-  wxDataObject() {}
-  ~wxDataObject() {}
+    void SetType( wxDataFormatId type );
+    wxDataFormatId GetType() const;
 
 
-  virtual wxDataFormat GetFormat() const = 0;
-  
-  // implementation
-};
+    /* 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". */
 
 
-// ----------------------------------------------------------------------------
-// wxTextDataObject is a specialization of wxDataObject for text data
-// ----------------------------------------------------------------------------
+    wxString GetId() const;
+    void SetId( const wxChar *id );
 
 
-class WXDLLEXPORT wxTextDataObject : public wxDataObject
-{
-  DECLARE_DYNAMIC_CLASS( wxTextDataObject )
+    Atom GetAtom();
+    void SetAtom(Atom atom) { m_hasAtom = TRUE; m_atom = atom; }
 
 
-public:
+    // implicit conversion to wxDataFormatId
+    operator wxDataFormatId() const { return m_type; }
 
 
-  wxTextDataObject() {}
-  wxTextDataObject( const wxString& strText ) 
-    : m_strText(strText) { }
-  
-  virtual wxDataFormat GetFormat() const
-    { return wxDF_TEXT; }
-    
-  void SetText( const wxString& strText) 
-    { m_strText = strText; }
-    
-  wxString GetText() const
-    { return m_strText; }
+    bool operator==(wxDataFormatId type) const { return m_type == type; }
+    bool operator!=(wxDataFormatId type) const { return m_type != type; }
 
 private:
 
 private:
-  wxString  m_strText;
-
+    wxDataFormatId  m_type;
+    wxString    m_id;
+    bool        m_hasAtom;
+    Atom        m_atom;
 };
 
 };
 
-// ----------------------------------------------------------------------------
-// wxFileDataObject is a specialization of wxDataObject for file names
-// ----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+// wxDataObject to be placed in wxDataBroker
+//----------------------------------------------------------------------------
 
 
-class WXDLLEXPORT wxFileDataObject : public wxDataObject
+class wxDataObject : public wxObject
 {
 {
-  DECLARE_DYNAMIC_CLASS( wxFileDataObject )
+  DECLARE_DYNAMIC_CLASS( wxDataObject )
 
 public:
 
 
 public:
 
-  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;
-  
-};
+  /* constructor */
+  wxDataObject();
 
 
-// ----------------------------------------------------------------------------
-// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
-// ----------------------------------------------------------------------------
+  /* destructor */
+  ~wxDataObject();
 
 
-class WXDLLEXPORT wxBitmapDataObject : public wxDataObject
-{
-  DECLARE_DYNAMIC_CLASS( wxBitmapDataObject )
+  /* write data to dest */
+  virtual void WriteData( void *dest ) const = 0;
 
 
-public:
+  /* get size of data */
+  virtual size_t GetSize() const = 0;
 
 
-  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;
+  /* implementation */
+
+  wxDataFormat &GetFormat();
+
+  wxDataFormatId GetFormatType() const;
+  wxString   GetFormatId() const;
+  Atom    GetFormatAtom() const;
+
+  wxDataFormat m_format;
 };
 
 };
 
-// ----------------------------------------------------------------------------
-// wxPrivateDataObject is a specialization of wxDataObject for app specific data
-// ----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+// wxTextDataObject is a specialization of wxDataObject for text data
+//----------------------------------------------------------------------------
 
 
-class WXDLLEXPORT wxPrivateDataObject : public wxDataObject
+class wxTextDataObject : public wxDataObject
 {
 {
-  DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
+  DECLARE_DYNAMIC_CLASS( wxTextDataObject )
 
 public:
 
 
 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;
+  /* default constructor. call SetText() later or override
+     WriteData() and GetSize() for working on-demand */
+  wxTextDataObject();
+
+  /* constructor */
+  wxTextDataObject( const wxString& data );
+
+  /* set current text data */
+  void SetText( const wxString& data );
+
+  /* get current text data */
+  wxString GetText() const;
+
+  /* by default calls WriteString() with string set by constructor or
+     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 */
+  void WriteString( const wxString &str, void *dest ) const;
+
+  /* implementation */
+
+  wxString  m_data;
 };
 
 
 };
 
 
index 21107d02824a9e0e95cf7ad3ceb35234740d6266..b929956e96836a80b4b91bbb340884ababc5a152 100644 (file)
@@ -84,6 +84,9 @@ public:
     virtual int ShowModal();
     virtual void EndModal(int retCode);
 
     virtual int ShowModal();
     virtual void EndModal(int retCode);
 
+    void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
+    int GetReturnCode() const { return m_returnCode; }
+
     // Standard buttons
     void OnOK(wxCommandEvent& event);
     void OnApply(wxCommandEvent& event);
     // Standard buttons
     void OnOK(wxCommandEvent& event);
     void OnApply(wxCommandEvent& event);
@@ -104,6 +107,7 @@ public:
     //// Motif-specific
     bool          m_modalShowing;
     wxString      m_dialogTitle;
     //// Motif-specific
     bool          m_modalShowing;
     wxString      m_dialogTitle;
+    int           m_returnCode;
 
 protected:
     virtual void DoSetSize(int x, int y,
 
 protected:
     virtual void DoSetSize(int x, int y,
index fed6259e2dfe46053bf2a5a1c28da3db7efd6dd3..3a165449c131f5e280a0fae10292f7c2016db60a 100644 (file)
@@ -209,6 +209,7 @@ protected:
     int GetPixmapWidth() const { return m_pixmapWidth; }
     int GetPixmapHeight() const { return m_pixmapHeight; }
 
     int GetPixmapWidth() const { return m_pixmapWidth; }
     int GetPixmapHeight() const { return m_pixmapHeight; }
 
+public:
     // Change properties
     virtual void ChangeFont(bool keepOriginalSize = TRUE);             // Change to the current font (often overridden)
     virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
     // Change properties
     virtual void ChangeFont(bool keepOriginalSize = TRUE);             // Change to the current font (often overridden)
     virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
@@ -220,6 +221,7 @@ protected:
     // Change foreground colour using current foreground colour setting
     virtual void ChangeForegroundColour();
 
     // Change foreground colour using current foreground colour setting
     virtual void ChangeForegroundColour();
 
+protected:
     // Adds the widget to the hash table and adds event handlers.
     bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
                       WXWidget formWidget, int x, int y, int width, int height);
     // Adds the widget to the hash table and adds event handlers.
     bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
                       WXWidget formWidget, int x, int y, int width, int height);
index 1fcfb1f30f04ea7ec52d51502f51103d7b20167f..6490e67f82babe1fbcab7b4842988e9fb33a4fc7 100644 (file)
 #ifndef   _WX_OLEDATAOBJ_H
 #define   _WX_OLEDATAOBJ_H
 
 #ifndef   _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
 // ----------------------------------------------------------------------------
index ebed2f206c1607dac3d40436079de72a4bc16425..cf8bd0166f309e6b765f3cc74cc850ab73b6e303 100644 (file)
@@ -149,7 +149,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     SetIcon(wxICON(mondrian));
 
     // create a menu bar
     SetIcon(wxICON(mondrian));
 
     // 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->AppendSeparator();
 
     menuFile->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog");
     menuFile->AppendSeparator();
index 5bb3e6d5160289583a8da2a595d36360697cf230..22e18533934e1b2c72643524cc2c4c0bc8025015 100644 (file)
@@ -178,13 +178,11 @@ libwx_motif_la_SOURCES = \
  spinbutt.cpp \
  statbmp.cpp \
  statbox.cpp \
  spinbutt.cpp \
  statbmp.cpp \
  statbox.cpp \
- statline.cpp \
  stattext.cpp \
  textctrl.cpp \
  timer.cpp \
  stattext.cpp \
  textctrl.cpp \
  timer.cpp \
- tooltip.cpp \
- utilsres.cpp \
- wave.cpp \
+ toolbar.cpp \
+ utils.cpp \
  window.cpp
 
 # propform.cpp \
  window.cpp
 
 # propform.cpp \
index f5e7767b14965954a29892824bbc5b2f7315ea0b..bf9a57a63ffb484b252fe62ed34256c8003bc92e 100644 (file)
@@ -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);
     
     ChangeBackgroundColour ();
     ChangeFont(FALSE);
     
     ChangeBackgroundColour ();
index 209c03de98219561a6e6a3b988a17ae1b9dd662f..f48bab42301e3d96203098fcda6a097babcc5828 100644 (file)
@@ -40,7 +40,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     m_windowStyle = style;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     m_windowStyle = style;
     m_backgroundColour = parent->GetBackgroundColour();
     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);
     Widget parentWidget = (Widget) parent->GetClientWidget();
     
     XmString text = XmStringCreateSimple ((char*) (const char*) label1);
     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()
 {
     wxWindow *parent = (wxWindow *)GetParent();
 void wxButton::SetDefault()
 {
     wxWindow *parent = (wxWindow *)GetParent();
+/*
+    TODO
     if (parent)
         parent->SetDefaultItem(this);
     if (parent)
         parent->SetDefaultItem(this);
+*/
     
     // We initially do not set XmNdefaultShadowThickness, to have small buttons.
     // Unfortunately, buttons are now mis-aligned. We try to correct this
     
     // We initially do not set XmNdefaultShadowThickness, to have small buttons.
     // Unfortunately, buttons are now mis-aligned. We try to correct this
index 0a5027d04607027a718871e30288785c02d355c1..160e3a6c81b861edf81804e5a4488e1e705e48e8 100644 (file)
@@ -43,7 +43,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     m_windowStyle = style;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     m_windowStyle = style;
     m_backgroundColour = parent->GetBackgroundColour();
     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);
     Widget parentWidget = (Widget) parent->GetClientWidget();
     
     XmString text = XmStringCreateSimple (label1);
     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",
         xmToggleButtonWidgetClass, parentWidget,
     
     m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
         xmToggleButtonWidgetClass, parentWidget,
index b950c67ef405a02b417dea7727a952fde56dc9e1..528d0607f000b7f8ae24d25f289cd4e0c10fdc5a 100644 (file)
@@ -66,7 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
     
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     
     m_backgroundColour = parent->GetBackgroundColour();
     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);
     
     WXWidget *new_widgetList = new WXWidget[m_noStrings + 1];
         NULL);
     
     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
     // to its original size! We therefore have to set the size
     // back again. TODO: a better way in Motif?
     // Note that this causes the widget to be resized back
     // to its original size! We therefore have to set the size
     // back again. TODO: a better way in Motif?
-    if (m_windowFont.Ok())
+    if (m_font.Ok())
     {
         int width, height, width1, height1;
         GetSize(& width, & height);
         
     {
         int width, height, width1, height1;
         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_buttonWidget, XmNfontList, fontList, NULL);
         
         XtVaSetValues ((Widget) m_mainWidget, XmNfontList, fontList, NULL);
         XtVaSetValues ((Widget) m_buttonWidget, XmNfontList, fontList, NULL);
         
index 21df675bf2dba318d71fb4de42a85919d8fd20d8..c5046a0db0a3880b61af678636627a2d15c1e89e 100644 (file)
@@ -203,16 +203,16 @@ wxObject *wxGetClipboardData(wxDataFormat dataFormat, long *len)
 wxDataFormat  wxEnumClipboardFormats(wxDataFormat dataFormat)
 {
     // Only wxDF_TEXT supported
 wxDataFormat  wxEnumClipboardFormats(wxDataFormat dataFormat)
 {
     // Only wxDF_TEXT supported
-    if (dataFormat == (wxDataFormat) 0)
+    if (dataFormat == wxDF_TEXT)
        return wxDF_TEXT;
     else
        return wxDF_TEXT;
     else
-       return (wxDataFormat) 0;
+       return wxDF_INVALID;
 }
 
 wxDataFormat  wxRegisterClipboardFormat(char *formatName)
 {
     // Not supported
 }
 
 wxDataFormat  wxRegisterClipboardFormat(char *formatName)
 {
     // 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);
             break;
         }
             return wxSetClipboardData(data->GetFormat(), (wxObject*) (const char*) str);
             break;
         }
+/*
         case wxDF_BITMAP:
         case wxDF_DIB:
         {
         case wxDF_BITMAP:
         case wxDF_DIB:
         {
@@ -289,6 +290,7 @@ bool wxClipboard::SetData( wxDataObject *data )
             return wxSetClipboardData(data->GetFormat(), & bitmap);
             break;
         }
             return wxSetClipboardData(data->GetFormat(), & bitmap);
             break;
         }
+*/
         default:
         {
             return FALSE;
         default:
         {
             return FALSE;
@@ -332,6 +334,7 @@ bool wxClipboard::GetData( wxDataObject *data )
                 return FALSE;
             break;
         }
                 return FALSE;
             break;
         }
+/*
         case wxDF_BITMAP:
         case wxDF_DIB:
         {
         case wxDF_BITMAP:
         case wxDF_DIB:
         {
@@ -347,6 +350,7 @@ bool wxClipboard::GetData( wxDataObject *data )
                 return FALSE;
             break;
         }
                 return FALSE;
             break;
         }
+*/
         default:
         {
             return FALSE;
         default:
         {
             return FALSE;
index 41a12151e587579617c6832991d37dd85507dea0..b24da1adb019aa0c960577ce88fa62120c7ef386 100644 (file)
@@ -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);
     
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
     
     SetCanAddEventHandler(TRUE);
index 090eae88f8b962d1f45257d5417030e08100a685..38e35741fa616418751e82da68114800db73a875 100644 (file)
@@ -38,12 +38,15 @@ wxControl::~wxControl()
 {
     // If we delete an item, we should initialize the parent panel,
     // because it could now be invalid.
 {
     // If we delete an item, we should initialize the parent panel,
     // because it could now be invalid.
+/*
+    TODO
     wxWindow *parent = (wxWindow *)GetParent();
     if (parent)
     {
         if (parent->GetDefaultItem() == (wxButton*) this)
             parent->SetDefaultItem((wxButton*) NULL);
     }
     wxWindow *parent = (wxWindow *)GetParent();
     if (parent)
     {
         if (parent->GetDefaultItem() == (wxButton*) this)
             parent->SetDefaultItem((wxButton*) NULL);
     }
+*/
 }
 
 void wxControl::SetLabel(const wxString& label)
 }
 
 void wxControl::SetLabel(const wxString& label)
index 465bc56741fb601985a530487ea743a54a8ef3f2..b41b06164e6d5407ba9aca50b953b99bdee6e496 100644 (file)
 #include "wx/dataobj.h"
 #include "wx/app.h"
 
 #include "wx/dataobj.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
 //-------------------------------------------------------------------------
 
 IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject )
 
 //-------------------------------------------------------------------------
 // wxDataObject
 //-------------------------------------------------------------------------
 
 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
 // ----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
 
 // ----------------------------------------------------------------------------
 // wxTextDataObject
 // ----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
 
-// ----------------------------------------------------------------------------
-// wxFileDataObject
-// ----------------------------------------------------------------------------
+wxTextDataObject::wxTextDataObject()
+{
+    m_format.SetType( wxDF_TEXT );
+}
 
 
-IMPLEMENT_DYNAMIC_CLASS( wxFileDataObject, wxDataObject )
+wxTextDataObject::wxTextDataObject( const wxString& data )
+{
+    m_format.SetType( wxDF_TEXT );
 
 
-// ----------------------------------------------------------------------------
-// wxBitmapDataObject
-// ----------------------------------------------------------------------------
+    m_data = data;
+}
+
+void wxTextDataObject::SetText( const wxString& data )
+{
+    m_data = data;
+}
+
+wxString wxTextDataObject::GetText() const
+{
+    return m_data;
+}
 
 
-IMPLEMENT_DYNAMIC_CLASS( wxBitmapDataObject, wxDataObject )
+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 )
 
-wxPrivateDataObject::wxPrivateDataObject() 
-{ 
-    m_size = 0; 
-    m_data = (char*) NULL; 
-    m_id = wxTheApp->GetAppName();
+void wxPrivateDataObject::Free()
+{
+    if ( m_data )
+        free(m_data);
 }
 }
-    
-wxPrivateDataObject::~wxPrivateDataObject()
-{ 
-    if (m_data) delete[] m_data; 
+
+wxPrivateDataObject::wxPrivateDataObject()
+{
+    wxString id = _T("application/");
+    id += wxTheApp->GetAppName();
+
+    m_format.SetId( id );
+
+    m_size = 0;
+    m_data = (void *)NULL;
 }
 }
-  
-void wxPrivateDataObject::SetData( const char *data, size_t size )
+
+void wxPrivateDataObject::SetData( const void *data, size_t size )
 {
 {
+    Free();
+
     m_size = size;
     m_size = size;
-    
-    if (m_data) delete[] m_data;
-    
-    m_data = new char[size];
+    m_data = malloc(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() );
 }
 
 }
 
index 775b1ca77968916c240d435cafb4aeb8cd2de0a6..d298056eb68c5bfef407405f8663790ea84ed71d 100644 (file)
@@ -60,6 +60,8 @@ wxList wxModalDialogs;
 wxList wxModelessWindows;  // Frames and modeless dialogs
 extern wxList wxPendingDelete;
 
 wxList wxModelessWindows;  // Frames and modeless dialogs
 extern wxList wxPendingDelete;
 
+extern wxHashTable *wxWidgetHashTable;
+
 #define wxUSE_INVISIBLE_RESIZE 1
 
 #if !USE_SHARED_LIBRARY
 #define wxUSE_INVISIBLE_RESIZE 1
 
 #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);
     
     wxAddWindowToTable(dialogShell, this);
     ChangeFont(FALSE);
     
     wxAddWindowToTable(dialogShell, this);
index 98682e8b99defa62b39391b4477aae73f1b5cb21..08cb475d7dd8765e2fd6d2dee2dc905d31545d1a 100644 (file)
@@ -50,6 +50,8 @@
 
 #include "wx/motif/private.h"
 
 
 #include "wx/motif/private.h"
 
+extern wxHashTable *wxWidgetHashTable;
+
 void wxCloseFrameCallback(Widget, XtPointer, XmAnyCallbackStruct *cbs);
 void wxFrameFocusProc(Widget workArea, XtPointer clientData, 
                       XmAnyCallbackStruct *cbs);
 void wxCloseFrameCallback(Widget, XtPointer, XmAnyCallbackStruct *cbs);
 void wxFrameFocusProc(Widget workArea, XtPointer clientData, 
                       XmAnyCallbackStruct *cbs);
@@ -91,7 +93,7 @@ wxFrame::wxFrame()
     m_frameMenuBar = NULL;
     m_frameStatusBar = NULL;
     
     m_frameMenuBar = NULL;
     m_frameStatusBar = NULL;
     
-    m_windowParent = NULL;
+    m_parent = NULL;
     m_iconized = FALSE;
     
     //// Motif-specific
     m_iconized = FALSE;
     
     //// Motif-specific
@@ -133,7 +135,7 @@ bool wxFrame::Create(wxWindow *parent,
     
     m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
     
     m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
-    m_windowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
     
     if ( id > -1 )
         m_windowId = id;
     
     if ( id > -1 )
         m_windowId = id;
index 5804f0b9b4856b06d3b502b66c6989a6d67a66a8..a8fc4cb16d446f1041be6c6f2ec8b2e317417b9d 100644 (file)
@@ -123,7 +123,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
     if (height == -1)
         height = 80;
     
     if (height == -1)
         height = 80;
     
-    m_windowFont = parent->GetFont();
+    m_font = parent->GetFont();
     ChangeFont(FALSE);
     
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
     
     SetCanAddEventHandler(TRUE);
index dab3cd48464af1f79865d37cab832a57d3a1ad94..0666c62369811613936d2fa920f3aa2b81398dd0 100644 (file)
@@ -111,7 +111,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
     XtAddCallback (listWidget, XmNdefaultActionCallback, (XtCallbackProc) wxListBoxDefaultActionProc,
         (XtPointer) this);
 
     XtAddCallback (listWidget, XmNdefaultActionCallback, (XtCallbackProc) wxListBoxDefaultActionProc,
         (XtPointer) this);
 
-    m_windowFont = parent->GetFont();
+    m_font = parent->GetFont();
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
index bace16b9f98a1ddaf9b5856610a624ee042b48e2..57786a54b9244d83a574b58fae79f1b86005717f 100644 (file)
@@ -302,7 +302,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
     
     m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
     
     m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
-    m_windowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+    m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
     
     if ( id > -1 )
         m_windowId = id;
     
     if ( id > -1 )
         m_windowId = id;
index ea9ef07f6b803816244b6c65832665147c259708..85c9cb6d198a4dfc7459dc2e0d3c7cf986dd47f3 100644 (file)
@@ -63,7 +63,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     m_radioButtonLabels = (wxString*) NULL;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     m_radioButtonLabels = (wxString*) NULL;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
-    m_windowFont = parent->GetFont();
+    m_font = parent->GetFont();
 
     SetName(name);
     SetValidator(val);
 
     SetName(name);
     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 != "")
     {
         text = XmStringCreateSimple ((char*) (const char*) label1);
     if (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);
 
     //    XtManageChild((Widget) m_formWidget);
     ChangeFont(FALSE);
 
     //    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;
     for (i = 0; i < m_noItems; i++)
 
     int i;
     for (i = 0; i < m_noItems; i++)
index 7fe7f99d31aef3bf846d2a5dcead9f383f2d3e19..7092369312ec2bad88989fd89b6df9c6677822dc 100644 (file)
@@ -47,7 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
     SetValidator(validator);
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     SetValidator(validator);
     m_backgroundColour = parent->GetBackgroundColour();
     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",
 #if wxUSE_GADGETS
     
     Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
 #if wxUSE_GADGETS
index ab2b4f6e4a3b3311126dfe133af60cc75bccf412..549360987362daa17899da73560d624aec3220e3 100644 (file)
@@ -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);
     SetCanAddEventHandler(TRUE);
     
     ChangeFont(FALSE);
     SetCanAddEventHandler(TRUE);
index ba3ae76b292ca0bd249f41062b64f4e370403f12..d4a8308d1acd2c5bb9f3149f8b9c7ca34b423ff0 100644 (file)
@@ -66,7 +66,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                     XmNlabelType, XmPIXMAP,
                     NULL);
 
                     XmNlabelType, XmPIXMAP,
                     NULL);
 
-    m_windowFont = parent->GetFont();
+    m_font = parent->GetFont();
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
index c3cda9c6d568161f72707cc4f856ff56e77d144e..872d120417c2e1fe81848a5644df0fca9719af69 100644 (file)
@@ -27,7 +27,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
 
 BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
 
 BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
-       EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
+//     EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
 END_EVENT_TABLE()
 
 #endif
 END_EVENT_TABLE()
 
 #endif
@@ -53,7 +53,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
     m_labelWidget = (WXWidget) 0;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     m_labelWidget = (WXWidget) 0;
     m_backgroundColour = parent->GetBackgroundColour();
     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));
         XmString text = XmStringCreateSimple ((char*) (const char*) label1);
 
         wxString label1(wxStripMenuCodes(label));
         XmString text = XmStringCreateSimple ((char*) (const char*) label1);
index 996cf9315e414ce6216b0093c3b1a17f085338c1..ab2115939218da681aa396abc32fa7cc2de9407c 100644 (file)
@@ -45,7 +45,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
            m_windowId = id;
 
     m_windowStyle = style;
            m_windowId = id;
 
     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 = XmStringCreateLtoR (label1, XmSTRING_DEFAULT_CHARSET);
 
 //    XmString text = XmStringCreateSimple (label1);
     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,
                                          xmLabelWidgetClass,
 
     m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
                                          xmLabelWidgetClass,
index 5a8950d25da7d446368b6b7da1308bc5d7a35d56..9668a888a848b800b03c8ea20c74bfd714609319 100644 (file)
@@ -185,7 +185,7 @@ bool wxTextCtrl::Create(wxWindow *parent,
     XtAddCallback((Widget) m_mainWidget, XmNlosingFocusCallback, (XtCallbackProc)wxTextWindowLoseFocusProc, (XtPointer)this);
 
     // font
     XtAddCallback((Widget) m_mainWidget, XmNlosingFocusCallback, (XtCallbackProc)wxTextWindowLoseFocusProc, (XtPointer)this);
 
     // font
-    m_windowFont = parent->GetFont();
+    m_font = parent->GetFont();
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
index 319e564d81774caacb3cd68e39269b186deb29a4..2ab14b3f8ab18438983cb80867e54d2299801423 100644 (file)
@@ -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);
 
     SetCanAddEventHandler(TRUE);
     ChangeFont(FALSE);
 
     SetCanAddEventHandler(TRUE);
index 47e93405ef895580a58027ffce005d0e442f40fc..65d6c32becad7c80410e643bd4a7c30697efdcad 100644 (file)
@@ -541,8 +541,8 @@ wxXSetBusyCursor (wxWindow * win, wxCursor * cursor)
     else
     {
         // Restore old cursor
     else
     {
         // Restore old cursor
-        if (win->GetCursor()->Ok())
-            attrs.cursor = (Cursor) win->GetCursor()->GetXCursor(display);
+        if (win->GetCursor().Ok())
+            attrs.cursor = (Cursor) win->GetCursor().GetXCursor(display);
         else
             attrs.cursor = None;
     }
         else
             attrs.cursor = None;
     }