]>
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"
48 #include "wx/palmos/dragimag.h"
49 #include "wx/palmos/private.h"
51 // ----------------------------------------------------------------------------
53 // ----------------------------------------------------------------------------
55 IMPLEMENT_DYNAMIC_CLASS(wxDragImage
, wxObject
)
57 #define GetHimageList() ((HIMAGELIST) m_hImageList)
59 // ============================================================================
61 // ============================================================================
63 // ----------------------------------------------------------------------------
64 // wxDragImage ctors/dtor
65 // ----------------------------------------------------------------------------
67 wxDragImage::wxDragImage()
71 wxDragImage::~wxDragImage()
75 void wxDragImage::Init()
80 ////////////////////////////////////////////////////////////////////////////
84 ////////////////////////////////////////////////////////////////////////////
86 // Create a drag image from a bitmap and optional cursor
87 bool wxDragImage::Create(const wxBitmap
& image
, const wxCursor
& cursor
)
92 // Create a drag image from an icon and optional cursor
93 bool wxDragImage::Create(const wxIcon
& image
, const wxCursor
& cursor
)
98 // Create a drag image from a string and optional cursor
99 bool wxDragImage::Create(const wxString
& str
, const wxCursor
& cursor
)
105 // Create a drag image for the given tree control item
106 bool wxDragImage::Create(const wxTreeCtrl
& treeCtrl
, wxTreeItemId
& id
)
113 // Create a drag image for the given list control item
114 bool wxDragImage::Create(const wxListCtrl
& listCtrl
, long id
)
121 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, bool fullScreen
, wxRect
* rect
)
126 // Begin drag. hotspot is the location of the drag position relative to the upper-left
127 // corner of the image. This is full screen only. fullScreenRect gives the
128 // position of the window on the screen, to restrict the drag to.
129 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, wxWindow
* fullScreenRect
)
135 bool wxDragImage::EndDrag()
140 // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
141 // is non-NULL, or in screen coordinates if NULL.
142 bool wxDragImage::Move(const wxPoint
& pt
)
147 bool wxDragImage::Show()
152 bool wxDragImage::Hide()
158 #endif // wxUSE_DRAGIMAGE