source: dev/trunk/ab5.0/abdev/abdev/include/ProjectManager/WindowManager.h@ 617

Last change on this file since 617 was 617, checked in by dai_9181, 16 years ago

WindowInfoクラスをリファクタリング。

File size: 1.9 KB
Line 
1#pragma once
2
3
4namespace ActiveBasic{ namespace IDE{
5
6/*
7struct ImageReferenceType
8{
9 enum EnumType
10 {
11 File = 0,
12 Resource,
13 };
14};
15
16struct IMAGECTRLINFO
17{
18 ImageReferenceType::EnumType type;
19 std::string path;
20};
21*/
22
23}}
24
25
26//イメージタイプ
27#define IMGTYPE_FILE 0
28#define IMGTYPE_RES 1
29
30struct IMAGECTRLINFO{
31 int type;
32 char *path;
33};
34
35class CHILDINFO
36{
37public:
38 char *IdName;
39 POINT pos;
40 SIZE size;
41 char *caption;
42 DWORD style;
43 DWORD ExStyle;
44 int Control;
45
46 IMAGECTRLINFO ImageCtrlInfo;
47};
48class WindowInfo
49{
50public:
51 WindowInfo()
52 : caption( NULL )
53 , MenuID( NULL )
54 , IconResName( NULL )
55 , ClassName( NULL )
56 , CallBackName( NULL )
57 {
58 }
59
60 void SetName( const std::string &name )
61 {
62 this->name = name;
63 }
64 const std::string &GetName() const
65 {
66 return name;
67 }
68
69 void SetHandleName( const std::string &handleName )
70 {
71 this->handleName = handleName;
72 }
73 const std::string &GetHandleName() const
74 {
75 return handleName;
76 }
77
78 //ウィンドウデータ
79 POINT pos;
80 SIZE size;
81 char *caption;
82 DWORD style;
83 DWORD ExStyle;
84 char *MenuID;
85 int id;
86 int bgColor;
87 LOGFONT LogFont;
88 char *IconResName;
89 char *ClassName;
90 char *CallBackName;
91 long type;
92 char *filepath;
93
94 //子ウィンドウ管理
95 std::vector<CHILDINFO *> childWindowInfos;
96
97 //ツリー項目
98 HTREEITEM hTreeItem;
99
100private:
101 std::string name;
102 std::string handleName;
103};
104
105class WindowInfos
106 : public std::vector<WindowInfo *>
107{
108public:
109 WindowInfos()
110 {
111 }
112 ~WindowInfos()
113 {
114 }
115
116 void Clear()
117 {
118 WindowInfos &windowInfos = *this;
119 BOOST_FOREACH( WindowInfo *pWindowInfo, windowInfos )
120 {
121 delete pWindowInfo;
122 }
123 this->clear();
124 }
125 void Erase( int index )
126 {
127 WindowInfos::iterator it = this->begin();
128 for( int i=0; i!=index ;i++, it++ )
129 {
130 delete *it;
131 }
132 this->erase( it );
133 }
134};
Note: See TracBrowser for help on using the repository browser.