1 | /*
|
---|
2 | *
|
---|
3 | * Include file with class definitions for class CWProgFolder
|
---|
4 | *
|
---|
5 | * (C) Chris Wohlgenuth 1999-2002
|
---|
6 | *
|
---|
7 | * This class is intended for programmers and provides functions for some
|
---|
8 | * common tasks like:
|
---|
9 | * - Adding dialogs as frame controls to WPS folders
|
---|
10 | * - Showing 'About'-dialogs
|
---|
11 | * - Checking of object pointers
|
---|
12 | * - ...
|
---|
13 | *
|
---|
14 | * Use IBM VAC++ V3.00 and Gnu-make 3.74.1 to compile
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 | /*
|
---|
19 | * This program is free software; you can redistribute it and/or modify
|
---|
20 | * it under the terms of the GNU General Public License as published by
|
---|
21 | * the Free Software Foundation; either version 2, or (at your option)
|
---|
22 | * any later version.
|
---|
23 | *
|
---|
24 | * This program is distributed in the hope that it will be useful,
|
---|
25 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
26 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
27 | * GNU General Public License for more details.
|
---|
28 | *
|
---|
29 | * You should have received a copy of the GNU General Public License
|
---|
30 | * along with this program; see the file COPYING. If not, write to
|
---|
31 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
32 | */
|
---|
33 | #define INCL_DOS
|
---|
34 | #define INCL_WIN
|
---|
35 | #include <os2.h>
|
---|
36 |
|
---|
37 | /* Structure which holds information about our
|
---|
38 | frame controls */
|
---|
39 | typedef struct {
|
---|
40 | HWND hwndCtlLeft;
|
---|
41 | BOOL bLeft;
|
---|
42 | ULONG ulFlagsLeft;
|
---|
43 | SIZEL sizelLeftFrame;
|
---|
44 |
|
---|
45 | HWND hwndCtlRight;
|
---|
46 | BOOL bRight;
|
---|
47 | ULONG ulFlagsRight;
|
---|
48 | SIZEL sizelRightFrame;
|
---|
49 |
|
---|
50 | HWND hwndCtlTop;
|
---|
51 | BOOL bTop;
|
---|
52 | ULONG ulFlagsTop;
|
---|
53 | SIZEL sizelTopFrame;
|
---|
54 |
|
---|
55 | HWND hwndCtlBottom;
|
---|
56 | BOOL bBottom;
|
---|
57 | ULONG ulFlagsBottom;
|
---|
58 | SIZEL sizelBottomFrame;
|
---|
59 |
|
---|
60 | BOOL bCnrAdjusted;
|
---|
61 | }FRAMECTRLDATA;
|
---|
62 |
|
---|
63 | /* Some stuff necessary for the compiler */
|
---|
64 | #pragma SOMAsDefault(on)
|
---|
65 | #include "som.hh"
|
---|
66 | #include "somcls.hh"
|
---|
67 | #pragma SOMNoMangling(on)
|
---|
68 | /* Include file with definition for WPFolder class */
|
---|
69 | #include "WPFOLDER.hh"
|
---|
70 | /* Include file with definition for WPShadow class */
|
---|
71 | #include "wpshadow.hh"
|
---|
72 |
|
---|
73 |
|
---|
74 |
|
---|
75 | /* Class definition for the Metaclass of our new folder class */
|
---|
76 | class M_CWProgFolder:public M_WPFolder
|
---|
77 | {
|
---|
78 | #pragma SOMClassName(*,"M_CWProgFolder")
|
---|
79 | /* Minimal SOM-Version we need. No change necessary */
|
---|
80 | #pragma SOMClassVersion(*,1,3)
|
---|
81 | #pragma SOMCallstyle(oidl)
|
---|
82 | public:
|
---|
83 | /* The member functions we want to override */
|
---|
84 | virtual PSZ wpclsQueryTitle();
|
---|
85 | virtual ULONG wpclsQueryStyle();
|
---|
86 | virtual void wpclsInitData();
|
---|
87 |
|
---|
88 | /* This statement describes new memberfunctions if we introduce them */
|
---|
89 | #pragma SOMReleaseOrder()
|
---|
90 | };
|
---|
91 |
|
---|
92 | /* The new folder class. It's a child of WPFolder-class */
|
---|
93 | class CWProgFolder:public WPFolder
|
---|
94 | {
|
---|
95 | /* The class name */
|
---|
96 | #pragma SOMClassName(*,"CWProgFolder")
|
---|
97 | /* The name of the class' Metaclass */
|
---|
98 | #pragma SOMMetaClass(CWProgFolder,"M_CWProgFolder")
|
---|
99 | /* SOM must be Version 1.2 or above */
|
---|
100 | #pragma SOMClassVersion(CWProgFolder,1,3)
|
---|
101 | #pragma SOMCallstyle(oidl)
|
---|
102 | private:
|
---|
103 | /* We have no private data or functions */
|
---|
104 | public:
|
---|
105 | /* Overridden or new functions come here */
|
---|
106 | /* This one is overridden */
|
---|
107 | virtual HWND wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam);
|
---|
108 | virtual BOOL cwClose(HWND hwndFrame);
|
---|
109 | /* This one is a new one */
|
---|
110 | virtual ULONG cwNumAdditionalFrameControls(HWND hwndFolder);
|
---|
111 | virtual BOOL cwCalculateClient(HWND hwndFolder, PRECTL pRectl, BOOL which);
|
---|
112 | virtual ULONG cwFormatFrame(HWND hwndFolder, USHORT countSWP,PSWP pswp);
|
---|
113 | virtual BOOL cwAddFrameCtl(HWND hwndFolder,HWND hwndNewCtl,SIZEL sizel, ULONG ulPos, ULONG ulFlags);
|
---|
114 | virtual HWND cwQueryFrameCtl(HWND hwndFolder, SIZEL* sizel, ULONG ulPos, ULONG * ulFlags);
|
---|
115 | virtual void cwUpdateFrame(HWND hwndFolder);
|
---|
116 | virtual WPObject* cwGetFileSystemObject(WPObject* wpObject);
|
---|
117 | virtual ULONG cwShowAboutDlg(HMODULE hModule, ULONG idDialog);
|
---|
118 | virtual BOOL cwQueryCDDrives(int *iNumCD, char * cFirstDrive);
|
---|
119 | virtual ULONG cwInsertUserMenuItems(HWND hwndMenu, char* chrMenuFolder, ULONG ulFirstId, BOOL bLeadingSeparator);
|
---|
120 | virtual BOOL cwCheckUserMenuItems( char* chrMenuFolder, USHORT usItemId);
|
---|
121 |
|
---|
122 | // virtual ULONG cwQueryAudioCDInfo(char * drive);
|
---|
123 | /* Tell SOM the order of the new functions. NEVER change the order in
|
---|
124 | future versions or you break binary compatibility! */
|
---|
125 | #pragma SOMReleaseOrder( \
|
---|
126 | "cwNumAdditionalFrameControls",\
|
---|
127 | "cwCalculateClient",\
|
---|
128 | "cwFormatFrame",\
|
---|
129 | "cwAddFrameCtl",\
|
---|
130 | "cwQueryFrameCtl",\
|
---|
131 | "cwUpdateFrame",\
|
---|
132 | "cwGetFileSystemObject",\
|
---|
133 | "cwShowAboutDlg",\
|
---|
134 | "cwQueryCDDrives",\
|
---|
135 | "cwClose",\
|
---|
136 | "cwInsertUserMenuItems",\
|
---|
137 | "cwCheckUserMenuItems")
|
---|
138 | };
|
---|
139 |
|
---|
140 |
|
---|
141 |
|
---|