]> git.saurik.com Git - wxWidgets.git/commitdiff
Dnd constant name changes because names like Copy can be #defined by other
authorJulian Smart <julian@anthemion.co.uk>
Thu, 17 Sep 1998 16:57:01 +0000 (16:57 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 17 Sep 1998 16:57:01 +0000 (16:57 +0000)
apps. Various other changes to stubs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

26 files changed:
distrib/msw/gtk.rsp
distrib/msw/msw.rsp
include/wx/defs.h
include/wx/dnd.h
include/wx/gtk/dnd.h
include/wx/gtk1/dnd.h
include/wx/msw/ole/dropsrc.h
include/wx/msw/window.h
include/wx/stubs/dnd.h
include/wx/stubs/frame.h
include/wx/stubs/window.h
include/wx/taskbar.h
include/wx/tbarsmpl.h
include/wx/toolbar.h
include/wx/utils.h
samples/dnd/dnd.cpp
samples/minimal/makefile.unx
src/common/gdicmn.cpp
src/common/postscrp.cpp
src/common/socket.cpp
src/gtk/dnd.cpp
src/gtk1/dnd.cpp
src/msw/ole/dropsrc.cpp
src/stubs/dnd.cpp
src/stubs/frame.cpp
src/stubs/window.cpp

index 3088ce4771f99ea60043c56384fd6ce55de691f2..9fee801c2248eb8170cd616be16ac06b2ebce613 100644 (file)
@@ -2,7 +2,6 @@ install-sh
 Makefile
 template.mak
 TODO.txt
-configure
 configure.in
 config.guess
 config.sub
index 708382c8f71765610c87d9d02aa995809dd9ec81..2f7894e3350ab3641e3bc6e0fee2380388a7dd59 100644 (file)
@@ -1,6 +1,9 @@
 docs/msw/*.txt
 docs/licence.txt
 
+distrib/msw/*.rsp
+distrib/msw/*.bat
+
 src/makeb32.env
 src/makebcc.env
 src/makemsw.env
index c45e25c85c5ab1cfd3ec39291948b30cd71ae23a..b57ca708429d07b7a6400f6e14fd02f9159d6726 100644 (file)
@@ -889,9 +889,10 @@ typedef int (__stdcall *WXFARPROC)();
 typedef void*           WXWindow;
 typedef void*           WXWidget;
 typedef void*           WXAppContext;
-typedef void*           WXMainColormap;
+typedef void*           WXColormap;
 typedef void            WXDisplay;
 typedef void            WXEvent;
+typedef void*           WXCursor;
 #endif
 
 #endif
index 84a61155ecab602a0850c220802d7882dc383a69..dc69fe940d16a680c22c6c23c060b46ef60d8026 100644 (file)
@@ -6,6 +6,7 @@
 #include "wx/msw/ole/droptgt.h"
 #include "wx/msw/ole/dataobj.h"
 #elif defined(__WXMOTIF__)
+#include "wx/motif/dnd.h"
 #elif defined(__WXGTK__)
 #include "wx/gtk/dnd.h"
 #elif defined(__WXQT__)
index fa97fdc5cd9fcdcdd6d176b73249fcf2ce79bf94..962161ea94f42f41987591639da275c43d019272 100644 (file)
@@ -210,28 +210,28 @@ class wxFileDropTarget: public wxDropTarget
 // wxDropSource
 //-------------------------------------------------------------------------
 
+  enum wxDragResult
+  {
+    wxDragError,    // error prevented the d&d operation from completing
+    wxDragNone,     // drag target didn't accept the data
+    wxDragCopy,     // the data was successfully copied
+    wxDragMove,     // the data was successfully moved
+    wxDragCancel    // the operation was cancelled by user (not an error)
+  };
+
 class wxDropSource: public wxObject
 {
   public:
 
-  enum DragResult
-  {
-    Error,    // error prevented the d&d operation from completing
-    None,     // drag target didn't accept the data
-    Copy,     // the data was successfully copied
-    Move,     // the data was successfully moved
-    Cancel    // the operation was cancelled by user (not an error)
-  };
-
     wxDropSource( wxWindow *win );
     wxDropSource( wxDataObject &data, wxWindow *win );
     
     ~wxDropSource(void);
     
     void SetData( wxDataObject &data  );
-    DragResult DoDragDrop( bool bAllowMove = FALSE );
+    wxDragResult DoDragDrop( bool bAllowMove = FALSE );
     
-    virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
+    virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
 
   protected:
   
@@ -242,7 +242,7 @@ class wxDropSource: public wxObject
   
     GtkWidget     *m_widget;
     wxWindow      *m_window;
-    DragResult     m_retValue;
+    wxDragResult   m_retValue;
     wxDataObject  *m_data;
     
     wxCursor      m_defaultCursor;
index fa97fdc5cd9fcdcdd6d176b73249fcf2ce79bf94..962161ea94f42f41987591639da275c43d019272 100644 (file)
@@ -210,28 +210,28 @@ class wxFileDropTarget: public wxDropTarget
 // wxDropSource
 //-------------------------------------------------------------------------
 
+  enum wxDragResult
+  {
+    wxDragError,    // error prevented the d&d operation from completing
+    wxDragNone,     // drag target didn't accept the data
+    wxDragCopy,     // the data was successfully copied
+    wxDragMove,     // the data was successfully moved
+    wxDragCancel    // the operation was cancelled by user (not an error)
+  };
+
 class wxDropSource: public wxObject
 {
   public:
 
-  enum DragResult
-  {
-    Error,    // error prevented the d&d operation from completing
-    None,     // drag target didn't accept the data
-    Copy,     // the data was successfully copied
-    Move,     // the data was successfully moved
-    Cancel    // the operation was cancelled by user (not an error)
-  };
-
     wxDropSource( wxWindow *win );
     wxDropSource( wxDataObject &data, wxWindow *win );
     
     ~wxDropSource(void);
     
     void SetData( wxDataObject &data  );
-    DragResult DoDragDrop( bool bAllowMove = FALSE );
+    wxDragResult DoDragDrop( bool bAllowMove = FALSE );
     
-    virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
+    virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
 
   protected:
   
@@ -242,7 +242,7 @@ class wxDropSource: public wxObject
   
     GtkWidget     *m_widget;
     wxWindow      *m_window;
-    DragResult     m_retValue;
+    wxDragResult   m_retValue;
     wxDataObject  *m_data;
     
     wxCursor      m_defaultCursor;
index e16968b28520406b360ee4eb3d31cdfc5d6a5412..a43999498d61fd42369957f9e4160df282ebea16 100644 (file)
 class wxIDropSource;
 class wxDataObject;
 
+enum wxDragResult
+  {
+    wxDragError,    // error prevented the d&d operation from completing
+    wxDragNone,     // drag target didn't accept the data
+    wxDragCopy,     // the data was successfully copied
+    wxDragMove,     // the data was successfully moved
+    wxDragCancel    // the operation was cancelled by user (not an error)
+  };
+
 // ----------------------------------------------------------------------------
 // wxDropSource is used to start the drag-&-drop operation on associated
 // wxDataObject object. It's responsible for giving UI feedback while dragging.
@@ -33,15 +42,6 @@ class wxDataObject;
 class wxDropSource
 {
 public:
-  enum DragResult
-  {
-    Error,    // error prevented the d&d operation from completing
-    None,     // drag target didn't accept the data
-    Copy,     // the data was successfully copied
-    Move,     // the data was successfully moved
-    Cancel    // the operation was cancelled by user (not an error)
-  };
-
   // ctors: if you use default ctor you must call SetData() later!
   // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK
   //     compatibility
@@ -54,12 +54,12 @@ public:
 
   // do it (call this in response to a mouse button press, for example)
   // params: if bAllowMove is false, data can be only copied
-  DragResult DoDragDrop(bool bAllowMove = FALSE);
+  wxDragResult DoDragDrop(bool bAllowMove = FALSE);
 
   // overridable: you may give some custom UI feedback during d&d operation
   // in this function (it's called on each mouse move, so it shouldn't be too
   // slow). Just return false if you want default feedback.
-  virtual bool GiveFeedback(DragResult effect, bool bScrolling);
+  virtual bool GiveFeedback(wxDragResult effect, bool bScrolling);
 
 protected:
   void Init();
@@ -70,4 +70,4 @@ private:
   wxIDropSource *m_pIDropSource;  // the pointer to COM interface
 };
 
-#endif  //_WX_OLEDROPSRC_H
\ No newline at end of file
+#endif  //_WX_OLEDROPSRC_H
index d47ad0e97d881d1cd1c97855ee15588dbab02572..b1be14ed170a06e9cdfaa51462848b2174120e90 100644 (file)
@@ -350,6 +350,7 @@ public:
   inline virtual void SetDefaultItem(wxButton *but);
 
   virtual void SetAcceleratorTable(const wxAcceleratorTable& accel);
+  inline virtual wxAcceleratorTable& GetAcceleratorTable() const { return (wxAcceleratorTable&) m_acceleratorTable; }
 
   // Override to define new behaviour for default action (e.g. double clicking
   // on a listbox)
index 2d3ad2f73775a38a1d1230ea580cfc1ddc8dbc3f..5a7a65335f43519c006de7e4ad8e71f568232b15 100644 (file)
@@ -205,28 +205,28 @@ class WXDLLEXPORT wxFileDropTarget: public wxDropTarget
 // wxDropSource
 //-------------------------------------------------------------------------
 
+enum wxDragResult
+  {
+    wxDragError,    // error prevented the d&d operation from completing
+    wxDragNone,     // drag target didn't accept the data
+    wxDragCopy,     // the data was successfully copied
+    wxDragMove,     // the data was successfully moved
+    wxDragCancel    // the operation was cancelled by user (not an error)
+  };
+
 class WXDLLEXPORT wxDropSource: public wxObject
 {
   public:
 
-  enum DragResult
-  {
-    Error,    // error prevented the d&d operation from completing
-    None,     // drag target didn't accept the data
-    Copy,     // the data was successfully copied
-    Move,     // the data was successfully moved
-    Cancel    // the operation was cancelled by user (not an error)
-  };
-
     wxDropSource( wxWindow *win );
     wxDropSource( wxDataObject &data, wxWindow *win );
     
     ~wxDropSource(void);
     
     void SetData( wxDataObject &data  );
-    DragResult DoDragDrop( bool bAllowMove = FALSE );
+    wxDragResult DoDragDrop( bool bAllowMove = FALSE );
     
-    virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
+    virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
 
   protected:
   
index 70247ae171f0b631d791644a3337d7264fa8e56c..705cc5cf24774334e4843d628aadb95088f7cfeb 100644 (file)
@@ -128,8 +128,6 @@ public:
 
   virtual void Maximize(bool maximize);
 
-  virtual void SetAcceleratorTable(const wxAcceleratorTable& accel);
-
   // Responds to colour changes
   void OnSysColourChanged(wxSysColourChangedEvent& event);
 
@@ -147,7 +145,6 @@ protected:
   bool                  m_iconized;
   static bool           m_useNativeStatusBar;
   wxToolBar *           m_frameToolBar ;
-  wxAcceleratorTable    m_acceleratorTable;
 
   DECLARE_EVENT_TABLE()
 };
index 6e87206d56a331600f782480fa73c44ca6905f54..6b33ddf12a04b384c25e7a2c523f599a611af251 100644 (file)
@@ -26,6 +26,7 @@
 #include "wx/string.h"
 #include "wx/list.h"
 #include "wx/region.h"
+#include "wx/accel.h"
 
 #define wxKEY_SHIFT     1
 #define wxKEY_CTRL      2
@@ -255,6 +256,9 @@ public:
   inline int GetId() const;
   inline void SetId(int id);
 
+  virtual void SetAcceleratorTable(const wxAcceleratorTable& accel);
+  inline virtual wxAcceleratorTable& GetAcceleratorTable() const { return (wxAcceleratorTable&) m_acceleratorTable; }
+
   // Make the window modal (all other windows unresponsive)
   virtual void MakeModal(bool modal);
 
@@ -477,6 +481,7 @@ protected:
   wxColour              m_foregroundColour ;
   wxColour              m_defaultBackgroundColour;
   wxColour              m_defaultForegroundColour;
+  wxAcceleratorTable    m_acceleratorTable;
 
 #if USE_DRAG_AND_DROP
   wxDropTarget         *m_pDropTarget;    // the current drop target or NULL
index 5b70d8573d13d7e6ea51cbba1f31cfaeb25c0d41..1e78999d42cc0358e1f2cd58365b9152652f18dd 100644 (file)
@@ -4,6 +4,7 @@
 #if defined(__WXMSW__)
 #include "wx/msw/taskbar.h"
 #elif defined(__WXMOTIF__)
+#include "wx/motif/taskbar.h"
 #elif defined(__WXGTK__)
 #elif defined(__WXQT__)
 #elif defined(__WXMAC__)
index add138a78d2c0a080a153f45b9aad9260f67184e..5094b665d9ddfc94a288200a923e042b6ebbd42f 100644 (file)
@@ -24,6 +24,8 @@
 #include "wx/list.h"
 #include "wx/tbarbase.h"
 
+class WXDLLEXPORT wxMemoryDC;
+
 WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
 WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
 WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
index e2499addee1266b373de61e583f83238ef710b8c..4bba52e5acb76f8b04819b46262d14c4dfeaef97 100644 (file)
 #   include "wx/msw/tbarmsw.h"
 #   define wxToolBar wxToolBarMSW
 #   define sm_classwxToolBar sm_classwxToolBarMSW
+#elif defined(__WXMOTIF__)
+#   include "wx/tbarsmpl.h"
+#   define wxToolBar wxToolBarSimple
+#   define sm_classwxToolBar sm_classwxToolBarSimple
 #elif defined(__WXGTK__)
 #   include "wx/gtk/tbargtk.h"
 #elif defined(__WXQT__)
index cbfd4d2b83720ca0730382c12e3a19422d274e8c..040d689fe3468fcc496f6a76ee583ea1f26e6a6c 100644 (file)
@@ -271,11 +271,9 @@ char* WXDLLEXPORT wxLoadUserResource(const wxString& resourceName, const wxStrin
 
 // X only
 #ifdef __X__
-// Get X display: often needed in the wxWindows implementation.
-Display *wxGetDisplay(void);
-/* Matthew Flatt: Added wxSetDisplay and wxGetDisplayName */
+WXDisplay *wxGetDisplay();
 bool wxSetDisplay(const wxString& display_name);
-wxString wxGetDisplayName(void);
+wxString wxGetDisplayName();
 #endif
 
 #ifdef __X__
index 546028fb2c803416da630f0f316b94b9f34d3f06..2d596e27cba029af81e4113849d128dea7880b45 100644 (file)
@@ -302,11 +302,11 @@ void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
     const char *pc;
 
     switch ( dragSource.DoDragDrop(TRUE) ) {
-      case wxDropSource::Error:   pc = "Error!";    break;
-      case wxDropSource::None:    pc = "Nothing";   break;
-      case wxDropSource::Copy:    pc = "Copied";    break;
-      case wxDropSource::Move:    pc = "Moved";     break;
-      case wxDropSource::Cancel:  pc = "Cancelled"; break;
+      case wxDragError:   pc = "Error!";    break;
+      case wxDragNone:    pc = "Nothing";   break;
+      case wxDragCopy:    pc = "Copied";    break;
+      case wxDragMove:    pc = "Moved";     break;
+      case wxDragCancel:  pc = "Cancelled"; break;
       default:                    pc = "Huh?";      break;
     }
 
index 7365f9c19cf5fd17e6de33272d932cecaea65399..6e0b9cac435c81c43308df2b860aea99b9493d8f 100644 (file)
@@ -9,8 +9,9 @@
 #
 # Makefile for minimal example (UNIX).
 
-include ../../src/makeprog.env
-
 PROGRAM=minimal
 
 OBJECTS=$(PROGRAM).o
+
+include ../../src/makeprog.env
+
index 7238bc9d0ace8ecbc410adc12b2e6172b102f61c..69cc0cac80b0f57abe5508fcc94ba7c5ed5d9752 100644 (file)
@@ -29,6 +29,7 @@
 #include "wx/cursor.h"
 #include "wx/font.h"
 #include "wx/palette.h"
+#include "wx/app.h"
 
 #include "wx/log.h"
 #include <string.h>
 #include <windows.h>
 #endif
 
+#ifdef __WXMOTIF__
+#include <Xm/Xm.h>
+#endif
+
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_CLASS(wxColourDatabase, wxList)
 IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList)
@@ -283,16 +288,11 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour)
     XColor xcolour;
 
 #ifdef __WXMOTIF__
-    Display *display = XtDisplay(wxTheApp->topLevel) ;
-#endif
-#ifdef __XVIEW__
-    Xv_Screen screen = xv_get(xview_server, SERVER_NTH_SCREEN, 0);
-    Xv_opaque root_window = xv_get(screen, XV_ROOT);
-    Display *display = (Display *)xv_get(root_window, XV_DISPLAY);
+    Display *display = XtDisplay((Widget) wxTheApp->GetTopLevelWidget()) ;
 #endif
 
     /* MATTHEW: [4] Use wxGetMainColormap */
-    if (!XParseColor(display, wxGetMainColormap(display), colour,&xcolour))
+    if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour,&xcolour))
       return NULL;
 
     unsigned char r = (unsigned char)(xcolour.red >> 8);
@@ -340,7 +340,8 @@ void wxInitializeStockObjects ()
 #ifdef __WXMOTIF__
 #endif
 #ifdef __X__
-  wxFontPool = new XFontPool;
+  // TODO
+  //  wxFontPool = new XFontPool;
 #endif
 
   wxNORMAL_FONT = new wxFont (12, wxMODERN, wxNORMAL, wxNORMAL);
@@ -604,12 +605,12 @@ wxFont *wxFontList::
          each_font->GetStyle () == Style &&
          each_font->GetWeight () == Weight &&
          each_font->GetUnderlined () == underline &&
-#if defined(__X__) || (defined(__WXMSW__) && USE_PORTABLE_FONTS_IN_MSW)
-         each_font->GetFontId () == FamilyOrFontId) /* New font system */
-#else
+         //#if defined(__X__)
+         //      each_font->GetFontId () == FamilyOrFontId) /* New font system */
+         //#else
          each_font->GetFamily () == FamilyOrFontId &&
           (!each_font->GetFaceName() || each_font->GetFaceName() == Face))
-#endif
+       //#endif
        return each_font;
     }
   wxFont *font = new wxFont (PointSize, FamilyOrFontId, Style, Weight, underline, Face);
index f85a94d553849bf94165732ce68b4542992a9978..99d1baa0954edcf02fdd271a8c575b3d8f55f87a 100644 (file)
 
 #endif
 
+#ifdef __WXMOTIF__
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#endif
+
 #ifdef __WXMSW__
 
 #ifdef DrawText
@@ -1447,13 +1452,16 @@ Blit (long xdest, long ydest, long fwidth, long fheight,
 #else  
 
 #ifdef __WXMOTIF__
-  d = source->display;
+  // TODO. for now, use global display
+  //  d = source->display;
+  d = (Display*) wxGetDisplay();
 #else
-  d = wxGetDisplay();
+  d = (Display*) wxGetDisplay();
 #endif
 
-  cm = wxGetMainColormap(d);
-  image = XGetImage(d, source->pixmap, x, y, width, height, AllPlanes, ZPixmap);
+  cm = (Colormap) wxTheApp->GetMainColormap((WXDisplay*) d);
+  // TODO - implement GetPixmap() and uncomment this line
+  //  image = XGetImage(d, source->GetPixmap(), x, y, width, height, AllPlanes, ZPixmap);
   
 #endif
 
@@ -2144,8 +2152,8 @@ int wxPostScriptPrintDialog::ShowModal (void)
       StringToLong (WXSTRINGCAST text4->GetValue (), &wxThePrintSetupData->printerTranslateY);
 
 #ifdef __X__
-      wxThePrintSetupData->SetPrinterOptions(WXSTRINGCAST text0->GetValue ());
-      wxThePrintSetupData->SetPrinterCommand(WXSTRINGCAST text_prt->GetValue ());
+      //      wxThePrintSetupData->SetPrinterOptions(WXSTRINGCAST text0->GetValue ());
+      //      wxThePrintSetupData->SetPrinterCommand(WXSTRINGCAST text_prt->GetValue ());
 #endif
 
       wxThePrintSetupData->SetPrinterOrientation((radio0->GetSelection() == 1 ? PS_LANDSCAPE : PS_PORTRAIT));
index 53ddde5e89e13974b88c481ba3428587c03cc57f..414efb7b8e79ac9d5b999bd9af57ccec3e78d223 100644 (file)
 #endif
 
 #ifdef __WXMOTIF__
-#define wxAPP_CONTEXT wxTheApp->appContext
+#define wxAPP_CONTEXT ((XtAppContext)wxTheApp->GetAppContext())
 #endif
 
 #ifdef __WINDOWS__
index dac170064ab127cb12195c9669a229273904839d..458eb72641c80b987c70d1d48034dab000b9ff9a 100644 (file)
@@ -158,7 +158,7 @@ void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source
   
   delete ptr;
   
-  source->m_retValue = wxDropSource::Copy;
+  source->m_retValue = wxDragCopy;
 }
 
 wxDropSource::wxDropSource( wxWindow *win )
@@ -170,7 +170,7 @@ wxDropSource::wxDropSource( wxWindow *win )
   if (win->m_wxwindow) m_widget = win->m_wxwindow;
   
   m_data = (wxDataObject *) NULL;
-  m_retValue = Cancel;
+  m_retValue = wxDragCancel;
 
   m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
   m_goaheadCursor = wxCursor( wxCURSOR_HAND );
@@ -183,7 +183,7 @@ wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
   m_window = win;
   m_widget = win->m_widget;
   if (win->m_wxwindow) m_widget = win->m_wxwindow;
-  m_retValue = Cancel;
+  m_retValue = wxDragCancel;
   
   m_data = &data;
 
@@ -203,15 +203,15 @@ wxDropSource::~wxDropSource(void)
   g_blockEventsOnDrag = FALSE;
 }
    
-wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
+wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
 {
-  if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None;
-  if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None;
+  if (gdk_dnd.dnd_grabbed) return (wxDragResult) wxDragNone;
+  if (gdk_dnd.drag_really) return (wxDragResult) wxDragNone;
   
   wxASSERT_MSG( m_data, "wxDragSource: no data" );
   
-  if (!m_data) return (wxDropSource::DragResult) None;
-  if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None;
+  if (!m_data) return (wxDragResult) wxDragNone;
+  if (m_data->GetDataSize() == 0) return (wxDragResult) wxDragNone;
   
   GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window;
   
index dac170064ab127cb12195c9669a229273904839d..458eb72641c80b987c70d1d48034dab000b9ff9a 100644 (file)
@@ -158,7 +158,7 @@ void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source
   
   delete ptr;
   
-  source->m_retValue = wxDropSource::Copy;
+  source->m_retValue = wxDragCopy;
 }
 
 wxDropSource::wxDropSource( wxWindow *win )
@@ -170,7 +170,7 @@ wxDropSource::wxDropSource( wxWindow *win )
   if (win->m_wxwindow) m_widget = win->m_wxwindow;
   
   m_data = (wxDataObject *) NULL;
-  m_retValue = Cancel;
+  m_retValue = wxDragCancel;
 
   m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
   m_goaheadCursor = wxCursor( wxCURSOR_HAND );
@@ -183,7 +183,7 @@ wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
   m_window = win;
   m_widget = win->m_widget;
   if (win->m_wxwindow) m_widget = win->m_wxwindow;
-  m_retValue = Cancel;
+  m_retValue = wxDragCancel;
   
   m_data = &data;
 
@@ -203,15 +203,15 @@ wxDropSource::~wxDropSource(void)
   g_blockEventsOnDrag = FALSE;
 }
    
-wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
+wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
 {
-  if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None;
-  if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None;
+  if (gdk_dnd.dnd_grabbed) return (wxDragResult) wxDragNone;
+  if (gdk_dnd.drag_really) return (wxDragResult) wxDragNone;
   
   wxASSERT_MSG( m_data, "wxDragSource: no data" );
   
-  if (!m_data) return (wxDropSource::DragResult) None;
-  if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None;
+  if (!m_data) return (wxDragResult) wxDragNone;
+  if (m_data->GetDataSize() == 0) return (wxDragResult) wxDragNone;
   
   GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window;
   
index 1f9708873201e968a9256aaf4c2ec9b0af68976a..1e381bfb5654bb9ede37445f562f16ef7667c2ae 100644 (file)
@@ -121,13 +121,13 @@ STDMETHODIMP wxIDropSource::QueryContinueDrag(BOOL fEscapePressed,
 // Notes   : default implementation is ok in more than 99% of cases
 STDMETHODIMP wxIDropSource::GiveFeedback(DWORD dwEffect)
 {
-  wxDropSource::DragResult effect;
+  wxDragResult effect;
   if ( dwEffect & DROPEFFECT_COPY )
-    effect = wxDropSource::Copy;
+    effect = wxDragCopy;
   else if ( dwEffect & DROPEFFECT_MOVE )
-    effect = wxDropSource::Move;
+    effect = wxDragMove;
   else
-    effect = wxDropSource::None;
+    effect = wxDragNone;
 
   if ( m_pDropSource->GiveFeedback(effect,
                                    (dwEffect & DROPEFFECT_SCROLL) != 0 ) )
@@ -173,12 +173,12 @@ wxDropSource::~wxDropSource()
 
 // Name    : DoDragDrop
 // Purpose : start drag and drop operation
-// Returns : DragResult - the code of performed operation
+// Returns : wxDragResult - the code of performed operation
 // Params  : [in] bool bAllowMove: if false, only copy is allowed
 // Notes   : you must call SetData() before if you had used def ctor
-wxDropSource::DragResult wxDropSource::DoDragDrop(bool bAllowMove)
+wxDragResult wxDropSource::DoDragDrop(bool bAllowMove)
 {
-  wxCHECK_MSG( m_pData != NULL, None, "No data in wxDropSource!" );
+  wxCHECK_MSG( m_pData != NULL, wxDragNone, "No data in wxDropSource!" );
 
   DWORD dwEffect;
   HRESULT hr = ::DoDragDrop(m_pData->GetInterface(), 
@@ -188,23 +188,23 @@ wxDropSource::DragResult wxDropSource::DoDragDrop(bool bAllowMove)
                             &dwEffect);
 
   if ( hr == DRAGDROP_S_CANCEL ) {
-    return Cancel;
+    return wxDragCancel;
   }
   else if ( hr == DRAGDROP_S_DROP ) {
     if ( dwEffect & DROPEFFECT_COPY ) {
-      return Copy;
+      return wxDragCopy;
     }
     else if ( dwEffect & DROPEFFECT_MOVE ) {
       // consistency check: normally, we shouldn't get "move" at all
       // here if !bAllowMove, but in practice it does happen quite often
       if ( bAllowMove )
-        return Move;
+        return wxDragMove;
       else
-        return Copy;
+        return wxDragCopy;
     }
     else {
       // not copy or move
-      return None;
+      return wxDragNone;
     }
   }
   else {
@@ -216,7 +216,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop(bool bAllowMove)
       wxLogDebug("Unexpected success return code %08lx from DoDragDrop.", hr);
     }
 
-    return Error;
+    return wxDragError;
   }
 }
 
@@ -226,9 +226,9 @@ wxDropSource::DragResult wxDropSource::DoDragDrop(bool bAllowMove)
 // Params  : [in] DragResult effect - what would happen if we dropped now
 //           [in] bool bScrolling   - true if target is scrolling    
 // Notes   : here we just leave this stuff for default implementation
-bool wxDropSource::GiveFeedback(DragResult effect, bool bScrolling)
+bool wxDropSource::GiveFeedback(wxDragResult effect, bool bScrolling)
 {
   return FALSE;
 }
 
-#endif  //USE_DRAG_AND_DROP
\ No newline at end of file
+#endif  //USE_DRAG_AND_DROP
index 50bfbd9162ab1f9ed9acb261dfe9f96d64c7ddae..32088eef0f6deea25207f69117d2fdeb92a3f6da 100644 (file)
@@ -125,9 +125,9 @@ wxDropSource::~wxDropSource(void)
 {
 };
    
-wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
+wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
 {
     // TODO
-    return Error;
+    return wxDragError;
 };
 
index 5c22818c61d738b784c988834330f0cf7864347c..5326e615d9bce12f88ee1ccada00f6d69dc59c93 100644 (file)
@@ -180,11 +180,6 @@ void wxFrame::SetIcon(const wxIcon& icon)
   // TODO
 }
 
-void wxFrame::SetAcceleratorTable(const wxAcceleratorTable& accel)
-{
-    m_acceleratorTable = accel;
-}
-
 wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
     const wxString& name)
 {
index 22f44f8b8d93ca2e84fec3394f9552a5e47bae51..6a538b0e80282b4ecd59df18d67f9323b95bbeff 100644 (file)
@@ -1172,6 +1172,11 @@ void wxWindow::SetValidator(const wxValidator& validator)
                m_windowValidator->SetWindow(this) ;
 }
 
+void wxWindow::SetAcceleratorTable(const wxAcceleratorTable& accel)
+{
+    m_acceleratorTable = accel;
+}
+
 // Find a window by id or name
 wxWindow *wxWindow::FindWindow(long id)
 {