xref: /trunk/main/toolkit/workben/controls.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_toolkit.hxx"
30 #include <tools/debug.hxx>
31 
32 #include <vcl/window.hxx>
33 #include <vcl/svapp.hxx>
34 #include <vcl/wrkwin.hxx>
35 #include <vcl/msgbox.hxx>
36 
37 
38 #include <stardiv/uno/awt/window.hxx>
39 #include <stardiv/uno/awt/vclwin.hxx>
40 #include <stardiv/uno/awt/printer.hxx>
41 #include <stardiv/uno/repos/serinfo.hxx>
42 #include <stardiv/uno/lang/factory.hxx>
43 
44 
45 #include <unoctrl.hxx>
46 // #include <unoctrl2.hxx>
47 
48 #include <svtools/unoiface.hxx> // InitExtToolkit
49 
50 UsrAny UsrAny_UINT16( UINT16 n )
51 {
52     UsrAny aVal;
53     aVal.setUINT16( n );
54     return aVal;
55 }
56 
57 // -----------------------------------------------------------------------
58 
59 class MyApp : public Application
60 {
61 public:
62     void        Main();
63 };
64 
65 MyApp aMyApp;
66 
67 // -----------------------------------------------------------------------
68 
69 class MyWin : public WorkWindow
70 {
71     XControlRef             xCtrl;
72     XPropertySetRef         xCtrlModel;
73     XControlContainerRef    xCont;
74     XPropertySetRef         xContModel;
75     XControlRef             xDrawCtrl;
76     XGraphicsRef            xG;
77 
78 public:
79                 MyWin( Window* pParent, WinBits nWinStyle );
80                 ~MyWin();
81 
82     void        MouseButtonDown( const MouseEvent& rMEvt );
83     void        Resize();
84     void        Paint( const Rectangle& r );
85 };
86 
87 // -----------------------------------------------------------------------
88 
89 void MyApp::Main()
90 {
91     createAndSetDefaultServiceManager();
92 
93     MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
94     aMainWin.SetText( "Uno-Controls - Workbench" );
95     aMainWin.Show();
96     Execute();
97 }
98 
99 // -----------------------------------------------------------------------
100 
101 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
102     WorkWindow( pParent, nWinStyle )
103 {
104 }
105 
106 // -----------------------------------------------------------------------
107 MyWin::~MyWin()
108 {
109     XComponentRef xC1( xCont, USR_QUERY );
110     xC1->dispose();
111     XComponentRef xC2( xContModel, USR_QUERY );
112     xC2->dispose();
113 }
114 
115 // -----------------------------------------------------------------------
116 
117 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
118 {
119     if( rMEvt.GetClicks() == 2 )
120     {
121         XViewRef xV( xDrawCtrl, USR_QUERY );
122         XWindowRef xC( xDrawCtrl, USR_QUERY );
123         xV->draw( xC->getPosSize().Left(), xC->getPosSize().Top() );
124 
125         // Printer Testen...
126 /*
127         XServiceManagerRef xProv = getGlobalServiceManager();
128         XServiceProviderRef xSSI = xProv->queryServiceProvider( L"stardiv.vcl.PrinterServer" );
129         XPrinterServerRef xPrinterServer( xSSI->createInstance(), USR_QUERY );
130 
131         Sequence< UString > aPrinterNames = xPrinterServer->getPrinterNames();
132         USHORT nPrinters = aPrinterNames.getLen();
133         String aInfo( "Printers: " );
134         aInfo += nPrinters;
135         if ( nPrinters )
136         {
137             for ( USHORT n = 0; n < nPrinters; n++ )
138             {
139                 aInfo += '\n';
140                 aInfo += OUStringToString( aPrinterNames.getConstArray()[n], CHARSET_SYSTEM );
141             }
142 
143             XPrinterRef xPrinter = xPrinterServer->createPrinter( aPrinterNames.getConstArray()[0] );
144             xPrinter->start( L"UNOPrinterTest", 1, TRUE );
145             XDeviceRef xDev = xPrinter->startPage();
146             XGraphicsRef xGraphics = xDev->createGraphics();
147             xGraphics->drawText( 200, 200, L"Printed with UNO"  );
148             xPrinter->endPage();
149             xPrinter->end();
150         }
151         InfoBox( this, aInfo ).Execute();
152 */
153     }
154     else if( rMEvt.GetClicks() == 1 )
155     {
156         if( xContModel )
157         {
158             static INT32 nColor = 0x001788ab;
159             xContModel->setPropertyValue( L"BackgroundColor", UsrAny( nColor ) );
160             nColor += 0x00111111;
161             nColor &= 0xFFFFFF;
162         }
163         else
164         {
165             XServiceManagerRef xProv = getGlobalServiceManager();
166 
167             XMultiServiceFactoryRef xMSF = NAMESPACE_USR( getProcessServiceManager )();
168 
169             XServiceProviderRef xSSI = xProv->queryServiceProvider( L"stardiv.vcl.VclToolkit" );
170             XToolkitRef xToolkit( xMSF->createInstance( L"stardiv.vcl.VclToolkit" ), USR_QUERY );
171             DBG_ASSERT( xToolkit, "No Toolkit!" );
172 
173             // Uno Container + Model erzeugen
174             XServiceProviderRef xModelProv; // = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.ControlContainer" );
175             XInterfaceRef xCMRef( xMSF->createInstance(L"stardiv.vcl.controlmodel.ControlContainer") );
176             xCMRef->queryInterface( XPropertySet::getSmartUik(), xContModel );
177             xContModel->setPropertyValue( L"Border", UsrAny_UINT16( 1 ) );
178             xContModel->setPropertyValue( L"BackgroundColor", UsrAny( (UINT32)0x00CCCCCC) );
179 
180             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.control.ControlContainer" );
181             XInterfaceRef xCCRef( xModelProv->createInstance(), USR_QUERY );
182             xCCRef->queryInterface( XControlContainer::getSmartUik(), xCont );
183 
184             XControlModelRef xCM( xContModel, USR_QUERY );
185             XControlRef xContControl( xCont, USR_QUERY );
186             xContControl->setModel( xCM );
187             XWindowRef xContComp( xCont, USR_QUERY );
188             xContComp->setPosSize( 0, 0, 500, 600, PosSize_POSSIZE );
189 
190             // Zwei EditControls auf einem Model...
191 //          xModelProv = xProv->queryServiceProvider( L"stardiv.uno.awt.UnoControlEditModel" );
192             XInterfaceRef xModel( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEditModel") );
193             DBG_ASSERT( xModel, "No Model!" );
194 
195             XPropertySetRef xPSet( xModel, USR_QUERY );
196             xPSet->setPropertyValue( L"Text", UsrAny( UString( L"Hallo!" ) ) );
197             xPSet->setPropertyValue( L"FontName", UsrAny( UString( L"Times New Roman" ) ) );
198 //          xPSet->setPropertyValue( L"FontWeight", UsrAny( 200 ) );
199 
200             XServiceProviderRef xEditCtrlProv = xProv->queryServiceProvider( L"stardiv.uno.awt.UnoControlEdit" );
201             // Edit1
202             XControlRef xEdit1( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEdit"), USR_QUERY );
203             xModel->queryInterface( XControlModel::getSmartUik(), xCM );
204             xEdit1->setModel( xCM );
205             XWindowRef xEditCmp1( xEdit1, USR_QUERY );
206             xEditCmp1->setPosSize( 50, 50, 100, 60, PosSize_POSSIZE );
207             xCont->addControl( L"", xEdit1 );
208             // Edit2
209             XControlRef xEdit2( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEdit"), USR_QUERY );
210             xModel->queryInterface( XControlModel::getSmartUik(), xCM );
211             xEdit2->setModel( xCM );
212             XWindowRef xEditCmp2( xEdit2, USR_QUERY );
213             XLayoutConstrainsRef xL( xEdit2, USR_QUERY );
214             if ( xL.is() )
215             {
216                 Size aSz = xL->getPreferredSize();
217                 xEditCmp2->setPosSize( 100, 180, aSz.Width(), aSz.Height(), PosSize_POSSIZE );
218             }
219             else
220                 xEditCmp2->setPosSize( 100, 180, 100, 40, PosSize_POSSIZE );
221             xCont->addControl( L"", xEdit2 );
222 
223             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.NumericField" );
224             XInterfaceRef xNumModel( xModelProv->createInstance(), USR_QUERY );
225             DBG_ASSERT( xNumModel, "No Model!" );
226 
227 
228             XServiceProviderRef xNumFieldProv = xProv->queryServiceProvider( L"stardiv.vcl.control.NumericField" );
229             XControlRef xNumField( xNumFieldProv->createInstance(), USR_QUERY );
230             xNumModel->queryInterface( XControlModel::getSmartUik(), xCM );
231             xNumField->setModel( xCM );
232             XWindowRef xNumFieldWin( xNumField, USR_QUERY );
233             xNumFieldWin->setPosSize( 50, 250, 100, 60, PosSize_POSSIZE );
234             xCont->addControl( L"", xNumField );
235 
236             XMultiPropertySetRef xPSet2( xNumModel, USR_QUERY );
237             Sequence<UString> Names( 2 );
238             Names.getArray()[0] = L"Value";
239             Names.getArray()[1] = L"ValueMin";
240             Sequence<UsrAny> Values( 2 );
241             Values.getArray()[0] = UsrAny( -2000000.0 );
242             Values.getArray()[1] = UsrAny( -2000000.0 );
243             xPSet2->setPropertyValues( Names, Values );
244 
245 
246             // Button...
247             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.Button" );
248             xModelProv->createInstance()->queryInterface( XInterface::getSmartUik(), xModel );
249             DBG_ASSERT( xModel, "No Model!" );
250 
251             xModel->queryInterface( XPropertySet::getSmartUik(), xPSet );
252             xPSet->setPropertyValue( L"Label", UsrAny( L"Press!" ) );
253 
254             XServiceProviderRef xButtonCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.Button" );
255             XControlRef xButton1( xButtonCtrlProv->createInstance(), USR_QUERY );
256             xModel->queryInterface( XControlModel::getSmartUik(), xCM );
257             xButton1->setModel( xCM );
258             XWindowRef xButtonCmp1( xButton1, USR_QUERY );
259             xButtonCmp1->setPosSize( 170, 80, 80, 80, PosSize_POSSIZE );
260             // Unsichtbar, nur im MBDown mit DrawRoutine bei Doppel-Klick...
261             xButtonCmp1->setVisible( FALSE );
262             xDrawCtrl = xButton1;
263 
264             xCont->addControl( L"", xButton1 );
265 
266 /*
267 
268             // ListBox...
269             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.ListBox" );
270             xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
271 
272             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
273             Sequence<UString> aSeq( 7 );
274             aSeq.getArray()[0] = L"Item1";
275             aSeq.getArray()[1] = L"Item2";
276             aSeq.getArray()[2] = L"Item3";
277             aSeq.getArray()[3] = L"Item4";
278             aSeq.getArray()[4] = L"Item5";
279             aSeq.getArray()[5] = L"Item6";
280             aSeq.getArray()[6] = L"Item7";
281             xPSet->setPropertyValue( L"StringItemList", UsrAny( &aSeq, Sequence<UString>::getReflection() ) );
282             xPSet->setPropertyValue( L"LineCount", UsrAny_UINT16( 4 ) );
283             xPSet->setPropertyValue( L"Dropdown", UsrAny( (BOOL)TRUE ) );
284 
285             XServiceProviderRef xListBoxCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.ListBox" );
286             XControlRef xListBox1 = (XControl*)xListBoxCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
287             xListBox1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
288             XWindowRef xListBoxCmp1 = (XWindow*)xListBox1->queryInterface( XWindow::getSmartUik() );
289             xListBoxCmp1->setPosSize( 20, 250, 200, 20, PosSize_POSSIZE );
290             xCont->addControl( L"", xListBox1 );
291 
292             // FixedText...
293             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.FixedText" );
294             xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
295             DBG_ASSERT( xModel, "No Model!" );
296 
297             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
298             xPSet->setPropertyValue( L"Label", UsrAny( L"Label:" ) );
299             xPSet->setPropertyValue( L"BackgroundColor", UsrAny( (UINT32)0x00888888) );
300 
301             Font_Attribs aFontAttrs;
302             aFontAttrs.Italic = ITALIC_NORMAL;
303             xPSet->setPropertyValue( L"Font_Attribs", UsrAny( &aFontAttrs, Font_Attribs_getReflection() ) );
304 
305             XPropertyStateRef xState = (XPropertyState*)xPSet->queryInterface( XPropertyState::getSmartUik() );
306             xState->getPropertyState( L"Font_Attribs" );
307             xState->getPropertyState( L"Font_Size" );
308 
309             XServiceProviderRef xFixedTextCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.FixedText" );
310             XControlRef xFixedText1 = (XControl*)xFixedTextCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
311             DBG_ASSERT( xFixedText1, "No FixedText!" );
312             xFixedText1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
313             XWindowRef xFixedTextCmp1 = (XWindow*)xFixedText1->queryInterface( XWindow::getSmartUik() );
314             xFixedTextCmp1->setPosSize( 20, 20, 120, 20, PosSize_POSSIZE );
315             xCont->addControl( L"", xFixedText1 );
316 
317             // TabTest...
318             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.GroupBox" );
319             xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
320             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
321             xPSet->setPropertyValue( L"Label", UsrAny( L"Radio-Test:" ) );
322             XServiceProviderRef xGroupBoxCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.GroupBox" );
323             XControlRef xGroupBox1 = (XControl*)xGroupBoxCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
324             xGroupBox1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
325             XWindowRef xGroupBoxCmp1 = (XWindow*)xGroupBox1->queryInterface( XWindow::getSmartUik() );
326             xGroupBoxCmp1->setPosSize( 30, 410, 100, 130, PosSize_POSSIZE );
327             xCont->addControl( L"", xGroupBox1 );
328 
329             XServiceProviderRef xRadioButtonModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.RadioButton" );
330             XServiceProviderRef xRadioButtonCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.RadioButton" );
331 
332             xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
333             XControlRef xT1 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
334             xT1->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
335             XWindowRef xTC1 = (XWindow*)xT1->queryInterface( XWindow::getSmartUik() );
336             xTC1->setPosSize( 40, 430, 80, 20, PosSize_POSSIZE );
337             xCont->addControl( L"", xT1 );
338             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
339             xPSet->setPropertyValue( L"Label", UsrAny( L"Radio1" ) );
340             xPSet->setPropertyValue( L"State", UsrAny_UINT16( 1 ) );
341 
342             xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
343             XControlRef xT2 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
344             xT2->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
345             XWindowRef xTC2 = (XWindow*)xT2->queryInterface( XWindow::getSmartUik() );
346             xTC2->setPosSize( 40, 470, 80, 20, PosSize_POSSIZE );
347             xCont->addControl( L"", xT2 );
348             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
349             xPSet->setPropertyValue( L"Label", UsrAny( L"Radio2" ) );
350 
351             xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
352             XControlRef xT3 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
353             xT3->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
354             XWindowRef xTC3 = (XWindow*)xT3->queryInterface( XWindow::getSmartUik() );
355             xTC3->setPosSize( 40, 510, 80, 20, PosSize_POSSIZE );
356             xCont->addControl( L"", xT3 );
357             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
358             xPSet->setPropertyValue( L"Label", UsrAny( L"Radio3" ) );
359 
360             xModel = (XInterface*)xRadioButtonModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
361             XControlRef xT4 = (XControl*)xRadioButtonCtrlProv->createInstance()->queryInterface( XControl::getSmartUik() );
362             xT4->setModel( (XControlModel*)xModel->queryInterface( XControlModel::getSmartUik() ) );
363             XWindowRef xTC4 = (XWindow*)xT4->queryInterface( XWindow::getSmartUik() );
364             xTC4->setPosSize( 40, 550, 80, 20, PosSize_POSSIZE );
365             xCont->addControl( L"", xT4 );
366             xPSet = (XPropertySet*)xModel->queryInterface( XPropertySet::getSmartUik() );
367             xPSet->setPropertyValue( L"Label", UsrAny( L"Radio4 - no" ) );
368             xPSet->setPropertyValue( L"Tabstop", UsrAny( (BOOL)TRUE ) );
369 
370             // TabController:
371             xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.TabController" );
372             xModel = (XInterface*)xModelProv->createInstance()->queryInterface( XInterface::getSmartUik() );
373             XTabControllerModelRef xTCModel = (XTabControllerModel*)xModel->queryInterface( XTabControllerModel::getSmartUik() );
374 
375             XServiceProviderRef xTCProv = xProv->queryServiceProvider( L"stardiv.vcl.control.TabController" );
376             XTabControllerRef xTC = (XTabController*)xTCProv->createInstance()->queryInterface( XTabController::getSmartUik() );
377             xTC->setModel( (XTabControllerModel*)xModel->queryInterface( XTabControllerModel::getSmartUik() ) );
378             XUnoControlContainerRef xUCC = (XUnoControlContainer*)xCont->queryInterface( XUnoControlContainer::getSmartUik() );
379             xUCC->addTabController( xTC );
380 
381             Sequence<XControlModelRef> aControls( 5 );
382             aControls.getArray()[0] = xGroupBox1->getModel();
383             aControls.getArray()[1] = xT1->getModel();
384             aControls.getArray()[2] = xT3->getModel();
385             aControls.getArray()[3] = xT2->getModel();
386             aControls.getArray()[4] = xT4->getModel();
387             xTCModel->setControls( aControls );
388 
389             Sequence<XControlModelRef> aGroup( 3 );
390             aGroup.getArray()[0] = xT1->getModel();
391             aGroup.getArray()[1] = xT3->getModel();
392             aGroup.getArray()[2] = xT2->getModel();
393             xTCModel->setGroup( aGroup, L"test" );
394 */
395             // Container anzeigen...
396             // Als Child zu diesem Fenster
397             xContControl->createPeer( XToolkitRef(), GetComponentInterface( TRUE ) );
398 
399             XDeviceRef xD( xContControl->getPeer(), USR_QUERY );
400             xG = xD->createGraphics();
401             XViewRef xV ( xDrawCtrl, USR_QUERY );
402             xV->setGraphics( xG );
403 
404 //      ((UnoControl*)(XControl*)xNumField))->updateFromModel();
405 
406 /*
407             // TEST:
408             WindowDecriptor aDescr;
409             aDescr.ComponentServiceName = "window";
410             aDescr.Type = VCLCOMPONENTTYPE_CONTAINER;
411             aDescr.Parent = GetComponentInterface( TRUE );
412             aDescr.WindowAttributes = WA_SHOW|WA_BORDER;
413             aDescr.Bounds = Rectangle( Point( 500, 50 ), Size( 300, 200 ) );
414             XVclWindowPeerRef xSPWin = xToolkit->createComponent( aDescr );
415 
416             WindowDecriptor aDescr2;
417             aDescr2.ComponentServiceName = "scrollbar";
418             aDescr2.Type = VCLCOMPONENTTYPE_SIMPLE;
419             aDescr2.Parent = xSPWin;
420             aDescr2.WindowAttributes = WA_SHOW|WA_BORDER|WA_VSCROLL;
421             aDescr2.Bounds = Rectangle( Point( 250, 0 ), Size( 50, 200 ) );
422             XVclWindowPeerRef xSB = xToolkit->createComponent( aDescr2 );
423 */
424         }
425         return;
426     }
427     WorkWindow::MouseButtonDown( rMEvt );
428 }
429 
430 
431 // -----------------------------------------------------------------------
432 
433 void MyWin::Resize()
434 {
435     WorkWindow::Resize();
436 }
437 
438 void MyWin::Paint( const Rectangle& r )
439 {
440     // Muss ueber PaintListener geschehen...
441     if ( xDrawCtrl.is() )
442     {
443         XViewRef xV( xDrawCtrl, USR_QUERY );
444         XWindowRef xC( xDrawCtrl, USR_QUERY );
445         xV->draw( xC->getPosSize().Left(), xC->getPosSize().Top() );
446     }
447 
448 }
449 
450