xref: /AOO41X/main/automation/source/inc/rcontrol.hxx (revision 8809db7a87f97847b57a57f4cd2b0104b2b83182)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 /*************************************************************************
25  *
26  *    ATTENTION
27  *    This file is intended to work inside and outside the StarOffice environment.
28  *    Only adaption of file commtypes.hxx should be necessary. Else it is a bug!
29  *
30  ************************************************************************/
31 
32 #ifndef _RCONTROL_HXX
33 #define _RCONTROL_HXX
34 
35 
36 #define UID_ACTIVE          "UID_ACTIVE"
37 
38 
39 #define SI_IPCCommandBlock  1
40 #define SI_SocketCommandBlock   SI_IPCCommandBlock  // Zumindest erstmal
41 #define SI_DirectCommandBlock   2
42 #define SIControl           3   // remove after numeric HelpIDs are completely removed and no legacy testtool is used anymore
43 #define SISlot              4
44 #define SIFlow              5
45 #define SICommand           6
46 #define SIUnoSlot           7
47 #define SIStringControl     8
48 
49 #define SIReturnBlock       11
50 #define SIReturn            12
51 #define SIReturnError       13
52 
53 // Typisierung im Stream
54 #define BinUSHORT           11
55 #define BinULONG            14
56 #define BinString           12
57 #define BinBool             13
58 #define BinSbxValue         15
59 
60 
61 // Classes
62 // !!!Diese Defines duerfen niemals geaendert werden!!!
63 #define C_NoType            -1
64 // Maximale 32 einfache Controls
65 #define C_TabControl        0
66 #define C_RadioButton       1
67 #define C_CheckBox          2
68 #define C_TriStateBox       3
69 #define C_Edit              4
70 #define C_MultiLineEdit     5
71 #define C_MultiListBox      6
72 #define C_ListBox           7
73 #define C_ComboBox          8
74 #define C_PushButton        9
75 
76 #define C_SpinField         10
77 #define C_PatternField      11
78 #define C_NumericField      12
79 #define C_MetricField       13
80 #define C_CurrencyField     14
81 #define C_DateField         15
82 #define C_TimeField         16
83 
84 #define C_ImageRadioButton  17
85 #define C_NumericBox        18
86 #define C_MetricBox         19
87 #define C_CurrencyBox       20
88 #define C_DateBox           21
89 #define C_TimeBox           22
90 
91 #define C_ImageButton       23
92 #define C_MenuButton        24
93 #define C_MoreButton        25
94 
95 // Maximale 7 Container
96 #define C_TabPage           32
97 #define C_ModalDlg          33
98 #define C_FloatWin          34
99 #define C_ModelessDlg       35
100 #define C_WorkWin           36
101 #define C_DockingWin        37
102 
103 // Diese Defines koennen geaendert werden
104 #define C_MessBox           40
105 #define C_InfoBox           41
106 #define C_WarningBox        42
107 #define C_ErrorBox          43
108 #define C_QueryBox          44
109 
110 #define C_TabDlg            45
111 #define C_SingleTabDlg      46
112 
113 #define C_Window            47
114 
115 
116 #define C_PatternBox        60
117 #define C_ToolBox           61
118 #define C_ValueSet          62
119 #define C_Control           63
120 #define C_TreeListBox       64  // Hurray the TreeListBox finally got its own Window Type
121 
122 #define C_OkButton          65
123 #define C_CancelButton      66
124 #define C_ButtonDialog      67
125 
126 #define C_Dialog            68
127 
128 
129 
130 
131 #define M_WITH_RETURN       0x0200  // Die Variable wird zum Aufnehmen des Wertes gespeichert
132 #define M_KEY_STRING        0x0400  // Key Befehle werden umgewandelt i.e. "<return><up>"
133 #define M_SOFFICE           0x0800  // Command valid for Star/Open Office
134 #define M_MOZILLA           0x1000  // Command valid for Mozilla
135 // for MacroRecorder
136 #define M_RET_NUM_CONTROL   0x2000  // decode ULong as Control (For Tabpages, Toolboxes, ... )
137 
138 // Methoden
139 #define M_Select            21
140 #define M_SetNoSelection    22
141 #define M_SetText           23
142 #define M_More              24
143 #define M_Less              25
144 #define M_ToMin             26
145 #define M_ToMax             27
146 #define M_Check             28
147 #define M_UnCheck           29
148 #define M_TriState          30
149 #define M_SetPage           31
150 #define M_Click             32
151 
152 #define M_Close             33      // Push Buttons on Dialog (Auch More Button)
153 #define M_Cancel            34
154 #define M_OK                35
155 #define M_Help              36
156 #define M_Default           37      // Push defaultbutton on Dialog
157 
158 #define M_Yes               38
159 #define M_No                39
160 #define M_Repeat            40
161 
162 #define M_Open              41
163 #define M_Pick              42
164 #define M_Move              43
165 #define M_Size              44
166 #define M_Minimize          45
167 #define M_Maximize          46
168 #define M_Dock              47
169 #define M_Undock            48
170 
171 
172 
173 #define M_TypeKeys          ( M_KEY_STRING | 50 )
174 #define M_MouseDown         51
175 #define M_MouseUp           52
176 #define M_MouseMove         53
177 #define M_MouseDoubleClick  54
178 #define M_SnapShot          55
179 #define M_SetNextToolBox    56
180 #define M_OpenContextMenu   57
181 #define M_MultiSelect       58
182 
183 // Filedialog
184 #define M_SetPath           60
185 #define M_SetCurFilter      61
186 
187 // Printdialog
188 #define M_SetPrinter        70
189 #define M_CheckRange        71
190 #define M_SetRangeText      72
191 #define M_SetFirstPage      73
192 #define M_SetLastPage       74
193 #define M_CheckCollate      75
194 #define M_SetPageId         76
195 #define M_SetPageNr         77
196 
197 #define M_AnimateMouse      78
198 #define M_TearOff           79
199 
200 #define M_FadeIn            80
201 #define M_FadeOut           81
202 #define M_Pin               82
203 
204 #define M_UseMenu           83      // Use the menu of the next possible parent of given Window
205 
206 #define M_OpenMenu          84      // MenuButtons and Menus in ToolBoxes
207 
208 #define M_Restore           85      // Window Control together with M_Maximize and M_Minimize
209 
210 #define M_DisplayPercent    200     // Zum Anzeigen der Prozente des Windows
211 
212 #define M_LAST_NO_RETURN    200
213 
214 #if ( M_LAST_NO_RETURN >= M_WITH_RETURN )
215 #error "Bereich �berschritten"
216 #endif
217 
218 #define M_Exists            ( M_WITH_RETURN |  1 )
219 #define M_NotExists         ( M_WITH_RETURN |  2 )
220 #define M_IsEnabled         ( M_WITH_RETURN |  3 )
221 #define M_IsVisible         ( M_WITH_RETURN |  4 )
222 #define M_IsWritable        ( M_WITH_RETURN |  5 )
223 
224 #define M_GetPage           ( M_WITH_RETURN |  6 )
225 #define M_IsChecked         ( M_WITH_RETURN |  7 )
226 #define M_IsTristate        ( M_WITH_RETURN |  8 )
227 #define M_GetState          ( M_WITH_RETURN |  9 )
228 #define M_GetText           ( M_WITH_RETURN | 10 )
229 #define M_GetSelCount       ( M_WITH_RETURN | 11 )
230 #define M_GetSelIndex       ( M_WITH_RETURN | 12 )
231 #define M_GetSelText        ( M_WITH_RETURN | 13 )
232 #define M_GetItemCount      ( M_WITH_RETURN | 14 )
233 #define M_GetItemText       ( M_WITH_RETURN | 15 )
234 #define M_IsOpen            ( M_WITH_RETURN | 16 )
235 #define M_Caption           ( M_WITH_RETURN | 17 )
236 #define M_IsMax             ( M_WITH_RETURN | 18 )
237 #define M_IsDocked          ( M_WITH_RETURN | 19 )
238 #define M_GetRT             ( M_WITH_RETURN | 20 )
239 #define M_GetPageId         ( M_WITH_RETURN | 21 )
240 #define M_GetPageCount      ( M_WITH_RETURN | 22 )
241 #define M_GetPosX           ( M_WITH_RETURN | 23 )
242 #define M_GetPosY           ( M_WITH_RETURN | 24 )
243 #define M_GetSizeX          ( M_WITH_RETURN | 25 )
244 #define M_GetSizeY          ( M_WITH_RETURN | 26 )
245 #define M_GetNextToolBox    ( M_WITH_RETURN | 27 )
246 #define M_GetButtonCount    ( M_WITH_RETURN | 28 )
247 #define M_GetButtonId       ( M_WITH_RETURN | 29 )
248 
249 #define M_IsFadeIn          ( M_WITH_RETURN | 30 )
250 #define M_IsPin             ( M_WITH_RETURN | 31 )
251 
252 // Statusbar
253 #define M_StatusGetText     ( M_WITH_RETURN | 32 )
254 #define M_StatusIsProgress  ( M_WITH_RETURN | 33 )
255 #define M_StatusGetItemCount ( M_WITH_RETURN | 34 )
256 #define M_StatusGetItemId   ( M_WITH_RETURN | 35 )
257 
258 //
259 #define M_GetMouseStyle     ( M_WITH_RETURN | 36 )
260 
261 // support for Messagebox with checkbox
262 #define M_GetCheckBoxText   ( M_WITH_RETURN | 37 )
263 
264 // Scrollbars
265 #define M_HasScrollBar      ( M_WITH_RETURN | 38 )
266 #define M_IsScrollBarEnabled ( M_WITH_RETURN | 39 )
267 
268 // Dieser befehl wird nur intern im Controller (sts library) verwendet. Sie tauchen nicht im Testtool auf!
269 #define _M_IsEnabled        ( M_WITH_RETURN | 50 )
270 
271 
272 #define M_GetFixedTextCount ( M_WITH_RETURN | 51 )
273 #define M_GetFixedText      ( M_WITH_RETURN | 52 )
274 
275 
276 #define M_IsMin             ( M_WITH_RETURN | 53 )
277 #define M_IsRestore         ( M_WITH_RETURN | 54 )
278 
279 #define M_GetItemType       ( M_WITH_RETURN | 55 )
280 
281 // Commands for (Edit)BrowseBox
282 #define M_GetColumnCount    ( M_WITH_RETURN | 56 )
283 #define M_GetRowCount       ( M_WITH_RETURN | 57 )
284 #define M_IsEditing         ( M_WITH_RETURN | 58 )
285 
286 #define M_IsItemEnabled     ( M_WITH_RETURN | 59 )
287 
288 //#define M_SOFFICE           0x0800  // Command valid for Star/Open Office
289 //#define M_MOZILLA           0x1000  // Command valid for Mozilla
290 
291 
292 // RemoteCommands
293 #define RC_AppAbort         ( M_SOFFICE | M_MOZILLA | 1 )
294 #define RC_SetClipboard     ( M_SOFFICE | M_MOZILLA | 2 )
295 #define RC_NoDebug          ( M_SOFFICE | M_MOZILLA | 3 )
296 #define RC_Debug            ( M_SOFFICE | M_MOZILLA | 4 )
297 #define RC_GPF              ( M_SOFFICE | M_MOZILLA | 5 )
298 #define RC_DisplayHid       ( M_SOFFICE | M_MOZILLA | 6 )
299 #define RC_AppDelay         ( M_SOFFICE | M_MOZILLA | 7 )
300 #define RC_UseBindings      ( M_SOFFICE             | 8 )
301 #define RC_Profile          ( M_SOFFICE | M_MOZILLA | 9 )
302 // (Popup)Menu
303 #define RC_MenuSelect       ( M_SOFFICE | M_MOZILLA | 10 )
304 #define RC_SetControlType   ( M_SOFFICE             | 11 )    // deprecated since RTTI
305 // RemoteFileAccess
306 #define RC_Kill             ( M_SOFFICE             | 12 )
307 #define RC_RmDir            ( M_SOFFICE             | 13 )
308 #define RC_MkDir            ( M_SOFFICE             | 14 )
309 #define RC_FileCopy         ( M_SOFFICE             | 15 )
310 #define RC_Name             ( M_SOFFICE             | 16 )
311 
312 #define RC_CaptureAssertions (M_SOFFICE | M_MOZILLA | 17 )
313 #define RC_Assert           ( M_SOFFICE | M_MOZILLA | 18 )
314 
315 #define RC_MenuOpen         ( M_SOFFICE | M_MOZILLA | 19 )
316 
317 #define RC_TypeKeysDelay    ( M_SOFFICE | M_MOZILLA | 20 )
318 
319 #define RC_ShowBar          (             M_MOZILLA | 21 )
320 
321 #define RC_LoadURL          (             M_MOZILLA | 22 )
322 
323 #define RC_CloseSysDialog   ( M_SOFFICE             | 23 )
324 
325 #define RC_SAXRelease       ( M_SOFFICE             | 24 )
326 
327 #define RC_RecordMacro      ( M_SOFFICE             | 25 )
328 
329 #define RC_ActivateDocument ( M_SOFFICE             | 26 )
330 
331 #define RC_CatchGPF         ( M_SOFFICE             | 27 )
332 
333 #define _RC_LAST_NO_RETURN                            27
334 
335 #if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN )
336 #error "Bereich �berschritten"
337 #endif
338 
339 // Befehle mit Returnwert
340 #define RC_GetClipboard     ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 1 )
341 #define RC_WinTree          ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 2 )
342 #define RC_ResetApplication ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 3 )
343 #define RC_GetNextCloseWindow ( M_SOFFICE             | M_WITH_RETURN | 4 )
344 #define RC_ApplicationBusy  ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 5 )
345 // (Popup)Menu
346 #define RC_MenuGetItemCount ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 6 )
347 #define RC_MenuGetItemId    ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 7 )
348 #define RC_MenuGetItemPos   ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 8 )
349 #define RC_MenuIsSeperator  ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 9 )
350 #define RC_MenuIsItemChecked ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 10 )
351 #define RC_MenuIsItemEnabled ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 11 )
352 #define RC_MenuGetItemText  ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 12 )
353 // RemoteFileAccess
354 #define RC_Dir              ( M_SOFFICE             | M_WITH_RETURN | 18 )
355 #define RC_FileLen          ( M_SOFFICE             | M_WITH_RETURN | 19 )
356 #define RC_FileDateTime     ( M_SOFFICE             | M_WITH_RETURN | 20 )
357 
358 #define RC_Translate        ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 21 )
359 #define RC_GetMouseStyle    ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 22 )
360 #define RC_UnpackStorage    ( M_SOFFICE             | M_WITH_RETURN | 23 )
361 
362 #define RC_IsBarVisible     (             M_MOZILLA | M_WITH_RETURN | 24 )
363 
364 #define RC_MenuGetItemCommand ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 25 )
365 
366 #define RC_ExistsSysDialog  ( M_SOFFICE             | M_WITH_RETURN | 26 )
367 
368 #define RC_SAXCheckWellformed ( M_SOFFICE             | M_WITH_RETURN | 27 )
369 #define RC_SAXReadFile      ( M_SOFFICE             | M_WITH_RETURN | 28 )
370 
371 #define RC_SAXGetNodeType   ( M_SOFFICE             | M_WITH_RETURN | 29 )
372 #define RC_SAXGetElementName ( M_SOFFICE             | M_WITH_RETURN | 30 )
373 #define RC_SAXGetChars      ( M_SOFFICE             | M_WITH_RETURN | 31 )
374 #define RC_SAXGetChildCount ( M_SOFFICE             | M_WITH_RETURN | 32 )
375 #define RC_SAXGetAttributeCount ( M_SOFFICE             | M_WITH_RETURN | 33 )
376 #define RC_SAXGetAttributeName ( M_SOFFICE             | M_WITH_RETURN | 34 )
377 #define RC_SAXGetAttributeValue ( M_SOFFICE             | M_WITH_RETURN | 35 )
378 #define RC_SAXSeekElement   ( M_SOFFICE             | M_WITH_RETURN | 36 )
379 #define RC_SAXHasElement    ( M_SOFFICE             | M_WITH_RETURN | 37 )
380 #define RC_SAXGetElementPath ( M_SOFFICE             | M_WITH_RETURN | 38 )
381 
382 #define RC_GetDocumentCount ( M_SOFFICE             | M_WITH_RETURN | 39 )
383 
384 #define RC_GetSystemLanguage ( M_SOFFICE             | M_WITH_RETURN | 40 )
385 
386 #define RC_IsProduct        ( M_SOFFICE             | M_WITH_RETURN | 41 )
387 
388 #define RC_MenuHasSubMenu   ( M_SOFFICE             | M_WITH_RETURN | 42 )
389 
390 #define RC_UsePostEvents    ( M_SOFFICE             | M_WITH_RETURN | 43 )
391 
392 #define RC_WaitSlot         ( M_SOFFICE             | M_WITH_RETURN | 44 )
393 
394 // Flow Control
395 #define F_EndCommandBlock   101         // Initiiert R�ckmeldung des Status
396 #define F_Sequence          102         // �bergibt Sequence Nummer (1. in jedem Stream)
397 
398 // Return codes
399 #define RET_Sequence        132         // �bergibt Sequence Nummer (1. in jedem Stream)
400 #define RET_Value           133         // �bergibt Return-wert
401 #define RET_WinInfo         134         // Information �ber aktuelles Fenster/Control
402 #define RET_ProfileInfo     135         // Profile Information
403 #define RET_DirectLoging    136         // Direktes �bertragen von Informationen in das Log
404 #define RET_MacroRecorder   137         // MakroRecorder Befehl �bertragen
405 
406 
407 
408 // Subcodes die in nUId geliefert werden
409 // f�r F_ProfileInfo
410 #define S_ProfileReset      201         // nNr1 = Anzahl Borders
411     // Achtung!! Diese Defines m�ssen aufeinanderfolgende Nummern haben!!
412 #define S_ProfileBorder1    202         // nNr1 = Border1 in ms
413 #define S_ProfileBorder2    203         // nNr1 = Border2 in ms
414 #define S_ProfileBorder3    204         // nNr1 = Border3 in ms
415 #define S_ProfileBorder4    205         // nNr1 = Border4 in ms
416     // Achtung Ende
417 #define S_ProfileTime       210         // nNr1 = remote Zeit des Befehls
418 #define S_ProfileDump       211         // Gibt die daten aus.
419 
420 // f�r F_DirectLoging
421 #define S_AssertError       220
422 #define S_AssertWarning     221
423 #define S_AssertTrace       222
424 #define S_QAError           223
425 
426 
427 
428 // Constants which are available in VCLTestTool scripts
429 
430 // Different types of controls recognized via RTTI
431 #define CONST_CTBrowseBox       100
432 #define CONST_CTValueSet        103
433 #define CONST_CTORoadmap        104
434 #define CONST_CTIExtensionListBox 105
435 #define CONST_CTTableControl    106
436 #define CONST_CTUnknown         199
437 
438 // Konstanten f�r das ALignment des gesuchten Splitters
439 #define CONST_ALIGN_LEFT        120
440 #define CONST_ALIGN_TOP         121
441 #define CONST_ALIGN_RIGHT       122
442 #define CONST_ALIGN_BOTTOM      123
443 
444 /// What dialog to use in RC_CloseSysDialog or RC_ExistsSysDialog
445 #define CONST_FilePicker        301
446 #define CONST_FolderPicker      302
447 
448 /// NodeTypes of the SAX Parser
449 #define CONST_NodeTypeCharacter 555
450 #define CONST_NodeTypeElement   556
451 #define CONST_NodeTypeComment   557
452 
453 /// ItemTypes for TreeListBox and maybe others
454 #define CONST_ItemTypeText          602
455 #define CONST_ItemTypeBMP           601
456 #define CONST_ItemTypeCheckbox      600
457 #define CONST_ItemTypeContextBMP    603
458 #define CONST_ItemTypeUnknown       604
459 
460 /// Return values for WaitSlot
461 #define CONST_WSTimeout             701
462 #define CONST_WSAborted             702
463 #define CONST_WSFinished            703
464 
465 // Beschreibt die Parametertypen als Bitfeld  Reihenfolge immer!
466 // wie hier Aufgelistet
467 #define PARAM_NONE              0x0000
468 #define PARAM_USHORT_1          0x0001
469 #define PARAM_USHORT_2          0x0002
470 #define PARAM_USHORT_3          0x0100      // Nicht in der Reihe!!
471 #define PARAM_USHORT_4          0x0200      // Nicht in der Reihe!!
472 #define PARAM_ULONG_1           0x0004
473 #define PARAM_ULONG_2           0x0008
474 #define PARAM_STR_1             0x0010
475 #define PARAM_STR_2             0x0020
476 #define PARAM_BOOL_1            0x0040
477 #define PARAM_BOOL_2            0x0080
478 #define PARAM_SBXVALUE_1        0x0400      // hier mit 0x0400 Weiter!!! Siehe Oben!
479 
480 // Zus�tzliche Beschreibung!! wird auch mit dem Rest verodert
481 //#define PARAM_STR_RAW           0x8000        // Der Zeichensatz der Strings wird nicht konvertiert(f�r Fareastern)
482 
483 
484 #define ERR_SEND_TIMEOUT        100
485 #define ERR_EXEC_TIMEOUT        101
486 #define ERR_RESTART_FAIL        102
487 #define ERR_RESTART             103
488 #define ERR_NO_WIN              104     // Keine *.Win Dateien gefunden
489 #define ERR_NO_SID              105     // Keine *.Sid Dateien gefunden
490 #define ERR_NO_FILE             106     // Datei nicht gefunden
491 
492 #endif
493