merge the formfield patch from ooo-build
[ooovba.git] / automation / source / miniapp / testapp.hxx
blobac545ab1b8a18f166eb28b28b5a3c3d6da049817
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: testapp.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _TESTAPP_HXX
31 #define _TESTAPP_HXX
33 #include <vcl/svapp.hxx>
34 #ifndef _DIALOG_HXX //autogen
35 #include <vcl/dialog.hxx>
36 #endif
37 #ifndef _BUTTON_HXX //autogen
38 #include <vcl/button.hxx>
39 #endif
40 #ifndef _FIELD_HXX //autogen
41 #include <vcl/field.hxx>
42 #endif
43 #ifndef _EDIT_HXX //autogen
44 #include <vcl/edit.hxx>
45 #endif
46 #ifndef _GROUP_HXX //autogen
47 #include <vcl/group.hxx>
48 #endif
49 #ifndef _COMBOBOX_HXX //autogen
50 #include <vcl/combobox.hxx>
51 #endif
52 #ifndef _FIXED_HXX //autogen
53 #include <vcl/fixed.hxx>
54 #endif
55 #ifndef _MENU_HXX //autogen
56 #include <vcl/menu.hxx>
57 #endif
58 #ifndef _WRKWIN_HXX //autogen
59 #include <vcl/wrkwin.hxx>
60 #endif
61 #include <svtools/poolitem.hxx>
64 #include "editwin.hxx"
67 #define EXECUTE_NO 0
68 #define EXECUTE_POSSIBLE 1
69 #define EXECUTE_YES 2
70 #define EXECUTEMODE_ASYNCHRON 1
71 #define EXECUTEMODE_DIALOGASYNCHRON 2
74 class MyApp;
75 class MainWindow : public WorkWindow
77 MyApp *pApp;
79 public:
80 MainWindow(MyApp *pAppl);
81 virtual BOOL Close(); // derived
83 void FileExit();
84 void FileOpen();
85 void TestGross();
86 void Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent);
87 void WinTree();
88 void SysDlg();
89 DECL_LINK(MenuSelectHdl,MenuBar*);
92 #define PlugInDispatcher MyDispatcher
93 class MyDispatcher
95 MainWindow *pMainWin;
97 public:
98 MyDispatcher(MainWindow *MainWin) : pMainWin(MainWin) {};
99 virtual ~MyDispatcher() {};
100 virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = 0, USHORT nMode = 0);
101 virtual void SetExecuteMode( USHORT nMode )
103 (void) nMode; /* avoid warning about unused parameter */
104 }; // Ist hier sowieso egal
107 class MyApp : public Application
109 PopupMenu *MyMenu;
110 Timer aCommandTimer;
111 PlugInDispatcher *pMyDispatcher;
113 public:
114 MyApp();
115 void Main();
117 virtual void Property( ApplicationProperty& );
118 virtual PlugInDispatcher* GetDispatcher();
120 MainWindow *pMainWin;
123 // -----------------------------------------------------------------------
125 extern MyApp aApp;
127 #endif