Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CTreeElement.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: 1837 byte(s)


1 #ifndef CTREEELEMENT_H_INCLUDED
2 #define CTREEELEMENT_H_INCLUDED
3
4 const int TREE_ICON_OFS = 2; // アイコンと文字の距離
5 const int TREE_ICON_MARGIN = 2; // 文字余白
6
7 class CPlugin;
8 class CPluginListView;
9
10 /*
11 * ツリー要素
12 */
13 class CTreeElement{
14 friend class CPluginTree;
15 friend class CTreeFileElement;
16 friend class CTreeDirElement;
17 protected:
18 static CTreeElement *ms_FocusPrev; // フォーカスアイテムの前
19 static CTreeElement *ms_FocusNext; // フォーカスアイテムの次
20 int m_State; // 状態
21 int m_Width; // 文字列幅
22 bool m_RenameWait; // リネーム待ち
23 DWORD m_ClickTime; // クリック時刻
24 POINT m_DownPos; // クリック座標
25 string m_String; // 文字列
26 CEditBox *m_EditBox; // 名称変更用エディットボックス
27 CTreeDirElement *m_Parent; // 親
28 CTreeElement *m_Brother; // 兄弟
29 CPluginTree *m_Owner; // ツリーコントロール
30 public:
31 CTreeElement(char *, CTreeDirElement *, CPluginTree *);
32 virtual ~CTreeElement(){}
33 CTreeDirElement *GetParent(){ return m_Parent; }
34 void SetString(char *str){ m_String = str; m_Width = -1; }
35 virtual void Delete();
36 bool IsInsideItem(int, int, int, int);
37 void BeginRename();
38 void EndRename(bool);
39 void PrepareDrag();
40 void RenderDragItem();
41 int Compare(CTreeElement *);
42 void MergeSort(CTreeElement **, CTreeElement *);
43 virtual CTreeFileElement *IsFile(){ return NULL; }
44 virtual CTreeDirElement *IsDirectory(){ return NULL; }
45 virtual bool IsRenamable() = 0;
46 virtual bool ConfirmRename(string &) = 0;
47 virtual bool IsDeletable() = 0;
48 virtual void Open();
49 virtual void PushListElement(CPluginListView *) = 0;
50 virtual void Save(FILE *, string) = 0;
51 virtual int CountItem(int, int *, bool) = 0;
52 virtual int ScanInput(int, int, int, int, int) = 0;
53 virtual int Render(int, int, int, int, int) = 0;
54 };
55
56 #endif

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