xref: /aoo41x/main/automation/source/inc/rcontrol.hxx (revision 10c5781f)
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 // TreeListBox
289 #define M_Collapse	    ( M_WITH_RETURN | 60 )
290 #define M_Expand	    ( M_WITH_RETURN | 61 )
291 
292 //#define M_SOFFICE           0x0800  // Command valid for Star/Open Office
293 //#define M_MOZILLA           0x1000  // Command valid for Mozilla
294 
295 // Enhencement
296 #define M_GetHelpText  ( M_WITH_RETURN |  90 )
297 #define M_GetQuickHelpText  ( M_WITH_RETURN |  91 )
298 #define M_GetScreenRectangle ( M_WITH_RETURN |  92 )
299 #define M_HasFocus ( M_WITH_RETURN |  93 )
300 #define M_GetItemHelpText ( M_WITH_RETURN |  94 )
301 #define M_GetItemQuickHelpText ( M_WITH_RETURN |  95 )
302 #define M_GetItemText2 ( M_WITH_RETURN |  96 )
303 
304 // RemoteCommands
305 #define RC_AppAbort			( M_SOFFICE | M_MOZILLA | 1 )
306 #define RC_SetClipboard		( M_SOFFICE | M_MOZILLA | 2 )
307 #define RC_NoDebug			( M_SOFFICE | M_MOZILLA | 3 )
308 #define RC_Debug			( M_SOFFICE | M_MOZILLA | 4 )
309 #define RC_GPF				( M_SOFFICE | M_MOZILLA | 5 )
310 #define RC_DisplayHid		( M_SOFFICE | M_MOZILLA | 6 )
311 #define RC_AppDelay			( M_SOFFICE | M_MOZILLA | 7 )
312 #define RC_UseBindings		( M_SOFFICE             | 8 )
313 #define RC_Profile			( M_SOFFICE | M_MOZILLA | 9 )
314 // (Popup)Menu
315 #define RC_MenuSelect		( M_SOFFICE | M_MOZILLA | 10 )
316 #define RC_SetControlType	( M_SOFFICE             | 11 )    // deprecated since RTTI
317 // RemoteFileAccess
318 #define RC_Kill				( M_SOFFICE             | 12 )
319 #define RC_RmDir			( M_SOFFICE             | 13 )
320 #define RC_MkDir			( M_SOFFICE             | 14 )
321 #define RC_FileCopy			( M_SOFFICE             | 15 )
322 #define RC_Name				( M_SOFFICE             | 16 )
323 
324 #define RC_CaptureAssertions (M_SOFFICE | M_MOZILLA | 17 )
325 #define RC_Assert			( M_SOFFICE | M_MOZILLA | 18 )
326 
327 #define RC_MenuOpen			( M_SOFFICE | M_MOZILLA | 19 )
328 
329 #define RC_TypeKeysDelay	( M_SOFFICE | M_MOZILLA | 20 )
330 
331 #define RC_ShowBar       	(             M_MOZILLA | 21 )
332 
333 #define RC_LoadURL          (             M_MOZILLA | 22 )
334 
335 #define RC_CloseSysDialog	( M_SOFFICE             | 23 )
336 
337 #define RC_SAXRelease		( M_SOFFICE             | 24 )
338 
339 #define RC_RecordMacro      ( M_SOFFICE             | 25 )
340 
341 #define RC_ActivateDocument ( M_SOFFICE             | 26 )
342 
343 #define RC_CatchGPF         ( M_SOFFICE             | 27 )
344 
345 #define _RC_LAST_NO_RETURN	                          27
346 
347 #if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN )
348 #error "Bereich �berschritten"
349 #endif
350 
351 // Befehle mit Returnwert
352 #define RC_GetClipboard		( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 1 )
353 #define RC_WinTree			( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 2 )
354 #define RC_ResetApplication	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 3 )
355 #define RC_GetNextCloseWindow ( M_SOFFICE             | M_WITH_RETURN | 4 )
356 #define RC_ApplicationBusy	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 5 )
357 // (Popup)Menu
358 #define RC_MenuGetItemCount	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 6 )
359 #define RC_MenuGetItemId	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 7 )
360 #define RC_MenuGetItemPos	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 8 )
361 #define RC_MenuIsSeperator	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 9 )
362 #define RC_MenuIsItemChecked ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 10 )
363 #define RC_MenuIsItemEnabled ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 11 )
364 #define RC_MenuGetItemText	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 12 )
365 // RemoteFileAccess
366 #define RC_Dir				( M_SOFFICE             | M_WITH_RETURN | 18 )
367 #define RC_FileLen			( M_SOFFICE             | M_WITH_RETURN | 19 )
368 #define RC_FileDateTime		( M_SOFFICE             | M_WITH_RETURN | 20 )
369 
370 #define RC_Translate		( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 21 )
371 #define RC_GetMouseStyle	( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 22 )
372 #define RC_UnpackStorage	( M_SOFFICE             | M_WITH_RETURN | 23 )
373 
374 #define RC_IsBarVisible 	(             M_MOZILLA | M_WITH_RETURN | 24 )
375 
376 #define RC_MenuGetItemCommand ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 25 )
377 
378 #define RC_ExistsSysDialog  ( M_SOFFICE             | M_WITH_RETURN | 26 )
379 
380 #define RC_SAXCheckWellformed ( M_SOFFICE             | M_WITH_RETURN | 27 )
381 #define RC_SAXReadFile		( M_SOFFICE             | M_WITH_RETURN | 28 )
382 
383 #define RC_SAXGetNodeType   ( M_SOFFICE             | M_WITH_RETURN | 29 )
384 #define RC_SAXGetElementName ( M_SOFFICE             | M_WITH_RETURN | 30 )
385 #define RC_SAXGetChars      ( M_SOFFICE             | M_WITH_RETURN | 31 )
386 #define RC_SAXGetChildCount ( M_SOFFICE             | M_WITH_RETURN | 32 )
387 #define RC_SAXGetAttributeCount ( M_SOFFICE             | M_WITH_RETURN | 33 )
388 #define RC_SAXGetAttributeName ( M_SOFFICE             | M_WITH_RETURN | 34 )
389 #define RC_SAXGetAttributeValue ( M_SOFFICE             | M_WITH_RETURN | 35 )
390 #define RC_SAXSeekElement   ( M_SOFFICE             | M_WITH_RETURN | 36 )
391 #define RC_SAXHasElement    ( M_SOFFICE             | M_WITH_RETURN | 37 )
392 #define RC_SAXGetElementPath ( M_SOFFICE             | M_WITH_RETURN | 38 )
393 
394 #define RC_GetDocumentCount ( M_SOFFICE             | M_WITH_RETURN | 39 )
395 
396 #define RC_GetSystemLanguage ( M_SOFFICE             | M_WITH_RETURN | 40 )
397 
398 #define RC_IsProduct        ( M_SOFFICE             | M_WITH_RETURN | 41 )
399 
400 #define RC_MenuHasSubMenu   ( M_SOFFICE             | M_WITH_RETURN | 42 )
401 
402 #define RC_UsePostEvents    ( M_SOFFICE             | M_WITH_RETURN | 43 )
403 
404 #define RC_WaitSlot         ( M_SOFFICE             | M_WITH_RETURN | 44 )
405 
406 // Flow Control
407 #define F_EndCommandBlock	101			// Initiiert R�ckmeldung des Status
408 #define F_Sequence			102			// �bergibt Sequence Nummer (1. in jedem Stream)
409 
410 // Return codes
411 #define RET_Sequence		132			// �bergibt Sequence Nummer (1. in jedem Stream)
412 #define RET_Value			133			// �bergibt Return-wert
413 #define RET_WinInfo			134			// Information �ber aktuelles Fenster/Control
414 #define RET_ProfileInfo		135			// Profile Information
415 #define RET_DirectLoging	136			// Direktes �bertragen von Informationen in das Log
416 #define RET_MacroRecorder	137			// MakroRecorder Befehl �bertragen
417 
418 
419 
420 // Subcodes die in nUId geliefert werden
421 // f�r F_ProfileInfo
422 #define S_ProfileReset		201			// nNr1 = Anzahl Borders
423 	// Achtung!! Diese Defines m�ssen aufeinanderfolgende Nummern haben!!
424 #define S_ProfileBorder1	202			// nNr1 = Border1 in ms
425 #define S_ProfileBorder2	203			// nNr1 = Border2 in ms
426 #define S_ProfileBorder3	204			// nNr1 = Border3 in ms
427 #define S_ProfileBorder4	205			// nNr1 = Border4 in ms
428 	// Achtung Ende
429 #define S_ProfileTime		210			// nNr1 = remote Zeit des Befehls
430 #define S_ProfileDump		211			// Gibt die daten aus.
431 
432 // f�r F_DirectLoging
433 #define S_AssertError		220
434 #define S_AssertWarning		221
435 #define S_AssertTrace		222
436 #define S_QAError			223
437 
438 
439 
440 // Constants which are available in VCLTestTool scripts
441 
442 // Different types of controls recognized via RTTI
443 #define CONST_CTBrowseBox		100
444 #define CONST_CTValueSet		103
445 #define CONST_CTORoadmap        104
446 #define CONST_CTIExtensionListBox 105
447 #define CONST_CTTableControl    106
448 #define CONST_CTUnknown			199
449 
450 // Konstanten f�r das ALignment des gesuchten Splitters
451 #define CONST_ALIGN_LEFT		120
452 #define CONST_ALIGN_TOP			121
453 #define CONST_ALIGN_RIGHT		122
454 #define CONST_ALIGN_BOTTOM		123
455 
456 /// What dialog to use in RC_CloseSysDialog or RC_ExistsSysDialog
457 #define CONST_FilePicker        301
458 #define CONST_FolderPicker      302
459 
460 /// NodeTypes of the SAX Parser
461 #define CONST_NodeTypeCharacter 555
462 #define CONST_NodeTypeElement   556
463 #define CONST_NodeTypeComment   557
464 
465 /// ItemTypes for TreeListBox and maybe others
466 #define CONST_ItemTypeText          602
467 #define CONST_ItemTypeBMP           601
468 #define CONST_ItemTypeCheckbox      600
469 #define CONST_ItemTypeContextBMP    603
470 #define CONST_ItemTypeUnknown       604
471 
472 /// Return values for WaitSlot
473 #define CONST_WSTimeout             701
474 #define CONST_WSAborted             702
475 #define CONST_WSFinished            703
476 
477 // Beschreibt die Parametertypen als Bitfeld  Reihenfolge immer!
478 // wie hier Aufgelistet
479 #define PARAM_NONE              0x0000
480 #define PARAM_USHORT_1          0x0001
481 #define PARAM_USHORT_2          0x0002
482 #define PARAM_USHORT_3          0x0100		// Nicht in der Reihe!!
483 #define PARAM_USHORT_4          0x0200		// Nicht in der Reihe!!
484 #define PARAM_ULONG_1           0x0004
485 #define PARAM_ULONG_2           0x0008
486 #define PARAM_STR_1             0x0010
487 #define PARAM_STR_2             0x0020
488 #define PARAM_BOOL_1            0x0040
489 #define PARAM_BOOL_2            0x0080
490 #define PARAM_SBXVALUE_1		0x0400		// hier mit 0x0400 Weiter!!! Siehe Oben!
491 
492 // Zus�tzliche Beschreibung!! wird auch mit dem Rest verodert
493 //#define PARAM_STR_RAW           0x8000		// Der Zeichensatz der Strings wird nicht konvertiert(f�r Fareastern)
494 
495 
496 #define ERR_SEND_TIMEOUT		100
497 #define ERR_EXEC_TIMEOUT		101
498 #define ERR_RESTART_FAIL		102
499 #define ERR_RESTART				103
500 #define ERR_NO_WIN				104		// Keine *.Win Dateien gefunden
501 #define ERR_NO_SID				105		// Keine *.Sid Dateien gefunden
502 #define ERR_NO_FILE				106		// Datei nicht gefunden
503 
504 #endif
505