bump product version to 5.0.4.1
[LibreOffice.git] / rsc / source / parser / rscicpx.cxx
blob0d23d0b05b581e30de0b33e22b019a5c74ec2ae6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <stdlib.h>
22 #include <stdio.h>
24 #include <tools/rc.h>
25 #include <tools/wintypes.hxx>
26 #include <rsc/rsc-vcl-shared-types.hxx>
28 #include <rscmgr.hxx>
29 #include <rscclass.hxx>
30 #include <rsccont.hxx>
31 #include <rscdb.hxx>
32 #include <rsc/rscsfx.hxx>
33 #include <rsclex.hxx>
34 #include <rscyacc.hxx>
36 void RscTypCont::InsWinBit( RscTop * pClass, const OString& rName,
37 Atom nVal )
39 RscClient * pClient;
41 // Clientvariablen einfuegen
42 aBaseLst.push_back(
43 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nVal )
45 Atom nId = aNmTb.Put( rName.getStr(), VARNAME );
46 pClass->SetVariable( nId, pClient, NULL,
47 VAR_NODATAINST, 0, nWinBitVarId );
50 #define INS_WINBIT( pClass, WinBit ) \
51 InsWinBit( pClass, #WinBit, n##WinBit##Id );
53 RscTop * RscTypCont::InitClassMgr()
55 RscTop * pClassMgr;
56 RscBaseCont * pClass;
57 Atom nId;
59 aBaseLst.push_back( pClass = new RscBaseCont( InvalidAtom, RSC_NOTYPE, NULL, false ) );
61 nId = pHS->getID( "Resource" );
62 pClassMgr = new RscMgr( nId, RSC_RESOURCE, pClass );
63 aNmTb.Put( nId, CLASSNAME, pClassMgr );
64 pClassMgr->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
66 // Variablen anlegen
68 RscContWriteSrc * pCont;
70 // Variablen anlegen
71 aBaseLst.push_back( pCont = new RscContExtraData( pHS->getID( "ContExtradata" ), RSC_NOTYPE ) );
72 pCont->SetTypeClass( &aShort, &aString );
73 nRsc_EXTRADATA = nId = aNmTb.Put( "ExtraData", VARNAME );
74 pClassMgr->SetVariable( nId, pCont );
76 nId = aNmTb.Put( "Comment", VARNAME );
77 pClassMgr->SetVariable( nId, &aString, NULL, VAR_NORC );
79 pClass->SetTypeClass( pClassMgr );
81 return pClassMgr;
84 RscTop * RscTypCont::InitClassString( RscTop * pSuper )
86 Atom nId;
87 RscTop * pClassString;
89 nId = pHS->getID( "String" );
90 pClassString = new RscClass( nId, RSC_STRING, pSuper );
91 aNmTb.Put( nId, CLASSNAME, pClassString );
92 pClassString->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
94 // Variablen anlegen
95 nId = aNmTb.Put( "Text", VARNAME );
96 pClassString->SetVariable( nId, &aLangString );
97 return pClassString;
100 RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper )
102 Atom nId;
103 RscTop * pClassBitmap;
105 nId = pHS->getID( "Bitmap" );
106 pClassBitmap = new RscSysDepend( nId, RSC_BITMAP, pSuper );
107 pClassBitmap->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
108 aNmTb.Put( nId, CLASSNAME, pClassBitmap );
110 // Die Klasse RscSysDepend behandelt die Variablen
111 // "FILE" gesondert
112 nId = aNmTb.Put( "File", VARNAME );
113 pClassBitmap->SetVariable( nId, &aLangString, NULL, VAR_NORC );
115 return pClassBitmap;
118 RscTop * RscTypCont::InitClassColor( RscTop * pSuper, RscEnum * pColor )
120 Atom nId;
121 RscTop * pClassColor;
123 // Klasse anlegen
124 nId = pHS->getID( "Color" );
125 pClassColor = new RscClass( nId, RSC_COLOR, pSuper );
126 pClassColor->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
127 aNmTb.Put( nId, CLASSNAME, pClassColor );
129 // Variablen anlegen
130 nId = aNmTb.Put( "Red", VARNAME );
131 pClassColor->SetVariable( nId, &aUShort );
132 nId = aNmTb.Put( "Green", VARNAME );
133 pClassColor->SetVariable( nId, &aUShort );
134 nId = aNmTb.Put( "Blue", VARNAME );
135 pClassColor->SetVariable( nId, &aUShort );
136 nId = aNmTb.Put( "Predefine", VARNAME );
137 pClassColor->SetVariable( nId, pColor );
139 return pClassColor;
142 RscTop * RscTypCont::InitClassImage( RscTop * pSuper, RscTop * pClassBitmap,
143 RscTop * pClassColor )
145 Atom nId;
146 RscTop * pClassImage;
148 // Klasse anlegen
149 nId = pHS->getID( "Image" );
150 pClassImage = new RscClass( nId, RSC_IMAGE, pSuper );
151 pClassImage->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
152 aNmTb.Put( nId, CLASSNAME, pClassImage );
154 // Variablen anlegen
155 nId = aNmTb.Put( "ImageBitmap", VARNAME );
156 pClassImage->SetVariable( nId, pClassBitmap, NULL, 0, RSC_IMAGE_IMAGEBITMAP );
157 nId = aNmTb.Put( "MaskBitmap", VARNAME );
158 pClassImage->SetVariable( nId, pClassBitmap, NULL, 0, RSC_IMAGE_MASKBITMAP );
159 nId = aNmTb.Put( "MaskColor", VARNAME );
160 pClassImage->SetVariable( nId, pClassColor, NULL,
161 VAR_SVDYNAMIC, RSC_IMAGE_MASKCOLOR );
163 return pClassImage;
166 RscTop * RscTypCont::InitClassImageList( RscTop * pSuper,
167 RscTop * pClassColor, RscCont * pStrLst )
169 Atom nId;
170 RscTop * pClassImageList;
172 // Klasse anlegen
173 nId = pHS->getID( "ImageList" );
174 pClassImageList = new RscClass( nId, RSC_IMAGELIST, pSuper );
175 pClassImageList->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
176 aNmTb.Put( nId, CLASSNAME, pClassImageList );
178 nId = aNmTb.Put( "Prefix", VARNAME );
179 pClassImageList->SetVariable( nId, &aString );
181 nId = aNmTb.Put( "MaskColor", VARNAME );
182 pClassImageList->SetVariable( nId, pClassColor, NULL,
183 VAR_SVDYNAMIC, RSC_IMAGELIST_MASKCOLOR );
185 RscCont * pCont = new RscCont( pHS->getID( "sal_uInt16 *" ), RSC_NOTYPE );
186 pCont->SetTypeClass( &aIdUShort );
187 aBaseLst.push_back( pCont );
188 nId = aNmTb.Put( "IdList", VARNAME );
189 pClassImageList->SetVariable( nId, pCont, NULL, 0,
190 RSC_IMAGELIST_IDLIST );
192 nId = aNmTb.Put( "FileList", VARNAME );
193 pClassImageList->SetVariable( nId, pStrLst );
195 nId = aNmTb.Put( "IdCount", VARNAME );
196 pClassImageList->SetVariable( nId, &aUShort, NULL, 0,
197 RSC_IMAGELIST_IDCOUNT );
198 return pClassImageList;
201 RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
202 RscArray * pLangGeo )
204 Atom nId;
205 RscTop * pClassWindow;
207 // Klasse anlegen
208 nId = pHS->getID( "Window" );
209 pClassWindow = new RscClass( nId, RSC_WINDOW, pSuper );
210 pClassWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
211 aNmTb.Put( nId, CLASSNAME, pClassWindow );
213 // Variablen anlegen
215 RscFlag * pFlag;
216 RscClient * pClient;
217 Atom nVarId, nDisableId, nOutputSizeId;
219 aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagWndExtra" ), RSC_NOTYPE ) );
221 // Konstanten in Tabelle stellen
222 nDisableId = pHS->getID( "RSWND_DISABLE" );
223 SETCONST( pFlag, nDisableId, RSWND_DISABLED );
224 nOutputSizeId = pHS->getID( "RSWND_OUTPUTSIZE" );
225 SETCONST( pFlag, nOutputSizeId, RSWND_CLIENTSIZE );
227 // Variable einfuegen
228 nVarId = aNmTb.Put( "_RscExtraFlags", VARNAME );
229 pClassWindow->SetVariable( nVarId, pFlag, NULL,
230 VAR_HIDDEN | VAR_NOENUM );
232 aBaseLst.push_back(
233 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nDisableId )
235 nId = aNmTb.Put( "Disable", VARNAME );
236 pClassWindow->SetVariable( nId, pClient, NULL,
237 VAR_NODATAINST, 0, nVarId );
239 aBaseLst.push_back(
240 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nOutputSizeId )
242 nId = aNmTb.Put( "OutputSize", VARNAME );
243 pClassWindow->SetVariable( nId, pClient, NULL,
244 VAR_NODATAINST, 0, nVarId );
247 pClassWindow->SetVariable( nWinBitVarId, &aWinBits, NULL,
248 VAR_HIDDEN | VAR_NOENUM );
250 INS_WINBIT(pClassWindow,Border)
251 INS_WINBIT(pClassWindow,Hide)
252 INS_WINBIT(pClassWindow,ClipChildren)
253 INS_WINBIT(pClassWindow,SVLook)
254 InsWinBit( pClassWindow, "DialogControl", nTabControlId );
256 nId = aNmTb.Put( "HelpID", VARNAME );
257 pClassWindow->SetVariable( nId, &aStringLiteral, NULL, 0, WINDOW_HELPID );
260 nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME );
261 pClassWindow->SetVariable( nId, pMapUnit, NULL, 0, WINDOW_XYMAPMODE );
262 nRsc_X = nId = aNmTb.Put( "_X", VARNAME );
263 pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_X );
264 nRsc_Y = nId = aNmTb.Put( "_Y", VARNAME );
265 pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_Y );
267 nRsc_WHMAPMODEId = nId = aNmTb.Put( "_WHMapMode", VARNAME );
268 pClassWindow->SetVariable( nId, pMapUnit, NULL, 0, WINDOW_WHMAPMODE );
269 nRsc_WIDTH = nId = aNmTb.Put( "_Width", VARNAME );
270 pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_WIDTH );
271 nRsc_HEIGHT = nId = aNmTb.Put( "_Height", VARNAME );
272 pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_HEIGHT );
274 nRsc_DELTALANG = nId = aNmTb.Put( "DeltaLang", VARNAME );
275 pClassWindow->SetVariable( nId, pLangGeo, NULL, VAR_NORC | VAR_NOENUM);
276 nId = aNmTb.Put( "Text", VARNAME );
277 pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_TEXT );
278 nId = aNmTb.Put( "HelpText", VARNAME );
279 pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_HELPTEXT );
280 nId = aNmTb.Put( "QuickHelpText", VARNAME );
281 pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_QUICKTEXT );
282 nId = aNmTb.Put( "ExtraLong", VARNAME );
283 pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_EXTRALONG );
284 nId = aNmTb.Put( "UniqueId", VARNAME );
285 pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_UNIQUEID );
287 // BorderStyle
288 RscEnum* pBorderStyleEnum = new RscEnum( pHS->getID( "WindowBorderStyle" ), RSC_NOTYPE );
289 aBaseLst.push_back( pBorderStyleEnum );
291 // Konstanten in Tabelle stellen
292 SETCONST( pBorderStyleEnum, pHS->getID( "WINDOW_BORDER_NORMAL" ), WindowBorderStyle::NORMAL );
293 SETCONST( pBorderStyleEnum, pHS->getID( "WINDOW_BORDER_MONO" ), WindowBorderStyle::MONO );
294 SETCONST( pBorderStyleEnum, pHS->getID( "WINDOW_BORDER_MENU" ), WindowBorderStyle::MENU );
295 SETCONST( pBorderStyleEnum, pHS->getID( "WINDOW_BORDER_NOBORDER" ), WindowBorderStyle::NOBORDER );
297 // Variable einfuegen
298 nId = aNmTb.Put( "BorderStyle", VARNAME );
299 pClassWindow->SetVariable( nId, pBorderStyleEnum, NULL,
301 WINDOW_BORDER_STYLE );
303 return pClassWindow;
306 RscTop * RscTypCont::InitClassSystemWindow( RscTop * pSuper )
308 Atom nId;
309 RscTop * pClassSystemWindow;
311 // Klasse anlegen
312 nId = pHS->getID( "SystemWindow" );
313 pClassSystemWindow = new RscClass( nId, RSC_SYSWINDOW, pSuper );
314 pClassSystemWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
315 aNmTb.Put( nId, CLASSNAME, pClassSystemWindow );
317 INS_WINBIT(pClassSystemWindow,Sizeable)
318 INS_WINBIT(pClassSystemWindow,Moveable)
319 InsWinBit( pClassSystemWindow, "Minable", nMinimizeId );
320 InsWinBit( pClassSystemWindow, "Maxable", nMaximizeId );
321 INS_WINBIT(pClassSystemWindow,Closeable)
322 INS_WINBIT(pClassSystemWindow,App)
323 INS_WINBIT(pClassSystemWindow,SysWin)
325 return pClassSystemWindow ;
328 RscTop * RscTypCont::InitClassWorkWindow( RscTop * pSuper )
330 Atom nId;
331 RscTop * pClassWorkWindow;
333 // Klasse anlegen
334 nId = pHS->getID( "WorkWindow" );
335 pClassWorkWindow = new RscClass( nId, RSC_WORKWIN, pSuper );
336 pClassWorkWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
338 aNmTb.Put( nId, CLASSNAME, pClassWorkWindow );
340 // Variablen anlegen
342 Atom nVarId;
343 RscEnum * pShow;
345 aBaseLst.push_back( pShow = new RscEnum( pHS->getID( "EnumShowState" ), RSC_NOTYPE ) );
347 SETCONST( pShow, "SHOW_NORMAL", WORKWIN_SHOWNORMAL );
348 SETCONST( pShow, "SHOW_MINIMIZED", WORKWIN_SHOWMINIMIZED );
349 SETCONST( pShow, "SHOW_MAXIMIZED", WORKWIN_SHOWMAXIMIZED );
352 // Variable einfuegen
353 nVarId = aNmTb.Put( "Show", VARNAME );
354 pClassWorkWindow->SetVariable( nVarId, pShow, NULL );
357 return pClassWorkWindow;
360 RscTop * RscTypCont::InitClassControl( RscTop * pSuper )
362 Atom nId;
363 RscTop * pClassControl;
365 // Klasse anlegen
366 nId = pHS->getID( "Control" );
367 pClassControl = new RscClass( nId, RSC_CONTROL, pSuper );
368 pClassControl->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
369 aNmTb.Put( nId, CLASSNAME, pClassControl );
371 InsWinBit( pClassControl, "TabStop", nTabstopId );
372 INS_WINBIT(pClassControl,Group)
374 return pClassControl;
377 RscTop * RscTypCont::InitClassCheckBox( RscTop * pSuper )
379 Atom nId;
380 RscTop * pClassCheckBox;
382 // Klasse anlegen
383 nId = pHS->getID( "CheckBox" );
384 pClassCheckBox = new RscClass( nId, RSC_CHECKBOX, pSuper );
385 pClassCheckBox->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
386 aNmTb.Put( nId, CLASSNAME, pClassCheckBox );
388 // Variablen anlegen
389 INS_WINBIT( pClassCheckBox, WordBreak )
390 INS_WINBIT( pClassCheckBox, Top )
391 INS_WINBIT( pClassCheckBox, VCenter )
392 INS_WINBIT( pClassCheckBox, Bottom )
394 nId = aNmTb.Put( "Check", VARNAME );
395 pClassCheckBox->SetVariable( nId, &aBool );
397 return pClassCheckBox;
400 RscTop * RscTypCont::InitClassPushButton( RscTop * pSuper )
402 Atom nId;
403 RscTop * pClassPushButton;
405 // Klasse anlegen
406 nId = pHS->getID( "PushButton" );
407 pClassPushButton = new RscClass( nId, RSC_PUSHBUTTON, pSuper );
408 pClassPushButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
409 aNmTb.Put( nId, CLASSNAME, pClassPushButton );
411 InsWinBit( pClassPushButton, "DefButton", nDefaultId );
412 INS_WINBIT( pClassPushButton, Top )
413 INS_WINBIT( pClassPushButton, VCenter )
414 INS_WINBIT( pClassPushButton, Bottom )
416 return pClassPushButton;
419 RscTop * RscTypCont::InitClassImageButton( RscTop * pSuper,
420 RscTop * pClassImage,
421 RscEnum * pTriState )
423 Atom nId;
424 RscTop * pClassImageButton;
426 // Klasse anlegen
427 nId = pHS->getID( "ImageButton" );
428 pClassImageButton = new RscClass( nId, RSC_IMAGEBUTTON, pSuper );
429 pClassImageButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
430 aNmTb.Put( nId, CLASSNAME, pClassImageButton );
432 // Variablen anlegen
434 nId = aNmTb.Put( "ButtonImage", VARNAME );
435 pClassImageButton->SetVariable( nId, pClassImage, NULL, 0,
436 RSC_IMAGEBUTTON_IMAGE );
438 // Variablen anlegen
440 Atom nVarId;
441 RscEnum * pSymbol;
443 aBaseLst.push_back( pSymbol = new RscEnum( pHS->getID( "EnumSymbolButton" ), RSC_NOTYPE ) );
445 SETCONST( pSymbol, "IMAGEBUTTON_DONTKNOW", SymbolType::DONTKNOW );
446 SETCONST( pSymbol, "IMAGEBUTTON_IMAGE", SymbolType::IMAGE );
447 SETCONST( pSymbol, "IMAGEBUTTON_ARROW_UP", SymbolType::ARROW_UP );
448 SETCONST( pSymbol, "IMAGEBUTTON_ARROW_DOWN", SymbolType::ARROW_DOWN );
449 SETCONST( pSymbol, "IMAGEBUTTON_ARROW_LEFT", SymbolType::ARROW_LEFT );
450 SETCONST( pSymbol, "IMAGEBUTTON_ARROW_RIGHT", SymbolType::ARROW_RIGHT );
451 SETCONST( pSymbol, "IMAGEBUTTON_SPIN_UP", SymbolType::SPIN_UP );
452 SETCONST( pSymbol, "IMAGEBUTTON_SPIN_DOWN", SymbolType::SPIN_DOWN );
453 SETCONST( pSymbol, "IMAGEBUTTON_SPIN_LEFT", SymbolType::SPIN_LEFT );
454 SETCONST( pSymbol, "IMAGEBUTTON_SPIN_RIGHT", SymbolType::SPIN_RIGHT );
455 SETCONST( pSymbol, "IMAGEBUTTON_FIRST", SymbolType::FIRST );
456 SETCONST( pSymbol, "IMAGEBUTTON_LAST", SymbolType::LAST );
457 SETCONST( pSymbol, "IMAGEBUTTON_PREV", SymbolType::PREV );
458 SETCONST( pSymbol, "IMAGEBUTTON_NEXT", SymbolType::NEXT );
459 SETCONST( pSymbol, "IMAGEBUTTON_PAGEUP", SymbolType::PAGEUP );
460 SETCONST( pSymbol, "IMAGEBUTTON_PAGEDOWN", SymbolType::PAGEDOWN );
461 SETCONST( pSymbol, "IMAGEBUTTON_PLAY", SymbolType::PLAY );
462 SETCONST( pSymbol, "IMAGEBUTTON_REVERSEPLAY", SymbolType::REVERSEPLAY );
463 SETCONST( pSymbol, "IMAGEBUTTON_STOP", SymbolType::STOP );
464 SETCONST( pSymbol, "IMAGEBUTTON_PAUSE", SymbolType::PAUSE );
465 SETCONST( pSymbol, "IMAGEBUTTON_WINDSTART", SymbolType::WINDSTART );
466 SETCONST( pSymbol, "IMAGEBUTTON_WINDEND", SymbolType::WINDEND );
467 SETCONST( pSymbol, "IMAGEBUTTON_WINDBACKWARD", SymbolType::WINDBACKWARD );
468 SETCONST( pSymbol, "IMAGEBUTTON_WINDFORWARD", SymbolType::WINDFORWARD );
470 // Variable einfuegen
471 nVarId = aNmTb.Put( "Symbol", VARNAME );
472 pClassImageButton->SetVariable( nVarId, pSymbol, NULL, 0,
473 RSC_IMAGEBUTTON_SYMBOL );
475 nId = aNmTb.Put( "State", VARNAME );
476 pClassImageButton->SetVariable( nId, pTriState, NULL, 0,
477 RSC_IMAGEBUTTON_STATE );
479 INS_WINBIT(pClassImageButton,Repeat)
480 INS_WINBIT(pClassImageButton,SmallStyle)
481 INS_WINBIT(pClassImageButton,RectStyle)
483 return pClassImageButton;
486 RscTop * RscTypCont::InitClassEdit( RscTop * pSuper )
488 Atom nId;
489 RscTop * pClassEdit;
491 // Klasse anlegen
492 nId = pHS->getID( "Edit" );
493 pClassEdit = new RscClass( nId, RSC_EDIT, pSuper );
494 pClassEdit->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
495 aNmTb.Put( nId, CLASSNAME, pClassEdit );
497 INS_WINBIT(pClassEdit,Left)
498 INS_WINBIT(pClassEdit,Center)
499 INS_WINBIT(pClassEdit,Right)
500 INS_WINBIT(pClassEdit,PassWord)
501 INS_WINBIT(pClassEdit,ReadOnly)
503 nId = aNmTb.Put( "MaxTextLength", VARNAME );
504 pClassEdit->SetVariable( nId, &aUShort );
506 return pClassEdit;
509 RscTop * RscTypCont::InitClassListBox( RscTop * pSuper, RscArray * pStrLst )
511 Atom nId;
512 RscTop * pClassListBox;
514 // Klasse anlegen
515 nId = pHS->getID( "ListBox" );
516 pClassListBox = new RscClass( nId, RSC_LISTBOX, pSuper );
517 pClassListBox->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
518 aNmTb.Put( nId, CLASSNAME, pClassListBox );
520 // Variablen anlegen
521 INS_WINBIT(pClassListBox,Sort)
522 INS_WINBIT(pClassListBox,DropDown)
523 INS_WINBIT(pClassListBox,HScroll);
524 INS_WINBIT(pClassListBox,VScroll);
525 INS_WINBIT(pClassListBox,AutoSize)
526 INS_WINBIT(pClassListBox,AutoHScroll)
527 INS_WINBIT(pClassListBox,DDExtraWidth)
530 RSCINST aDflt = aUShort.Create( NULL, RSCINST(), false );
531 aDflt.pClass->SetNumber( aDflt, (sal_uInt16)0xFFFF );
532 nId = aNmTb.Put( "CurPos", VARNAME );
533 pClassListBox->SetVariable( nId, &aUShort, &aDflt );
535 nId = aNmTb.Put( "StringList", VARNAME );
536 pClassListBox->SetVariable( nId, pStrLst );
538 return pClassListBox;
541 RscTop * RscTypCont::InitClassComboBox( RscTop * pSuper, RscArray * pStrLst )
543 Atom nId;
544 RscTop * pClassComboBox;
546 // Klasse anlegen
547 nId = pHS->getID( "ComboBox" );
548 pClassComboBox = new RscClass( nId, RSC_COMBOBOX, pSuper );
549 pClassComboBox->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
550 aNmTb.Put( nId, CLASSNAME, pClassComboBox );
552 // Variablen anlegen
553 INS_WINBIT(pClassComboBox,DropDown)
554 INS_WINBIT(pClassComboBox,Sort)
555 INS_WINBIT(pClassComboBox,HScroll);
556 INS_WINBIT(pClassComboBox,VScroll);
557 INS_WINBIT(pClassComboBox,AutoSize)
558 INS_WINBIT(pClassComboBox,AutoHScroll)
559 INS_WINBIT(pClassComboBox,DDExtraWidth)
561 nId = aNmTb.Put( "StringList", VARNAME );
562 pClassComboBox->SetVariable( nId, pStrLst );
564 return pClassComboBox;
567 RscTop * RscTypCont::InitClassFixedText( RscTop * pSuper )
569 Atom nId;
570 RscTop * pClassFixedText;
572 // Klasse anlegen
573 nId = pHS->getID( "FixedText" );
574 pClassFixedText = new RscClass( nId, RSC_TEXT, pSuper );
575 pClassFixedText->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
576 aNmTb.Put( nId, CLASSNAME, pClassFixedText );
578 // Variablen anlegen
579 INS_WINBIT(pClassFixedText,Left)
580 INS_WINBIT(pClassFixedText,Center)
581 INS_WINBIT(pClassFixedText,Right)
582 INS_WINBIT(pClassFixedText,WordBreak)
583 INS_WINBIT(pClassFixedText,LeftLabel)
584 INS_WINBIT(pClassFixedText,NoLabel)
585 INS_WINBIT(pClassFixedText,Top)
586 INS_WINBIT(pClassFixedText,VCenter)
587 INS_WINBIT(pClassFixedText,Bottom)
589 return pClassFixedText;
592 RscTop * RscTypCont::InitClassFixedImage( RscTop * pSuper, RscTop * pClassImage )
594 Atom nId;
595 RscTop * pClassFixedImage;
597 // Klasse anlegen
598 nId = pHS->getID( "FixedImage" );
599 pClassFixedImage = new RscClass( nId, RSC_FIXEDIMAGE, pSuper );
600 pClassFixedImage->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
601 aNmTb.Put( nId, CLASSNAME, pClassFixedImage );
603 // Variablen anlegen
604 nId = aNmTb.Put( "Fixed", VARNAME );
605 pClassFixedImage->SetVariable( nId, pClassImage, 0, 0, RSC_FIXEDIMAGE_IMAGE );
607 return pClassFixedImage;
610 RscTop * RscTypCont::InitClassRadioButton( RscTop * pSuper )
612 Atom nId;
613 RscTop * pClassRadioButton;
615 // Klasse anlegen
616 nId = pHS->getID( "RadioButton" );
617 pClassRadioButton = new RscClass( nId, RSC_RADIOBUTTON, pSuper );
618 pClassRadioButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
619 aNmTb.Put( nId, CLASSNAME, pClassRadioButton );
621 // Variablen anlegen
622 INS_WINBIT( pClassRadioButton, WordBreak )
623 INS_WINBIT( pClassRadioButton, Top )
624 INS_WINBIT( pClassRadioButton, VCenter )
625 INS_WINBIT( pClassRadioButton, Bottom )
627 nId = aNmTb.Put( "Check", VARNAME );
628 pClassRadioButton->SetVariable( nId, &aBool );
630 return pClassRadioButton;
633 RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
635 Atom nId;
636 RscTop * pClassKeyCode;
638 // Klasse anlegen
639 nId = pHS->getID( "KeyCode" );
640 pClassKeyCode = new RscClass( nId, RSC_KEYCODE, pSuper );
641 aNmTb.Put( nId, CLASSNAME, pClassKeyCode );
643 // Variablen anlegen
644 nId = aNmTb.Put( "Code", VARNAME );
645 pClassKeyCode->SetVariable( nId, pKey );
648 RscFlag * pFlag;
649 RscClient * pClient;
650 Atom nVarId, nShiftId, nMod1Id, nMod2Id;
652 aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagKeyModifier" ), RSC_NOTYPE ) );
654 // Konstanten in Tabelle stellen
655 nShiftId = pHS->getID( "KEY_SHIFT" );
656 SETCONST( pFlag, nShiftId, KEY_SHIFT );
657 nMod1Id = pHS->getID( "KEY_MOD1" );
658 SETCONST( pFlag, nMod1Id, KEY_MOD1 );
659 nMod2Id = pHS->getID( "KEY_MOD2" );
660 SETCONST( pFlag, nMod2Id, KEY_MOD2 );
662 // Variable einfuegen
663 nVarId = aNmTb.Put( "_ModifierFlags", VARNAME );
664 pClassKeyCode->SetVariable( nVarId, pFlag, NULL,
665 VAR_HIDDEN | VAR_NOENUM );
667 // Clientvariablen einfuegen
668 aBaseLst.push_back(
669 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nShiftId )
671 nId = aNmTb.Put( "Shift", VARNAME );
672 pClassKeyCode->SetVariable( nId, pClient, NULL,
673 VAR_NODATAINST, 0, nVarId );
675 aBaseLst.push_back(
676 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nMod1Id )
678 nId = aNmTb.Put( "Modifier1", VARNAME );
679 pClassKeyCode->SetVariable( nId, pClient, NULL,
680 VAR_NODATAINST, 0, nVarId );
683 aBaseLst.push_back(
684 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nMod2Id )
686 nId = aNmTb.Put( "Modifier2", VARNAME );
687 pClassKeyCode->SetVariable( nId, pClient, NULL,
688 VAR_NODATAINST, 0, nVarId );
691 Atom nVarId;
692 RscEnum * pKeyFunc;
694 aBaseLst.push_back( pKeyFunc = new RscEnum( pHS->getID( "EnumKeyFunc" ), RSC_NOTYPE ) );
696 SETCONST( pKeyFunc, "KEYFUNC_DONTKNOW", KeyFuncType::DONTKNOW );
697 SETCONST( pKeyFunc, "KEYFUNC_NEW", KeyFuncType::NEW );
698 SETCONST( pKeyFunc, "KEYFUNC_OPEN", KeyFuncType::OPEN );
699 SETCONST( pKeyFunc, "KEYFUNC_SAVE", KeyFuncType::SAVE );
700 SETCONST( pKeyFunc, "KEYFUNC_SAVEAS", KeyFuncType::SAVEAS );
701 SETCONST( pKeyFunc, "KEYFUNC_PRINT", KeyFuncType::PRINT );
702 SETCONST( pKeyFunc, "KEYFUNC_CLOSE", KeyFuncType::CLOSE );
703 SETCONST( pKeyFunc, "KEYFUNC_QUIT", KeyFuncType::QUIT );
704 SETCONST( pKeyFunc, "KEYFUNC_CUT", KeyFuncType::CUT );
705 SETCONST( pKeyFunc, "KEYFUNC_COPY", KeyFuncType::COPY );
706 SETCONST( pKeyFunc, "KEYFUNC_PASTE", KeyFuncType::PASTE );
707 SETCONST( pKeyFunc, "KEYFUNC_UNDO", KeyFuncType::UNDO );
708 SETCONST( pKeyFunc, "KEYFUNC_REDO", KeyFuncType::REDO );
709 SETCONST( pKeyFunc, "KEYFUNC_DELETE", KeyFuncType::DELETE );
710 SETCONST( pKeyFunc, "KEYFUNC_REPEAT", KeyFuncType::REPEAT );
711 SETCONST( pKeyFunc, "KEYFUNC_FIND", KeyFuncType::FIND );
712 SETCONST( pKeyFunc, "KEYFUNC_PROPERTIES", KeyFuncType::PROPERTIES );
713 SETCONST( pKeyFunc, "KEYFUNC_FRONT", KeyFuncType::FRONT );
714 SETCONST( pKeyFunc, "KEYFUNC_FINDBACKWARD", KeyFuncType::FINDBACKWARD );
715 // Variable einfuegen
716 nVarId = aNmTb.Put( "Function", VARNAME );
717 pClassKeyCode->SetVariable( nVarId, pKeyFunc, NULL );
720 return pClassKeyCode;
723 RscTop * RscTypCont::InitClassAccelItem( RscTop * pSuper,
724 RscTop * pClassKeyCode )
726 Atom nId;
727 RscTop * pClassAccelItem;
729 // Klasse anlegen
730 nId = pHS->getID( "AcceleratorItem" );
731 pClassAccelItem = new RscClass( nId, RSC_ACCELITEM, pSuper );
732 aNmTb.Put( nId, CLASSNAME, pClassAccelItem );
734 // Variablen anlegen
735 nId = aNmTb.Put( "Identifier", VARNAME );
736 pClassAccelItem->SetVariable( nId, &aIdNoZeroUShort );
737 nId = aNmTb.Put( "Disable", VARNAME );
738 pClassAccelItem->SetVariable( nId, &aBool );
739 nId = aNmTb.Put( "Key", VARNAME );
740 pClassAccelItem->SetVariable( nId, pClassKeyCode, NULL, 0,
741 ACCELITEM_KEY );
743 return pClassAccelItem;
746 RscTop * RscTypCont::InitClassAccel( RscTop * pSuper, RscTop * pClassAccelItem )
748 Atom nId;
749 RscTop * pClassAccel;
751 // Klasse anlegen
752 nId = pHS->getID( "Accelerator" );
753 pClassAccel = new RscClass( nId, RSC_ACCEL, pSuper );
754 pClassAccel->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
755 aNmTb.Put( nId, CLASSNAME, pClassAccel );
757 // Variablen anlegen
758 nId = aNmTb.Put( "HelpText", VARNAME );
759 pClassAccel->SetVariable( nId, &aLangString );
761 RscCont * pCont;
763 aBaseLst.push_back(
764 pCont = new RscCont( pHS->getID( "ContAcceleratorKey" ), RSC_NOTYPE )
766 pCont->SetTypeClass( pClassAccelItem );
767 nId = aNmTb.Put( "ItemList", VARNAME );
768 pClassAccel->SetVariable( nId, pCont );
771 return pClassAccel;
774 RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
775 RscTop * pClassBitmap,
776 RscTop * pClassKeyCode )
778 Atom nId;
779 RscTop * pClassMenuItem;
781 // Klasse anlegen
782 nId = pHS->getID( "MenuItem" );
783 pClassMenuItem = new RscClass( nId, RSC_MENUITEM, pSuper );
784 aNmTb.Put( nId, CLASSNAME, pClassMenuItem );
786 // Variablen anlegen
787 nId = aNmTb.Put( "Separator", VARNAME );
788 pClassMenuItem->SetVariable( nId, &aBool, NULL, 0,
789 RSC_MENUITEM_SEPARATOR );
790 nId = aNmTb.Put( "Identifier", VARNAME );
791 pClassMenuItem->SetVariable( nId, &aIdNoZeroUShort, NULL, 0,
792 RSC_MENUITEM_ID );
794 RscFlag * pFlag;
795 RscClient * pClient;
796 Atom nVarId, nAutoCheckId, nRadioCheckId;
797 Atom nCheckableId, nAboutId, nHelpId;
799 aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagMenuState" ), RSC_NOTYPE ) );
801 // Konstanten in Tabelle stellen
802 nCheckableId = pHS->getID( "MIB_CHECKABLE" );
803 SETCONST( pFlag, nCheckableId, MenuItemBits::CHECKABLE );
804 nAutoCheckId = pHS->getID( "MIB_AUTOCHECK" );
805 SETCONST( pFlag, nAutoCheckId, MenuItemBits::AUTOCHECK );
806 nRadioCheckId = pHS->getID( "MIB_RADIOCHECK" );
807 SETCONST( pFlag, nRadioCheckId, MenuItemBits::RADIOCHECK );
808 nAboutId = pHS->getID( "MIB_ABOUT" );
809 SETCONST( pFlag, nAboutId, MenuItemBits::ABOUT );
810 nHelpId = pHS->getID( "MIB_HELP" );
811 SETCONST( pFlag, nHelpId, MenuItemBits::HELP );
813 // Variable einfuegen
814 nVarId = aNmTb.Put( "_MenuItemFlags", VARNAME );
815 pClassMenuItem->SetVariable( nVarId, pFlag, NULL,
816 VAR_HIDDEN | VAR_NOENUM,
817 RSC_MENUITEM_STATUS );
819 // Clientvariablen einfuegen
820 aBaseLst.push_back(
821 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nCheckableId )
823 nId = aNmTb.Put( "Checkable", VARNAME );
824 pClassMenuItem->SetVariable( nId, pClient, NULL,
825 VAR_NODATAINST, 0, nVarId );
827 aBaseLst.push_back(
828 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAutoCheckId )
830 nId = aNmTb.Put( "AutoCheck", VARNAME );
831 pClassMenuItem->SetVariable( nId, pClient, NULL,
832 VAR_NODATAINST, 0, nVarId );
834 aBaseLst.push_back(
835 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nRadioCheckId )
837 nId = aNmTb.Put( "RadioCheck", VARNAME );
838 pClassMenuItem->SetVariable( nId, pClient, NULL,
839 VAR_NODATAINST, 0, nVarId );
841 aBaseLst.push_back(
842 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAboutId )
844 nId = aNmTb.Put( "About", VARNAME );
845 pClassMenuItem->SetVariable( nId, pClient, NULL,
846 VAR_NODATAINST, 0, nVarId );
848 aBaseLst.push_back(
849 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nHelpId )
851 nId = aNmTb.Put( "Help", VARNAME );
852 pClassMenuItem->SetVariable( nId, pClient, NULL,
853 VAR_NODATAINST, 0, nVarId );
856 nId = aNmTb.Put( "Text", VARNAME );
857 pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0,
858 RSC_MENUITEM_TEXT );
859 nId = aNmTb.Put( "ItemBitmap", VARNAME );
860 pClassMenuItem->SetVariable( nId, pClassBitmap, NULL, 0,
861 RSC_MENUITEM_BITMAP );
862 nId = aNmTb.Put( "HelpText", VARNAME );
863 pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0,
864 RSC_MENUITEM_HELPTEXT );
865 nId = aNmTb.Put( "HelpID", VARNAME );
866 pClassMenuItem->SetVariable( nId, &aStringLiteral, NULL, 0,
867 RSC_MENUITEM_HELPID );
868 nId = aNmTb.Put( "AccelKey", VARNAME );
869 pClassMenuItem->SetVariable( nId, pClassKeyCode, NULL, 0,
870 RSC_MENUITEM_KEYCODE );
871 nId = aNmTb.Put( "Check", VARNAME );
872 pClassMenuItem->SetVariable( nId, &aBool, NULL, 0,
873 RSC_MENUITEM_CHECKED );
874 nId = aNmTb.Put( "Disable", VARNAME );
875 pClassMenuItem->SetVariable( nId, &aBool, NULL, 0,
876 RSC_MENUITEM_DISABLE );
877 nId = aNmTb.Put( "Command", VARNAME );
878 pClassMenuItem->SetVariable( nId, &aString, NULL, 0,
879 RSC_MENUITEM_COMMAND );
881 return pClassMenuItem;
884 RscTop * RscTypCont::InitClassMenu( RscTop * pSuper,
885 RscTop * pClassMenuItem )
887 Atom nId;
888 RscTop * pClassMenu;
890 // Klasse anlegen
891 nId = pHS->getID( "Menu" );
892 pClassMenu = new RscClass( nId, RSC_MENU, pSuper );
893 pClassMenu->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
894 aNmTb.Put( nId, CLASSNAME, pClassMenu );
896 // Variablen anlegen
898 RscCont * pCont;
900 aBaseLst.push_back( pCont = new RscCont( pHS->getID( "ContMenuItem" ), RSC_NOTYPE ) );
901 pCont->SetTypeClass( pClassMenuItem );
902 nId = aNmTb.Put( "ItemList", VARNAME );
903 pClassMenu->SetVariable( nId, pCont, NULL, 0, RSC_MENU_ITEMS );
905 nId = aNmTb.Put( "Text", VARNAME );
906 pClassMenu->SetVariable( nId, &aLangString, NULL, 0, RSC_MENU_TEXT );
907 nId = aNmTb.Put( "DefaultItemId", VARNAME );
908 pClassMenu->SetVariable( nId, &aIdUShort, NULL, 0,
909 RSC_MENU_DEFAULTITEMID );
911 return pClassMenu;
914 RscTop * RscTypCont::InitClassSplitWindow( RscTop * pSuper )
916 Atom nId;
917 RscTop * pClassSplitWindow;
919 // Klasse anlegen
920 nId = pHS->getID( "SplitWindow" );
921 pClassSplitWindow = new RscClass( nId, RSC_SPLITWINDOW, pSuper );
922 pClassSplitWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
924 aNmTb.Put( nId, CLASSNAME, pClassSplitWindow );
926 INS_WINBIT(pClassSplitWindow,Sizeable)
927 INS_WINBIT(pClassSplitWindow,NoSplitDraw)
929 return pClassSplitWindow;
932 RscTop * RscTypCont::InitClassNumericFormatter( RscTop * pSuper )
934 Atom nId;
935 RscTop * pClassNumeric;
937 // Klasse anlegen
938 nId = pHS->getID( "NumericFormatter" );
939 pClassNumeric = new RscClass( nId, RSC_NOTYPE, pSuper );
940 pClassNumeric->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
942 // Variablen anlegen
943 nId = aNmTb.Put( "Minimum", VARNAME );
944 pClassNumeric->SetVariable( nId, &aIdLong, NULL,
945 0, NUMERICFORMATTER_MIN );
946 nId = aNmTb.Put( "Maximum", VARNAME );
947 pClassNumeric->SetVariable( nId, &aIdLong, NULL,
948 0, NUMERICFORMATTER_MAX );
949 nId = aNmTb.Put( "StrictFormat", VARNAME );
950 pClassNumeric->SetVariable( nId, &aBool, NULL,
951 0, NUMERICFORMATTER_STRICTFORMAT );
952 nId = aNmTb.Put( "DecimalDigits", VARNAME );
953 pClassNumeric->SetVariable( nId, &aUShort, NULL,
954 0, NUMERICFORMATTER_DECIMALDIGITS );
955 nId = aNmTb.Put( "Value", VARNAME );
956 pClassNumeric->SetVariable( nId, &aIdLong, NULL,
957 0, NUMERICFORMATTER_VALUE );
958 nId = aNmTb.Put( "NoThousandSep", VARNAME );
959 pClassNumeric->SetVariable( nId, &aBool, NULL,
960 0, NUMERICFORMATTER_NOTHOUSANDSEP );
962 return pClassNumeric;
965 RscTop * RscTypCont::InitClassMetricFormatter( RscTop * pSuper,
966 RscEnum * pFieldUnits )
968 Atom nId;
969 RscTop * pClassMetric;
971 // Klasse anlegen
972 nId = pHS->getID( "MetricFormatter" );
973 pClassMetric = new RscClass( nId, RSC_NOTYPE, pSuper );
974 pClassMetric->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
976 // Variablen anlegen
977 nId = aNmTb.Put( "Unit", VARNAME );
978 pClassMetric->SetVariable( nId, pFieldUnits, NULL,
979 0, METRICFORMATTER_UNIT );
980 nId = aNmTb.Put( "CustomUnitText", VARNAME );
981 pClassMetric->SetVariable( nId, &aLangString, NULL,
982 0, METRICFORMATTER_CUSTOMUNITTEXT );
984 return pClassMetric;
987 RscTop * RscTypCont::InitClassSpinField( RscTop * pSuper )
989 Atom nId;
990 RscTop * pClassSpinField;
992 // Klasse anlegen
993 nId = pHS->getID( "SpinField" );
994 pClassSpinField = new RscClass( nId, RSC_SPINFIELD, pSuper );
995 pClassSpinField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
997 aNmTb.Put( nId, CLASSNAME, pClassSpinField );
999 INS_WINBIT(pClassSpinField,Repeat)
1000 INS_WINBIT(pClassSpinField,Spin)
1002 return pClassSpinField;
1005 RscTop * RscTypCont::InitClassNumericField( RscTop * pSuper )
1007 Atom nId;
1008 RscTop * pClassNumericField;
1010 // Klasse anlegen
1011 nId = pHS->getID( "NumericField" );
1012 pClassNumericField = new RscClass( nId, RSC_NUMERICFIELD, pSuper );
1013 pClassNumericField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
1015 aNmTb.Put( nId, CLASSNAME, pClassNumericField );
1017 // Variablen anlegen
1018 nId = aNmTb.Put( "First", VARNAME );
1019 pClassNumericField->SetVariable( nId, &aIdLong, NULL,
1020 0, NUMERICFIELD_FIRST );
1021 nId = aNmTb.Put( "Last", VARNAME );
1022 pClassNumericField->SetVariable( nId, &aIdLong, NULL,
1023 0, NUMERICFIELD_LAST );
1024 nId = aNmTb.Put( "SpinSize", VARNAME );
1025 pClassNumericField->SetVariable( nId, &aIdLong, NULL,
1026 0, NUMERICFIELD_SPINSIZE );
1027 return pClassNumericField;
1030 RscTop * RscTypCont::InitClassMetricField( RscTop * pSuper )
1032 Atom nId;
1033 RscTop * pClassMetricField;
1035 // Klasse anlegen
1036 nId = pHS->getID( "MetricField" );
1037 pClassMetricField = new RscClass( nId, RSC_METRICFIELD, pSuper );
1038 pClassMetricField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
1040 aNmTb.Put( nId, CLASSNAME, pClassMetricField );
1042 // Variablen anlegen
1043 nId = aNmTb.Put( "First", VARNAME );
1044 pClassMetricField->SetVariable( nId, &aIdLong, NULL,
1045 0, METRICFIELD_FIRST );
1046 nId = aNmTb.Put( "Last", VARNAME );
1047 pClassMetricField->SetVariable( nId, &aIdLong, NULL,
1048 0, METRICFIELD_LAST );
1049 nId = aNmTb.Put( "SpinSize", VARNAME );
1050 pClassMetricField->SetVariable( nId, &aIdLong, NULL,
1051 0, METRICFIELD_SPINSIZE );
1053 return pClassMetricField;
1056 RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper,
1057 RscEnum * pMapUnit )
1059 Atom nId;
1060 RscTop * pClassDockWindow;
1062 // Klasse anlegen
1063 nId = pHS->getID( "DockingWindow" );
1064 pClassDockWindow = new RscClass( nId, RSC_DOCKINGWINDOW, pSuper );
1065 pClassDockWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
1066 aNmTb.Put( nId, CLASSNAME, pClassDockWindow );
1068 // Variablen anlegen
1069 nId = aNmTb.Put( "_FloatingPosMapMode", VARNAME );
1070 pClassDockWindow->SetVariable( nId, pMapUnit, NULL, 0,
1071 RSC_DOCKINGWINDOW_XYMAPMODE );
1072 nId = aNmTb.Put( "_FloatingPosX", VARNAME );
1073 pClassDockWindow->SetVariable( nId, &aShort, NULL, 0,
1074 RSC_DOCKINGWINDOW_X );
1075 nId = aNmTb.Put( "_FloatingPosY", VARNAME );
1076 pClassDockWindow->SetVariable( nId, &aShort, NULL, 0,
1077 RSC_DOCKINGWINDOW_Y );
1078 nId = aNmTb.Put( "FloatingMode", VARNAME );
1079 pClassDockWindow->SetVariable( nId, &aBool, NULL, 0,
1080 RSC_DOCKINGWINDOW_FLOATING );
1082 INS_WINBIT(pClassDockWindow,Moveable)
1083 INS_WINBIT(pClassDockWindow,Sizeable)
1084 INS_WINBIT(pClassDockWindow,EnableResizing)
1085 INS_WINBIT(pClassDockWindow,Closeable)
1086 INS_WINBIT(pClassDockWindow,HideWhenDeactivate);
1087 INS_WINBIT(pClassDockWindow,Zoomable);
1088 INS_WINBIT(pClassDockWindow,Dockable);
1090 return pClassDockWindow;
1093 RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
1094 RscTop * pClassBitmap,
1095 RscTop * pClassImage,
1096 RscEnum * pTriState )
1098 Atom nId;
1099 RscTop * pClassToolBoxItem;
1101 // Klasse anlegen
1102 nId = pHS->getID( "ToolBoxItem" );
1103 pClassToolBoxItem = new RscClass( nId, RSC_TOOLBOXITEM, pSuper );
1104 aNmTb.Put( nId, CLASSNAME, pClassToolBoxItem );
1106 // Variablen anlegen
1107 nId = aNmTb.Put( "Identifier", VARNAME );
1108 pClassToolBoxItem->SetVariable( nId, &aIdNoZeroUShort, NULL, 0,
1109 RSC_TOOLBOXITEM_ID );
1111 RscEnum * pEnum;
1113 aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumToolBoxItemType" ), RSC_NOTYPE ) );
1114 SETCONST( pEnum, "TOOLBOXITEM_BUTTON", ToolBoxItemType::BUTTON );
1115 SETCONST( pEnum, "TOOLBOXITEM_SPACE", ToolBoxItemType::SPACE );
1116 SETCONST( pEnum, "TOOLBOXITEM_SEPARATOR", ToolBoxItemType::SEPARATOR );
1117 SETCONST( pEnum, "TOOLBOXITEM_BREAK", ToolBoxItemType::BREAK );
1119 // Variable einfuegen
1120 nId = aNmTb.Put( "Type", VARNAME );
1121 pClassToolBoxItem->SetVariable( nId, pEnum, NULL, 0,
1122 RSC_TOOLBOXITEM_TYPE );
1125 RscFlag * pFlag;
1126 RscClient * pClient;
1127 Atom l_nVarId, l_nAutoCheckId, l_nRadioCheckId, l_nCheckableId, l_nLeftId, l_nAutoSizeId, l_nDropDownId;
1129 aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagToolBoxState" ), RSC_NOTYPE ) );
1131 // Konstanten in Tabelle stellen
1132 l_nCheckableId = pHS->getID( "ToolBoxItemBits::CHECKABLE" );
1133 SETCONST( pFlag, l_nCheckableId, ToolBoxItemBits::CHECKABLE );
1134 l_nAutoCheckId = pHS->getID( "ToolBoxItemBits::AUTOCHECK" );
1135 SETCONST( pFlag, l_nAutoCheckId, ToolBoxItemBits::AUTOCHECK );
1136 l_nRadioCheckId = pHS->getID( "ToolBoxItemBits::RADIOCHECK" );
1137 SETCONST( pFlag, l_nRadioCheckId, ToolBoxItemBits::RADIOCHECK );
1138 l_nLeftId = pHS->getID( "ToolBoxItemBits::LEFT" );
1139 SETCONST( pFlag, l_nLeftId, ToolBoxItemBits::LEFT );
1140 l_nAutoSizeId = pHS->getID( "ToolBoxItemBits::AUTOSIZE" );
1141 SETCONST( pFlag, l_nAutoSizeId, ToolBoxItemBits::AUTOSIZE );
1142 l_nDropDownId = pHS->getID( "ToolBoxItemBits::DROPDOWN" );
1143 SETCONST( pFlag, l_nDropDownId, ToolBoxItemBits::DROPDOWN );
1145 // Variable einfuegen
1146 l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME );
1147 pClassToolBoxItem->SetVariable( l_nVarId, pFlag, NULL,
1148 VAR_HIDDEN | VAR_NOENUM,
1149 RSC_TOOLBOXITEM_STATUS );
1151 // Clientvariablen einfuegen
1152 aBaseLst.push_back(
1153 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nCheckableId )
1155 nId = aNmTb.Put( "Checkable", VARNAME );
1156 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1158 aBaseLst.push_back(
1159 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nAutoCheckId )
1161 nId = aNmTb.Put( "AutoCheck", VARNAME );
1162 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1164 aBaseLst.push_back(
1165 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nRadioCheckId )
1167 nId = aNmTb.Put( "RadioCheck", VARNAME );
1168 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1170 aBaseLst.push_back(
1171 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nLeftId )
1173 nId = aNmTb.Put( "Left", VARNAME );
1174 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1176 aBaseLst.push_back(
1177 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nAutoSizeId )
1179 nId = aNmTb.Put( "AutoSize", VARNAME );
1180 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1182 aBaseLst.push_back(
1183 pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nDropDownId )
1185 nId = aNmTb.Put( "DropDown", VARNAME );
1186 pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
1188 nId = aNmTb.Put( "HelpID", VARNAME );
1189 pClassToolBoxItem->SetVariable( nId, &aStringLiteral, NULL, 0,
1190 RSC_TOOLBOXITEM_HELPID );
1191 nId = aNmTb.Put( "Text", VARNAME );
1192 pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0,
1193 RSC_TOOLBOXITEM_TEXT );
1194 nId = aNmTb.Put( "HelpText", VARNAME );
1195 pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0,
1196 RSC_TOOLBOXITEM_HELPTEXT );
1197 nId = aNmTb.Put( "ItemBitmap", VARNAME );
1198 pClassToolBoxItem->SetVariable( nId, pClassBitmap, NULL, 0,
1199 RSC_TOOLBOXITEM_BITMAP );
1200 nId = aNmTb.Put( "ItemImage", VARNAME );
1201 pClassToolBoxItem->SetVariable( nId, pClassImage, NULL, 0,
1202 RSC_TOOLBOXITEM_IMAGE );
1203 nId = aNmTb.Put( "Disable", VARNAME );
1204 pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0,
1205 RSC_TOOLBOXITEM_DISABLE );
1207 nId = aNmTb.Put( "State", VARNAME );
1208 pClassToolBoxItem->SetVariable( nId, pTriState, NULL, 0,
1209 RSC_TOOLBOXITEM_STATE );
1210 nId = aNmTb.Put( "Hide", VARNAME );
1211 pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0,
1212 RSC_TOOLBOXITEM_HIDE );
1213 nId = aNmTb.Put( "Hide", VARNAME );
1214 pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0,
1215 RSC_TOOLBOXITEM_HIDE );
1216 nId = aNmTb.Put( "Command", VARNAME );
1217 pClassToolBoxItem->SetVariable( nId, &aString, NULL, 0,
1218 RSC_TOOLBOXITEM_COMMAND );
1220 return pClassToolBoxItem;
1223 RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper,
1224 RscTop * pClassToolBoxItem,
1225 RscTop * pClassImageList )
1227 Atom nId;
1228 RscTop * pClassToolBox;
1230 // Klasse anlegen
1231 nId = pHS->getID( "ToolBox" );
1232 pClassToolBox = new RscClass( nId, RSC_TOOLBOX, pSuper );
1233 pClassToolBox->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
1234 aNmTb.Put( nId, CLASSNAME, pClassToolBox );
1236 // Variablen anlegen
1238 RscEnum * pEnum;
1240 aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumButtonType" ), RSC_NOTYPE ) );
1241 SETCONST( pEnum, "BUTTON_SYMBOL", ButtonType::SYMBOLONLY );
1242 SETCONST( pEnum, "BUTTON_TEXT", ButtonType::TEXT );
1243 SETCONST( pEnum, "BUTTON_SYMBOLTEXT", ButtonType::SYMBOLTEXT );
1245 // Variable einfuegen
1246 nId = aNmTb.Put( "ButtonType", VARNAME );
1247 pClassToolBox->SetVariable( nId, pEnum, NULL, 0,
1248 RSC_TOOLBOX_BUTTONTYPE );
1251 RscEnum * pEnum;
1253 aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumToolBoxAlign" ), RSC_NOTYPE ) );
1254 SETCONST( pEnum, "BOXALIGN_TOP", WINDOWALIGN_TOP );
1255 SETCONST( pEnum, "BOXALIGN_LEFT", WINDOWALIGN_LEFT );
1256 SETCONST( pEnum, "BOXALIGN_RIGHT", WINDOWALIGN_RIGHT );
1257 SETCONST( pEnum, "BOXALIGN_BOTTOM", WINDOWALIGN_BOTTOM );
1259 // Variable einfuegen
1260 nId = aNmTb.Put( "Align", VARNAME );
1261 pClassToolBox->SetVariable( nId, pEnum, NULL, 0,
1262 RSC_TOOLBOX_ALIGN );
1264 nId = aNmTb.Put( "LineCount", VARNAME );
1265 pClassToolBox->SetVariable( nId, &aIdNoZeroUShort, NULL, 0,
1266 RSC_TOOLBOX_LINECOUNT );
1267 nId = aNmTb.Put( "FloatingLines", VARNAME );
1268 pClassToolBox->SetVariable( nId, &aUShort, NULL, 0,
1269 RSC_TOOLBOX_FLOATLINES );
1270 nId = aNmTb.Put( "Customize", VARNAME );
1271 pClassToolBox->SetVariable( nId, &aBool, NULL, 0,
1272 RSC_TOOLBOX_CUSTOMIZE );
1273 nId = aNmTb.Put( "MenuStrings", VARNAME );
1274 pClassToolBox->SetVariable( nId, &aBool, NULL, 0,
1275 RSC_TOOLBOX_MENUSTRINGS );
1276 nId = aNmTb.Put( "ItemImageList", VARNAME );
1277 pClassToolBox->SetVariable( nId, pClassImageList, NULL, 0,
1278 RSC_TOOLBOX_ITEMIMAGELIST );
1280 RscLangArray* pLA;
1281 RscCont * pCont;
1283 aBaseLst.push_back( pCont = new RscCont( pHS->getID( "ContToolBoxItem" ), RSC_NOTYPE ) );
1284 pCont->SetTypeClass( pClassToolBoxItem );
1285 aBaseLst.push_back(
1286 pLA = new RscLangArray( pHS->getID( "LangContToolBoxItem" )
1287 , RSC_NOTYPE
1288 , pCont
1289 , &aLangType
1292 nId = aNmTb.Put( "ItemList", VARNAME );
1293 pClassToolBox->SetVariable( nId, pLA, NULL, 0,
1294 RSC_TOOLBOX_ITEMLIST );
1296 INS_WINBIT(pClassToolBox,Scroll)
1297 INS_WINBIT(pClassToolBox,LineSpacing)
1298 INS_WINBIT(pClassToolBox,RectStyle)
1299 INS_WINBIT(pClassToolBox,Tabstop)
1301 return pClassToolBox;
1304 RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
1305 RscTop * pClassBitmap,
1306 RscTop * pClassImage,
1307 RscArray * pStrLst )
1309 Atom nId;
1310 RscTop * pClassSfxFamilyStyleItem;
1312 // Klasse anlegen
1313 nId = pHS->getID( "SfxStyleFamilyItem" );
1314 pClassSfxFamilyStyleItem = new RscClass( nId, RSC_SFX_STYLE_FAMILY_ITEM, pSuper );
1315 aNmTb.Put( nId, CLASSNAME, pClassSfxFamilyStyleItem );
1317 nId = aNmTb.Put( "FilterList", VARNAME );
1318 pClassSfxFamilyStyleItem->SetVariable( nId, pStrLst, NULL, 0,
1319 RSC_SFX_STYLE_ITEM_LIST );
1320 nId = aNmTb.Put( "StyleBitmap", VARNAME );
1321 pClassSfxFamilyStyleItem->SetVariable( nId, pClassBitmap, NULL, 0,
1322 RSC_SFX_STYLE_ITEM_BITMAP );
1323 nId = aNmTb.Put( "Text", VARNAME );
1324 pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, NULL, 0,
1325 RSC_SFX_STYLE_ITEM_TEXT );
1326 nId = aNmTb.Put( "HelpText", VARNAME );
1327 pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, NULL, 0,
1328 RSC_SFX_STYLE_ITEM_HELPTEXT );
1330 RscEnum * pSfxStyleFamily;
1331 pSfxStyleFamily = new RscEnum( pHS->getID( "StyleFamily" ),
1332 RSC_NOTYPE );
1334 SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PARA", SFX_STYLE_FAMILY_PARA );
1335 SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_CHAR", SFX_STYLE_FAMILY_CHAR );
1336 SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_FRAME",SFX_STYLE_FAMILY_FRAME);
1337 SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PAGE", SFX_STYLE_FAMILY_PAGE );
1338 SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PSEUDO", SFX_STYLE_FAMILY_PSEUDO );
1339 aBaseLst.push_back( pSfxStyleFamily );
1341 nId = aNmTb.Put( "StyleFamily", VARNAME );
1342 pClassSfxFamilyStyleItem->SetVariable( nId, pSfxStyleFamily, NULL, 0,
1343 RSC_SFX_STYLE_ITEM_STYLEFAMILY );
1345 nId = aNmTb.Put( "StyleImage", VARNAME );
1346 pClassSfxFamilyStyleItem->SetVariable( nId, pClassImage, NULL, 0,
1347 RSC_SFX_STYLE_ITEM_IMAGE );
1348 return pClassSfxFamilyStyleItem;
1351 RscTop * RscTypCont::InitClassSfxTemplateDialog( RscTop * pSuper,
1352 RscTop * pClassFamilyStyleItem )
1354 Atom nId;
1355 RscTop * pClassSfxTemplateDialog;
1357 // Klasse anlegen
1358 nId = pHS->getID( "SfxStyleFamilies" );
1359 pClassSfxTemplateDialog = new RscClass( nId, RSC_SFX_STYLE_FAMILIES, pSuper );
1360 aNmTb.Put( nId, CLASSNAME, pClassSfxTemplateDialog );
1362 // Variablen anlegen
1364 RscCont * pCont;
1366 aBaseLst.push_back(
1367 pCont = new RscCont( pHS->getID( "ContFamilyStyleItem" ), RSC_NOTYPE )
1369 pCont->SetTypeClass( pClassFamilyStyleItem );
1370 nId = aNmTb.Put( "StyleFamilyList", VARNAME );
1371 pClassSfxTemplateDialog->SetVariable( nId, pCont );
1374 return pClassSfxTemplateDialog;
1377 RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper )
1379 Atom nId;
1380 RscTop * pClassSfxSlotInfo;
1382 // Klasse anlegen
1383 nId = pHS->getID( "SfxSlotInfo" );
1384 pClassSfxSlotInfo = new RscClass( nId, RSC_SFX_SLOT_INFO, pSuper );
1385 aNmTb.Put( nId, CLASSNAME, pClassSfxSlotInfo );
1387 nId = aNmTb.Put( "SlotName", VARNAME );
1388 pClassSfxSlotInfo->SetVariable( nId, &aLangString, NULL, 0,
1389 RSC_SFX_SLOT_INFO_SLOTNAME );
1390 nId = aNmTb.Put( "HelpText", VARNAME );
1391 pClassSfxSlotInfo->SetVariable( nId, &aLangString, NULL, 0,
1392 RSC_SFX_SLOT_INFO_HELPTEXT );
1393 return pClassSfxSlotInfo;
1397 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */