]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/dragimag.cpp
782c168db5d90a832ed4ab375137f4facacd09e5
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"
32 #include "wx/window.h"
33 #include "wx/dcclient.h"
34 #include "wx/dcscreen.h"
35 #include "wx/dcmemory.h"
36 #include "wx/settings.h"
44 #include "wx/palmos/dragimag.h"
45 #include "wx/palmos/private.h"
47 // ----------------------------------------------------------------------------
49 // ----------------------------------------------------------------------------
51 IMPLEMENT_DYNAMIC_CLASS(wxDragImage
, wxObject
)
53 #define GetHimageList() ((HIMAGELIST) m_hImageList)
55 // ============================================================================
57 // ============================================================================
59 // ----------------------------------------------------------------------------
60 // wxDragImage ctors/dtor
61 // ----------------------------------------------------------------------------
63 wxDragImage::wxDragImage()
67 wxDragImage::~wxDragImage()
71 void wxDragImage::Init()
76 ////////////////////////////////////////////////////////////////////////////
80 ////////////////////////////////////////////////////////////////////////////
82 // Create a drag image from a bitmap and optional cursor
83 bool wxDragImage::Create(const wxBitmap
& image
, const wxCursor
& cursor
)
88 // Create a drag image from an icon and optional cursor
89 bool wxDragImage::Create(const wxIcon
& image
, const wxCursor
& cursor
)
94 // Create a drag image from a string and optional cursor
95 bool wxDragImage::Create(const wxString
& str
, const wxCursor
& cursor
)
101 // Create a drag image for the given tree control item
102 bool wxDragImage::Create(const wxTreeCtrl
& treeCtrl
, wxTreeItemId
& id
)
109 // Create a drag image for the given list control item
110 bool wxDragImage::Create(const wxListCtrl
& listCtrl
, long id
)
117 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, bool fullScreen
, wxRect
* rect
)
122 // Begin drag. hotspot is the location of the drag position relative to the upper-left
123 // corner of the image. This is full screen only. fullScreenRect gives the
124 // position of the window on the screen, to restrict the drag to.
125 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, wxWindow
* fullScreenRect
)
131 bool wxDragImage::EndDrag()
136 // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
137 // is non-NULL, or in screen coordinates if NULL.
138 bool wxDragImage::Move(const wxPoint
& pt
)
143 bool wxDragImage::Show()
148 bool wxDragImage::Hide()
154 #endif // wxUSE_DRAGIMAGE