xref: /AOO41X/main/vcl/inc/svdata.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _SV_SVDATA_HXX
29*cdf0e10cSrcweir #define _SV_SVDATA_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "rtl/ref.hxx"
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir #include "vos/thread.hxx"
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include "tools/string.hxx"
36*cdf0e10cSrcweir #include "tools/gen.hxx"
37*cdf0e10cSrcweir #include "tools/shl.hxx"
38*cdf0e10cSrcweir #include "tools/link.hxx"
39*cdf0e10cSrcweir #include "tools/fldunit.hxx"
40*cdf0e10cSrcweir #include "tools/color.hxx"
41*cdf0e10cSrcweir #include "tools/debug.hxx"
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir #include "vcl/vclevent.hxx"
44*cdf0e10cSrcweir #include "vcl/sv.h"
45*cdf0e10cSrcweir #include "vcl/dllapi.h"
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir #include "unotools/options.hxx"
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir #include "xconnection.hxx"
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir #include "com/sun/star/uno/Reference.hxx"
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir #include <hash_map>
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir namespace com {
56*cdf0e10cSrcweir namespace sun {
57*cdf0e10cSrcweir namespace star {
58*cdf0e10cSrcweir namespace lang {
59*cdf0e10cSrcweir     class XMultiServiceFactory;
60*cdf0e10cSrcweir }
61*cdf0e10cSrcweir namespace frame {
62*cdf0e10cSrcweir 	class XSessionManagerClient;
63*cdf0e10cSrcweir }
64*cdf0e10cSrcweir }}}
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir struct ImplTimerData;
67*cdf0e10cSrcweir struct ImplFileImageCacheData;
68*cdf0e10cSrcweir struct ImplConfigData;
69*cdf0e10cSrcweir class ImplDirectFontSubstitution;
70*cdf0e10cSrcweir struct ImplHotKey;
71*cdf0e10cSrcweir struct ImplEventHook;
72*cdf0e10cSrcweir class Point;
73*cdf0e10cSrcweir class Rectangle;
74*cdf0e10cSrcweir class ImpResMgr;
75*cdf0e10cSrcweir class ResMgr;
76*cdf0e10cSrcweir class UniqueIndex;
77*cdf0e10cSrcweir class ImplAccelManager;
78*cdf0e10cSrcweir class ImplDevFontList;
79*cdf0e10cSrcweir class ImplFontCache;
80*cdf0e10cSrcweir class HelpTextWindow;
81*cdf0e10cSrcweir class ImplTBDragMgr;
82*cdf0e10cSrcweir class ImplButtonList;
83*cdf0e10cSrcweir class ImplIdleMgr;
84*cdf0e10cSrcweir class DbgWindow;
85*cdf0e10cSrcweir class FloatingWindow;
86*cdf0e10cSrcweir class AllSettings;
87*cdf0e10cSrcweir class KeyCode;
88*cdf0e10cSrcweir class NotifyEvent;
89*cdf0e10cSrcweir class Timer;
90*cdf0e10cSrcweir class AutoTimer;
91*cdf0e10cSrcweir class Help;
92*cdf0e10cSrcweir class ImageList;
93*cdf0e10cSrcweir class Image;
94*cdf0e10cSrcweir class PopupMenu;
95*cdf0e10cSrcweir class Application;
96*cdf0e10cSrcweir class OutputDevice;
97*cdf0e10cSrcweir class Window;
98*cdf0e10cSrcweir class SystemWindow;
99*cdf0e10cSrcweir class WorkWindow;
100*cdf0e10cSrcweir class Dialog;
101*cdf0e10cSrcweir class VirtualDevice;
102*cdf0e10cSrcweir class Printer;
103*cdf0e10cSrcweir class SalFrame;
104*cdf0e10cSrcweir class SalInstance;
105*cdf0e10cSrcweir class SalSystem;
106*cdf0e10cSrcweir class SalProcessWindowList;
107*cdf0e10cSrcweir class SalTrayList;
108*cdf0e10cSrcweir class UniqueIdContainer;
109*cdf0e10cSrcweir class List;
110*cdf0e10cSrcweir class ImplPrnQueueList;
111*cdf0e10cSrcweir class ImplVDevCache;
112*cdf0e10cSrcweir class UnoWrapperBase;
113*cdf0e10cSrcweir class GraphicConverter;
114*cdf0e10cSrcweir class ImplWheelWindow;
115*cdf0e10cSrcweir class SalTimer;
116*cdf0e10cSrcweir class SalI18NImeStatus;
117*cdf0e10cSrcweir class DockingManager;
118*cdf0e10cSrcweir class VclEventListeners2;
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir namespace vos { class OMutex; }
121*cdf0e10cSrcweir namespace vos { class OCondition; }
122*cdf0e10cSrcweir namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; }
123*cdf0e10cSrcweir namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; }
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir // -----------------
126*cdf0e10cSrcweir // - ImplSVAppData -
127*cdf0e10cSrcweir // -----------------
128*cdf0e10cSrcweir class LocaleConfigurationListener : public utl::ConfigurationListener
129*cdf0e10cSrcweir {
130*cdf0e10cSrcweir public:
131*cdf0e10cSrcweir 	virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
132*cdf0e10cSrcweir };
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir struct ImplSVAppData
135*cdf0e10cSrcweir {
136*cdf0e10cSrcweir     enum ImeStatusWindowMode
137*cdf0e10cSrcweir     {
138*cdf0e10cSrcweir         ImeStatusWindowMode_UNKNOWN,
139*cdf0e10cSrcweir         ImeStatusWindowMode_HIDE,
140*cdf0e10cSrcweir         ImeStatusWindowMode_SHOW
141*cdf0e10cSrcweir     };
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    mxMSF;
144*cdf0e10cSrcweir     String*                 mpMSFTempFileName;
145*cdf0e10cSrcweir     AllSettings*            mpSettings;         // Application settings
146*cdf0e10cSrcweir 	LocaleConfigurationListener* mpCfgListener;
147*cdf0e10cSrcweir     VclEventListeners*      mpEventListeners;   // listeners for vcl events (eg, extended toolkit)
148*cdf0e10cSrcweir     VclEventListeners*      mpKeyListeners;     // listeners for key events only (eg, extended toolkit)
149*cdf0e10cSrcweir     ImplAccelManager*       mpAccelMgr;         // Accelerator Manager
150*cdf0e10cSrcweir     XubString*              mpAppName;          // Application name
151*cdf0e10cSrcweir     XubString*              mpAppFileName;      // Abs. Application FileName
152*cdf0e10cSrcweir     XubString*              mpDisplayName;      // Application Display Name
153*cdf0e10cSrcweir     String*                 mpFontPath;         // Additional Fontpath
154*cdf0e10cSrcweir     Help*                   mpHelp;             // Application help
155*cdf0e10cSrcweir     PopupMenu*              mpActivePopupMenu;  // Actives Popup-Menu (in Execute)
156*cdf0e10cSrcweir     UniqueIdContainer*      mpUniqueIdCont;     // Fuer Eindeutige Id's
157*cdf0e10cSrcweir     ImplIdleMgr*            mpIdleMgr;          // Idle-Manager
158*cdf0e10cSrcweir     ImplWheelWindow*        mpWheelWindow;      // WheelWindow
159*cdf0e10cSrcweir     ImplHotKey*             mpFirstHotKey;      // HotKey-Verwaltung
160*cdf0e10cSrcweir     ImplEventHook*          mpFirstEventHook;   // Event-Hooks
161*cdf0e10cSrcweir     VclEventListeners2*     mpPostYieldListeners;           // post yield listeners
162*cdf0e10cSrcweir     sal_uLong                   mnLastInputTime;                // GetLastInputTime()
163*cdf0e10cSrcweir     sal_uInt16                  mnDispatchLevel;                // DispatchLevel
164*cdf0e10cSrcweir     sal_uInt16                  mnModalMode;                    // ModalMode Count
165*cdf0e10cSrcweir     sal_uInt16                  mnModalDialog;                  // ModalDialog Count
166*cdf0e10cSrcweir     sal_uInt16                  mnAccessCount;                  // AccessHdl Count
167*cdf0e10cSrcweir     sal_uInt16                  mnSysWinMode;                   // Modus, wann SystemWindows erzeugt werden sollen
168*cdf0e10cSrcweir     sal_uInt16                  mnLayout;                       // --- RTL-Flags --- currently not used, only for testing
169*cdf0e10cSrcweir     short                   mnDialogScaleX;                 // Scale X-Positions and sizes in Dialogs
170*cdf0e10cSrcweir     sal_Bool                    mbInAppMain;                    // is Application::Main() on stack
171*cdf0e10cSrcweir     sal_Bool                    mbInAppExecute;                 // is Application::Execute() on stack
172*cdf0e10cSrcweir     sal_Bool                    mbAppQuit;                      // is Application::Quit() called
173*cdf0e10cSrcweir     sal_Bool                    mbSettingsInit;                 // sal_True: Settings are initialized
174*cdf0e10cSrcweir     sal_Bool                    mbDialogCancel;                 // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
175*cdf0e10cSrcweir     sal_Bool                    mbNoYield;                      // Application::Yield will not wait for events if the queue is empty
176*cdf0e10cSrcweir                                                             // essentially that makes it the same as Application::Reschedule
177*cdf0e10cSrcweir     long                    mnDefaultLayoutBorder;          // default value in pixel for layout distances used
178*cdf0e10cSrcweir                                                             // in window arrangers
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir     /** Controls whether showing any IME status window is toggled on or off.
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir         Only meaningful if showing IME status windows can be toggled on and off
183*cdf0e10cSrcweir         externally (see Application::CanToggleImeStatusWindow).
184*cdf0e10cSrcweir      */
185*cdf0e10cSrcweir     ImeStatusWindowMode meShowImeStatusWindow;
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir                             DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* );
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir };
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir // -----------------
193*cdf0e10cSrcweir // - ImplSVGDIData -
194*cdf0e10cSrcweir // -----------------
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir struct ImplSVGDIData
197*cdf0e10cSrcweir {
198*cdf0e10cSrcweir     OutputDevice*           mpFirstWinGraphics; // First OutputDevice with a Frame Graphics
199*cdf0e10cSrcweir     OutputDevice*           mpLastWinGraphics;  // Last OutputDevice with a Frame Graphics
200*cdf0e10cSrcweir     OutputDevice*           mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics
201*cdf0e10cSrcweir     OutputDevice*           mpLastVirGraphics;  // Last OutputDevice with a VirtualDevice Graphics
202*cdf0e10cSrcweir     OutputDevice*           mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics
203*cdf0e10cSrcweir     OutputDevice*           mpLastPrnGraphics;  // Last OutputDevice with a InfoPrinter Graphics
204*cdf0e10cSrcweir     VirtualDevice*          mpFirstVirDev;      // First VirtualDevice
205*cdf0e10cSrcweir     VirtualDevice*          mpLastVirDev;       // Last VirtualDevice
206*cdf0e10cSrcweir     Printer*                mpFirstPrinter;     // First Printer
207*cdf0e10cSrcweir     Printer*                mpLastPrinter;      // Last Printer
208*cdf0e10cSrcweir     ImplPrnQueueList*       mpPrinterQueueList; // List of all printer queue
209*cdf0e10cSrcweir     ImplDevFontList*        mpScreenFontList;   // Screen-Font-List
210*cdf0e10cSrcweir     ImplFontCache*          mpScreenFontCache;  // Screen-Font-Cache
211*cdf0e10cSrcweir     ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts
212*cdf0e10cSrcweir     GraphicConverter*       mpGrfConverter;     // Converter for graphics
213*cdf0e10cSrcweir     long                    mnRealAppFontX;     // AppFont X-Numenator for 40/tel Width
214*cdf0e10cSrcweir     long                    mnAppFontX;         // AppFont X-Numenator for 40/tel Width + DialogScaleX
215*cdf0e10cSrcweir     long                    mnAppFontY;         // AppFont Y-Numenator for 80/tel Height
216*cdf0e10cSrcweir     sal_Bool                    mbFontSubChanged;   // sal_True: FontSubstitution wurde zwischen Begin/End geaendert
217*cdf0e10cSrcweir     utl::DefaultFontConfiguration* mpDefaultFontConfiguration;
218*cdf0e10cSrcweir     utl::FontSubstConfiguration* mpFontSubstConfiguration;
219*cdf0e10cSrcweir     bool                    mbNativeFontConfig; // true: do not override UI font
220*cdf0e10cSrcweir     bool                    mbNoXORClipping;    // true: do not use XOR to achieve clipping effects
221*cdf0e10cSrcweir };
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir // -----------------
225*cdf0e10cSrcweir // - ImplSVWinData -
226*cdf0e10cSrcweir // -----------------
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir struct ImplSVWinData
229*cdf0e10cSrcweir {
230*cdf0e10cSrcweir     Window*                 mpFirstFrame;       // First FrameWindow
231*cdf0e10cSrcweir     Window*                 mpDefDialogParent;  // Default Dialog Parent
232*cdf0e10cSrcweir     WorkWindow*             mpAppWin;           // Application-Window
233*cdf0e10cSrcweir     Window*                 mpFocusWin;         // window, that has the focus
234*cdf0e10cSrcweir     Window*                 mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
235*cdf0e10cSrcweir     Window*                 mpCaptureWin;       // window, that has the mouse capture
236*cdf0e10cSrcweir     Window*                 mpLastDeacWin;      // Window, that need a deactivate (FloatingWindow-Handling)
237*cdf0e10cSrcweir     DbgWindow*              mpDbgWin;           // debug window
238*cdf0e10cSrcweir     FloatingWindow*         mpFirstFloat;       // First FloatingWindow in PopupMode
239*cdf0e10cSrcweir     Dialog*                 mpLastExecuteDlg;   // Erster Dialog, der sich in Execute befindet
240*cdf0e10cSrcweir     Window*                 mpExtTextInputWin;  // Window, which is in ExtTextInput
241*cdf0e10cSrcweir     Window*                 mpTrackWin;         // window, that is in tracking mode
242*cdf0e10cSrcweir     AutoTimer*              mpTrackTimer;       // tracking timer
243*cdf0e10cSrcweir     ImageList*              mpMsgBoxImgList;    // ImageList for MessageBox
244*cdf0e10cSrcweir     ImageList*              mpMsgBoxHCImgList;  // ImageList for MessageBox (high contrast mode)
245*cdf0e10cSrcweir     Window*                 mpAutoScrollWin;    // window, that is in AutoScrollMode mode
246*cdf0e10cSrcweir     sal_uInt16                  mnTrackFlags;       // tracking flags
247*cdf0e10cSrcweir     sal_uInt16                  mnAutoScrollFlags;  // auto scroll flags
248*cdf0e10cSrcweir     sal_Bool                    mbNoDeactivate;     // sal_True: keine Deactivate durchfuehren
249*cdf0e10cSrcweir 	sal_Bool					mbNoSaveFocus;		// sal_True: menues must not save/restore focus
250*cdf0e10cSrcweir     sal_Bool                    mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant
251*cdf0e10cSrcweir };
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir // ------------------
255*cdf0e10cSrcweir // - ImplSVCtrlData -
256*cdf0e10cSrcweir // ------------------
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList;
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir struct ImplSVCtrlData
261*cdf0e10cSrcweir {
262*cdf0e10cSrcweir     ImageList*              mpCheckImgList;     // ImageList for CheckBoxes
263*cdf0e10cSrcweir     ImageList*              mpRadioImgList;     // ImageList for RadioButtons
264*cdf0e10cSrcweir     ImageList*              mpPinImgList;       // ImageList for PIN
265*cdf0e10cSrcweir     ImageList*              mpSplitHPinImgList; // ImageList for Horizontale SplitWindows
266*cdf0e10cSrcweir     ImageList*              mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's)
267*cdf0e10cSrcweir     ImageList*              mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows)
268*cdf0e10cSrcweir     ImageList*              mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows)
269*cdf0e10cSrcweir     Image*                  mpDisclosurePlus;
270*cdf0e10cSrcweir     Image*                  mpDisclosurePlusHC;
271*cdf0e10cSrcweir     Image*                  mpDisclosureMinus;
272*cdf0e10cSrcweir     Image*                  mpDisclosureMinusHC;
273*cdf0e10cSrcweir     ImplTBDragMgr*          mpTBDragMgr;        // DragMgr for ToolBox
274*cdf0e10cSrcweir     sal_uInt16                  mnCheckStyle;       // CheckBox-Style for ImageList-Update
275*cdf0e10cSrcweir     sal_uInt16                  mnRadioStyle;       // Radio-Style for ImageList-Update
276*cdf0e10cSrcweir     sal_uLong                   mnLastCheckFColor;  // Letzte FaceColor fuer CheckImage
277*cdf0e10cSrcweir     sal_uLong                   mnLastCheckWColor;  // Letzte WindowColor fuer CheckImage
278*cdf0e10cSrcweir     sal_uLong                   mnLastCheckWTextColor;  // Letzte WindowTextColor fuer CheckImage
279*cdf0e10cSrcweir     sal_uLong                   mnLastCheckLColor;  // Letzte LightColor fuer CheckImage
280*cdf0e10cSrcweir     sal_uLong                   mnLastRadioFColor;  // Letzte FaceColor fuer RadioImage
281*cdf0e10cSrcweir     sal_uLong                   mnLastRadioWColor;  // Letzte WindowColor fuer RadioImage
282*cdf0e10cSrcweir     sal_uLong                   mnLastRadioLColor;  // Letzte LightColor fuer RadioImage
283*cdf0e10cSrcweir     FieldUnitStringList*    mpFieldUnitStrings; // list with field units
284*cdf0e10cSrcweir     FieldUnitStringList*    mpCleanUnitStrings; // same list but with some "fluff" like spaces removed
285*cdf0e10cSrcweir };
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir // ------------------
289*cdf0e10cSrcweir // - ImplSVHelpData -
290*cdf0e10cSrcweir // ------------------
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir struct ImplSVHelpData
293*cdf0e10cSrcweir {
294*cdf0e10cSrcweir     sal_Bool                    mbContextHelp       : 1;    // is ContextHelp enabled
295*cdf0e10cSrcweir     sal_Bool                    mbExtHelp           : 1;    // is ExtendedHelp enabled
296*cdf0e10cSrcweir     sal_Bool                    mbExtHelpMode       : 1;    // is in ExtendedHelp Mode
297*cdf0e10cSrcweir     sal_Bool                    mbOldBalloonMode    : 1;    // BallonMode, befor ExtHelpMode started
298*cdf0e10cSrcweir     sal_Bool                    mbBalloonHelp       : 1;    // is BalloonHelp enabled
299*cdf0e10cSrcweir     sal_Bool                    mbQuickHelp         : 1;    // is QuickHelp enabled
300*cdf0e10cSrcweir     sal_Bool                    mbSetKeyboardHelp   : 1;    // tiphelp was activated by keyboard
301*cdf0e10cSrcweir     sal_Bool                    mbKeyboardHelp      : 1;    // tiphelp was activated by keyboard
302*cdf0e10cSrcweir     sal_Bool                    mbAutoHelpId        : 1;    // generate HelpIds
303*cdf0e10cSrcweir     sal_Bool                    mbRequestingHelp    : 1;    // In Window::RequestHelp
304*cdf0e10cSrcweir     HelpTextWindow*         mpHelpWin;                  // HelpWindow
305*cdf0e10cSrcweir     sal_uLong                   mnLastHelpHideTime;         // ticks of last show
306*cdf0e10cSrcweir };
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir struct ImplSVNWFData
309*cdf0e10cSrcweir {
310*cdf0e10cSrcweir     bool                    mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme
311*cdf0e10cSrcweir     bool                    mbDockingAreaSeparateTB;      // individual toolbar backgrounds
312*cdf0e10cSrcweir                                                           // instead of one for docking area
313*cdf0e10cSrcweir     bool                    mbToolboxDropDownSeparate;    // two adjacent buttons for
314*cdf0e10cSrcweir                                                           // toolbox dropdown buttons
315*cdf0e10cSrcweir     int                     mnMenuFormatExtraBorder;      // inner popup menu border
316*cdf0e10cSrcweir     bool                    mbFlatMenu;                   // no popup 3D border
317*cdf0e10cSrcweir     Color                   maMenuBarHighlightTextColor;  // override higlight text color
318*cdf0e10cSrcweir                                                           // in menubar if not transparent
319*cdf0e10cSrcweir     bool                    mbOpenMenuOnF10;              // on gnome the first menu opens on F10
320*cdf0e10cSrcweir     bool                    mbNoFocusRects;               // on Aqua focus rects are not used
321*cdf0e10cSrcweir     bool                    mbNoBoldTabFocus;             // on Aqua and Gnome the focused tab has not bold text
322*cdf0e10cSrcweir     bool                    mbCenteredTabs;               // on Aqua, tabs are centered
323*cdf0e10cSrcweir     bool                    mbNoActiveTabTextRaise;       // on Aqua the text for the selected tab
324*cdf0e10cSrcweir                                                           // should not "jump up" a pixel
325*cdf0e10cSrcweir     bool                    mbProgressNeedsErase;         // set true for platforms that should draw the
326*cdf0e10cSrcweir                                                           // window background before drawing the native
327*cdf0e10cSrcweir                                                           // progress bar
328*cdf0e10cSrcweir     bool                    mbCheckBoxNeedsErase;         // set true for platforms that should draw the
329*cdf0e10cSrcweir                                                           // window background before drawing the native
330*cdf0e10cSrcweir                                                           // checkbox
331*cdf0e10cSrcweir     bool                    mbScrollbarJumpPage;          // true for "jump to here" behavior
332*cdf0e10cSrcweir     int                     mnStatusBarLowerRightOffset;  // amount in pixel to avoid in the lower righthand corner
333*cdf0e10cSrcweir     bool                    mbCanDrawWidgetAnySize;       // set to true currently on gtk
334*cdf0e10cSrcweir };
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir // --------------
338*cdf0e10cSrcweir // - ImplSVData -
339*cdf0e10cSrcweir // --------------
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir struct ImplSVData
342*cdf0e10cSrcweir {
343*cdf0e10cSrcweir     void*                   mpSalData;          // SalData
344*cdf0e10cSrcweir     SalInstance*            mpDefInst;          // Default SalInstance
345*cdf0e10cSrcweir     Application*            mpApp;              // pApp
346*cdf0e10cSrcweir     WorkWindow*             mpDefaultWin;       // Default-Window
347*cdf0e10cSrcweir     sal_Bool                    mbDeInit;             // Is VCL deinitializing
348*cdf0e10cSrcweir     sal_uLong                   mnThreadCount;      // is VCL MultiThread enabled
349*cdf0e10cSrcweir     ImplConfigData*         mpFirstConfigData;  // Zeiger auf ersten Config-Block
350*cdf0e10cSrcweir     ImplTimerData*          mpFirstTimerData;   // list of all running timers
351*cdf0e10cSrcweir     SalTimer*				mpSalTimer;			// interface to sal event loop/timers
352*cdf0e10cSrcweir     SalI18NImeStatus*		mpImeStatus;		// interface to ime status window
353*cdf0e10cSrcweir     SalSystem*				mpSalSystem;		// SalSystem interface
354*cdf0e10cSrcweir     ResMgr*                 mpResMgr;           // SV-Resource-Manager
355*cdf0e10cSrcweir     sal_uLong                   mnTimerPeriod;      // current timer period
356*cdf0e10cSrcweir     sal_uLong                   mnTimerUpdate;      // TimerCallbackProcs on stack
357*cdf0e10cSrcweir     sal_Bool                    mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden
358*cdf0e10cSrcweir     sal_Bool                    mbNoCallTimer;      // sal_True: No Timeout calls
359*cdf0e10cSrcweir     ImplSVAppData           maAppData;          // indepen data for class Application
360*cdf0e10cSrcweir     ImplSVGDIData           maGDIData;          // indepen data for Output classes
361*cdf0e10cSrcweir     ImplSVWinData           maWinData;          // indepen data for Windows classes
362*cdf0e10cSrcweir     ImplSVCtrlData          maCtrlData;         // indepen data for Control classes
363*cdf0e10cSrcweir     ImplSVHelpData          maHelpData;         // indepen data for Help classes
364*cdf0e10cSrcweir     ImplSVNWFData           maNWFData;
365*cdf0e10cSrcweir     UnoWrapperBase*         mpUnoWrapper;
366*cdf0e10cSrcweir     Window*                 mpIntroWindow;      // the splash screen
367*cdf0e10cSrcweir     DockingManager*         mpDockingManager;
368*cdf0e10cSrcweir     sal_Bool                    mbIsTestTool;
369*cdf0e10cSrcweir 
370*cdf0e10cSrcweir     vos::OThread::TThreadIdentifier                     mnMainThreadId;
371*cdf0e10cSrcweir     rtl::Reference< vcl::DisplayConnection >            mxDisplayConnection;
372*cdf0e10cSrcweir 
373*cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge;
374*cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient;
375*cdf0e10cSrcweir     ::vcl::SettingsConfigItem*			mpSettingsConfigItem;
376*cdf0e10cSrcweir     std::list< vcl::DeleteOnDeinitBase* >*   mpDeinitDeleteList;
377*cdf0e10cSrcweir     std::hash_map< int, rtl::OUString >*     mpPaperNames;
378*cdf0e10cSrcweir };
379*cdf0e10cSrcweir 
380*cdf0e10cSrcweir void        ImplInitSVData();
381*cdf0e10cSrcweir void        ImplDeInitSVData();
382*cdf0e10cSrcweir void        ImplDestroySVData();
383*cdf0e10cSrcweir Window*     ImplGetDefaultWindow();
384*cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResMgr*     ImplGetResMgr();
385*cdf0e10cSrcweir VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
386*cdf0e10cSrcweir DockingManager*     ImplGetDockingManager();
387*cdf0e10cSrcweir void        ImplWindowAutoMnemonic( Window* pWindow );
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir void        ImplUpdateSystemProcessWindow();
390*cdf0e10cSrcweir Window*     ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
391*cdf0e10cSrcweir 
392*cdf0e10cSrcweir // SVAPP.CXX
393*cdf0e10cSrcweir sal_Bool        ImplCallHotKey( const KeyCode& rKeyCode );
394*cdf0e10cSrcweir void        ImplFreeHotKeyData();
395*cdf0e10cSrcweir void        ImplFreeEventHookData();
396*cdf0e10cSrcweir 
397*cdf0e10cSrcweir // WINPROC.CXX
398*cdf0e10cSrcweir long        ImplCallPreNotify( NotifyEvent& rEvt );
399*cdf0e10cSrcweir long        ImplCallEvent( NotifyEvent& rEvt );
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
402*cdf0e10cSrcweir inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
403*cdf0e10cSrcweir inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
404*cdf0e10cSrcweir 
405*cdf0e10cSrcweir bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
406*cdf0e10cSrcweir 
407*cdf0e10cSrcweir FieldUnitStringList* ImplGetFieldUnits();
408*cdf0e10cSrcweir FieldUnitStringList* ImplGetCleanedFieldUnits();
409*cdf0e10cSrcweir 
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir // -----------------------------------------------------------------------
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir // -----------------
414*cdf0e10cSrcweir // - ImplSVEmpyStr -
415*cdf0e10cSrcweir // -----------------
416*cdf0e10cSrcweir 
417*cdf0e10cSrcweir // Empty-SV-String
418*cdf0e10cSrcweir 
419*cdf0e10cSrcweir inline const String& ImplGetSVEmptyStr()
420*cdf0e10cSrcweir     { return String::EmptyString(); }
421*cdf0e10cSrcweir inline const ByteString& ImplGetSVEmptyByteStr()
422*cdf0e10cSrcweir     { return ByteString::EmptyString(); }
423*cdf0e10cSrcweir 
424*cdf0e10cSrcweir // -----------------------------------------------------------------------
425*cdf0e10cSrcweir 
426*cdf0e10cSrcweir // ----------------------
427*cdf0e10cSrcweir // - struct ImplDelData -
428*cdf0e10cSrcweir // ----------------------
429*cdf0e10cSrcweir // ImplDelData is used as a "dog tag" by a window when it
430*cdf0e10cSrcweir // does something that could indirectly destroy the window
431*cdf0e10cSrcweir // TODO: wild destruction of a window should not be possible
432*cdf0e10cSrcweir 
433*cdf0e10cSrcweir struct ImplDelData
434*cdf0e10cSrcweir {
435*cdf0e10cSrcweir     ImplDelData*    mpNext;
436*cdf0e10cSrcweir     const Window*   mpWindow;
437*cdf0e10cSrcweir     sal_Bool            mbDel;
438*cdf0e10cSrcweir 
439*cdf0e10cSrcweir                     ImplDelData( const Window* pWindow = NULL )
440*cdf0e10cSrcweir                     : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False )
441*cdf0e10cSrcweir                     { if( pWindow ) AttachToWindow( pWindow ); }
442*cdf0e10cSrcweir 
443*cdf0e10cSrcweir     virtual         ~ImplDelData();
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir     bool            IsDead() const
446*cdf0e10cSrcweir     {
447*cdf0e10cSrcweir         DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" );
448*cdf0e10cSrcweir         return (mbDel!=sal_False);
449*cdf0e10cSrcweir     }
450*cdf0e10cSrcweir     sal_Bool /*deprecated */IsDelete() const { return (sal_Bool)IsDead(); }
451*cdf0e10cSrcweir 
452*cdf0e10cSrcweir private:
453*cdf0e10cSrcweir     void            AttachToWindow( const Window* );
454*cdf0e10cSrcweir };
455*cdf0e10cSrcweir 
456*cdf0e10cSrcweir // ---------------
457*cdf0e10cSrcweir // - ImplSVEvent -
458*cdf0e10cSrcweir // ---------------
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir struct ImplSVEvent
461*cdf0e10cSrcweir {
462*cdf0e10cSrcweir     sal_uLong               mnEvent;
463*cdf0e10cSrcweir     void*               mpData;
464*cdf0e10cSrcweir     Link*               mpLink;
465*cdf0e10cSrcweir     Window*             mpWindow;
466*cdf0e10cSrcweir     ImplDelData         maDelData;
467*cdf0e10cSrcweir     sal_Bool                mbCall;
468*cdf0e10cSrcweir };
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir #endif  // _SV_SVDATA_HXX
471