]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/dragimag.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDragImage
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "dragimag.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
36 #include "wx/window.h"
37 #include "wx/dcclient.h"
38 #include "wx/dcscreen.h"
39 #include "wx/dcmemory.h"
40 #include "wx/settings.h"
43 #include "wx/msw/private.h"
49 #include "wx/palmos/dragimag.h"
50 #include "wx/palmos/private.h"
52 // ----------------------------------------------------------------------------
54 // ----------------------------------------------------------------------------
56 IMPLEMENT_DYNAMIC_CLASS(wxDragImage
, wxObject
)
58 #define GetHimageList() ((HIMAGELIST) m_hImageList)
60 // ============================================================================
62 // ============================================================================
64 // ----------------------------------------------------------------------------
65 // wxDragImage ctors/dtor
66 // ----------------------------------------------------------------------------
68 wxDragImage::wxDragImage()
72 wxDragImage::~wxDragImage()
76 void wxDragImage::Init()
81 ////////////////////////////////////////////////////////////////////////////
85 ////////////////////////////////////////////////////////////////////////////
87 // Create a drag image from a bitmap and optional cursor
88 bool wxDragImage::Create(const wxBitmap
& image
, const wxCursor
& cursor
)
93 // Create a drag image from an icon and optional cursor
94 bool wxDragImage::Create(const wxIcon
& image
, const wxCursor
& cursor
)
99 // Create a drag image from a string and optional cursor
100 bool wxDragImage::Create(const wxString
& str
, const wxCursor
& cursor
)
106 // Create a drag image for the given tree control item
107 bool wxDragImage::Create(const wxTreeCtrl
& treeCtrl
, wxTreeItemId
& id
)
114 // Create a drag image for the given list control item
115 bool wxDragImage::Create(const wxListCtrl
& listCtrl
, long id
)
122 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, bool fullScreen
, wxRect
* rect
)
127 // Begin drag. hotspot is the location of the drag position relative to the upper-left
128 // corner of the image. This is full screen only. fullScreenRect gives the
129 // position of the window on the screen, to restrict the drag to.
130 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, wxWindow
* fullScreenRect
)
136 bool wxDragImage::EndDrag()
141 // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
142 // is non-NULL, or in screen coordinates if NULL.
143 bool wxDragImage::Move(const wxPoint
& pt
)
148 bool wxDragImage::Show()
153 bool wxDragImage::Hide()
159 #endif // wxUSE_DRAGIMAGE