Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[r8767]: main / branches / 4.1 / trunk / extensions / platform / windows / oodialog / BaseDialog.cls Maximize Restore History

Download this file

BaseDialog.cls    209 lines (177 with data), 10.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/*----------------------------------------------------------------------------*/
/* */
/* Copyright (c) 1995, 2004 IBM Corporation. All rights reserved. */
/* Copyright (c) 2005-2013 Rexx Language Association. All rights reserved. */
/* */
/* This program and the accompanying materials are made available under */
/* the terms of the Common Public License v1.0 which accompanies this */
/* distribution. A copy is also available at the following address: */
/* http://www.oorexx.org/license.html */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* Redistributions in binary form must reproduce the above copyright */
/* notice, this list of conditions and the following disclaimer in */
/* the documentation and/or other materials provided with the distribution. */
/* */
/* Neither the name of Rexx Language Association nor the names */
/* of its contributors may be used to endorse or promote products */
/* derived from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/*----------------------------------------------------------------------------*/
/**
* Windows Dialog Interface for Open Object Rexx (ooRexx.)
*
* This module contains the WindowsExtensions mixinclass. This class is
* inherited by the PlainBaseDialog class and helps form the foundation of all
* non-trivial dialogs.
*
* Some classes related to Windows resources are also included here.
*/
::requires "PlainBaseDialog.cls"
::requires "DialogExtensions.cls"
/**
* The class WindowExtensions implements methods that are common to all windows,
* no matter whether they are dialogs or dialog controls. It's an extension to
* the WindowBase mixin-class.
*
* Note that this mixin class contains (did contian) many methods that should
* not be a part of a dialog control class. It also contains (did contain) many
* methods that would be bettor off in a separate class. The original comment
* above, does not seem to have been followed through on.
*/
::class 'WindowExtensions' public mixinclass Object
::method initWindowExtensions external "LIBRARY oodialog winex_initWindowExtensions"
::method setFont unguarded external "LIBRARY oodialog winex_setFont"
::method getFont unguarded external "LIBRARY oodialog winex_getFont"
-- createFont() has always been broken, maintained for program compatibility.
-- createFontEx() is a correct implementation.
::method createFont unguarded external "LIBRARY oodialog winex_createFont"
::method createFontEx unguarded external "LIBRARY oodialog winex_createFontEx"
::method deleteFont unguarded external "LIBRARY oodialog winex_deleteObject"
::method scroll unguarded external "LIBRARY oodialog winex_scroll"
::method hScrollPos unguarded external "LIBRARY oodialog winex_getScrollPos"
::method setHScrollPos unguarded external "LIBRARY oodialog winex_setScrollPos"
::method vScrollPos unguarded external "LIBRARY oodialog winex_getScrollPos"
::method setVScrollPos unguarded external "LIBRARY oodialog winex_setScrollPos"
::method loadBitmap unguarded external "LIBRARY oodialog winex_loadBitmap"
::method removeBitmap unguarded external "LIBRARY oodialog winex_removeBitmap"
::method write unguarded external "LIBRARY oodialog winex_write"
::method writeDirect unguarded external "LIBRARY oodialog winex_writeDirect"
::method createBrush unguarded external "LIBRARY oodialog winex_createBrush"
::method createPen unguarded external "LIBRARY oodialog winex_createPen"
::method deleteObject unguarded external "LIBRARY oodialog winex_deleteObject"
::method getTextAlign unguarded external "LIBRARY oodialog winex_getTextAlign" -- Document for 4.2.1, not for 4.2.0
::method setTextAlign unguarded external "LIBRARY oodialog winex_setTextAlign" -- Document for 4.2.1, not for 4.2.0
::method getTextExtent unguarded external "LIBRARY oodialog winex_getTextExtent"
::method getDC unguarded external "LIBRARY oodialog winex_getDC"
::method freeDC unguarded external "LIBRARY oodialog winex_freeDC"
::method objectToDC unguarded external "LIBRARY oodialog winex_objectToDC"
::method fontToDC unguarded
use strict arg dc, hFont
return self~objectToDC(dc, hFont)
::method rectangle unguarded external "LIBRARY oodialog winex_rectangle"
::method drawLine unguarded external "LIBRARY oodialog winex_drawLine"
::method drawPixel unguarded external "LIBRARY oodialog winex_drawPixel"
::method getPixel unguarded external "LIBRARY oodialog winex_getPixel"
::method fillDrawing unguarded external "LIBRARY oodialog winex_fillDrawing"
::method drawArc unguarded external "LIBRARY oodialog winex_drawArcOrPie"
::method drawPie unguarded external "LIBRARY oodialog winex_drawArcOrPie"
::method drawAngleArc unguarded external "LIBRARY oodialog winex_drawAngleArc"
::method getArcDirection unguarded external "LIBRARY oodialog winex_getSetArcDirection"
::method setArcDirection unguarded external "LIBRARY oodialog winex_getSetArcDirection"
::method fontColor unguarded external "LIBRARY oodialog winex_fontColor"
::method transparentText unguarded external "LIBRARY oodialog winex_textBkMode"
::method opaqueText unguarded external "LIBRARY oodialog winex_textBkMode"
-- DEPRECATED
::method absRect2LogRect unguarded
parse arg l, t, r, b
ret.left = l/self~factorX
ret.right = r/self~factorX
ret.top = t/self~factorY
ret.bottom = b/self~factorY
return ret.
::method cursor_Arrow unguarded
use strict arg
forward to (.Mouse~new(self)) message 'ARROW'
::method cursor_AppStarting unguarded
use strict arg
forward to (.Mouse~new(self)) message 'APPSTARTING'
::method cursor_Cross unguarded
use strict arg
forward to (.Mouse~new(self)) message 'CROSS'
::method cursor_No unguarded
use strict arg
forward to (.Mouse~new(self)) message 'NO'
::method cursor_Wait unguarded
use strict arg
forward to (.Mouse~new(self)) message 'WAIT'
::method cursorPos unguarded
forward to (.Mouse~new(self)) message 'GETCURSORPOS' continue
return result~x result~y
::method logRect2AbsRect unguarded
parse arg l, t, r, b
ret.left = l*self~factorX
ret.right = r*self~factorX
ret.top = t*self~factorY
ret.bottom = b*self~factorY
return ret.
::method restoreCursorShape unguarded
forward to (.Mouse~new(self)) message 'RESTORECURSOR'
::method setCursorPos unguarded
forward to (.Mouse~new(self)) message 'SETCURSORPOS'
::class 'ResourceImage' public
::method init external "LIBRARY oodialog ri_init"
::method release external "LIBRARY oodialog ri_release"
::method handle external "LIBRARY oodialog ri_handle"
::method isNull external "LIBRARY oodialog ri_isNull"
::method systemErrorCode external "LIBRARY oodialog ri_systemErrorCode"
::method getImage external "LIBRARY oodialog ri_getImage"
::method getImages external "LIBRARY oodialog ri_getImages"
::class 'Image' public
::method toID class external "LIBRARY oodialog image_toID_cls"
::method getImage class external "LIBRARY oodialog image_getImage_cls"
::method fromFiles class external "LIBRARY oodialog image_fromFiles_cls"
-- ::method getGDIImage class external "LIBRARY oodialog image_getGDIImage_cls" future enhancement
::method fromIDs class external "LIBRARY oodialog image_fromIDs_cls"
::method userIcon class external "LIBRARY oodialog image_userIcon_cls"
::method colorRef class external "LIBRARY oodialog image_colorRef_cls"
::method getRValue class external "LIBRARY oodialog image_getRValue_cls"
::method getGValue class external "LIBRARY oodialog image_getGValue_cls"
::method getBValue class external "LIBRARY oodialog image_getBValue_cls"
::method init external "LIBRARY oodialog image_init"
::method release external "LIBRARY oodialog image_release"
::method handle external "LIBRARY oodialog image_handle"
::method isNull external "LIBRARY oodialog image_isNull"
::method systemErrorCode external "LIBRARY oodialog image_systemErrorCode"
::class 'ImageList' public
::method create class external "LIBRARY oodialog il_create_cls"
::method init external "LIBRARY oodialog il_init"
::method release external "LIBRARY oodialog il_release"
::method add external "LIBRARY oodialog il_add"
::method addMasked external "LIBRARY oodialog il_addMasked"
::method addIcon external "LIBRARY oodialog il_addIcon"
::method addImages external "LIBRARY oodialog il_addImages"
::method getCount external "LIBRARY oodialog il_getCount"
::method getImageSize external "LIBRARY oodialog il_getImageSize"
::method duplicate external "LIBRARY oodialog il_duplicate"
::method remove external "LIBRARY oodialog il_remove"
::method removeAll external "LIBRARY oodialog il_removeAll"
::method handle external "LIBRARY oodialog il_handle"
::method isNull external "LIBRARY oodialog il_isNull"