Dnd constant name changes because names like Copy can be #defined by other

apps. Various other changes to stubs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-17 16:57:01 +00:00
parent 9fdf3c3877
commit 46ccb5107f
26 changed files with 142 additions and 120 deletions

View 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

View 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__)

View 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;

View 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;

View File

@@ -26,6 +26,15 @@
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
#endif //_WX_OLEDROPSRC_H

View 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)

View 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:

View 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()
};

View 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

View 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__)

View 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;

View File

@@ -11,6 +11,10 @@
# 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__)

View 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__