10d63794cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 30d63794cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 40d63794cSAndrew Rist * or more contributor license agreements. See the NOTICE file 50d63794cSAndrew Rist * distributed with this work for additional information 60d63794cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 70d63794cSAndrew Rist * to you under the Apache License, Version 2.0 (the 80d63794cSAndrew Rist * "License"); you may not use this file except in compliance 90d63794cSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 110d63794cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 130d63794cSAndrew Rist * Unless required by applicable law or agreed to in writing, 140d63794cSAndrew Rist * software distributed under the License is distributed on an 150d63794cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 160d63794cSAndrew Rist * KIND, either express or implied. See the License for the 170d63794cSAndrew Rist * specific language governing permissions and limitations 180d63794cSAndrew Rist * under the License. 19cdf0e10cSrcweir * 200d63794cSAndrew Rist *************************************************************/ 210d63794cSAndrew Rist 220d63794cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SV_WINDOW_HXX 25cdf0e10cSrcweir #define _SV_WINDOW_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/sv.h> 28cdf0e10cSrcweir #include <vcl/dllapi.h> 29cdf0e10cSrcweir #include <vcl/outdev.hxx> 30cdf0e10cSrcweir #include <tools/resid.hxx> 31cdf0e10cSrcweir #ifndef _SV_POINTR_HXX 32cdf0e10cSrcweir #include <vcl/pointr.hxx> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir #include <tools/wintypes.hxx> 35cdf0e10cSrcweir #ifndef _SV_APPTYPES_HXX 36cdf0e10cSrcweir #include <vcl/apptypes.hxx> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir #include <vcl/inputctx.hxx> 39cdf0e10cSrcweir #include <vcl/vclevent.hxx> 40cdf0e10cSrcweir // Only for compatibility - because many people outside haven't included event.hxx 41cdf0e10cSrcweir #ifndef _VCL_EVENT_HXX 42cdf0e10cSrcweir #include <vcl/event.hxx> 43cdf0e10cSrcweir #endif 44cdf0e10cSrcweir #include <vcl/region.hxx> 45cdf0e10cSrcweir #include <vcl/salnativewidgets.hxx> 46cdf0e10cSrcweir #include <rtl/ustring.hxx> 47cdf0e10cSrcweir #include <cppuhelper/weakref.hxx> 48cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 49cdf0e10cSrcweir #include <boost/shared_ptr.hpp> 50cdf0e10cSrcweir 51cdf0e10cSrcweir class VirtualDevice; 52cdf0e10cSrcweir struct ImplDelData; 53cdf0e10cSrcweir struct ImplWinData; 54cdf0e10cSrcweir struct ImplOverlapData; 55cdf0e10cSrcweir struct ImplFrameData; 56cdf0e10cSrcweir struct ImplCalcToTopData; 57cdf0e10cSrcweir struct SystemEnvData; 58cdf0e10cSrcweir struct SystemParentData; 59cdf0e10cSrcweir class ImplBorderWindow; 60cdf0e10cSrcweir class VirtualDevice; 61cdf0e10cSrcweir class Timer; 62cdf0e10cSrcweir class Cursor; 63cdf0e10cSrcweir class DockingManager; 64cdf0e10cSrcweir class ScrollBar; 65cdf0e10cSrcweir class Bitmap; 66cdf0e10cSrcweir class Image; 67cdf0e10cSrcweir class MouseEvent; 68cdf0e10cSrcweir class KeyEvent; 69cdf0e10cSrcweir class CommandEvent; 70cdf0e10cSrcweir class TrackingEvent; 71cdf0e10cSrcweir class HelpEvent; 72cdf0e10cSrcweir class DataChangedEvent; 73cdf0e10cSrcweir class NotifyEvent; 74cdf0e10cSrcweir class SystemWindow; 75cdf0e10cSrcweir class SalFrame; 76cdf0e10cSrcweir class SalObject; 77cdf0e10cSrcweir class MenuFloatingWindow; 78cdf0e10cSrcweir class UNOWindowData; 79cdf0e10cSrcweir // Nur fuer ExecuteDrag: 80cdf0e10cSrcweir struct IDataObject; 81cdf0e10cSrcweir class VCLXWindow; 82cdf0e10cSrcweir struct ImplAccessibleInfos; 83cdf0e10cSrcweir 84cdf0e10cSrcweir namespace com { 85cdf0e10cSrcweir namespace sun { 86cdf0e10cSrcweir namespace star { 87cdf0e10cSrcweir namespace accessibility { 88cdf0e10cSrcweir class XAccessible; 89cdf0e10cSrcweir }}}} 90cdf0e10cSrcweir 91cdf0e10cSrcweir namespace com { 92cdf0e10cSrcweir namespace sun { 93cdf0e10cSrcweir namespace star { 94cdf0e10cSrcweir namespace beans { 95cdf0e10cSrcweir struct PropertyValue; 96cdf0e10cSrcweir }}}} 97cdf0e10cSrcweir 98cdf0e10cSrcweir namespace com { 99cdf0e10cSrcweir namespace sun { 100cdf0e10cSrcweir namespace star { 101cdf0e10cSrcweir namespace rendering { 102cdf0e10cSrcweir class XCanvas; 103cdf0e10cSrcweir class XSpriteCanvas; 104cdf0e10cSrcweir }}}} 105cdf0e10cSrcweir 106cdf0e10cSrcweir namespace com { 107cdf0e10cSrcweir namespace sun { 108cdf0e10cSrcweir namespace star { 109cdf0e10cSrcweir namespace awt { 110cdf0e10cSrcweir class XWindowPeer; 111cdf0e10cSrcweir class XWindow; 112cdf0e10cSrcweir } 113cdf0e10cSrcweir namespace uno { 114cdf0e10cSrcweir class Any; 115cdf0e10cSrcweir class XInterface; 116cdf0e10cSrcweir } 117cdf0e10cSrcweir namespace datatransfer { 118cdf0e10cSrcweir namespace clipboard { 119cdf0e10cSrcweir class XClipboard; 120cdf0e10cSrcweir } 121cdf0e10cSrcweir 122cdf0e10cSrcweir namespace dnd { 123cdf0e10cSrcweir class XDragGestureRecognizer; 124cdf0e10cSrcweir class XDragSource; 125cdf0e10cSrcweir class XDropTarget; 126cdf0e10cSrcweir } } } } } 127cdf0e10cSrcweir 128cdf0e10cSrcweir namespace vcl { 129cdf0e10cSrcweir struct ControlLayoutData; 130cdf0e10cSrcweir class WindowArranger; 131cdf0e10cSrcweir struct ExtWindowImpl; 132cdf0e10cSrcweir } 133cdf0e10cSrcweir 134cdf0e10cSrcweir namespace svt { class PopupWindowControllerImpl; } 135cdf0e10cSrcweir 136cdf0e10cSrcweir // --------------- 137cdf0e10cSrcweir // - WindowTypes - 138cdf0e10cSrcweir // --------------- 139cdf0e10cSrcweir 140cdf0e10cSrcweir // Type fuer GetWindow() 141cdf0e10cSrcweir #define WINDOW_PARENT ((sal_uInt16)0) 142cdf0e10cSrcweir #define WINDOW_FIRSTCHILD ((sal_uInt16)1) 143cdf0e10cSrcweir #define WINDOW_LASTCHILD ((sal_uInt16)2) 144cdf0e10cSrcweir #define WINDOW_PREV ((sal_uInt16)3) 145cdf0e10cSrcweir #define WINDOW_NEXT ((sal_uInt16)4) 146cdf0e10cSrcweir #define WINDOW_FIRSTOVERLAP ((sal_uInt16)5) 147cdf0e10cSrcweir #define WINDOW_LASTOVERLAP ((sal_uInt16)6) 148cdf0e10cSrcweir #define WINDOW_OVERLAP ((sal_uInt16)7) 149cdf0e10cSrcweir #define WINDOW_PARENTOVERLAP ((sal_uInt16)8) 150cdf0e10cSrcweir #define WINDOW_CLIENT ((sal_uInt16)9) 151cdf0e10cSrcweir #define WINDOW_REALPARENT ((sal_uInt16)10) 152cdf0e10cSrcweir #define WINDOW_FRAME ((sal_uInt16)11) 153cdf0e10cSrcweir #define WINDOW_BORDER ((sal_uInt16)12) 154cdf0e10cSrcweir #define WINDOW_FIRSTTOPWINDOWCHILD ((sal_uInt16)13) 155cdf0e10cSrcweir #define WINDOW_LASTTOPWINDOWCHILD ((sal_uInt16)14) 156cdf0e10cSrcweir #define WINDOW_PREVTOPWINDOWSIBLING ((sal_uInt16)15) 157cdf0e10cSrcweir #define WINDOW_NEXTTOPWINDOWSIBLING ((sal_uInt16)16) 158cdf0e10cSrcweir 159cdf0e10cSrcweir // Flags for SetPosSizePixel() 160cdf0e10cSrcweir #define WINDOW_POSSIZE_X ((sal_uInt16)0x0001) 161cdf0e10cSrcweir #define WINDOW_POSSIZE_Y ((sal_uInt16)0x0002) 162cdf0e10cSrcweir #define WINDOW_POSSIZE_WIDTH ((sal_uInt16)0x0004) 163cdf0e10cSrcweir #define WINDOW_POSSIZE_HEIGHT ((sal_uInt16)0x0008) 164cdf0e10cSrcweir #define WINDOW_POSSIZE_POS (WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y) 165cdf0e10cSrcweir #define WINDOW_POSSIZE_SIZE (WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT) 166cdf0e10cSrcweir #define WINDOW_POSSIZE_POSSIZE (WINDOW_POSSIZE_POS | WINDOW_POSSIZE_SIZE) 167cdf0e10cSrcweir #define WINDOW_POSSIZE_ALL (WINDOW_POSSIZE_POSSIZE) 168cdf0e10cSrcweir #define WINDOW_POSSIZE_DROPDOWN ((sal_uInt16)0x0010) 169cdf0e10cSrcweir 170cdf0e10cSrcweir // Flags for Show() 171cdf0e10cSrcweir #define SHOW_NOPARENTUPDATE ((sal_uInt16)0x0001) 172cdf0e10cSrcweir #define SHOW_NOFOCUSCHANGE ((sal_uInt16)0x0002) 173cdf0e10cSrcweir #define SHOW_NOACTIVATE ((sal_uInt16)0x0004) 174cdf0e10cSrcweir #define SHOW_FOREGROUNDTASK ((sal_uInt16)0x0008) 175cdf0e10cSrcweir 176cdf0e10cSrcweir // Flags for SetZOrder() 177cdf0e10cSrcweir #define WINDOW_ZORDER_BEFOR ((sal_uInt16)0x0001) 178cdf0e10cSrcweir #define WINDOW_ZORDER_BEHIND ((sal_uInt16)0x0002) 179cdf0e10cSrcweir #define WINDOW_ZORDER_FIRST ((sal_uInt16)0x0004) 180cdf0e10cSrcweir #define WINDOW_ZORDER_LAST ((sal_uInt16)0x0008) 181cdf0e10cSrcweir 182cdf0e10cSrcweir // Activate-Flags 183cdf0e10cSrcweir #define ACTIVATE_MODE_GRABFOCUS ((sal_uInt16)0x0001) 184cdf0e10cSrcweir 185cdf0e10cSrcweir // ToTop-Flags 186cdf0e10cSrcweir #define TOTOP_RESTOREWHENMIN ((sal_uInt16)0x0001) 187cdf0e10cSrcweir #define TOTOP_FOREGROUNDTASK ((sal_uInt16)0x0002) 188cdf0e10cSrcweir #define TOTOP_NOGRABFOCUS ((sal_uInt16)0x0004) 189cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE // vcl internal only 190cdf0e10cSrcweir #define TOTOP_GRABFOCUSONLY ((sal_uInt16)0x0008) 191cdf0e10cSrcweir //#endif 192cdf0e10cSrcweir 193cdf0e10cSrcweir // Flags for Invalidate 194cdf0e10cSrcweir #define INVALIDATE_CHILDREN ((sal_uInt16)0x0001) 195cdf0e10cSrcweir #define INVALIDATE_NOCHILDREN ((sal_uInt16)0x0002) 196cdf0e10cSrcweir #define INVALIDATE_NOERASE ((sal_uInt16)0x0004) 197cdf0e10cSrcweir #define INVALIDATE_UPDATE ((sal_uInt16)0x0008) 198cdf0e10cSrcweir #define INVALIDATE_TRANSPARENT ((sal_uInt16)0x0010) 199cdf0e10cSrcweir #define INVALIDATE_NOTRANSPARENT ((sal_uInt16)0x0020) 200cdf0e10cSrcweir #define INVALIDATE_NOCLIPCHILDREN ((sal_uInt16)0x4000) 201cdf0e10cSrcweir // Temporaer fuer Kompatibilitaet 202cdf0e10cSrcweir #define INVALIDATE_BACKGROUND INVALIDATE_TRANSPARENT 203cdf0e10cSrcweir 204cdf0e10cSrcweir // Flags for Validate 205cdf0e10cSrcweir #define VALIDATE_CHILDREN ((sal_uInt16)0x0001) 206cdf0e10cSrcweir #define VALIDATE_NOCHILDREN ((sal_uInt16)0x0002) 207cdf0e10cSrcweir 208cdf0e10cSrcweir // Flags for Scroll 209cdf0e10cSrcweir #define SCROLL_CLIP ((sal_uInt16)0x0001) 210cdf0e10cSrcweir #define SCROLL_CHILDREN ((sal_uInt16)0x0002) 211cdf0e10cSrcweir #define SCROLL_NOCHILDREN ((sal_uInt16)0x0004) 212cdf0e10cSrcweir #define SCROLL_NOERASE ((sal_uInt16)0x0008) 213cdf0e10cSrcweir #define SCROLL_NOINVALIDATE ((sal_uInt16)0x0010) 214cdf0e10cSrcweir #define SCROLL_NOWINDOWINVALIDATE ((sal_uInt16)0x0020) 215cdf0e10cSrcweir #define SCROLL_USECLIPREGION ((sal_uInt16)0x0040) 216cdf0e10cSrcweir #define SCROLL_UPDATE ((sal_uInt16)0x0080) 217cdf0e10cSrcweir 218cdf0e10cSrcweir // Flags for ParentClipMode 219cdf0e10cSrcweir #define PARENTCLIPMODE_CLIP ((sal_uInt16)0x0001) 220cdf0e10cSrcweir #define PARENTCLIPMODE_NOCLIP ((sal_uInt16)0x0002) 221cdf0e10cSrcweir 222cdf0e10cSrcweir // Flags for Invert() 223cdf0e10cSrcweir #define INVERT_HIGHLIGHT ((sal_uInt16)0x0001) 224cdf0e10cSrcweir #define INVERT_50 ((sal_uInt16)0x0002) 225cdf0e10cSrcweir 226cdf0e10cSrcweir // Flags for ShowTracking() 227cdf0e10cSrcweir #define SHOWTRACK_SMALL ((sal_uInt16)0x0001) 228cdf0e10cSrcweir #define SHOWTRACK_BIG ((sal_uInt16)0x0002) 229cdf0e10cSrcweir #define SHOWTRACK_SPLIT ((sal_uInt16)0x0003) 230cdf0e10cSrcweir #define SHOWTRACK_OBJECT ((sal_uInt16)0x0004) 231cdf0e10cSrcweir #define SHOWTRACK_WINDOW ((sal_uInt16)0x1000) 232cdf0e10cSrcweir #define SHOWTRACK_CLIP ((sal_uInt16)0x2000) 233cdf0e10cSrcweir #define SHOWTRACK_STYLE ((sal_uInt16)0x000F) 234cdf0e10cSrcweir 235cdf0e10cSrcweir // Flags for StartTracking() 236cdf0e10cSrcweir #define STARTTRACK_KEYINPUT ((sal_uInt16)0x0001) 237cdf0e10cSrcweir #define STARTTRACK_KEYMOD ((sal_uInt16)0x0002) 238cdf0e10cSrcweir #define STARTTRACK_NOKEYCANCEL ((sal_uInt16)0x0004) 239cdf0e10cSrcweir #define STARTTRACK_SCROLLREPEAT ((sal_uInt16)0x0008) 240cdf0e10cSrcweir #define STARTTRACK_BUTTONREPEAT ((sal_uInt16)0x0010) 241cdf0e10cSrcweir #define STARTTRACK_MOUSEBUTTONDOWN ((sal_uInt16)0x0020) 242cdf0e10cSrcweir #define STARTTRACK_FOCUSCANCEL ((sal_uInt16)0x0040) 243cdf0e10cSrcweir 244cdf0e10cSrcweir // Flags for StartAutoScroll() 245cdf0e10cSrcweir #define AUTOSCROLL_VERT ((sal_uInt16)0x0001) 246cdf0e10cSrcweir #define AUTOSCROLL_HORZ ((sal_uInt16)0x0002) 247cdf0e10cSrcweir 248cdf0e10cSrcweir // Flags for StateChanged() 249cdf0e10cSrcweir typedef sal_uInt16 StateChangedType; 250cdf0e10cSrcweir #define STATE_CHANGE_INITSHOW ((StateChangedType)1) 251cdf0e10cSrcweir #define STATE_CHANGE_VISIBLE ((StateChangedType)2) 252cdf0e10cSrcweir #define STATE_CHANGE_UPDATEMODE ((StateChangedType)3) 253cdf0e10cSrcweir #define STATE_CHANGE_ENABLE ((StateChangedType)4) 254cdf0e10cSrcweir #define STATE_CHANGE_TEXT ((StateChangedType)5) 255cdf0e10cSrcweir #define STATE_CHANGE_IMAGE ((StateChangedType)6) 256cdf0e10cSrcweir #define STATE_CHANGE_DATA ((StateChangedType)7) 257cdf0e10cSrcweir #define STATE_CHANGE_STATE ((StateChangedType)8) 258cdf0e10cSrcweir #define STATE_CHANGE_STYLE ((StateChangedType)9) 259cdf0e10cSrcweir #define STATE_CHANGE_ZOOM ((StateChangedType)10) 260cdf0e10cSrcweir #define STATE_CHANGE_BORDER ((StateChangedType)11) 261cdf0e10cSrcweir #define STATE_CHANGE_TRANSPARENT ((StateChangedType)12) 262cdf0e10cSrcweir #define STATE_CHANGE_CONTROLFONT ((StateChangedType)13) 263cdf0e10cSrcweir #define STATE_CHANGE_CONTROLFOREGROUND ((StateChangedType)14) 264cdf0e10cSrcweir #define STATE_CHANGE_CONTROLBACKGROUND ((StateChangedType)15) 265cdf0e10cSrcweir #define STATE_CHANGE_READONLY ((StateChangedType)16) 266cdf0e10cSrcweir #define STATE_CHANGE_FORMAT ((StateChangedType)17) 267cdf0e10cSrcweir #define STATE_CHANGE_EXTENDEDSTYLE ((StateChangedType)18) 268cdf0e10cSrcweir #define STATE_CHANGE_MIRRORING ((StateChangedType)19) 269cdf0e10cSrcweir #define STATE_CHANGE_CONTROL_FOCUS ((StateChangedType)20) 270cdf0e10cSrcweir #define STATE_CHANGE_USER ((StateChangedType)10000) 271cdf0e10cSrcweir 272cdf0e10cSrcweir // GetFocusFlags 273cdf0e10cSrcweir #define GETFOCUS_TAB ((sal_uInt16)0x0001) 274cdf0e10cSrcweir #define GETFOCUS_CURSOR ((sal_uInt16)0x0002) 275cdf0e10cSrcweir #define GETFOCUS_MNEMONIC ((sal_uInt16)0x0004) 276cdf0e10cSrcweir #define GETFOCUS_FORWARD ((sal_uInt16)0x0010) 277cdf0e10cSrcweir #define GETFOCUS_BACKWARD ((sal_uInt16)0x0020) 278cdf0e10cSrcweir #define GETFOCUS_AROUND ((sal_uInt16)0x0040) 279cdf0e10cSrcweir #define GETFOCUS_UNIQUEMNEMONIC ((sal_uInt16)0x0100) 280cdf0e10cSrcweir #define GETFOCUS_INIT ((sal_uInt16)0x0200) 281cdf0e10cSrcweir #define GETFOCUS_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0400) 282cdf0e10cSrcweir 283cdf0e10cSrcweir // Draw-Flags fuer Draw() 284cdf0e10cSrcweir #define WINDOW_DRAW_MONO ((sal_uLong)0x00000001) 285cdf0e10cSrcweir #define WINDOW_DRAW_NOBORDER ((sal_uLong)0x00000002) 286cdf0e10cSrcweir #define WINDOW_DRAW_NOCONTROLS ((sal_uLong)0x00000004) 287cdf0e10cSrcweir #define WINDOW_DRAW_NODISABLE ((sal_uLong)0x00000008) 288cdf0e10cSrcweir #define WINDOW_DRAW_NOMNEMONIC ((sal_uLong)0x00000010) 289cdf0e10cSrcweir #define WINDOW_DRAW_NOSELECTION ((sal_uLong)0x00000020) 290cdf0e10cSrcweir #define WINDOW_DRAW_NOFOCUS ((sal_uLong)0x00000040) 291cdf0e10cSrcweir #define WINDOW_DRAW_NOBACKGROUND ((sal_uLong)0x00000080) 292cdf0e10cSrcweir #define WINDOW_DRAW_ROLLOVER ((sal_uLong)0x00000100) 293cdf0e10cSrcweir 294cdf0e10cSrcweir // Border-Styles fuer SetBorder() 295cdf0e10cSrcweir #define WINDOW_BORDER_NORMAL ((sal_uInt16)0x0001) 296cdf0e10cSrcweir #define WINDOW_BORDER_MONO ((sal_uInt16)0x0002) 297cdf0e10cSrcweir #define WINDOW_BORDER_ACTIVE ((sal_uInt16)0x0004) 298cdf0e10cSrcweir #define WINDOW_BORDER_DOUBLEOUT ((sal_uInt16)0x0008) 299cdf0e10cSrcweir #define WINDOW_BORDER_MENU ((sal_uInt16)0x0010) 300cdf0e10cSrcweir #define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000) 301cdf0e10cSrcweir #define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000) 302cdf0e10cSrcweir 303cdf0e10cSrcweir // DialogControl-Flags 304cdf0e10cSrcweir #define WINDOW_DLGCTRL_RETURN ((sal_uInt16)0x0001) 305cdf0e10cSrcweir #define WINDOW_DLGCTRL_WANTFOCUS ((sal_uInt16)0x0002) 306cdf0e10cSrcweir #define WINDOW_DLGCTRL_MOD1TAB ((sal_uInt16)0x0004) 307cdf0e10cSrcweir #define WINDOW_DLGCTRL_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0008) 308cdf0e10cSrcweir 309cdf0e10cSrcweir // GetWindowClipRegionPixel-Flags 310cdf0e10cSrcweir #define WINDOW_GETCLIPREGION_NULL ((sal_uInt16)0x0001) 311cdf0e10cSrcweir #define WINDOW_GETCLIPREGION_NOCHILDREN ((sal_uInt16)0x0002) 312cdf0e10cSrcweir 313cdf0e10cSrcweir // EndExtTextInput-Flags 314cdf0e10cSrcweir #define EXTTEXTINPUT_END_COMPLETE ((sal_uInt16)0x0001) 315cdf0e10cSrcweir #define EXTTEXTINPUT_END_CANCEL ((sal_uInt16)0x0002) 316cdf0e10cSrcweir 317cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 318cdf0e10cSrcweir #define IMPL_MINSIZE_BUTTON_WIDTH 70 319cdf0e10cSrcweir #define IMPL_MINSIZE_BUTTON_HEIGHT 22 320cdf0e10cSrcweir #define IMPL_EXTRA_BUTTON_WIDTH 18 321cdf0e10cSrcweir #define IMPL_EXTRA_BUTTON_HEIGHT 10 322cdf0e10cSrcweir #define IMPL_SEP_BUTTON_X 5 323cdf0e10cSrcweir #define IMPL_SEP_BUTTON_Y 5 324cdf0e10cSrcweir #define IMPL_MINSIZE_MSGBOX_WIDTH 150 325cdf0e10cSrcweir #define IMPL_MINSIZE_MSGBOX_HEIGHT 80 326cdf0e10cSrcweir #define IMPL_DIALOG_OFFSET 5 327cdf0e10cSrcweir #define IMPL_DIALOG_BAR_OFFSET 3 328cdf0e10cSrcweir #define IMPL_MSGBOX_OFFSET_EXTRA_X 0 329cdf0e10cSrcweir #define IMPL_MSGBOX_OFFSET_EXTRA_Y 2 330cdf0e10cSrcweir #define IMPL_SEP_MSGBOX_IMAGE 8 331cdf0e10cSrcweir 332cdf0e10cSrcweir #define DLGWINDOW_PREV 0 333cdf0e10cSrcweir #define DLGWINDOW_NEXT 1 334cdf0e10cSrcweir #define DLGWINDOW_FIRST 2 335cdf0e10cSrcweir //#endif 336cdf0e10cSrcweir 337cdf0e10cSrcweir enum WindowSizeType { 338cdf0e10cSrcweir WINDOWSIZE_MINIMUM, 339cdf0e10cSrcweir WINDOWSIZE_PREFERRED, 340cdf0e10cSrcweir WINDOWSIZE_MAXIMUM 341cdf0e10cSrcweir }; 342cdf0e10cSrcweir 343cdf0e10cSrcweir // ---------- 344cdf0e10cSrcweir // - Window - 345cdf0e10cSrcweir // ---------- 346cdf0e10cSrcweir 347cdf0e10cSrcweir #ifdef DBG_UTIL 348cdf0e10cSrcweir const char* ImplDbgCheckWindow( const void* pObj ); 349cdf0e10cSrcweir #endif 350cdf0e10cSrcweir 351cdf0e10cSrcweir class WindowImpl; 352cdf0e10cSrcweir class VCL_DLLPUBLIC Window : public OutputDevice 353cdf0e10cSrcweir { 354cdf0e10cSrcweir friend class Cursor; 355cdf0e10cSrcweir friend class OutputDevice; 356cdf0e10cSrcweir friend class Application; 357cdf0e10cSrcweir friend class SystemWindow; 358cdf0e10cSrcweir friend class WorkWindow; 359cdf0e10cSrcweir friend class Dialog; 360cdf0e10cSrcweir friend class MessBox; 361cdf0e10cSrcweir friend class DockingWindow; 362cdf0e10cSrcweir friend class FloatingWindow; 363cdf0e10cSrcweir friend class GroupBox; 364cdf0e10cSrcweir friend class PushButton; 365cdf0e10cSrcweir friend class RadioButton; 366cdf0e10cSrcweir friend class SystemChildWindow; 367cdf0e10cSrcweir friend class ImplBorderWindow; 368cdf0e10cSrcweir 369cdf0e10cSrcweir // TODO: improve missing functionality 370cdf0e10cSrcweir // only required because of SetFloatingMode() 371cdf0e10cSrcweir friend class ImplDockingWindowWrapper; 372cdf0e10cSrcweir friend class ImplPopupFloatWin; 373cdf0e10cSrcweir friend class MenuFloatingWindow; 374cdf0e10cSrcweir 375cdf0e10cSrcweir friend class svt::PopupWindowControllerImpl; 376cdf0e10cSrcweir 377cdf0e10cSrcweir private: 378cdf0e10cSrcweir // NOTE: to remove many dependencies of other modules 379cdf0e10cSrcweir // to this central file, all members are now hidden 380cdf0e10cSrcweir // in the WindowImpl class and all inline functions 381cdf0e10cSrcweir // were removed 382cdf0e10cSrcweir // 383cdf0e10cSrcweir // Please do *not* add new members or inline functions to class Window, 384cdf0e10cSrcweir // but use class WindowImpl instead 385cdf0e10cSrcweir // 386cdf0e10cSrcweir WindowImpl* mpWindowImpl; 387cdf0e10cSrcweir 388cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInitWindowData( WindowType nType ); 389cdf0e10cSrcweir 390cdf0e10cSrcweir #ifdef DBG_UTIL 391cdf0e10cSrcweir friend const char* ImplDbgCheckWindow( const void* pObj ); 392cdf0e10cSrcweir #endif 393cdf0e10cSrcweir friend Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); 394cdf0e10cSrcweir public: 395cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ); 396cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ); 397cdf0e10cSrcweir SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId ); 398cdf0e10cSrcweir SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); 399cdf0e10cSrcweir SAL_DLLPRIVATE void ImplWindowRes( const ResId& rResId ); 400cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent ); 401cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInsertWindow( Window* pParent ); 402cdf0e10cSrcweir SAL_DLLPRIVATE void ImplRemoveWindow( sal_Bool bRemoveFrameData ); 403cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetWindow(); 404cdf0e10cSrcweir SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData(); 405cdf0e10cSrcweir SAL_DLLPRIVATE SalFrame* ImplGetFrame() const; 406cdf0e10cSrcweir SAL_DLLPRIVATE ImplWinData* ImplGetWinData() const; 407cdf0e10cSrcweir SAL_DLLPRIVATE SalGraphics* ImplGetFrameGraphics() const; 408cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pOldOverlapWindow ); 409cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplFindWindow( const Point& rFramePos ); 410cdf0e10cSrcweir SAL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rFramePos ); 411cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetParent() const; 412cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetClientWindow() const; 413cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetBorderWindow() const; 414cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetFirstOverlapWindow(); 415cdf0e10cSrcweir SAL_DLLPRIVATE const Window* ImplGetFirstOverlapWindow() const; 416cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetFrameWindow() const; 417cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsRealParentPath( const Window* pWindow ) const; 418cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; 419cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; 420cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetSameParent( const Window* pWindow ) const; 421cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsDockingWindow() const; 422cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsFloatingWindow() const; 423cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsToolbox() const; 424cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsSplitter() const; 425cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsPushButton() const; 426cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsOverlapWindow() const; 427cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSetActive( sal_Bool bActive ); 428cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsMouseTransparent() const; 429cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSetMouseTransparent( sal_Bool bTransparent ); 430cdf0e10cSrcweir SAL_DLLPRIVATE int ImplTestMousePointerSet(); 431cdf0e10cSrcweir SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const; 432cdf0e10cSrcweir SAL_DLLPRIVATE void ImplResetReallyVisible(); 433cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSetReallyVisible(); 434cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallInitShow(); 435cdf0e10cSrcweir SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel ); 436cdf0e10cSrcweir SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel ); 437cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInitResolutionSettings(); 438cdf0e10cSrcweir SAL_DLLPRIVATE void ImplPointToLogic( Font& rFont ) const; 439cdf0e10cSrcweir SAL_DLLPRIVATE void ImplLogicToPoint( Font& rFont ) const; 440cdf0e10cSrcweir SAL_DLLPRIVATE Point ImplOutputToFrame( const Point& rPos ); 441cdf0e10cSrcweir SAL_DLLPRIVATE Point ImplFrameToOutput( const Point& rPos ); 442cdf0e10cSrcweir SAL_DLLPRIVATE void ImplOutputToFrame( Rectangle& rRect ); 443cdf0e10cSrcweir SAL_DLLPRIVATE void ImplFrameToOutput( Rectangle& rRect ); 444cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplSysObjClip( const Region* pOldRegion ); 445cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateSysObjChildsClip(); 446cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip(); 447cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateSysObjClip(); 448cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller = sal_False ); 449cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller = sal_False ); 450cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplSetClipFlag( sal_Bool bSysObjOnlySmaller = sal_False ); 451cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIntersectWindowClipRegion( Region& rRegion ); 452cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIntersectWindowRegion( Region& rRegion ); 453cdf0e10cSrcweir SAL_DLLPRIVATE void ImplExcludeWindowRegion( Region& rRegion ); 454cdf0e10cSrcweir SAL_DLLPRIVATE void ImplExcludeOverlapWindows( Region& rRegion ); 455cdf0e10cSrcweir SAL_DLLPRIVATE void ImplExcludeOverlapWindows2( Region& rRegion ); 456cdf0e10cSrcweir SAL_DLLPRIVATE void ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ); 457cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplClipChilds( Region& rRegion ); 458cdf0e10cSrcweir SAL_DLLPRIVATE void ImplClipAllChilds( Region& rRegion ); 459cdf0e10cSrcweir SAL_DLLPRIVATE void ImplClipSiblings( Region& rRegion ); 460cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInitWinClipRegion(); 461cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInitWinChildClipRegion(); 462cdf0e10cSrcweir SAL_DLLPRIVATE Region* ImplGetWinChildClipRegion(); 463cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Region& rRegion ); 464cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion ); 465cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ); 466cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, 467cdf0e10cSrcweir sal_Bool bChilds, sal_Bool bParent, sal_Bool bSiblings ); 468cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ); 469cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallOverlapPaint(); 470cdf0e10cSrcweir SAL_DLLPRIVATE void ImplPostPaint(); 471cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ); 472cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( const Region& rRegion ); 473cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( Region& rRegion ); 474cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvalidate( const Region* rRegion, sal_uInt16 nFlags ); 475cdf0e10cSrcweir SAL_DLLPRIVATE void ImplValidateFrameRegion( const Region* rRegion, sal_uInt16 nFlags ); 476cdf0e10cSrcweir SAL_DLLPRIVATE void ImplValidate( const Region* rRegion, sal_uInt16 nFlags ); 477cdf0e10cSrcweir SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChilds ); 478cdf0e10cSrcweir SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChilds ); 479cdf0e10cSrcweir SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ); 480cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateAll( sal_Bool bOverlapWindows = sal_True ); 481cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateWindowPtr( Window* pWindow ); 482cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateWindowPtr(); 483cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ); 484cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplUpdatePos(); 485cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateSysObjPos(); 486cdf0e10cSrcweir SAL_DLLPRIVATE WindowImpl* ImplGetWindowImpl() const { return mpWindowImpl; } 487cdf0e10cSrcweir SAL_DLLPRIVATE void ImplFreeExtWindowImpl(); 488cdf0e10cSrcweir // creates ExtWindowImpl on demand, but may return NULL (e.g. if mbInDtor) 489cdf0e10cSrcweir SAL_DLLPRIVATE vcl::ExtWindowImpl* ImplGetExtWindowImpl() const; 490cdf0e10cSrcweir SAL_DLLPRIVATE void ImplDeleteOwnedChildren(); 491cdf0e10cSrcweir /** check whether a font is suitable for UI 492cdf0e10cSrcweir 493cdf0e10cSrcweir The font to be tested will be checked whether it could display a 494cdf0e10cSrcweir localized test string. If this is not the case, then the font 495cdf0e10cSrcweir is deemed unsuitable as UI font. 496cdf0e10cSrcweir 497cdf0e10cSrcweir @param rFont 498cdf0e10cSrcweir the font to be tested 499cdf0e10cSrcweir 500cdf0e10cSrcweir @returns 501cdf0e10cSrcweir <TRUE/> if the font can be used as UI font 502cdf0e10cSrcweir <FALSE/> if the font is unsuitable as UI font 503cdf0e10cSrcweir */ 504cdf0e10cSrcweir SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont ); 505cdf0e10cSrcweir SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl = sal_True ); 506cdf0e10cSrcweir SAL_DLLPRIVATE void ImplAlignChilds(); 507cdf0e10cSrcweir SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); 508cdf0e10cSrcweir SAL_DLLPRIVATE void ImplToBottomChild(); 509cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCalcToTop( ImplCalcToTopData* pPrevData ); 510cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData ); 511cdf0e10cSrcweir SAL_DLLPRIVATE void ImplToTop( sal_uInt16 nFlags ); 512cdf0e10cSrcweir SAL_DLLPRIVATE void ImplStartToTop( sal_uInt16 nFlags ); 513cdf0e10cSrcweir SAL_DLLPRIVATE void ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ); 514cdf0e10cSrcweir SAL_DLLPRIVATE void ImplShowAllOverlaps(); 515cdf0e10cSrcweir SAL_DLLPRIVATE void ImplHideAllOverlaps(); 516cdf0e10cSrcweir SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ); 517cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged = sal_False ); 518cdf0e10cSrcweir SAL_DLLPRIVATE void ImplGenerateMouseMove(); 519cdf0e10cSrcweir SAL_DLLPRIVATE void ImplGrabFocus( sal_uInt16 nFlags ); 520cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle& rRect ); 521cdf0e10cSrcweir SAL_DLLPRIVATE void ImplControlFocus( sal_uInt16 nFlags = 0 ); 522cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetDlgWindow( sal_uInt16 n, sal_uInt16 nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = NULL ); 523cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ); 524cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplHasDlgCtrl(); 525cdf0e10cSrcweir SAL_DLLPRIVATE void ImplDlgCtrlNextWindow(); 526cdf0e10cSrcweir SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus ); 527cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplFindDlgCtrlWindow( Window* pWindow ); 528cdf0e10cSrcweir SAL_DLLPRIVATE long ImplLogicUnitToPixelX( long nX, MapUnit eUnit ); 529cdf0e10cSrcweir SAL_DLLPRIVATE long ImplLogicUnitToPixelY( long nY, MapUnit eUnit ); 530cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsWindowInFront( const Window* pTestWindow ) const; 531cdf0e10cSrcweir SAL_DLLPRIVATE void ImplSaveOverlapBackground(); 532cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplRestoreOverlapBackground( Region& rInvRegion ); 533cdf0e10cSrcweir SAL_DLLPRIVATE void ImplDeleteOverlapBackground(); 534cdf0e10cSrcweir SAL_DLLPRIVATE void ImplInvalidateAllOverlapBackgrounds(); 535cdf0e10cSrcweir SAL_DLLPRIVATE static void ImplNewInputContext(); 536cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallActivateListeners(Window*); 537cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallDeactivateListeners(Window*); 538cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplHandlePaintHdl, void* ); 539cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplGenerateMouseMoveHdl, void* ); 540cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplTrackTimerHdl, Timer* ); 541cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplAsyncFocusHdl, void* ); 542cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplAsyncStateChangedHdl, void* ); 543cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplHideOwnerDrawWindowsHdl, void* ); 544cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplHandleResizeTimerHdl, void* ); 545cdf0e10cSrcweir 546cdf0e10cSrcweir SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect ); 547cdf0e10cSrcweir SAL_DLLPRIVATE void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY ); 548cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplGetCurrentBackgroundColor( Color& rCol ); 549cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsAccessibleCandidate() const; 550cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsAccessibleNativeFrame() const; 551cdf0e10cSrcweir SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const; 552cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel = sal_True ) const; 553cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplRegisterAccessibleNativeFrame(); 554cdf0e10cSrcweir SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame(); 555cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallResize(); 556cdf0e10cSrcweir SAL_DLLPRIVATE void ImplExtResize(); 557cdf0e10cSrcweir SAL_DLLPRIVATE void ImplCallMove(); 558cdf0e10cSrcweir SAL_DLLPRIVATE Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle& rRect ) const; 559cdf0e10cSrcweir SAL_DLLPRIVATE void ImplMirrorFramePos( Point &pt ) const; 560cdf0e10cSrcweir SAL_DLLPRIVATE long ImplGetUnmirroredOutOffX(); 561cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIncModalCount(); 562cdf0e10cSrcweir SAL_DLLPRIVATE void ImplDecModalCount(); 563cdf0e10cSrcweir 564cdf0e10cSrcweir // retrieves the list of owner draw decorated windows for this window hiearchy 565cdf0e10cSrcweir SAL_DLLPRIVATE ::std::vector<Window *>& ImplGetOwnerDrawList(); 566cdf0e10cSrcweir SAL_DLLPRIVATE Window* ImplGetTopmostFrameWindow(); 567cdf0e10cSrcweir 568cdf0e10cSrcweir SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const; 569cdf0e10cSrcweir SAL_DLLPRIVATE void ImplNotifyIconifiedState( sal_Bool bIconified ); 570cdf0e10cSrcweir SAL_DLLPRIVATE bool ImplStopDnd(); 571cdf0e10cSrcweir SAL_DLLPRIVATE void ImplStartDnd(); 572cdf0e10cSrcweir 573cdf0e10cSrcweir SAL_DLLPRIVATE static void ImplInitAppFontData( Window* pWindow ); 574cdf0e10cSrcweir SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos ); 575cdf0e10cSrcweir 576cdf0e10cSrcweir SAL_DLLPRIVATE sal_Bool ImplIsInTaskPaneList(); 577cdf0e10cSrcweir SAL_DLLPRIVATE void ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ); 578cdf0e10cSrcweir SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > 579cdf0e10cSrcweir ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const; 580cdf0e10cSrcweir 581cdf0e10cSrcweir private: 582cdf0e10cSrcweir // Default construction is forbidden and not implemented. 583cdf0e10cSrcweir SAL_DLLPRIVATE Window(); 584cdf0e10cSrcweir 585cdf0e10cSrcweir // Copy assignment is forbidden and not implemented. 586cdf0e10cSrcweir SAL_DLLPRIVATE Window (const Window &); 587cdf0e10cSrcweir SAL_DLLPRIVATE Window & operator= (const Window &); 588cdf0e10cSrcweir 589cdf0e10cSrcweir protected: 590cdf0e10cSrcweir // Single argument ctors shall be explicit. 591cdf0e10cSrcweir explicit Window( WindowType nType ); 592cdf0e10cSrcweir 593cdf0e10cSrcweir void SetCompoundControl( sal_Bool bCompound ); 594cdf0e10cSrcweir 595cdf0e10cSrcweir void ImplCallEventListeners( sal_uLong nEvent, void* pData = NULL ); 596cdf0e10cSrcweir void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); 597cdf0e10cSrcweir void FireVclEvent( VclSimpleEvent* pEvent ); 598cdf0e10cSrcweir 599cdf0e10cSrcweir // FIXME: this is a hack to workaround missing layout functionality 600cdf0e10cSrcweir SAL_DLLPRIVATE void ImplAdjustNWFSizes(); 601cdf0e10cSrcweir public: 602cdf0e10cSrcweir // Single argument ctors shall be explicit. 603cdf0e10cSrcweir explicit Window( Window* pParent, WinBits nStyle = 0 ); 604cdf0e10cSrcweir 605cdf0e10cSrcweir Window( Window* pParent, const ResId& rResId ); 606cdf0e10cSrcweir virtual ~Window(); 607cdf0e10cSrcweir 608cdf0e10cSrcweir virtual void MouseMove( const MouseEvent& rMEvt ); 609cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 610cdf0e10cSrcweir virtual void MouseButtonUp( const MouseEvent& rMEvt ); 611cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKEvt ); 612cdf0e10cSrcweir virtual void KeyUp( const KeyEvent& rKEvt ); 613cdf0e10cSrcweir virtual void PrePaint(); 614cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 615cdf0e10cSrcweir 616cdf0e10cSrcweir virtual void PostPaint(); 617cdf0e10cSrcweir virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ); 618cdf0e10cSrcweir virtual void Move(); 619cdf0e10cSrcweir virtual void Resize(); 620cdf0e10cSrcweir virtual void Activate(); 621cdf0e10cSrcweir virtual void Deactivate(); 622cdf0e10cSrcweir virtual void GetFocus(); 623cdf0e10cSrcweir virtual void LoseFocus(); 624cdf0e10cSrcweir virtual void RequestHelp( const HelpEvent& rHEvt ); 625cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 626cdf0e10cSrcweir virtual void Tracking( const TrackingEvent& rTEvt ); 627cdf0e10cSrcweir virtual void UserEvent( sal_uLong nEvent, void* pEventData ); 628cdf0e10cSrcweir virtual void StateChanged( StateChangedType nStateChange ); 629cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 630cdf0e10cSrcweir virtual long PreNotify( NotifyEvent& rNEvt ); 631cdf0e10cSrcweir virtual long Notify( NotifyEvent& rNEvt ); 632*ad3a95a3SSteve Yin //IAccessibility2 Implementation 2009----- 633*ad3a95a3SSteve Yin virtual void NotifyVCLEvent( sal_uLong nEvent ,void* pData = NULL); 634*ad3a95a3SSteve Yin virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > GetAccFlowToSequence(); 635*ad3a95a3SSteve Yin virtual void SwitchView() {} 636*ad3a95a3SSteve Yin //-----IAccessibility2 Implementation 2009 637cdf0e10cSrcweir virtual Window* GetPreferredKeyInputWindow(); 638cdf0e10cSrcweir 639cdf0e10cSrcweir /*virtual*/ void AddEventListener( const Link& rEventListener ); 640cdf0e10cSrcweir /*virtual*/ void RemoveEventListener( const Link& rEventListener ); 641cdf0e10cSrcweir /*virtual*/ void AddChildEventListener( const Link& rEventListener ); 642cdf0e10cSrcweir /*virtual*/ void RemoveChildEventListener( const Link& rEventListener ); 643cdf0e10cSrcweir 644cdf0e10cSrcweir sal_uLong PostUserEvent( sal_uLong nEvent, void* pEventData = NULL ); 645cdf0e10cSrcweir sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL ); 646cdf0e10cSrcweir sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL ); 647cdf0e10cSrcweir sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL ); 648cdf0e10cSrcweir void RemoveUserEvent( sal_uLong nUserEvent ); 649cdf0e10cSrcweir void PostStateChanged( StateChangedType nState ); 650cdf0e10cSrcweir 651cdf0e10cSrcweir void IncrementLockCount(); 652cdf0e10cSrcweir void DecrementLockCount(); 653cdf0e10cSrcweir sal_Bool IsLocked( sal_Bool bChilds = sal_False ) const; 654cdf0e10cSrcweir 655cdf0e10cSrcweir // returns the input language used for the last key stroke 656cdf0e10cSrcweir // may be LANGUAGE_DONTKNOW if not supported by the OS 657cdf0e10cSrcweir LanguageType GetInputLanguage() const; 658cdf0e10cSrcweir 659cdf0e10cSrcweir void SetStyle( WinBits nStyle ); 660cdf0e10cSrcweir WinBits GetStyle() const; 661cdf0e10cSrcweir WinBits GetPrevStyle() const; 662cdf0e10cSrcweir void SetExtendedStyle( WinBits nExtendedStyle ); 663cdf0e10cSrcweir WinBits GetExtendedStyle() const; 664cdf0e10cSrcweir WinBits GetPrevExtendedStyle() const; 665cdf0e10cSrcweir void SetType( WindowType nType ); 666cdf0e10cSrcweir WindowType GetType() const; 667cdf0e10cSrcweir sal_Bool IsSystemWindow() const; 668cdf0e10cSrcweir sal_Bool IsDialog() const; 669cdf0e10cSrcweir sal_Bool IsMenuFloatingWindow() const; 670cdf0e10cSrcweir sal_Bool IsToolbarFloatingWindow() const; 671cdf0e10cSrcweir sal_Bool IsTopWindow() const; 672cdf0e10cSrcweir SystemWindow* GetSystemWindow() const; 673cdf0e10cSrcweir 674cdf0e10cSrcweir void EnableAllResize( sal_Bool bEnable = sal_True ); 675cdf0e10cSrcweir sal_Bool IsAllResizeEnabled() const; 676cdf0e10cSrcweir 677cdf0e10cSrcweir void SetBorderStyle( sal_uInt16 nBorderStyle ); 678cdf0e10cSrcweir sal_uInt16 GetBorderStyle() const; 679cdf0e10cSrcweir void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, 680cdf0e10cSrcweir sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; 681cdf0e10cSrcweir Size CalcWindowSize( const Size& rOutSz ) const; 682cdf0e10cSrcweir Size CalcOutputSize( const Size& rWinSz ) const; 683cdf0e10cSrcweir long CalcTitleWidth() const; 684cdf0e10cSrcweir 685cdf0e10cSrcweir void EnableClipSiblings( sal_Bool bClipSiblings = sal_True ); 686cdf0e10cSrcweir sal_Bool IsClipSiblingsEnabled() const; 687cdf0e10cSrcweir 688cdf0e10cSrcweir void EnableChildTransparentMode( sal_Bool bEnable = sal_True ); 689cdf0e10cSrcweir sal_Bool IsChildTransparentModeEnabled() const; 690cdf0e10cSrcweir 691cdf0e10cSrcweir void SetMouseTransparent( sal_Bool bTransparent ); 692cdf0e10cSrcweir sal_Bool IsMouseTransparent() const; 693cdf0e10cSrcweir void SetPaintTransparent( sal_Bool bTransparent ); 694cdf0e10cSrcweir sal_Bool IsPaintTransparent() const; 695cdf0e10cSrcweir void SetDialogControlStart( sal_Bool bStart ); 696cdf0e10cSrcweir sal_Bool IsDialogControlStart() const; 697cdf0e10cSrcweir void SetDialogControlFlags( sal_uInt16 nFlags ); 698cdf0e10cSrcweir sal_uInt16 GetDialogControlFlags() const; 699cdf0e10cSrcweir 700cdf0e10cSrcweir struct PointerState 701cdf0e10cSrcweir { 702cdf0e10cSrcweir sal_uLong mnState; // the button state 703cdf0e10cSrcweir Point maPos; // mouse position in output coordinates 704cdf0e10cSrcweir }; 705cdf0e10cSrcweir PointerState GetPointerState(); 706cdf0e10cSrcweir sal_Bool IsMouseOver(); 707cdf0e10cSrcweir 708cdf0e10cSrcweir sal_uLong GetCurrentModButtons(); 709cdf0e10cSrcweir 710cdf0e10cSrcweir void SetInputContext( const InputContext& rInputContext ); 711cdf0e10cSrcweir const InputContext& GetInputContext() const; 712cdf0e10cSrcweir void EndExtTextInput( sal_uInt16 nFlags ); 713cdf0e10cSrcweir sal_Bool IsExtTextInput() const; 714cdf0e10cSrcweir void SetCursorRect( const Rectangle* pRect = NULL, long nExtTextInputWidth = 0 ); 715cdf0e10cSrcweir const Rectangle* GetCursorRect() const; 716cdf0e10cSrcweir long GetCursorExtTextInputWidth() const; 717cdf0e10cSrcweir 718cdf0e10cSrcweir void EnableChildNotify( sal_Bool bEnable ); 719cdf0e10cSrcweir sal_Bool IsChildNotify() const; 720cdf0e10cSrcweir 721cdf0e10cSrcweir using OutputDevice::SetSettings; 722cdf0e10cSrcweir virtual void SetSettings( const AllSettings& rSettings ); 723cdf0e10cSrcweir virtual void SetSettings( const AllSettings& rSettings, sal_Bool bChild ); 724cdf0e10cSrcweir void UpdateSettings( const AllSettings& rSettings, sal_Bool bChild = sal_False ); 725cdf0e10cSrcweir void NotifyAllChilds( DataChangedEvent& rDCEvt ); 726cdf0e10cSrcweir 727cdf0e10cSrcweir void SetPointFont( const Font& rFont ); 728cdf0e10cSrcweir Font GetPointFont() const; 729cdf0e10cSrcweir void SetZoomedPointFont( const Font& rFont ); 730cdf0e10cSrcweir long GetDrawPixel( OutputDevice* pDev, long nPixels ) const; 731cdf0e10cSrcweir Font GetDrawPixelFont( OutputDevice* pDev ) const; 732cdf0e10cSrcweir void GetFontResolution( sal_Int32& nDPIX, sal_Int32& nDPIY ) const; 733cdf0e10cSrcweir 734cdf0e10cSrcweir void SetControlFont(); 735cdf0e10cSrcweir void SetControlFont( const Font& rFont ); 736cdf0e10cSrcweir Font GetControlFont() const; 737cdf0e10cSrcweir sal_Bool IsControlFont() const; 738cdf0e10cSrcweir void SetControlForeground(); 739cdf0e10cSrcweir void SetControlForeground( const Color& rColor ); 740cdf0e10cSrcweir Color GetControlForeground() const; 741cdf0e10cSrcweir sal_Bool IsControlForeground() const; 742cdf0e10cSrcweir void SetControlBackground(); 743cdf0e10cSrcweir void SetControlBackground( const Color& rColor ); 744cdf0e10cSrcweir Color GetControlBackground() const; 745cdf0e10cSrcweir sal_Bool IsControlBackground() const; 746cdf0e10cSrcweir 747cdf0e10cSrcweir void SetParentClipMode( sal_uInt16 nMode = 0 ); 748cdf0e10cSrcweir sal_uInt16 GetParentClipMode() const; 749cdf0e10cSrcweir 750cdf0e10cSrcweir void SetWindowRegionPixel(); 751cdf0e10cSrcweir void SetWindowRegionPixel( const Region& rRegion ); 752cdf0e10cSrcweir const Region& GetWindowRegionPixel() const; 753cdf0e10cSrcweir sal_Bool IsWindowRegionPixel() const; 754cdf0e10cSrcweir Region GetWindowClipRegionPixel( sal_uInt16 nFlags = 0 ) const; 755cdf0e10cSrcweir Region GetPaintRegion() const; 756cdf0e10cSrcweir sal_Bool IsInPaint() const; 757cdf0e10cSrcweir // while IsInPaint returns true ExpandPaintClipRegion adds the 758cdf0e10cSrcweir // submitted region to the paint clip region so you can 759cdf0e10cSrcweir // paint additional parts of your window if necessary 760cdf0e10cSrcweir void ExpandPaintClipRegion( const Region& rRegion ); 761cdf0e10cSrcweir 762cdf0e10cSrcweir void SetParent( Window* pNewParent ); 763cdf0e10cSrcweir Window* GetParent() const; 764cdf0e10cSrcweir 765cdf0e10cSrcweir void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ); 766cdf0e10cSrcweir void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); } 767cdf0e10cSrcweir sal_Bool IsVisible() const; 768cdf0e10cSrcweir sal_Bool IsReallyVisible() const; 769cdf0e10cSrcweir // Do not use this function, use IsReallyVisible() 770cdf0e10cSrcweir sal_Bool IsParentPathVisible() const; 771cdf0e10cSrcweir sal_Bool IsReallyShown() const; 772cdf0e10cSrcweir sal_Bool IsInInitShow() const; 773cdf0e10cSrcweir 774cdf0e10cSrcweir void Enable( bool bEnable = true, bool bChild = true ); 775cdf0e10cSrcweir void Disable( bool bChild = true ) { Enable( false, bChild ); } 776cdf0e10cSrcweir sal_Bool IsEnabled() const; 777cdf0e10cSrcweir 778cdf0e10cSrcweir void EnableInput( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True ); 779cdf0e10cSrcweir void EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin, 780cdf0e10cSrcweir const Window* pExcludeWindow = NULL ); 781cdf0e10cSrcweir sal_Bool IsInputEnabled() const; 782cdf0e10cSrcweir 783cdf0e10cSrcweir /** Override <code>EnableInput</code>. This can be necessary due to other people 784cdf0e10cSrcweir using EnableInput for whole window hierarchies. 785cdf0e10cSrcweir 786cdf0e10cSrcweir 787cdf0e10cSrcweir <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are 788cdf0e10cSrcweir mutually exclusive; the last setter wins. 789cdf0e10cSrcweir @param bAlways 790cdf0e10cSrcweir sets always enabled flag 791cdf0e10cSrcweir 792cdf0e10cSrcweir @param bChild 793cdf0e10cSrcweir if true children are recursively set to AlwaysEnableInput 794cdf0e10cSrcweir */ 795cdf0e10cSrcweir void AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild = sal_True ); 796cdf0e10cSrcweir /** returns the current AlwaysEnableInput state 797cdf0e10cSrcweir @return 798cdf0e10cSrcweir true if window is in AlwaysEnableInput state 799cdf0e10cSrcweir */ 800cdf0e10cSrcweir sal_Bool IsAlwaysEnableInput() const; 801cdf0e10cSrcweir /** Override <code>EnableInput</code>, counterpart to AlwaysEnableInput. 802cdf0e10cSrcweir Windows with AlwaysDisableInput will not get key events even if enabled 803cdf0e10cSrcweir and input enabled.This can be necessary due to other people using EnableInput 804cdf0e10cSrcweir for whole window hierarchies. 805cdf0e10cSrcweir 806cdf0e10cSrcweir <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are 807cdf0e10cSrcweir mutually exclusive; the last setter wins. 808cdf0e10cSrcweir 809cdf0e10cSrcweir @param bAlways 810cdf0e10cSrcweir sets always disable flag 811cdf0e10cSrcweir 812cdf0e10cSrcweir @param bChild 813cdf0e10cSrcweir if true children are recursively set to AlwaysDisableInput 814cdf0e10cSrcweir */ 815cdf0e10cSrcweir void AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild = sal_True ); 816cdf0e10cSrcweir /** returns the current AlwaysDisableInput state 817cdf0e10cSrcweir @return 818cdf0e10cSrcweir true if window is in AlwaysEnableInput state 819cdf0e10cSrcweir */ 820cdf0e10cSrcweir sal_Bool IsAlwaysDisableInput() const; 821cdf0e10cSrcweir /** usually event handlers (see AddEventListener and AddChildEventListener) 822cdf0e10cSrcweir are not called on disabled, modal or input disabled windows. There are however rare cases 823cdf0e10cSrcweir in which one wants a Window or rather one of its Control subclasses to 824cdf0e10cSrcweir not evaluate events but still react to those events externally. In these 825cdf0e10cSrcweir rare cases call SetCallHandlersOnInputDisabled( true ) to have your handler 826cdf0e10cSrcweir called anyway. 827cdf0e10cSrcweir 828cdf0e10cSrcweir Currently only mouse events get this special treatment. 829cdf0e10cSrcweir 830cdf0e10cSrcweir Use this sparingly, chances are if you want to use it you're wroking around 831cdf0e10cSrcweir the real problem. 832cdf0e10cSrcweir 833cdf0e10cSrcweir @param bCall 834cdf0e10cSrcweir Enable/Disable calling event handlers for this disabled, modal or input disabled window. 835cdf0e10cSrcweir This call is implicity done recursively for possible child windows. 836cdf0e10cSrcweir */ 837cdf0e10cSrcweir void SetCallHandlersOnInputDisabled( bool bCall ); 838cdf0e10cSrcweir /** get state of SetCallHandlersOnInputDisabled 839cdf0e10cSrcweir 840cdf0e10cSrcweir @returns whether handlers are called regardless of input enabled state 841cdf0e10cSrcweir */ 842cdf0e10cSrcweir bool IsCallHandlersOnInputDisabled() const; 843cdf0e10cSrcweir /** A window is in modal mode if one of its children or subchildren 844cdf0e10cSrcweir is a running modal window (a modal dialog) 845cdf0e10cSrcweir 846cdf0e10cSrcweir @returns sal_True if a child or subchild is a running modal window 847cdf0e10cSrcweir */ 848cdf0e10cSrcweir sal_Bool IsInModalMode() const; 849cdf0e10cSrcweir 850cdf0e10cSrcweir void SetActivateMode( sal_uInt16 nMode ); 851cdf0e10cSrcweir sal_uInt16 GetActivateMode() const; 852cdf0e10cSrcweir 853cdf0e10cSrcweir void ToTop( sal_uInt16 nFlags = 0 ); 854cdf0e10cSrcweir void SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ); 855cdf0e10cSrcweir void EnableAlwaysOnTop( sal_Bool bEnable = sal_True ); 856cdf0e10cSrcweir sal_Bool IsAlwaysOnTopEnabled() const; 857cdf0e10cSrcweir 858cdf0e10cSrcweir virtual void SetPosSizePixel( long nX, long nY, 859cdf0e10cSrcweir long nWidth, long nHeight, 860cdf0e10cSrcweir sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); 861cdf0e10cSrcweir virtual void SetPosPixel( const Point& rNewPos ); 862cdf0e10cSrcweir virtual Point GetPosPixel() const; 863cdf0e10cSrcweir virtual void SetSizePixel( const Size& rNewSize ); 864cdf0e10cSrcweir virtual Size GetSizePixel() const; 865cdf0e10cSrcweir virtual void SetPosSizePixel( const Point& rNewPos, 866cdf0e10cSrcweir const Size& rNewSize ); 867cdf0e10cSrcweir virtual void SetOutputSizePixel( const Size& rNewSize ); 868cdf0e10cSrcweir sal_Bool IsDefaultPos() const; 869cdf0e10cSrcweir sal_Bool IsDefaultSize() const; 870cdf0e10cSrcweir 871cdf0e10cSrcweir // those conversion routines might deliver different results during UI mirroring 872cdf0e10cSrcweir Point OutputToScreenPixel( const Point& rPos ) const; 873cdf0e10cSrcweir Point ScreenToOutputPixel( const Point& rPos ) const; 874cdf0e10cSrcweir // the normalized screen methods work independent from UI mirroring 875cdf0e10cSrcweir Point OutputToNormalizedScreenPixel( const Point& rPos ) const; 876cdf0e10cSrcweir Point NormalizedScreenToOutputPixel( const Point& rPos ) const; 877cdf0e10cSrcweir Point OutputToAbsoluteScreenPixel( const Point& rPos ) const; 878cdf0e10cSrcweir Point AbsoluteScreenToOutputPixel( const Point& rPos ) const; 879cdf0e10cSrcweir Rectangle GetDesktopRectPixel() const; 880cdf0e10cSrcweir // window extents including border and decoratrion 881cdf0e10cSrcweir Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; 882cdf0e10cSrcweir // window extents of the client window, coordinates to be used in SetPosPixel 883cdf0e10cSrcweir Rectangle GetClientWindowExtentsRelative( Window *pRelativeWindow ) const; 884cdf0e10cSrcweir 885cdf0e10cSrcweir virtual sal_Bool IsScrollable() const; 886cdf0e10cSrcweir virtual void Scroll( long nHorzScroll, long nVertScroll, 887cdf0e10cSrcweir sal_uInt16 nFlags = 0 ); 888cdf0e10cSrcweir virtual void Scroll( long nHorzScroll, long nVertScroll, 889cdf0e10cSrcweir const Rectangle& rRect, sal_uInt16 nFlags = 0 ); 890cdf0e10cSrcweir virtual void Invalidate( sal_uInt16 nFlags = 0 ); 891cdf0e10cSrcweir virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ); 892cdf0e10cSrcweir virtual void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 ); 893cdf0e10cSrcweir void Validate( sal_uInt16 nFlags = 0 ); 894cdf0e10cSrcweir void Validate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ); 895cdf0e10cSrcweir void Validate( const Region& rRegion, sal_uInt16 nFlags = 0 ); 896cdf0e10cSrcweir sal_Bool HasPaintEvent() const; 897cdf0e10cSrcweir void Update(); 898cdf0e10cSrcweir void Flush(); 899cdf0e10cSrcweir void Sync(); 900cdf0e10cSrcweir 901cdf0e10cSrcweir // toggles new docking support, enabled via toolkit 902cdf0e10cSrcweir void EnableDocking( sal_Bool bEnable = sal_True ); 903cdf0e10cSrcweir // retrieves the single dockingmanager instance 904cdf0e10cSrcweir static DockingManager* GetDockingManager(); 905cdf0e10cSrcweir 906cdf0e10cSrcweir void EnablePaint( sal_Bool bEnable ); 907cdf0e10cSrcweir sal_Bool IsPaintEnabled() const; 908cdf0e10cSrcweir void SetUpdateMode( sal_Bool bUpdate ); 909cdf0e10cSrcweir sal_Bool IsUpdateMode() const; 910cdf0e10cSrcweir void SetParentUpdateMode( sal_Bool bUpdate ); 911cdf0e10cSrcweir sal_Bool IsParentUpdateMode() const; 912cdf0e10cSrcweir 913cdf0e10cSrcweir void GrabFocus(); 914cdf0e10cSrcweir sal_Bool HasFocus() const; 915cdf0e10cSrcweir sal_Bool HasChildPathFocus( sal_Bool bSystemWindow = sal_False ) const; 916cdf0e10cSrcweir sal_Bool IsActive() const; 917cdf0e10cSrcweir sal_Bool HasActiveChildFrame(); 918cdf0e10cSrcweir sal_uInt16 GetGetFocusFlags() const; 919cdf0e10cSrcweir void GrabFocusToDocument(); 920cdf0e10cSrcweir 921cdf0e10cSrcweir /** 922cdf0e10cSrcweir * Set this when you need to act as if the window has focus even if it 923cdf0e10cSrcweir * doesn't. This is necessary for implementing tab stops inside floating 924cdf0e10cSrcweir * windows, but floating windows don't get focus from the system. 925cdf0e10cSrcweir */ 926cdf0e10cSrcweir void SetFakeFocus( bool bFocus ); 927cdf0e10cSrcweir 928cdf0e10cSrcweir sal_Bool IsCompoundControl() const; 929cdf0e10cSrcweir sal_Bool HasCompoundControlFocus() const; 930cdf0e10cSrcweir 931cdf0e10cSrcweir static sal_uIntPtr SaveFocus(); 932cdf0e10cSrcweir static sal_Bool EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore = sal_True ); 933cdf0e10cSrcweir 934cdf0e10cSrcweir void CaptureMouse(); 935cdf0e10cSrcweir void ReleaseMouse(); 936cdf0e10cSrcweir sal_Bool IsMouseCaptured() const; 937cdf0e10cSrcweir 938cdf0e10cSrcweir void SetPointer( const Pointer& rPointer ); 939cdf0e10cSrcweir const Pointer& GetPointer() const; 940cdf0e10cSrcweir void EnableChildPointerOverwrite( sal_Bool bOverwrite = sal_True ); 941cdf0e10cSrcweir sal_Bool IsChildPointerOverwrite() const; 942cdf0e10cSrcweir void SetPointerPosPixel( const Point& rPos ); 943cdf0e10cSrcweir Point GetPointerPosPixel(); 944cdf0e10cSrcweir Point GetLastPointerPosPixel(); 945cdf0e10cSrcweir void ShowPointer( sal_Bool bVisible ); 946cdf0e10cSrcweir sal_Bool IsPointerVisible() const; 947cdf0e10cSrcweir void EnterWait(); 948cdf0e10cSrcweir void LeaveWait(); 949cdf0e10cSrcweir sal_Bool IsWait() const; 950cdf0e10cSrcweir 951cdf0e10cSrcweir void SetCursor( Cursor* pCursor ); 952cdf0e10cSrcweir Cursor* GetCursor() const; 953cdf0e10cSrcweir 954cdf0e10cSrcweir void SetZoom( const Fraction& rZoom ); 955cdf0e10cSrcweir const Fraction& GetZoom() const; 956cdf0e10cSrcweir sal_Bool IsZoom() const; 957cdf0e10cSrcweir long CalcZoom( long n ) const; 958cdf0e10cSrcweir 959cdf0e10cSrcweir virtual void SetText( const XubString& rStr ); 960cdf0e10cSrcweir virtual String GetText() const; 961cdf0e10cSrcweir // return the actual text displayed 962cdf0e10cSrcweir // this may have e.g. accellerators removed or portions 963cdf0e10cSrcweir // replaced by ellipsis 964cdf0e10cSrcweir virtual String GetDisplayText() const; 965cdf0e10cSrcweir // gets the visible background color. for transparent windows 966cdf0e10cSrcweir // this may be the parent's background color; for controls 967cdf0e10cSrcweir // this may be a child's background color (e.g. ListBox) 968cdf0e10cSrcweir virtual const Wallpaper& GetDisplayBackground() const; 969cdf0e10cSrcweir 970cdf0e10cSrcweir void SetHelpText( const XubString& rHelpText ); 971cdf0e10cSrcweir const XubString& GetHelpText() const; 972cdf0e10cSrcweir 973cdf0e10cSrcweir void SetQuickHelpText( const XubString& rHelpText ); 974cdf0e10cSrcweir const XubString& GetQuickHelpText() const; 975cdf0e10cSrcweir 976cdf0e10cSrcweir void SetHelpId( const rtl::OString& ); 977cdf0e10cSrcweir const rtl::OString& GetHelpId() const; 978cdf0e10cSrcweir 979cdf0e10cSrcweir void SetUniqueId( const rtl::OString& ); 980cdf0e10cSrcweir const rtl::OString& GetUniqueId() const; 981cdf0e10cSrcweir const rtl::OString& GetUniqueOrHelpId() const; 982cdf0e10cSrcweir 983cdf0e10cSrcweir Window* FindWindow( const Point& rPos ) const; 984cdf0e10cSrcweir 985cdf0e10cSrcweir sal_uInt16 GetChildCount() const; 986cdf0e10cSrcweir Window* GetChild( sal_uInt16 nChild ) const; 987cdf0e10cSrcweir Window* GetWindow( sal_uInt16 nType ) const; 988cdf0e10cSrcweir sal_Bool IsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; 989cdf0e10cSrcweir sal_Bool IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; 990cdf0e10cSrcweir 991cdf0e10cSrcweir void SetData( void* pNewData ); 992cdf0e10cSrcweir void* GetData() const; 993cdf0e10cSrcweir 994cdf0e10cSrcweir // Should be merged in the next top level build !!! 995cdf0e10cSrcweir Bitmap SnapShot( sal_Bool bBorder ) const; 996cdf0e10cSrcweir Bitmap SnapShot() const; 997cdf0e10cSrcweir 998cdf0e10cSrcweir void ShowFocus( const Rectangle& rRect ); 999cdf0e10cSrcweir void HideFocus(); 1000cdf0e10cSrcweir 1001cdf0e10cSrcweir void Invert( const Rectangle& rRect, sal_uInt16 nFlags = 0 ); 1002cdf0e10cSrcweir void Invert( const Polygon& rPoly, sal_uInt16 nFlags = 0 ); 1003cdf0e10cSrcweir 1004cdf0e10cSrcweir // transparent background for selected or checked items in toolboxes etc. 1005cdf0e10cSrcweir void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ); 1006cdf0e10cSrcweir // the same, but fills a passed Color with a text color complementing the selection background 1007cdf0e10cSrcweir void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ); 1008cdf0e10cSrcweir // support rounded edges in the selection rect 1009cdf0e10cSrcweir void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor ); 1010cdf0e10cSrcweir 1011cdf0e10cSrcweir void ShowTracking( const Rectangle& rRect, 1012cdf0e10cSrcweir sal_uInt16 nFlags = SHOWTRACK_SMALL ); 1013cdf0e10cSrcweir void HideTracking(); 1014cdf0e10cSrcweir void InvertTracking( const Rectangle& rRect, 1015cdf0e10cSrcweir sal_uInt16 nFlags = SHOWTRACK_SMALL ); 1016cdf0e10cSrcweir void InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags = 0 ); 1017cdf0e10cSrcweir 1018cdf0e10cSrcweir void StartTracking( sal_uInt16 nFlags = 0 ); 1019cdf0e10cSrcweir void EndTracking( sal_uInt16 nFlags = 0 ); 1020cdf0e10cSrcweir sal_Bool IsTracking() const; 1021cdf0e10cSrcweir 1022cdf0e10cSrcweir void StartAutoScroll( sal_uInt16 nFlags ); 1023cdf0e10cSrcweir void EndAutoScroll(); 1024cdf0e10cSrcweir sal_Bool IsAutoScroll() const; 1025cdf0e10cSrcweir 1026cdf0e10cSrcweir sal_Bool HandleScrollCommand( const CommandEvent& rCmd, 1027cdf0e10cSrcweir ScrollBar* pHScrl = NULL, 1028cdf0e10cSrcweir ScrollBar* pVScrl = NULL ); 1029cdf0e10cSrcweir 1030cdf0e10cSrcweir void SaveBackground( const Point& rPos, const Size& rSize, 1031cdf0e10cSrcweir const Point& rDestOff, VirtualDevice& rSaveDevice ); 1032cdf0e10cSrcweir 1033cdf0e10cSrcweir const SystemEnvData* GetSystemData() const; 1034cdf0e10cSrcweir ::com::sun::star::uno::Any GetSystemDataAny() const; 1035cdf0e10cSrcweir 1036cdf0e10cSrcweir // API zum Setzen/Abfragen des Komponenteninterfaces 1037cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( sal_Bool bCreate = sal_True ); 1038cdf0e10cSrcweir virtual void SetComponentInterface( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace ); 1039cdf0e10cSrcweir 1040cdf0e10cSrcweir // Accessibility 1041cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( sal_Bool bCreate = sal_True ); 1042cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); 1043cdf0e10cSrcweir void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ); 1044cdf0e10cSrcweir 1045cdf0e10cSrcweir Window* GetAccessibleParentWindow() const; 1046cdf0e10cSrcweir sal_uInt16 GetAccessibleChildWindowCount(); 1047cdf0e10cSrcweir Window* GetAccessibleChildWindow( sal_uInt16 n ); 1048cdf0e10cSrcweir 1049cdf0e10cSrcweir void SetAccessibleRole( sal_uInt16 nRole ); 1050cdf0e10cSrcweir sal_uInt16 GetAccessibleRole() const; 1051cdf0e10cSrcweir 1052cdf0e10cSrcweir void SetAccessibleName( const String& rName ); 1053cdf0e10cSrcweir String GetAccessibleName() const; 1054cdf0e10cSrcweir 1055cdf0e10cSrcweir void SetAccessibleDescription( const String& rDescr ); 1056cdf0e10cSrcweir String GetAccessibleDescription() const; 1057cdf0e10cSrcweir 1058cdf0e10cSrcweir void SetAccessibleRelationLabeledBy( Window* pLabeledBy ); 1059cdf0e10cSrcweir Window* GetAccessibleRelationLabeledBy() const; 1060cdf0e10cSrcweir 1061cdf0e10cSrcweir void SetAccessibleRelationLabelFor( Window* pLabelFor ); 1062cdf0e10cSrcweir Window* GetAccessibleRelationLabelFor() const; 1063cdf0e10cSrcweir 1064cdf0e10cSrcweir void SetAccessibleRelationMemberOf( Window* pMemberOf ); 1065cdf0e10cSrcweir Window* GetAccessibleRelationMemberOf() const; 1066cdf0e10cSrcweir 1067cdf0e10cSrcweir 1068cdf0e10cSrcweir // to avoid sending accessibility events in cases like closing dialogs 1069cdf0e10cSrcweir // by default checks complete parent path 1070cdf0e10cSrcweir sal_Bool IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath = sal_True ); 1071cdf0e10cSrcweir void SetAccessibilityEventsSuppressed(sal_Bool bSuppressed); 1072cdf0e10cSrcweir 1073cdf0e10cSrcweir /// request XCanvas render interface for this window 1074cdf0e10cSrcweir ::com::sun::star::uno::Reference< 1075cdf0e10cSrcweir ::com::sun::star::rendering::XCanvas > GetCanvas() const; 1076cdf0e10cSrcweir /// request XSpriteCanvas render interface for this window 1077cdf0e10cSrcweir ::com::sun::star::uno::Reference< 1078cdf0e10cSrcweir ::com::sun::star::rendering::XSpriteCanvas > GetSpriteCanvas() const; 1079cdf0e10cSrcweir /// request fullscreen XSpriteCanvas render interface for this window 1080cdf0e10cSrcweir ::com::sun::star::uno::Reference< 1081cdf0e10cSrcweir ::com::sun::star::rendering::XSpriteCanvas > GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const; 1082cdf0e10cSrcweir 1083cdf0e10cSrcweir /* records all DrawText operations within the passed rectangle; 1084cdf0e10cSrcweir * a synchronous paint is sent to achieve this 1085cdf0e10cSrcweir */ 1086cdf0e10cSrcweir void RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect ); 1087cdf0e10cSrcweir 1088cdf0e10cSrcweir // Setzen und Abfragen fuer das Toolkit 1089cdf0e10cSrcweir VCLXWindow* GetWindowPeer() const; 1090cdf0e10cSrcweir void SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer, VCLXWindow* pVCLXWindow ); 1091cdf0e10cSrcweir 1092cdf0e10cSrcweir // Merken, ob vom Toolkit erzeugt 1093cdf0e10cSrcweir sal_Bool IsCreatedWithToolkit() const; 1094cdf0e10cSrcweir void SetCreatedWithToolkit( sal_Bool b ); 1095cdf0e10cSrcweir 1096cdf0e10cSrcweir // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys 1097cdf0e10cSrcweir virtual Window* GetParentLabelFor( const Window* pLabel ) const; 1098cdf0e10cSrcweir virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; 1099cdf0e10cSrcweir KeyEvent GetActivationKey() const; 1100cdf0e10cSrcweir 1101cdf0e10cSrcweir // Drag and Drop interfaces 1102cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > GetDropTarget(); 1103cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > GetDragSource(); 1104cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer > GetDragGestureRecognizer(); 1105cdf0e10cSrcweir // only for RVP transmission 1106cdf0e10cSrcweir void GetDragSourceDropTarget(::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xDragSource,::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > &xDropTarget ); 1107cdf0e10cSrcweir 1108cdf0e10cSrcweir // Clipboard/Selection interfaces 1109cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard(); 1110cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetPrimarySelection(); 1111cdf0e10cSrcweir 1112cdf0e10cSrcweir // Advisory Sizing - what is a good size for this widget ? 1113cdf0e10cSrcweir virtual Size GetOptimalSize(WindowSizeType eType) const; 1114cdf0e10cSrcweir 1115cdf0e10cSrcweir //------------------------------------- 1116cdf0e10cSrcweir // Native Widget Rendering functions 1117cdf0e10cSrcweir //------------------------------------- 1118cdf0e10cSrcweir 1119cdf0e10cSrcweir // form controls must never use native widgets, this can be toggled here 1120cdf0e10cSrcweir void EnableNativeWidget( sal_Bool bEnable = sal_True ); 1121cdf0e10cSrcweir sal_Bool IsNativeWidgetEnabled() const; 1122cdf0e10cSrcweir 1123cdf0e10cSrcweir // a helper method for a Control's Draw method 1124cdf0e10cSrcweir void PaintToDevice( OutputDevice* pDevice, const Point& rPos, const Size& rSize ); 1125cdf0e10cSrcweir 1126cdf0e10cSrcweir /* mark Window for deletion in top of event queue 1127cdf0e10cSrcweir */ 1128cdf0e10cSrcweir void doLazyDelete(); 1129cdf0e10cSrcweir 1130cdf0e10cSrcweir // let the window intercept the KeyDown messages of the system children 1131cdf0e10cSrcweir void InterceptChildWindowKeyDown( sal_Bool bIntercept ); 1132cdf0e10cSrcweir 1133cdf0e10cSrcweir virtual XubString GetSurroundingText() const; 1134cdf0e10cSrcweir virtual Selection GetSurroundingTextSelection() const; 1135cdf0e10cSrcweir 1136cdf0e10cSrcweir // ExtImpl 1137cdf0e10cSrcweir 1138cdf0e10cSrcweir // layouting 1139cdf0e10cSrcweir boost::shared_ptr< vcl::WindowArranger > getLayout(); 1140cdf0e10cSrcweir 1141cdf0e10cSrcweir /* add a child Window 1142cdf0e10cSrcweir addWindow will do the following things 1143cdf0e10cSrcweir - insert the passed window into the child list (equivalent to i_pWin->SetParent( this )) 1144cdf0e10cSrcweir - mark the window as "owned", meaning that the added Window will be destroyed by 1145cdf0e10cSrcweir the parent's desctructor. 1146cdf0e10cSrcweir This means: do not pass in member windows or stack objects here. Do not cause 1147cdf0e10cSrcweir the destructor of the added window to be called in any way. 1148cdf0e10cSrcweir 1149cdf0e10cSrcweir to avoid ownership pass i_bTakeOwnership as "false" 1150cdf0e10cSrcweir */ 1151cdf0e10cSrcweir void addWindow( Window* i_pWin, bool i_bTakeOwnership = true ); 1152cdf0e10cSrcweir 1153cdf0e10cSrcweir /* remove a child Window 1154cdf0e10cSrcweir the remove window functions will 1155cdf0e10cSrcweir - reparent the searched window (equivalent to i_pWin->SetParent( i_pNewParent )) 1156cdf0e10cSrcweir - return a pointer to the removed window or NULL if i_pWin was not found 1157cdf0e10cSrcweir caution: ownership passes to the new parent or the caller, if the new parent was NULL 1158cdf0e10cSrcweir */ 1159cdf0e10cSrcweir Window* removeWindow( Window* i_pWin, Window* i_pNewParent = NULL ); 1160cdf0e10cSrcweir 1161cdf0e10cSrcweir /* return the identifier of this window 1162cdf0e10cSrcweir */ 1163cdf0e10cSrcweir const rtl::OUString& getIdentifier() const; 1164cdf0e10cSrcweir /* set an identifier 1165cdf0e10cSrcweir identifiers have only loosely defined rules per se 1166cdf0e10cSrcweir in context of Window they must be unique over the window 1167cdf0e10cSrcweir hierarchy you'd like to find them again using the findWindow method 1168cdf0e10cSrcweir */ 1169cdf0e10cSrcweir void setIdentifier( const rtl::OUString& ); 1170cdf0e10cSrcweir 1171cdf0e10cSrcweir /* returns the first found descendant that matches 1172cdf0e10cSrcweir the passed identifier or NULL 1173cdf0e10cSrcweir */ 1174cdf0e10cSrcweir Window* findWindow( const rtl::OUString& ) const; 1175cdf0e10cSrcweir 1176cdf0e10cSrcweir /* get/set properties 1177cdf0e10cSrcweir this will contain window properties (like visible, enabled) 1178cdf0e10cSrcweir as well as properties of derived classes (e.g. text of Edit fields) 1179cdf0e10cSrcweir */ 1180cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getProperties() const; 1181cdf0e10cSrcweir /* 1182cdf0e10cSrcweir */ 1183cdf0e10cSrcweir virtual void setProperties( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& ); 1184cdf0e10cSrcweir 1185cdf0e10cSrcweir }; 1186cdf0e10cSrcweir 1187cdf0e10cSrcweir 1188cdf0e10cSrcweir #endif // _SV_WINDOW_HXX 1189