Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_UNOCONTROLS_INC_BASECONTROL_HXX
21 : #define INCLUDED_UNOCONTROLS_INC_BASECONTROL_HXX
22 :
23 : #include <com/sun/star/awt/XKeyListener.hpp>
24 : #include <com/sun/star/awt/XPaintListener.hpp>
25 : #include <com/sun/star/awt/KeyEvent.hpp>
26 : #include <com/sun/star/awt/KeyModifier.hpp>
27 : #include <com/sun/star/awt/XMouseMotionListener.hpp>
28 : #include <com/sun/star/awt/FocusEvent.hpp>
29 : #include <com/sun/star/awt/XWindowListener.hpp>
30 : #include <com/sun/star/awt/XActivateListener.hpp>
31 : #include <com/sun/star/awt/MouseEvent.hpp>
32 : #include <com/sun/star/awt/XTopWindowListener.hpp>
33 : #include <com/sun/star/awt/PaintEvent.hpp>
34 : #include <com/sun/star/awt/InputEvent.hpp>
35 : #include <com/sun/star/awt/KeyGroup.hpp>
36 : #include <com/sun/star/awt/Key.hpp>
37 : #include <com/sun/star/awt/WindowEvent.hpp>
38 : #include <com/sun/star/awt/XMouseListener.hpp>
39 : #include <com/sun/star/awt/KeyFunction.hpp>
40 : #include <com/sun/star/awt/FocusChangeReason.hpp>
41 : #include <com/sun/star/awt/MouseButton.hpp>
42 : #include <com/sun/star/awt/XFocusListener.hpp>
43 : #include <com/sun/star/awt/XFileDialog.hpp>
44 : #include <com/sun/star/awt/XTextComponent.hpp>
45 : #include <com/sun/star/awt/XListBox.hpp>
46 : #include <com/sun/star/awt/XProgressMonitor.hpp>
47 : #include <com/sun/star/awt/TextAlign.hpp>
48 : #include <com/sun/star/awt/XScrollBar.hpp>
49 : #include <com/sun/star/awt/XVclContainerPeer.hpp>
50 : #include <com/sun/star/awt/XTabControllerModel.hpp>
51 : #include <com/sun/star/awt/XMessageBox.hpp>
52 : #include <com/sun/star/awt/XTextEditField.hpp>
53 : #include <com/sun/star/awt/Style.hpp>
54 : #include <com/sun/star/awt/XTimeField.hpp>
55 : #include <com/sun/star/awt/XVclWindowPeer.hpp>
56 : #include <com/sun/star/awt/XControlModel.hpp>
57 : #include <com/sun/star/awt/XSpinField.hpp>
58 : #include <com/sun/star/awt/XUnoControlContainer.hpp>
59 : #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
60 : #include <com/sun/star/awt/XNumericField.hpp>
61 : #include <com/sun/star/awt/XButton.hpp>
62 : #include <com/sun/star/awt/XTextArea.hpp>
63 : #include <com/sun/star/awt/XImageButton.hpp>
64 : #include <com/sun/star/awt/XFixedText.hpp>
65 : #include <com/sun/star/awt/XControlContainer.hpp>
66 : #include <com/sun/star/awt/XDialog.hpp>
67 : #include <com/sun/star/awt/ScrollBarOrientation.hpp>
68 : #include <com/sun/star/awt/XRadioButton.hpp>
69 : #include <com/sun/star/awt/XCurrencyField.hpp>
70 : #include <com/sun/star/awt/XPatternField.hpp>
71 : #include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
72 : #include <com/sun/star/awt/XTabController.hpp>
73 : #include <com/sun/star/awt/XVclContainer.hpp>
74 : #include <com/sun/star/awt/XDateField.hpp>
75 : #include <com/sun/star/awt/XComboBox.hpp>
76 : #include <com/sun/star/awt/XControl.hpp>
77 : #include <com/sun/star/awt/XCheckBox.hpp>
78 : #include <com/sun/star/awt/XLayoutConstrains.hpp>
79 : #include <com/sun/star/awt/XProgressBar.hpp>
80 : #include <com/sun/star/awt/XTopWindow.hpp>
81 : #include <com/sun/star/awt/XWindow.hpp>
82 : #include <com/sun/star/awt/PosSize.hpp>
83 : #include <com/sun/star/awt/XView.hpp>
84 : #include <com/sun/star/lang/XServiceInfo.hpp>
85 : #include <osl/mutex.hxx>
86 : #include <cppuhelper/weak.hxx>
87 : #include <cppuhelper/component.hxx>
88 :
89 : #include "multiplexer.hxx"
90 :
91 : namespace com { namespace sun { namespace star { namespace uno {
92 : class XComponentContext;
93 : } } } }
94 :
95 : // "namespaces"
96 :
97 : namespace unocontrols{
98 :
99 : // macros
100 :
101 : #define TRGB_COLORDATA(TRANSPARENCE,RED,GREEN,BLUE) \
102 : ((sal_Int32)(((sal_uInt32)((sal_uInt8)(BLUE))))|(((sal_uInt32)((sal_uInt8)(GREEN)))<<8)|(((sal_uInt32)((sal_uInt8)(RED)))<<16)|(((sal_uInt32)((sal_uInt8)(TRANSPARENCE)))<<24))
103 :
104 : // structs
105 :
106 0 : struct IMPL_MutexContainer
107 : {
108 : // Is necassery to initialize "BaseControl" and make this class thread-safe.
109 : ::osl::Mutex m_aMutex;
110 : };
111 :
112 : class BaseControl : public ::com::sun::star::lang::XServiceInfo
113 : , public ::com::sun::star::awt::XPaintListener
114 : , public ::com::sun::star::awt::XWindowListener
115 : , public ::com::sun::star::awt::XView
116 : , public ::com::sun::star::awt::XWindow
117 : , public ::com::sun::star::awt::XControl
118 : , public IMPL_MutexContainer
119 : , public ::cppu::OComponentHelper
120 : {
121 :
122 : // public methods
123 :
124 : public:
125 :
126 : // construct/destruct
127 :
128 : /**_______________________________________________________________________________________________________
129 : */
130 :
131 : BaseControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
132 :
133 : /**_______________________________________________________________________________________________________
134 : */
135 :
136 : virtual ~BaseControl();
137 :
138 : // XInterface
139 :
140 : /**_______________________________________________________________________________________________________
141 : @short give answer, if interface is supported
142 : @descr The interfaces are searched by type.
143 :
144 : @seealso XInterface
145 :
146 : @param "rType" is the type of searched interface.
147 :
148 : @return Any information about found interface
149 :
150 : @onerror A RuntimeException is thrown.
151 : */
152 :
153 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
154 : const ::com::sun::star::uno::Type& aType
155 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
156 :
157 : /**_______________________________________________________________________________________________________
158 : @short increment refcount
159 : @seealso XInterface
160 : @seealso release()
161 : @onerror A RuntimeException is thrown.
162 : */
163 :
164 : virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
165 :
166 : /**_______________________________________________________________________________________________________
167 : @short decrement refcount
168 : @seealso XInterface
169 : @seealso acquire()
170 : @onerror A RuntimeException is thrown.
171 : */
172 :
173 : virtual void SAL_CALL release() throw() SAL_OVERRIDE;
174 :
175 : // XTypeProvider
176 :
177 : /**_______________________________________________________________________________________________________
178 : @short get information about supported interfaces
179 : @seealso XTypeProvider
180 : @return Sequence of types of all supported interfaces
181 :
182 : @onerror A RuntimeException is thrown.
183 : */
184 :
185 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
186 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
187 :
188 : /**_______________________________________________________________________________________________________
189 : @short get implementation id
190 : @descr This ID is necessary for UNO-caching. If there no ID, cache is disabled.
191 : Another way, cache is enabled.
192 :
193 : @seealso XTypeProvider
194 : @return ID as Sequence of byte
195 :
196 : @onerror A RuntimeException is thrown.
197 : */
198 :
199 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
200 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
201 :
202 : // XAggregation
203 :
204 : /**_______________________________________________________________________________________________________
205 : */
206 :
207 : virtual void SAL_CALL setDelegator(
208 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xDelegator
209 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
210 :
211 : /**_______________________________________________________________________________________________________
212 : */
213 :
214 : virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
215 : const ::com::sun::star::uno::Type& aType
216 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
217 :
218 : // XServiceInfo
219 :
220 : /**_______________________________________________________________________________________________________
221 : */
222 :
223 : virtual sal_Bool SAL_CALL supportsService(
224 : const OUString& sServiceName
225 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
226 :
227 : /**_______________________________________________________________________________________________________
228 : */
229 :
230 : virtual OUString SAL_CALL getImplementationName()
231 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
232 :
233 : /**_______________________________________________________________________________________________________
234 : */
235 :
236 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
237 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
238 :
239 : // XComponent
240 :
241 : /**_______________________________________________________________________________________________________
242 : */
243 :
244 : virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
245 :
246 : /**_______________________________________________________________________________________________________
247 : */
248 :
249 : virtual void SAL_CALL addEventListener(
250 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener
251 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
252 :
253 : /**_______________________________________________________________________________________________________
254 : */
255 :
256 : virtual void SAL_CALL removeEventListener(
257 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener
258 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
259 :
260 : // XControl
261 :
262 : /**_______________________________________________________________________________________________________
263 : */
264 :
265 : virtual void SAL_CALL createPeer(
266 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& xToolkit,
267 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent
268 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
269 :
270 : /**_______________________________________________________________________________________________________
271 : */
272 :
273 : virtual void SAL_CALL setContext(
274 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xContext
275 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
276 :
277 : /**_______________________________________________________________________________________________________
278 : */
279 :
280 : virtual sal_Bool SAL_CALL setModel(
281 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel
282 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE = 0;
283 :
284 : /**_______________________________________________________________________________________________________
285 : */
286 :
287 : virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
288 :
289 : /**_______________________________________________________________________________________________________
290 : */
291 :
292 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext()
293 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
294 :
295 : /**_______________________________________________________________________________________________________
296 : */
297 :
298 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel()
299 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE = 0;
300 :
301 : /**_______________________________________________________________________________________________________
302 : */
303 :
304 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer()
305 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
306 :
307 : /**_______________________________________________________________________________________________________
308 : */
309 :
310 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView()
311 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
312 :
313 : /**_______________________________________________________________________________________________________
314 : */
315 :
316 : virtual sal_Bool SAL_CALL isDesignMode() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
317 :
318 : /**_______________________________________________________________________________________________________
319 : */
320 :
321 : virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
322 :
323 : // XWindow
324 :
325 : /**_______________________________________________________________________________________________________
326 : */
327 :
328 : virtual void SAL_CALL setPosSize( sal_Int32 nX ,
329 : sal_Int32 nY ,
330 : sal_Int32 nWidth ,
331 : sal_Int32 nHeight ,
332 : sal_Int16 nFlags ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
333 :
334 : /**_______________________________________________________________________________________________________
335 : */
336 :
337 : virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
338 :
339 : /**_______________________________________________________________________________________________________
340 : */
341 :
342 : virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
343 :
344 : /**_______________________________________________________________________________________________________
345 : */
346 :
347 : virtual void SAL_CALL setFocus() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
348 :
349 : /**_______________________________________________________________________________________________________
350 : */
351 :
352 : virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
353 :
354 : /**_______________________________________________________________________________________________________
355 : */
356 :
357 : virtual void SAL_CALL addWindowListener(
358 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener
359 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
360 :
361 : /**_______________________________________________________________________________________________________
362 : */
363 :
364 : virtual void SAL_CALL addFocusListener(
365 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener
366 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
367 :
368 : /**_______________________________________________________________________________________________________
369 : */
370 :
371 : virtual void SAL_CALL addKeyListener(
372 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener )
373 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
374 :
375 : /**_______________________________________________________________________________________________________
376 : */
377 :
378 : virtual void SAL_CALL addMouseListener(
379 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener
380 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
381 :
382 : /**_______________________________________________________________________________________________________
383 : */
384 :
385 : virtual void SAL_CALL addMouseMotionListener(
386 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener
387 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
388 :
389 : /**_______________________________________________________________________________________________________
390 : */
391 :
392 : virtual void SAL_CALL addPaintListener(
393 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener
394 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
395 :
396 : /**_______________________________________________________________________________________________________
397 : */
398 :
399 : virtual void SAL_CALL removeWindowListener(
400 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener
401 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
402 :
403 : /**_______________________________________________________________________________________________________
404 : */
405 :
406 : virtual void SAL_CALL removeFocusListener(
407 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener
408 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
409 :
410 : /**_______________________________________________________________________________________________________
411 : */
412 :
413 : virtual void SAL_CALL removeKeyListener(
414 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener
415 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
416 :
417 : /**_______________________________________________________________________________________________________
418 : */
419 :
420 : virtual void SAL_CALL removeMouseListener(
421 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener
422 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
423 :
424 : /**_______________________________________________________________________________________________________
425 : */
426 :
427 : virtual void SAL_CALL removeMouseMotionListener(
428 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener
429 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
430 :
431 : /**_______________________________________________________________________________________________________
432 : */
433 :
434 : virtual void SAL_CALL removePaintListener(
435 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener
436 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
437 :
438 : // XView
439 :
440 : /**_______________________________________________________________________________________________________
441 : */
442 :
443 : virtual void SAL_CALL draw( sal_Int32 nX ,
444 : sal_Int32 nY ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
445 :
446 : /**_______________________________________________________________________________________________________
447 : */
448 :
449 : virtual sal_Bool SAL_CALL setGraphics(
450 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xDevice
451 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
452 :
453 : /**_______________________________________________________________________________________________________
454 : */
455 :
456 : virtual void SAL_CALL setZoom( float fZoomX ,
457 : float fZoomY ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
458 :
459 : /**_______________________________________________________________________________________________________
460 : */
461 :
462 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics()
463 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
464 :
465 : /**_______________________________________________________________________________________________________
466 : */
467 :
468 : virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
469 :
470 : // ::com::sun::star::lang::XEventListener
471 :
472 : /**_______________________________________________________________________________________________________
473 : */
474 :
475 : virtual void SAL_CALL disposing(
476 : const ::com::sun::star::lang::EventObject& rSource
477 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
478 :
479 : // XPaintListener
480 :
481 : /**_______________________________________________________________________________________________________
482 : */
483 :
484 : virtual void SAL_CALL windowPaint(
485 : const ::com::sun::star::awt::PaintEvent& rEvent
486 : ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
487 :
488 : // XWindowListener
489 :
490 : /**_______________________________________________________________________________________________________
491 : */
492 :
493 : virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
494 : virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
495 : virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
496 : virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
497 :
498 : // impl but public method to register service
499 :
500 : /**_______________________________________________________________________________________________________
501 : */
502 :
503 : static const ::com::sun::star::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
504 :
505 : /**_______________________________________________________________________________________________________
506 : */
507 :
508 : static const OUString impl_getStaticImplementationName();
509 :
510 : // protected methods
511 :
512 : protected:
513 : using OComponentHelper::disposing;
514 :
515 : /**_______________________________________________________________________________________________________
516 : */
517 :
518 0 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > impl_getComponentContext() { return m_xComponentContext;}
519 :
520 : /**_______________________________________________________________________________________________________
521 : */
522 :
523 0 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > impl_getPeerWindow() { return m_xPeerWindow;}
524 :
525 : /**_______________________________________________________________________________________________________
526 : */
527 :
528 0 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > impl_getGraphicsPeer() { return m_xGraphicsPeer;}
529 :
530 : /**_______________________________________________________________________________________________________
531 : */
532 :
533 0 : const sal_Int32& impl_getWidth() { return m_nWidth;}
534 :
535 : /**_______________________________________________________________________________________________________
536 : */
537 :
538 0 : const sal_Int32& impl_getHeight() { return m_nHeight;}
539 :
540 : /**_______________________________________________________________________________________________________
541 : */
542 :
543 : virtual ::com::sun::star::awt::WindowDescriptor* impl_getWindowDescriptor(
544 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentPeer
545 : );
546 :
547 : /**_______________________________________________________________________________________________________
548 : */
549 :
550 : virtual void impl_paint( sal_Int32 nX ,
551 : sal_Int32 nY ,
552 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics );
553 :
554 : /**_______________________________________________________________________________________________________
555 : */
556 :
557 : virtual void impl_recalcLayout( const ::com::sun::star::awt::WindowEvent& aEvent );
558 :
559 : /**_______________________________________________________________________________________________________
560 : */
561 :
562 0 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > impl_getDelegator() { return m_xDelegator;}
563 :
564 : // private methods
565 :
566 : private:
567 :
568 : /**_______________________________________________________________________________________________________
569 : */
570 :
571 : void impl_releasePeer();
572 :
573 : /**_______________________________________________________________________________________________________
574 : */
575 :
576 : OMRCListenerMultiplexerHelper* impl_getMultiplexer();
577 :
578 : // private variables
579 :
580 : private:
581 :
582 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xComponentContext;
583 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xDelegator;
584 : OMRCListenerMultiplexerHelper* m_pMultiplexer; // multiplex events
585 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xMultiplexer;
586 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xContext;
587 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > m_xPeer;
588 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xPeerWindow;
589 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > m_xGraphicsView; // graphics for ::com::sun::star::awt::XView-operations
590 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > m_xGraphicsPeer; // graphics for painting on a peer
591 : sal_Int32 m_nX; // Position ...
592 : sal_Int32 m_nY;
593 : sal_Int32 m_nWidth; // ... and size of window
594 : sal_Int32 m_nHeight;
595 : bool m_bVisible; // Some state flags
596 : bool m_bInDesignMode;
597 : bool m_bEnable;
598 :
599 : }; // class BaseControl
600 :
601 : } // namespace unocontrols
602 :
603 : #endif // INCLUDED_UNOCONTROLS_INC_BASECONTROL_HXX
604 :
605 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|