Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CDragContainer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Sun Aug 15 01:53:13 2010 UTC (13 years, 9 months ago) by okadu
File MIME type: text/x-chdr
File size: 1234 byte(s)


1 #ifndef CDRAGCONTAINER_H_INCLUDED
2 #define CDRAGCONTAINER_H_INCLUDED
3
4 const int DRAG_THD = FONT_HEIGHT/2;
5
6 // 反復子
7 typedef list<DWORD>::iterator IDWORD;
8
9 // ドラッグタイプ
10 typedef enum{
11 DRAG_NONE = 0, // 不明
12 DRAG_PLUGIN, // プラグイン・ディレクトリ
13 DRAG_INSERT, // 同一リスト内挿入のみ
14 } DRAGTYPE;
15
16 /*
17 * ドラッグコンテナ
18 */
19 class CDragContainer{
20 friend class CDragInterface;
21 private:
22 static CDragContainer *ms_Drag; // ドラッグ物
23 DRAGTYPE m_Type; // タイプ
24 list<DWORD> m_Data; // データ
25 CDragInterface *m_Owner; // 所有者
26 public:
27 static void BeginDrag(DRAGTYPE, CDragInterface *);
28 static void EndDrag();
29 static bool IsDragging(){ return !!ms_Drag; }
30 static void Insert(DWORD);
31 static void Render();
32 static list<DWORD> &GetData(){ return ms_Drag->m_Data; }
33 static DRAGTYPE GetType(){ return ms_Drag ? ms_Drag->m_Type : DRAG_NONE; }
34 static CDragInterface *GetOwner(){ return ms_Drag ? ms_Drag->m_Owner : NULL; }
35 CDragContainer(DRAGTYPE, CDragInterface *);
36 void InsertData(DWORD);
37 void RenderDragItem();
38 };
39
40 /*
41 * ドラッグ可能インターフェイス
42 */
43 class CDragInterface{
44 protected:
45 public:
46 virtual void RenderDragItem() = 0;
47 };
48
49 #endif CDRAGCONTAINER_H_INCLUDED

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26