]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/dragimag.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/dragimag.cpp
3 // Purpose: wxDragImage
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
31 #include "wx/window.h"
32 #include "wx/dcclient.h"
33 #include "wx/dcscreen.h"
34 #include "wx/dcmemory.h"
35 #include "wx/settings.h"
43 #include "wx/palmos/dragimag.h"
44 #include "wx/palmos/private.h"
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 IMPLEMENT_DYNAMIC_CLASS(wxDragImage
, wxObject
)
52 #define GetHimageList() ((HIMAGELIST) m_hImageList)
54 // ============================================================================
56 // ============================================================================
58 // ----------------------------------------------------------------------------
59 // wxDragImage ctors/dtor
60 // ----------------------------------------------------------------------------
62 wxDragImage::wxDragImage()
66 wxDragImage::~wxDragImage()
70 void wxDragImage::Init()
75 ////////////////////////////////////////////////////////////////////////////
79 ////////////////////////////////////////////////////////////////////////////
81 // Create a drag image from a bitmap and optional cursor
82 bool wxDragImage::Create(const wxBitmap
& image
, const wxCursor
& cursor
)
87 // Create a drag image from an icon and optional cursor
88 bool wxDragImage::Create(const wxIcon
& image
, const wxCursor
& cursor
)
93 // Create a drag image from a string and optional cursor
94 bool wxDragImage::Create(const wxString
& str
, const wxCursor
& cursor
)
100 // Create a drag image for the given tree control item
101 bool wxDragImage::Create(const wxTreeCtrl
& treeCtrl
, wxTreeItemId
& id
)
108 // Create a drag image for the given list control item
109 bool wxDragImage::Create(const wxListCtrl
& listCtrl
, long id
)
116 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, bool fullScreen
, wxRect
* rect
)
121 // Begin drag. hotspot is the location of the drag position relative to the upper-left
122 // corner of the image. This is full screen only. fullScreenRect gives the
123 // position of the window on the screen, to restrict the drag to.
124 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, wxWindow
* fullScreenRect
)
130 bool wxDragImage::EndDrag()
135 // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
136 // is non-NULL, or in screen coordinates if NULL.
137 bool wxDragImage::Move(const wxPoint
& pt
)
142 bool wxDragImage::Show()
147 bool wxDragImage::Hide()
153 #endif // wxUSE_DRAGIMAGE