ARGH
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / Dock / src / Dockers.cpp
1 /////////////////////////////////////////////\r
2 // Dockers.cpp\r
3 \r
4 #include "stdafx.h"\r
5 #include "DockingApp.h"\r
6 #include "Mainfrm.h"\r
7 #include "Dockers.h"\r
8 \r
9 \r
10 //////////////////////////////////////////////\r
11 //  Definitions for the CDockSimple class\r
12 CDockSimple::CDockSimple()\r
13 {\r
14         // Set the view window to our edit control\r
15         SetView(m_View);\r
16 }\r
17 \r
18 CDocker* CDockSimple::NewDockerFromID(int nID)\r
19 {\r
20         CDocker* pDock = NULL;\r
21         switch(nID)\r
22         {\r
23         case ID_DOCK_CLASSES1:\r
24                 pDock = new CDockClasses;\r
25                 break;\r
26         case ID_DOCK_CLASSES2:\r
27                 pDock = new CDockClasses;                                       \r
28                 break;\r
29         case ID_DOCK_FILES1:\r
30                 pDock = new CDockFiles;\r
31                 break;\r
32         case ID_DOCK_FILES2:\r
33                 pDock = new CDockFiles;\r
34                 break;\r
35         case ID_DOCK_SIMPLE1:\r
36                 pDock = new CDockSimple;\r
37                 break;\r
38         case ID_DOCK_SIMPLE2:\r
39                 pDock = new CDockSimple;\r
40                 break;\r
41         case ID_DOCK_TEXT1:\r
42                 pDock = new CDockText;\r
43                 break;\r
44         case ID_DOCK_TEXT2:\r
45                 pDock = new CDockText;\r
46                 break;\r
47         default:\r
48                 TRACE(_T("Unknown Dock ID\n"));\r
49                 break;\r
50         }\r
51 \r
52         return pDock;\r
53 }\r
54 \r
55 void CDockSimple::OnInitialUpdate()\r
56 {\r
57         // Set the width of the splitter bar\r
58         SetBarWidth(8);\r
59 \r
60         SetCaption (_T("Simple View - Docking"));\r
61 }\r
62 \r
63 \r
64 //////////////////////////////////////////////\r
65 //  Definitions for the CDockText class\r
66 CDockText::CDockText()\r
67 {\r
68         // Set the view window to our edit control\r
69         SetView(m_View);\r
70 }\r
71 \r
72 void CDockText::OnInitialUpdate()\r
73 {\r
74         // Set the width of the splitter bar\r
75         SetBarWidth(8);\r
76 \r
77         SetCaption (_T("Text View - Docking"));\r
78 }\r
79 \r
80 \r
81 \r
82 //////////////////////////////////////////////\r
83 //  Definitions for the CDockClasses class\r
84 CDockClasses::CDockClasses()\r
85 {\r
86         // Set the view window to our edit control\r
87         SetView(m_View);\r
88 }\r
89 \r
90 void CDockClasses::OnInitialUpdate()\r
91 {\r
92         // Set the width of the splitter bar\r
93         SetBarWidth(8);\r
94 \r
95         SetCaption (_T("Class View - Docking"));\r
96 }\r
97 \r
98 \r
99 //////////////////////////////////////////////\r
100 //  Definitions for the CDockFiles class\r
101 CDockFiles::CDockFiles()\r
102 {\r
103         // Set the view window to our edit control\r
104         SetView(m_View);\r
105 }\r
106 \r
107 void CDockFiles::OnInitialUpdate()\r
108 {\r
109         // Set the width of the splitter bar\r
110         SetBarWidth(8);\r
111 \r
112         SetCaption (_T("Files View - Docking"));\r
113 }\r

UCC git Repository :: git.ucc.asn.au