merge the formfield patch from ooo-build
[ooovba.git] / basic / source / app / appbased.hxx
blobf12b8052404219012aebf4f839596a03a3d1de31
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: appbased.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
31 #ifndef _APPBASED_HXX
32 #define _APPBASED_HXX
34 #include <basic/sbmod.hxx>
35 #ifndef _SB_APPEDIT_HXX
36 #include "appedit.hxx"
37 #endif
38 #ifndef _SB_TEXTEDIT_HXX
39 #include "textedit.hxx"
40 #endif
42 class BasicFrame;
43 class BreakpointWindow;
45 class AppBasEd : public AppEdit { // Editor-Window:
46 using DockingWindow::Notify;
48 SbModuleRef pMod; // compile module
49 BOOL bCompiled; // TRUE if compiled
50 protected:
51 DECL_LINK( EditChange, void * );
52 #define BREAKPOINTSWIDTH 15
53 BreakpointWindow *pBreakpoints;
54 virtual USHORT ImplSave(); // Save file
56 public:
57 TYPEINFO();
58 AppBasEd( BasicFrame*, SbModule* );
59 ~AppBasEd();
60 FileType GetFileType(); // Returns Filetype
61 SbModule* GetModule() { return pMod; }
62 long InitMenu( Menu* ); // Initialision of the menus
63 virtual long DeInitMenu( Menu* ); // Reset to enable all shortcuts
64 virtual void Command( const CommandEvent& rCEvt ); // Command handler
65 virtual void Resize(); // Includes the breakpoint bar
66 virtual void PostLoad(); // Set source of module
67 virtual void PostSaveAs(); // Postprocess of module...
68 void Reload();
69 void LoadSource(); // Load source for object
70 BOOL Compile(); // Compile text
71 void Run(); // Run image
72 void Disassemble(); // Disassemble image
73 const String& GetModName() const { return pMod->GetName(); }
74 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
77 #endif