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