1*96821c26SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*96821c26SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*96821c26SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*96821c26SAndrew Rist * distributed with this work for additional information 6*96821c26SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*96821c26SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*96821c26SAndrew Rist * "License"); you may not use this file except in compliance 9*96821c26SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*96821c26SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*96821c26SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*96821c26SAndrew Rist * software distributed under the License is distributed on an 15*96821c26SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*96821c26SAndrew Rist * KIND, either express or implied. See the License for the 17*96821c26SAndrew Rist * specific language governing permissions and limitations 18*96821c26SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*96821c26SAndrew Rist *************************************************************/ 21*96821c26SAndrew Rist 22*96821c26SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _BASIDE2_HXX 25cdf0e10cSrcweir #define _BASIDE2_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svheader.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <bastypes.hxx> 30cdf0e10cSrcweir #include <bastype3.hxx> 31cdf0e10cSrcweir #include <basidesh.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir class ExtTextEngine; 34cdf0e10cSrcweir class ExtTextView; 35cdf0e10cSrcweir class SvxSearchItem; 36cdf0e10cSrcweir #include <svtools/svtabbx.hxx> 37cdf0e10cSrcweir #include <svtools/headbar.hxx> 38cdf0e10cSrcweir 39cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen 40cdf0e10cSrcweir #include <vcl/button.hxx> 41cdf0e10cSrcweir #endif 42cdf0e10cSrcweir #include <basic/sbmod.hxx> 43cdf0e10cSrcweir #include <vcl/split.hxx> 44cdf0e10cSrcweir #include "svl/lstner.hxx" 45cdf0e10cSrcweir #include <svtools/colorcfg.hxx> 46cdf0e10cSrcweir 47cdf0e10cSrcweir #include <sfx2/progress.hxx> 48cdf0e10cSrcweir #include <svtools/syntaxhighlight.hxx> 49cdf0e10cSrcweir 50cdf0e10cSrcweir DBG_NAMEEX( ModulWindow ) 51cdf0e10cSrcweir 52cdf0e10cSrcweir #define MARKER_NOMARKER 0xFFFF 53cdf0e10cSrcweir 54cdf0e10cSrcweir namespace utl 55cdf0e10cSrcweir { 56cdf0e10cSrcweir class SourceViewConfig; 57cdf0e10cSrcweir } 58cdf0e10cSrcweir 59cdf0e10cSrcweir // #108672 Helper functions to get/set text in TextEngine 60cdf0e10cSrcweir // using the stream interface (get/setText() only supports 61cdf0e10cSrcweir // tools Strings limited to 64K). 62cdf0e10cSrcweir ::rtl::OUString getTextEngineText( ExtTextEngine* pEngine ); 63cdf0e10cSrcweir void setTextEngineText( ExtTextEngine* pEngine, const ::rtl::OUString aStr ); 64cdf0e10cSrcweir 65cdf0e10cSrcweir class ProgressInfo : public SfxProgress 66cdf0e10cSrcweir { 67cdf0e10cSrcweir private: 68cdf0e10cSrcweir sal_uLong nCurState; 69cdf0e10cSrcweir 70cdf0e10cSrcweir public: 71cdf0e10cSrcweir 72cdf0e10cSrcweir inline ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange ); 73cdf0e10cSrcweir 74cdf0e10cSrcweir // inline void StartProgress( const String& rName, sal_uLong nStates ); 75cdf0e10cSrcweir // inline void EndProgress(); 76cdf0e10cSrcweir inline void StepProgress(); 77cdf0e10cSrcweir }; 78cdf0e10cSrcweir 79cdf0e10cSrcweir inline ProgressInfo::ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange ) 80cdf0e10cSrcweir : SfxProgress( pObjSh, rText, nRange ) 81cdf0e10cSrcweir { 82cdf0e10cSrcweir nCurState = 0; 83cdf0e10cSrcweir } 84cdf0e10cSrcweir 85cdf0e10cSrcweir // inline void ProgressInfo::StartProgress( const String& rName, sal_uLong nStates ) 86cdf0e10cSrcweir // { 87cdf0e10cSrcweir // nCurState = 0; 88cdf0e10cSrcweir // if ( pStbMgr ) 89cdf0e10cSrcweir // pStbMgr->StartProgressMode( rName, nStates ); 90cdf0e10cSrcweir // } 91cdf0e10cSrcweir 92cdf0e10cSrcweir // inline void ProgressInfo::EndProgress() 93cdf0e10cSrcweir // { 94cdf0e10cSrcweir // if ( pStbMgr ) 95cdf0e10cSrcweir // pStbMgr->EndProgressMode(); 96cdf0e10cSrcweir //} 97cdf0e10cSrcweir 98cdf0e10cSrcweir inline void ProgressInfo::StepProgress() 99cdf0e10cSrcweir { 100cdf0e10cSrcweir SetState( ++nCurState ); 101cdf0e10cSrcweir } 102cdf0e10cSrcweir 103cdf0e10cSrcweir 104cdf0e10cSrcweir namespace svt { 105cdf0e10cSrcweir class SourceViewConfig; 106cdf0e10cSrcweir } 107cdf0e10cSrcweir 108cdf0e10cSrcweir class EditorWindow : public Window, public SfxListener, public utl::ConfigurationListener 109cdf0e10cSrcweir { 110cdf0e10cSrcweir private: 111cdf0e10cSrcweir ExtTextView* pEditView; 112cdf0e10cSrcweir ExtTextEngine* pEditEngine; 113cdf0e10cSrcweir 114cdf0e10cSrcweir utl::SourceViewConfig* pSourceViewConfig; 115cdf0e10cSrcweir 116cdf0e10cSrcweir long nCurTextWidth; 117cdf0e10cSrcweir 118cdf0e10cSrcweir SyntaxHighlighter aHighlighter; 119cdf0e10cSrcweir Timer aSyntaxIdleTimer; 120cdf0e10cSrcweir Table aSyntaxLineTable; 121cdf0e10cSrcweir DECL_LINK( SyntaxTimerHdl, Timer * ); 122cdf0e10cSrcweir ProgressInfo* pProgress; 123cdf0e10cSrcweir ModulWindow* pModulWindow; 124cdf0e10cSrcweir 125cdf0e10cSrcweir virtual void DataChanged(DataChangedEvent const & rDCEvt); 126cdf0e10cSrcweir 127cdf0e10cSrcweir using Window::Notify; 128cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 129cdf0e10cSrcweir 130cdf0e10cSrcweir void ImpDoHighlight( sal_uLong nLineOff ); 131cdf0e10cSrcweir void ImplSetFont(); 132cdf0e10cSrcweir 133cdf0e10cSrcweir sal_Bool bHighlightning; 134cdf0e10cSrcweir sal_Bool bDoSyntaxHighlight; 135cdf0e10cSrcweir sal_Bool bDelayHighlight; 136cdf0e10cSrcweir 137cdf0e10cSrcweir virtual 138cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > 139cdf0e10cSrcweir GetComponentInterface(sal_Bool bCreate = sal_True); 140cdf0e10cSrcweir 141cdf0e10cSrcweir protected: 142cdf0e10cSrcweir virtual void Paint( const Rectangle& ); 143cdf0e10cSrcweir virtual void Resize(); 144cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKeyEvt ); 145cdf0e10cSrcweir virtual void MouseMove( const MouseEvent& rMEvt ); 146cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 147cdf0e10cSrcweir virtual void MouseButtonUp( const MouseEvent& rMEvt ); 148cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 149cdf0e10cSrcweir virtual void LoseFocus(); 150cdf0e10cSrcweir virtual void RequestHelp( const HelpEvent& rHEvt ); 151cdf0e10cSrcweir virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); 152cdf0e10cSrcweir 153cdf0e10cSrcweir void DoSyntaxHighlight( sal_uLong nPara ); 154cdf0e10cSrcweir String GetWordAtCursor(); 155cdf0e10cSrcweir sal_Bool ImpCanModify(); 156cdf0e10cSrcweir 157cdf0e10cSrcweir public: 158cdf0e10cSrcweir EditorWindow( Window* pParent ); 159cdf0e10cSrcweir ~EditorWindow(); 160cdf0e10cSrcweir 161cdf0e10cSrcweir ExtTextEngine* GetEditEngine() const { return (ExtTextEngine*)pEditEngine; } 162cdf0e10cSrcweir ExtTextView* GetEditView() const { return pEditView; } 163cdf0e10cSrcweir ProgressInfo* GetProgress() const { return pProgress; } 164cdf0e10cSrcweir 165cdf0e10cSrcweir void CreateProgress( const String& rText, sal_uLong nRange ); 166cdf0e10cSrcweir void DestroyProgress(); 167cdf0e10cSrcweir 168cdf0e10cSrcweir void ParagraphInsertedDeleted( sal_uLong nNewPara, sal_Bool bInserted ); 169cdf0e10cSrcweir void DoDelayedSyntaxHighlight( sal_uLong nPara ); 170cdf0e10cSrcweir 171cdf0e10cSrcweir void CreateEditEngine(); 172cdf0e10cSrcweir void SetScrollBarRanges(); 173cdf0e10cSrcweir void InitScrollBars(); 174cdf0e10cSrcweir void SetModulWindow( ModulWindow* pWin ) 175cdf0e10cSrcweir { pModulWindow = pWin; } 176cdf0e10cSrcweir 177cdf0e10cSrcweir void ForceSyntaxTimeout(); 178cdf0e10cSrcweir sal_Bool SetSourceInBasic( sal_Bool bQuiet = sal_True ); 179cdf0e10cSrcweir 180cdf0e10cSrcweir sal_Bool CanModify() { return ImpCanModify(); } 181cdf0e10cSrcweir }; 182cdf0e10cSrcweir 183cdf0e10cSrcweir 184cdf0e10cSrcweir class BreakPointWindow : public Window 185cdf0e10cSrcweir { 186cdf0e10cSrcweir private: 187cdf0e10cSrcweir long nCurYOffset; 188cdf0e10cSrcweir sal_uInt16 nMarkerPos; 189cdf0e10cSrcweir BreakPointList aBreakPointList; 190cdf0e10cSrcweir ModulWindow* pModulWindow; 191cdf0e10cSrcweir sal_Bool bErrorMarker; 192cdf0e10cSrcweir bool m_bHighContrastMode; 193cdf0e10cSrcweir 194cdf0e10cSrcweir virtual void DataChanged(DataChangedEvent const & rDCEvt); 195cdf0e10cSrcweir 196cdf0e10cSrcweir void setBackgroundColor(Color aColor); 197cdf0e10cSrcweir 198cdf0e10cSrcweir protected: 199cdf0e10cSrcweir virtual void Paint( const Rectangle& ); 200cdf0e10cSrcweir virtual void Resize(); 201cdf0e10cSrcweir BreakPoint* FindBreakPoint( const Point& rMousePos ); 202cdf0e10cSrcweir void ShowMarker( sal_Bool bShow ); 203cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 204cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 205cdf0e10cSrcweir 206cdf0e10cSrcweir sal_Bool SyncYOffset(); 207cdf0e10cSrcweir 208cdf0e10cSrcweir public: 209cdf0e10cSrcweir BreakPointWindow( Window* pParent ); 210cdf0e10cSrcweir ~BreakPointWindow(); 211cdf0e10cSrcweir 212cdf0e10cSrcweir void SetModulWindow( ModulWindow* pWin ) 213cdf0e10cSrcweir { pModulWindow = pWin; } 214cdf0e10cSrcweir 215cdf0e10cSrcweir void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False ); 216cdf0e10cSrcweir 217cdf0e10cSrcweir void DoScroll( long nHorzScroll, long nVertScroll ); 218cdf0e10cSrcweir long& GetCurYOffset() { return nCurYOffset; } 219cdf0e10cSrcweir BreakPointList& GetBreakPoints() { return aBreakPointList; } 220cdf0e10cSrcweir }; 221cdf0e10cSrcweir 222cdf0e10cSrcweir 223cdf0e10cSrcweir class WatchTreeListBox : public SvHeaderTabListBox 224cdf0e10cSrcweir { 225cdf0e10cSrcweir String aEditingRes; 226cdf0e10cSrcweir 227cdf0e10cSrcweir protected: 228cdf0e10cSrcweir virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); 229cdf0e10cSrcweir virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); 230cdf0e10cSrcweir 231cdf0e10cSrcweir sal_Bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ); 232cdf0e10cSrcweir SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement ); 233cdf0e10cSrcweir 234cdf0e10cSrcweir // virtual DragDropMode NotifyBeginDrag( SvLBoxEntry* ); 235cdf0e10cSrcweir // virtual sal_Bool NotifyQueryDrop( SvLBoxEntry* ); 236cdf0e10cSrcweir 237cdf0e10cSrcweir // virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, 238cdf0e10cSrcweir // SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); 239cdf0e10cSrcweir // virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, 240cdf0e10cSrcweir // SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); 241cdf0e10cSrcweir // sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, 242cdf0e10cSrcweir // SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove ); 243cdf0e10cSrcweir 244cdf0e10cSrcweir public: 245cdf0e10cSrcweir WatchTreeListBox( Window* pParent, WinBits nWinBits ); 246cdf0e10cSrcweir ~WatchTreeListBox(); 247cdf0e10cSrcweir 248cdf0e10cSrcweir void RequestingChilds( SvLBoxEntry * pParent ); 249cdf0e10cSrcweir void UpdateWatches( bool bBasicStopped = false ); 250cdf0e10cSrcweir 251cdf0e10cSrcweir using SvTabListBox::SetTabs; 252cdf0e10cSrcweir virtual void SetTabs(); 253cdf0e10cSrcweir }; 254cdf0e10cSrcweir 255cdf0e10cSrcweir 256cdf0e10cSrcweir 257cdf0e10cSrcweir class WatchWindow : public BasicDockingWindow 258cdf0e10cSrcweir { 259cdf0e10cSrcweir private: 260cdf0e10cSrcweir String aWatchStr; 261cdf0e10cSrcweir ExtendedEdit aXEdit; 262cdf0e10cSrcweir ImageButton aRemoveWatchButton; 263cdf0e10cSrcweir WatchTreeListBox aTreeListBox; 264cdf0e10cSrcweir HeaderBar aHeaderBar; 265cdf0e10cSrcweir 266cdf0e10cSrcweir protected: 267cdf0e10cSrcweir virtual void Resize(); 268cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 269cdf0e10cSrcweir 270cdf0e10cSrcweir DECL_LINK( ButtonHdl, ImageButton * ); 271cdf0e10cSrcweir DECL_LINK( TreeListHdl, SvTreeListBox * ); 272cdf0e10cSrcweir DECL_LINK( implEndDragHdl, HeaderBar * ); 273cdf0e10cSrcweir DECL_LINK( EditAccHdl, Accelerator * ); 274cdf0e10cSrcweir 275cdf0e10cSrcweir 276cdf0e10cSrcweir public: 277cdf0e10cSrcweir WatchWindow( Window* pParent ); 278cdf0e10cSrcweir ~WatchWindow(); 279cdf0e10cSrcweir 280cdf0e10cSrcweir void AddWatch( const String& rVName ); 281cdf0e10cSrcweir sal_Bool RemoveSelectedWatch(); 282cdf0e10cSrcweir void UpdateWatches( bool bBasicStopped = false ); 283cdf0e10cSrcweir 284cdf0e10cSrcweir WatchTreeListBox& GetWatchTreeListBox() { return aTreeListBox; } 285cdf0e10cSrcweir }; 286cdf0e10cSrcweir 287cdf0e10cSrcweir 288cdf0e10cSrcweir class StackWindow : public BasicDockingWindow 289cdf0e10cSrcweir { 290cdf0e10cSrcweir private: 291cdf0e10cSrcweir SvTreeListBox aTreeListBox; 292cdf0e10cSrcweir ImageButton aGotoCallButton; 293cdf0e10cSrcweir String aStackStr; 294cdf0e10cSrcweir 295cdf0e10cSrcweir protected: 296cdf0e10cSrcweir virtual void Resize(); 297cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 298cdf0e10cSrcweir DECL_LINK( ButtonHdl, ImageButton * ); 299cdf0e10cSrcweir 300cdf0e10cSrcweir public: 301cdf0e10cSrcweir StackWindow( Window* pParent ); 302cdf0e10cSrcweir ~StackWindow(); 303cdf0e10cSrcweir 304cdf0e10cSrcweir void UpdateCalls(); 305cdf0e10cSrcweir }; 306cdf0e10cSrcweir 307cdf0e10cSrcweir 308cdf0e10cSrcweir class ComplexEditorWindow : public Window 309cdf0e10cSrcweir { 310cdf0e10cSrcweir private: 311cdf0e10cSrcweir BreakPointWindow aBrkWindow; 312cdf0e10cSrcweir EditorWindow aEdtWindow; 313cdf0e10cSrcweir ScrollBar aEWVScrollBar; 314cdf0e10cSrcweir 315cdf0e10cSrcweir virtual void DataChanged(DataChangedEvent const & rDCEvt); 316cdf0e10cSrcweir 317cdf0e10cSrcweir protected: 318cdf0e10cSrcweir virtual void Resize(); 319cdf0e10cSrcweir DECL_LINK( ScrollHdl, ScrollBar * ); 320cdf0e10cSrcweir 321cdf0e10cSrcweir public: 322cdf0e10cSrcweir ComplexEditorWindow( ModulWindow* pParent ); 323cdf0e10cSrcweir 324cdf0e10cSrcweir BreakPointWindow& GetBrkWindow() { return aBrkWindow; } 325cdf0e10cSrcweir EditorWindow& GetEdtWindow() { return aEdtWindow; } 326cdf0e10cSrcweir ScrollBar& GetEWVScrollBar() { return aEWVScrollBar; } 327cdf0e10cSrcweir }; 328cdf0e10cSrcweir 329cdf0e10cSrcweir 330cdf0e10cSrcweir #define SYNTAX_COLOR_MAX 5 331cdf0e10cSrcweir 332cdf0e10cSrcweir class ModulWindow: public IDEBaseWindow 333cdf0e10cSrcweir { 334cdf0e10cSrcweir friend class BasicIDEShell; 335cdf0e10cSrcweir 336cdf0e10cSrcweir private: 337cdf0e10cSrcweir StarBASICRef xBasic; 338cdf0e10cSrcweir short nValid; 339cdf0e10cSrcweir ComplexEditorWindow aXEditorWindow; 340cdf0e10cSrcweir BasicStatus aStatus; 341cdf0e10cSrcweir SbModuleRef xModule; 342cdf0e10cSrcweir ModulWindowLayout* pLayout; 343cdf0e10cSrcweir String aCurPath; 344cdf0e10cSrcweir ::rtl::OUString m_aModule; 345cdf0e10cSrcweir 346cdf0e10cSrcweir DECL_LINK( BasicErrorHdl, StarBASIC * ); 347cdf0e10cSrcweir long BasicBreakHdl( StarBASIC* pBasic ); 348cdf0e10cSrcweir 349cdf0e10cSrcweir void CheckCompileBasic(); 350cdf0e10cSrcweir sal_Bool BasicExecute(); 351cdf0e10cSrcweir 352cdf0e10cSrcweir void GoOnTop(); 353cdf0e10cSrcweir void AssertValidEditEngine(); 354cdf0e10cSrcweir 355cdf0e10cSrcweir sal_Int32 FormatAndPrint( Printer* pPrinter, sal_Int32 nPage = -1 ); 356cdf0e10cSrcweir SbModuleRef XModule(); 357cdf0e10cSrcweir protected: 358cdf0e10cSrcweir virtual void Resize(); 359cdf0e10cSrcweir virtual void GetFocus(); 360cdf0e10cSrcweir virtual void Paint( const Rectangle& ); 361cdf0e10cSrcweir virtual void Deactivating(); 362cdf0e10cSrcweir virtual void DoInit(); 363cdf0e10cSrcweir virtual void DoScroll( ScrollBar* pCurScrollBar ); 364cdf0e10cSrcweir 365cdf0e10cSrcweir public: 366cdf0e10cSrcweir TYPEINFO(); 367cdf0e10cSrcweir 368cdf0e10cSrcweir ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, String aLibName, 369cdf0e10cSrcweir String aName, ::rtl::OUString& aModule ); 370cdf0e10cSrcweir 371cdf0e10cSrcweir ~ModulWindow(); 372cdf0e10cSrcweir 373cdf0e10cSrcweir virtual void ExecuteCommand( SfxRequest& rReq ); 374cdf0e10cSrcweir virtual void GetState( SfxItemSet& ); 375cdf0e10cSrcweir virtual void StoreData(); 376cdf0e10cSrcweir virtual void UpdateData(); 377cdf0e10cSrcweir virtual sal_Bool CanClose(); 378cdf0e10cSrcweir // virtual void PrintData( Printer* pPrinter ); 379cdf0e10cSrcweir // return number of pages to be printed 380cdf0e10cSrcweir virtual sal_Int32 countPages( Printer* pPrinter ); 381cdf0e10cSrcweir // print page 382cdf0e10cSrcweir virtual void printPage( sal_Int32 nPage, Printer* pPrinter ); 383cdf0e10cSrcweir virtual String GetTitle(); 384cdf0e10cSrcweir virtual BasicEntryDescriptor CreateEntryDescriptor(); 385cdf0e10cSrcweir virtual sal_Bool AllowUndo(); 386cdf0e10cSrcweir virtual void SetReadOnly( sal_Bool bReadOnly ); 387cdf0e10cSrcweir virtual sal_Bool IsReadOnly(); 388cdf0e10cSrcweir 389cdf0e10cSrcweir StarBASIC* GetBasic() { XModule(); return xBasic; } 390cdf0e10cSrcweir 391cdf0e10cSrcweir SbModule* GetSbModule() { return xModule; } 392cdf0e10cSrcweir void SetSbModule( SbModule* pModule ) { xModule = pModule; } 393cdf0e10cSrcweir String GetSbModuleName(); 394cdf0e10cSrcweir 395cdf0e10cSrcweir sal_Bool CompileBasic(); 396cdf0e10cSrcweir sal_Bool BasicRun(); 397cdf0e10cSrcweir sal_Bool BasicStepOver(); 398cdf0e10cSrcweir sal_Bool BasicStepInto(); 399cdf0e10cSrcweir sal_Bool BasicStepOut(); 400cdf0e10cSrcweir void BasicStop(); 401cdf0e10cSrcweir sal_Bool BasicToggleBreakPoint(); 402cdf0e10cSrcweir void BasicToggleBreakPointEnabled(); 403cdf0e10cSrcweir void ManageBreakPoints(); 404cdf0e10cSrcweir void UpdateBreakPoint( const BreakPoint& rBrk ); 405cdf0e10cSrcweir void BasicAddWatch(); 406cdf0e10cSrcweir void BasicRemoveWatch(); 407cdf0e10cSrcweir 408cdf0e10cSrcweir sal_Bool LoadBasic(); 409cdf0e10cSrcweir sal_Bool SaveBasicSource(); 410cdf0e10cSrcweir sal_Bool ImportDialog(); 411cdf0e10cSrcweir 412cdf0e10cSrcweir void EditMacro( const String& rMacroName ); 413cdf0e10cSrcweir 414cdf0e10cSrcweir // void InsertFromObjectCatalog( ObjectCatalog* pObjDlg ); 415cdf0e10cSrcweir 416cdf0e10cSrcweir sal_Bool ToggleBreakPoint( sal_uLong nLine ); 417cdf0e10cSrcweir 418cdf0e10cSrcweir BasicStatus& GetBasicStatus() { return aStatus; } 419cdf0e10cSrcweir 420cdf0e10cSrcweir virtual sal_Bool IsModified(); 421cdf0e10cSrcweir virtual sal_Bool IsPasteAllowed(); 422cdf0e10cSrcweir 423cdf0e10cSrcweir void FrameWindowMoved(); 424cdf0e10cSrcweir void ShowCursor( sal_Bool bOn ); 425cdf0e10cSrcweir 426cdf0e10cSrcweir virtual sal_uInt16 GetSearchOptions(); 427cdf0e10cSrcweir sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart = sal_False ); 428cdf0e10cSrcweir 429cdf0e10cSrcweir virtual Window* GetLayoutWindow(); 430cdf0e10cSrcweir 431cdf0e10cSrcweir EditorWindow& GetEditorWindow() { return aXEditorWindow.GetEdtWindow(); } 432cdf0e10cSrcweir BreakPointWindow& GetBreakPointWindow() { return aXEditorWindow.GetBrkWindow(); } 433cdf0e10cSrcweir ScrollBar& GetEditVScrollBar() { return aXEditorWindow.GetEWVScrollBar(); } 434cdf0e10cSrcweir ExtTextEngine* GetEditEngine() { return GetEditorWindow().GetEditEngine(); } 435cdf0e10cSrcweir ExtTextView* GetEditView() { return GetEditorWindow().GetEditView(); } 436cdf0e10cSrcweir BreakPointList& GetBreakPoints() { return GetBreakPointWindow().GetBreakPoints(); } 437cdf0e10cSrcweir ModulWindowLayout* GetLayout() const { return pLayout; } 438cdf0e10cSrcweir 439cdf0e10cSrcweir virtual void BasicStarted(); 440cdf0e10cSrcweir virtual void BasicStopped(); 441cdf0e10cSrcweir 442cdf0e10cSrcweir virtual ::svl::IUndoManager* 443cdf0e10cSrcweir GetUndoManager(); 444cdf0e10cSrcweir 445cdf0e10cSrcweir const ::rtl::OUString& GetModule() const { return m_aModule; } 446cdf0e10cSrcweir void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; } 447cdf0e10cSrcweir }; 448cdf0e10cSrcweir 449cdf0e10cSrcweir class ModulWindowLayout: public Window, public utl::ConfigurationListener 450cdf0e10cSrcweir { 451cdf0e10cSrcweir private: 452cdf0e10cSrcweir 453cdf0e10cSrcweir Splitter aVSplitter; 454cdf0e10cSrcweir Splitter aHSplitter; 455cdf0e10cSrcweir 456cdf0e10cSrcweir WatchWindow aWatchWindow; 457cdf0e10cSrcweir StackWindow aStackWindow; 458cdf0e10cSrcweir 459cdf0e10cSrcweir sal_Bool bVSplitted; 460cdf0e10cSrcweir sal_Bool bHSplitted; 461cdf0e10cSrcweir 462cdf0e10cSrcweir ModulWindow * m_pModulWindow; 463cdf0e10cSrcweir 464cdf0e10cSrcweir Color m_aSyntaxColors[TT_KEYWORDS + 1]; 465cdf0e10cSrcweir svtools::ColorConfig m_aColorConfig; 466cdf0e10cSrcweir 467cdf0e10cSrcweir ImageList m_aImagesNormal; 468cdf0e10cSrcweir ImageList m_aImagesHighContrast; 469cdf0e10cSrcweir 470cdf0e10cSrcweir virtual void DataChanged(DataChangedEvent const & rDCEvt); 471cdf0e10cSrcweir 472cdf0e10cSrcweir virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); 473cdf0e10cSrcweir 474cdf0e10cSrcweir void updateSyntaxHighlighting(); 475cdf0e10cSrcweir 476cdf0e10cSrcweir DECL_LINK( SplitHdl, Splitter * ); 477cdf0e10cSrcweir 478cdf0e10cSrcweir void ArrangeWindows(); 479cdf0e10cSrcweir 480cdf0e10cSrcweir protected: 481cdf0e10cSrcweir virtual void Resize(); 482cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 483cdf0e10cSrcweir 484cdf0e10cSrcweir public: 485cdf0e10cSrcweir ModulWindowLayout( Window* pParent ); 486cdf0e10cSrcweir ~ModulWindowLayout(); 487cdf0e10cSrcweir 488cdf0e10cSrcweir void DockaWindow( DockingWindow* pDockingWin ); 489cdf0e10cSrcweir sal_Bool IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect ); 490cdf0e10cSrcweir 491cdf0e10cSrcweir void SetModulWindow( ModulWindow* pModWin ); 492cdf0e10cSrcweir ModulWindow* GetModulWindow() const { return m_pModulWindow; } 493cdf0e10cSrcweir 494cdf0e10cSrcweir WatchWindow& GetWatchWindow() { return aWatchWindow; } 495cdf0e10cSrcweir StackWindow& GetStackWindow() { return aStackWindow; } 496cdf0e10cSrcweir 497cdf0e10cSrcweir Image getImage(sal_uInt16 nId, bool bHighContrastMode) const; 498cdf0e10cSrcweir 499cdf0e10cSrcweir inline Color const & getSyntaxColor(TokenTypes eType) const 500cdf0e10cSrcweir { return m_aSyntaxColors[eType]; } 501cdf0e10cSrcweir }; 502cdf0e10cSrcweir 503cdf0e10cSrcweir #endif // _BASIDE2_HXX 504