]>
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"
42 #include "wx/palmos/dragimag.h"
43 #include "wx/palmos/private.h"
45 // ----------------------------------------------------------------------------
47 // ----------------------------------------------------------------------------
49 IMPLEMENT_DYNAMIC_CLASS(wxDragImage
, wxObject
)
51 #define GetHimageList() ((HIMAGELIST) m_hImageList)
53 // ============================================================================
55 // ============================================================================
57 // ----------------------------------------------------------------------------
58 // wxDragImage ctors/dtor
59 // ----------------------------------------------------------------------------
61 wxDragImage::wxDragImage()
65 wxDragImage::~wxDragImage()
69 void wxDragImage::Init()
74 ////////////////////////////////////////////////////////////////////////////
78 ////////////////////////////////////////////////////////////////////////////
80 // Create a drag image from a bitmap and optional cursor
81 bool wxDragImage::Create(const wxBitmap
& image
, const wxCursor
& cursor
)
86 // Create a drag image from an icon and optional cursor
87 bool wxDragImage::Create(const wxIcon
& image
, const wxCursor
& cursor
)
92 // Create a drag image from a string and optional cursor
93 bool wxDragImage::Create(const wxString
& str
, const wxCursor
& cursor
)
99 // Create a drag image for the given tree control item
100 bool wxDragImage::Create(const wxTreeCtrl
& treeCtrl
, wxTreeItemId
& id
)
107 // Create a drag image for the given list control item
108 bool wxDragImage::Create(const wxListCtrl
& listCtrl
, long id
)
115 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, bool fullScreen
, wxRect
* rect
)
120 // Begin drag. hotspot is the location of the drag position relative to the upper-left
121 // corner of the image. This is full screen only. fullScreenRect gives the
122 // position of the window on the screen, to restrict the drag to.
123 bool wxDragImage::BeginDrag(const wxPoint
& hotspot
, wxWindow
* window
, wxWindow
* fullScreenRect
)
129 bool wxDragImage::EndDrag()
134 // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
135 // is non-NULL, or in screen coordinates if NULL.
136 bool wxDragImage::Move(const wxPoint
& pt
)
141 bool wxDragImage::Show()
146 bool wxDragImage::Hide()
152 #endif // wxUSE_DRAGIMAGE