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

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

WindowInfosクラスを追加。

File size: 1.6 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
35struct CHILDINFO{
36 char *IdName;
37 POINT pos;
38 SIZE size;
39 char *caption;
40 DWORD style;
41 DWORD ExStyle;
42 int Control;
43
44 IMAGECTRLINFO ImageCtrlInfo;
45};
46class WindowInfo
47{
48public:
49 WindowInfo()
50 : name( NULL )
51 , HandleName( NULL )
52 , caption( NULL )
53 , MenuID( NULL )
54 , IconResName( NULL )
55 , ClassName( NULL )
56 , CallBackName( NULL )
57 {
58 }
59
60 //ウィンドウデータ
61 char *name;
62 char *HandleName;
63 POINT pos;
64 SIZE size;
65 char *caption;
66 DWORD style;
67 DWORD ExStyle;
68 char *MenuID;
69 int id;
70 int bgColor;
71 LOGFONT LogFont;
72 char *IconResName;
73 char *ClassName;
74 char *CallBackName;
75 long type;
76 char *filepath;
77
78 //子ウィンドウ管理
79 int NumberOfChildWindows;
80 CHILDINFO *pChildInfo;
81
82 //ツリー項目
83 HTREEITEM hTreeItem;
84};
85
86class WindowInfos
87 : public std::vector<WindowInfo *>
88{
89public:
90 WindowInfos()
91 {
92 }
93 ~WindowInfos()
94 {
95 Clear();
96 }
97
98 void Clear()
99 {
100 WindowInfos &windowInfos = *this;
101 BOOST_FOREACH( WindowInfo *pWindowInfo, windowInfos )
102 {
103 delete pWindowInfo;
104 }
105 this->clear();
106 }
107 void Erase( int index )
108 {
109 WindowInfos::iterator it = this->begin();
110 for( int i=0; i!=index ;i++, it++ )
111 {
112 delete *it;
113 }
114 this->erase( it );
115 }
116};
Note: See TracBrowser for help on using the repository browser.