LibreOffice Module basctl (master) 1
baside2.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <memory>
23#include <mutex>
24#include <layout.hxx>
25#include "breakpoint.hxx"
26#include "linenumberwindow.hxx"
27
28#include <basic/sbmod.hxx>
29#include <basic/sbstar.hxx>
31#include <vcl/idle.hxx>
32#include <vcl/weld.hxx>
33
34#include <svtools/colorcfg.hxx>
36#include <o3tl/enumarray.hxx>
37#include <rtl/ustrbuf.hxx>
38
39#include <set>
40#include <string_view>
41
42#include <vcl/textdata.hxx>
44#include <com/sun/star/reflection/XIdlClass.hpp>
46
47class ExtTextEngine;
48class TextView;
49class SvxSearchItem;
50namespace com::sun::star::beans { class XMultiPropertySet; }
51
52namespace basctl
53{
54
55class ObjectCatalog;
56class CodeCompleteWindow;
57class ModulWindowLayout;
58
59// #108672 Helper functions to get/set text in TextEngine
60// using the stream interface (get/setText() only supports
61// tools Strings limited to 64K).
62// defined in baside2b.cxx
64void setTextEngineText (ExtTextEngine&, std::u16string_view);
65
66class EditorWindow final : public vcl::Window, public SfxListener
67{
68friend class CodeCompleteWindow;
70private:
71 class ChangesListener;
72
73 std::unique_ptr<TextView> pEditView;
74 std::unique_ptr<ExtTextEngine> pEditEngine;
76
78 std::mutex mutex_;
79 css::uno::Reference< css::beans::XMultiPropertySet >
81
83
85
88 std::set<sal_uInt16> aSyntaxLineTable;
89 DECL_LINK(SyntaxTimerHdl, Timer *, void);
90 DECL_LINK(SetSourceInBasicHdl, void*, void);
91
92 // progress bar
93 class ProgressInfo;
94 std::unique_ptr<ProgressInfo> pProgress;
95
96 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
97
98 void ImpDoHighlight( sal_uInt32 nLineOff );
99 void ImplSetFont();
101
105
106 virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate = true) override;
107 CodeCompleteDataCache aCodeCompleteCache;
109 OUString GetActualSubName( sal_uInt32 nLine ); // gets the actual subroutine name according to line number
110 void SetupAndShowCodeCompleteWnd(const std::vector< OUString >& aEntryVect, TextSelection aSel );
111 void HandleAutoCorrect();
117
118 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
119 virtual void Resize() override;
120 virtual void KeyInput( const KeyEvent& rKeyEvt ) override;
121 virtual void MouseMove( const MouseEvent& rMEvt ) override;
122 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
123 virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
124 virtual void Command( const CommandEvent& rCEvt ) override;
125 virtual void LoseFocus() override;
126 virtual void RequestHelp( const HelpEvent& rHEvt ) override;
127
128 void DoSyntaxHighlight( sal_uInt32 nPara );
129 OUString GetWordAtCursor();
130 bool ImpCanModify();
131
132public:
134 virtual ~EditorWindow() override;
135 virtual void dispose() override;
136
137 ExtTextEngine* GetEditEngine() const { return pEditEngine.get(); }
138 TextView* GetEditView() const { return pEditView.get(); }
139
140 void CreateProgress( const OUString& rText, sal_uInt32 nRange );
141 void DestroyProgress();
142
143 void ParagraphInsertedDeleted( sal_uInt32 nNewPara, bool bInserted );
144 void DoDelayedSyntaxHighlight( sal_uInt32 nPara );
145
146 void CreateEditEngine();
147 void SetScrollBarRanges();
148 void InitScrollBars();
149
150 void ForceSyntaxTimeout();
151 void SetSourceInBasic();
152
153 bool CanModify() { return ImpCanModify(); }
154
155 void ChangeFontColor( Color aColor );
157
158 void SetEditorZoomLevel(sal_uInt16 nNewZoomLevel);
159 sal_uInt16 GetCurrentZoom() { return nCurrentZoomLevel; }
160
161 bool GetProcedureName(std::u16string_view rLine, OUString& rProcType, OUString& rProcName) const;
162
163 FactoryFunction GetUITestFactory() const override;
164};
165
166class BreakPointWindow final : public vcl::Window
167{
170 sal_uInt16 nMarkerPos;
173
174 virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
175
176 void setBackgroundColor(Color aColor);
177
178 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
179 BreakPoint* FindBreakPoint( const Point& rMousePos );
180 void ShowMarker(vcl::RenderContext& rRenderContext);
181 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
182 virtual void Command( const CommandEvent& rCEvt ) override;
183
184 bool SyncYOffset();
185
186public:
188
189 void SetMarkerPos( sal_uInt16 nLine, bool bErrorMarker = false );
190 void SetNoMarker ();
191
192 void DoScroll( tools::Long nVertScroll );
195};
196
197class WatchWindow final : public DockingWindow
198{
199private:
200 std::unique_ptr<weld::Container> m_xTitleArea;
201 std::unique_ptr<weld::Label> m_xTitle;
202 std::unique_ptr<weld::Entry> m_xEdit;
203 std::unique_ptr<weld::Button> m_xRemoveWatchButton;
204 std::unique_ptr<weld::TreeView> m_xTreeListBox;
205
207 OUString aEditingRes;
208
209 virtual void Resize() override;
210 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
211
212 SbxBase* ImplGetSBXForEntry(const weld::TreeIter& rEntry, bool& rbArrayElement);
213
214 void implEnableChildren(const weld::TreeIter& rEntry, bool bEnable);
215
217 DECL_LINK(TreeListHdl, weld::TreeView&, void);
218 DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool);
219 DECL_LINK(ActivateHdl, weld::Entry&, bool);
220 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
221 DECL_LINK(EditingEntryHdl, const weld::TreeIter&, bool);
222 typedef std::pair<const weld::TreeIter&, OUString> IterString;
223 DECL_LINK(EditedEntryHdl, const IterString&, bool);
224 DECL_LINK(ExecuteUpdateWatches, void*, void);
225
226public:
227 explicit WatchWindow (Layout* pParent);
228 virtual ~WatchWindow() override;
229 virtual void dispose() override;
230
231 void AddWatch( const OUString& rVName );
232 void RemoveSelectedWatch();
233 void UpdateWatches(bool bBasicStopped = false);
234};
235
237{
238private:
239 std::unique_ptr<weld::Label> m_xTitle;
240 std::unique_ptr<weld::TreeView> m_xTreeListBox;
241
242protected:
243 virtual void Resize() override;
244 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
245
246public:
247 explicit StackWindow (Layout* pParent);
248 virtual ~StackWindow() override;
249 virtual void dispose() override;
250
251 void UpdateCalls();
252};
253
254
256{
257private:
263
264 virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
265
266 virtual void Resize() override;
267 DECL_LINK(ScrollHdl, weld::Scrollbar&, void);
268
269public:
270 explicit ComplexEditorWindow( ModulWindow* pParent );
271 virtual ~ComplexEditorWindow() override;
272 virtual void dispose() override;
278
279 void SetLineNumberDisplay(bool b);
280};
281
282
284{
285private:
288 short m_nValid;
292 OUString m_aModule;
293
294 void CheckCompileBasic();
295 void BasicExecute();
296
297 sal_Int32 FormatAndPrint( Printer* pPrinter, sal_Int32 nPage );
298 SbModuleRef const & XModule();
299protected:
300 virtual void Resize() override;
301 virtual void GetFocus() override;
302 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
303 virtual void DoInit() override;
304 virtual void DoScroll(Scrollable* pCurScrollBar) override;
305
306public:
307 ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, OUString aModule );
308
309 virtual ~ModulWindow() override;
310 virtual void dispose() override;
311
312 virtual void ExecuteCommand (SfxRequest& rReq) override;
313 virtual void ExecuteGlobal (SfxRequest& rReq) override;
314 virtual void GetState( SfxItemSet& ) override;
315 virtual void StoreData() override;
316 virtual void UpdateData() override;
317 // return number of pages to be printed
318 virtual sal_Int32 countPages( Printer* pPrinter ) override;
319 // print page
320 virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) override;
321 virtual OUString GetTitle() override;
322 virtual EntryDescriptor CreateEntryDescriptor() override;
323 virtual bool AllowUndo() override;
324 virtual void SetReadOnly (bool bReadOnly) override;
325 virtual bool IsReadOnly() override;
326
328
330 void SetSbModule( SbModule* pModule ) { m_xModule = pModule; }
331 OUString GetSbModuleName();
332
333 void CompileBasic();
334 void BasicRun();
335 void BasicStepOver();
336 void BasicStepInto();
337 void BasicStepOut();
338 void BasicStop();
341 void ManageBreakPoints();
342 void UpdateBreakPoint( const BreakPoint& rBrk );
343 void BasicAddWatch();
344
345 void BasicErrorHdl( StarBASIC const * pBasic );
348
349 void LoadBasic();
350 void SaveBasicSource();
351 void ImportDialog();
352
353 void EditMacro( const OUString& rMacroName );
354
355 void ToggleBreakPoint( sal_uInt16 nLine );
356
358
359 virtual bool IsModified () override;
360 bool IsPasteAllowed ();
361
362 void ShowCursor( bool bOn );
363
364 virtual SearchOptionFlags GetSearchOptions() override;
365 virtual sal_uInt16 StartSearchAndReplace (SvxSearchItem const&, bool bFromStart = false) override;
366
367 EditorWindow& GetEditorWindow() { return m_aXEditorWindow->GetEdtWindow(); }
369 LineNumberWindow& GetLineNumberWindow() { return m_aXEditorWindow->GetLineNumberWindow(); }
370 ScrollAdaptor& GetEditVScrollBar() { return m_aXEditorWindow->GetEWVScrollBar(); }
371 ScrollAdaptor& GetEditHScrollBar() { return m_aXEditorWindow->GetEWHScrollBar(); }
376
377 virtual void BasicStarted() override;
378 virtual void BasicStopped() override;
379
380 virtual SfxUndoManager*
381 GetUndoManager() override;
382
383 const OUString& GetModule() const { return m_aModule; }
384 void SetModule( const OUString& aModule ) { m_aModule = aModule; }
385
386 virtual void Activating () override;
387 virtual void Deactivating () override;
388
389 virtual void OnNewDocument () override;
390 virtual OUString GetHid () const override;
391 virtual ItemType GetType () const override;
392 virtual bool HasActiveEditor () const override;
393
394 void UpdateModule ();
395};
396
398{
399public:
401 virtual ~ModulWindowLayout() override;
402 virtual void dispose() override;
403public:
404 // Layout:
405 virtual void Activating (BaseWindow&) override;
406 virtual void Deactivating () override;
407 virtual void GetState (SfxItemSet&, unsigned nWhich) override;
408 virtual void UpdateDebug (bool bBasicStopped) override;
409public:
410 void BasicAddWatch (OUString const&);
411 void BasicRemoveWatch ();
412 void ShowWatchWindow(bool bVisible);
413 void ShowStackWindow(bool bVisible);
414 bool IsWatchWindowVisible() { return aWatchWindow->IsVisible(); }
415 bool IsStackWindowVisible() { return aStackWindow->IsVisible(); }
417 Color const & GetFontColor () const { return aSyntaxColors.GetFontColor(); }
418 Color const & GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); }
419
420protected:
421 // Window:
422 virtual void Paint (vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
423 // Layout:
424 virtual void OnFirstSize (tools::Long nWidth, tools::Long nHeight) override;
425
426private:
427 // main child window
429 // dockable windows
433
434 // SyntaxColors -- stores Basic syntax highlighting colors
436 {
437 public:
438 SyntaxColors ();
439 virtual ~SyntaxColors () override;
440 public:
441 void SetActiveEditor (EditorWindow* pEditor_) { pEditor = pEditor_; }
442 public:
443 Color const & GetBackgroundColor () const { return m_aBackgroundColor; };
444 Color const & GetFontColor () const { return m_aFontColor; }
445 Color const & GetColor(TokenType eType) const { return aColors[eType]; }
446
447 private:
449 void NewConfig (bool bFirst);
450
451 private:
454 // the color values (the indexes are TokenType, see comphelper/syntaxhighlight.hxx)
456 // the configuration
458 // the active editor
460
462};
463
465{
466private:
469 std::unique_ptr<weld::TreeView> m_xListBox;
470
471 /* a buffer to build up function name when typing
472 * a function name, used for showing/hiding listbox values
473 * */
474 OUStringBuffer aFuncBuffer;
475
476 void InsertSelectedEntry(); // insert the selected entry
477 void SetMatchingEntries(); // sets the visible entries based on aFuncBuffer variable
479
480 DECL_LINK(ImplDoubleClickHdl, weld::TreeView&, bool);
481 DECL_LINK(ImplSelectHdl, weld::TreeView&, void);
482 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
483
484public:
485 explicit CodeCompleteWindow( EditorWindow* pPar );
486 virtual ~CodeCompleteWindow() override;
487 virtual void dispose() override;
488
489 void InsertEntry( const OUString& aStr );
490 void ClearListBox();
491 void SetTextSelection( const TextSelection& aSel );
494 void SelectFirstEntry(); //selects first entry in ListBox
495
496 /*
497 * clears if typed anything, then hides
498 * the window, clear internal variables
499 * */
500 void ClearAndHide();
501 void HideAndRestoreFocus();
502
503 bool HandleKeyInput(const KeyEvent& rKeyEvt);
504};
505
507{
508private:
509 css::uno::Reference< css::reflection::XIdlClass > xClass;
511
512 bool CheckField( const OUString& sFieldName );
513 bool CheckMethod( const OUString& sMethName );
514
515public:
516 UnoTypeCodeCompletetor( const std::vector< OUString >& aVect, const OUString& sVarType );
517
518 std::vector< OUString > GetXIdlClassMethods() const;
519 std::vector< OUString > GetXIdlClassFields() const;
520
521 bool CanCodeComplete() const { return bCanComplete;}
522};
523
524} // namespace basctl
525
526/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
friend class ModulWindow
Definition: bastypes.hxx:170
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: baside2b.cxx:1522
tools::Long nCurYOffset
Definition: baside2.hxx:169
ModulWindow & rModulWindow
Definition: baside2.hxx:168
BreakPointList aBreakPointList
Definition: baside2.hxx:171
virtual void DataChanged(DataChangedEvent const &rDCEvt) override
Definition: baside2b.cxx:1601
BreakPoint * FindBreakPoint(const Point &rMousePos)
Definition: baside2b.cxx:1505
void ShowMarker(vcl::RenderContext &rRenderContext)
Definition: baside2b.cxx:1461
BreakPointList & GetBreakPoints()
Definition: baside2.hxx:194
void SetMarkerPos(sal_uInt16 nLine, bool bErrorMarker=false)
Definition: baside2b.cxx:1490
void setBackgroundColor(Color aColor)
Definition: baside2b.cxx:1617
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: baside2b.cxx:1432
BreakPointWindow(vcl::Window *pParent, ModulWindow *)
Definition: baside2b.cxx:1421
tools::Long & GetCurYOffset()
Definition: baside2.hxx:193
void DoScroll(tools::Long nVertScroll)
Definition: baside2b.cxx:1484
virtual void Command(const CommandEvent &rCEvt) override
Definition: baside2b.cxx:1538
TextView * GetParentEditView()
Definition: baside2b.cxx:2614
void SetTextSelection(const TextSelection &aSel)
Definition: baside2b.cxx:2830
virtual ~CodeCompleteWindow() override
Definition: baside2b.cxx:2807
TextSelection m_aTextSelection
Definition: baside2.hxx:468
VclPtr< EditorWindow > pParent
Definition: baside2.hxx:467
DECL_LINK(ImplSelectHdl, weld::TreeView &, void)
std::unique_ptr< weld::TreeView > m_xListBox
Definition: baside2.hxx:469
OUStringBuffer aFuncBuffer
Definition: baside2.hxx:474
CodeCompleteWindow(EditorWindow *pPar)
Definition: baside2b.cxx:2793
const TextSelection & GetTextSelection() const
Definition: baside2.hxx:492
DECL_LINK(ImplDoubleClickHdl, weld::TreeView &, bool)
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
void InsertEntry(const OUString &aStr)
Definition: baside2b.cxx:2819
virtual void dispose() override
Definition: baside2b.cxx:2812
bool HandleKeyInput(const KeyEvent &rKeyEvt)
Definition: baside2b.cxx:2664
EditorWindow & GetEdtWindow()
Definition: baside2.hxx:275
virtual void Resize() override
Definition: baside2b.cxx:2023
VclPtr< ScrollAdaptor > aEWVScrollBar
Definition: baside2.hxx:261
ComplexEditorWindow(ModulWindow *pParent)
Definition: baside2b.cxx:1986
DECL_LINK(ScrollHdl, weld::Scrollbar &, void)
virtual void DataChanged(DataChangedEvent const &rDCEvt) override
Definition: baside2b.cxx:2070
BreakPointWindow & GetBrkWindow()
Definition: baside2.hxx:273
virtual void dispose() override
Definition: baside2b.cxx:2013
VclPtr< LineNumberWindow > aLineNumberWindow
Definition: baside2.hxx:259
virtual ~ComplexEditorWindow() override
Definition: baside2b.cxx:2008
VclPtr< EditorWindow > aEdtWindow
Definition: baside2.hxx:260
LineNumberWindow & GetLineNumberWindow()
Definition: baside2.hxx:274
VclPtr< BreakPointWindow > aBrkWindow
Definition: baside2.hxx:258
void SetLineNumberDisplay(bool b)
Definition: baside2b.cxx:2086
ScrollAdaptor & GetEWHScrollBar()
Definition: baside2.hxx:277
VclPtr< ScrollAdaptor > aEWHScrollBar
Definition: baside2.hxx:262
ScrollAdaptor & GetEWVScrollBar()
Definition: baside2.hxx:276
DECL_LINK(SyntaxTimerHdl, Timer *, void)
SyntaxHighlighter aHighlighter
Definition: baside2.hxx:86
EditorWindow(vcl::Window *pParent, ModulWindow *)
Definition: baside2b.cxx:240
css::uno::Reference< css::beans::XMultiPropertySet > notifier_
Definition: baside2.hxx:80
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: baside2b.cxx:1101
virtual void KeyInput(const KeyEvent &rKeyEvt) override
Definition: baside2b.cxx:553
OUString GetWordAtCursor()
Definition: baside2b.cxx:309
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: baside2b.cxx:969
std::mutex mutex_
Definition: baside2.hxx:78
tools::Long nCurTextWidth
Definition: baside2.hxx:82
void HandleAutoCloseParen()
Definition: baside2b.cxx:758
void UpdateSyntaxHighlighting()
Definition: baside2b.cxx:1248
TextView * GetEditView() const
Definition: baside2.hxx:138
bool GetProcedureName(std::u16string_view rLine, OUString &rProcType, OUString &rProcName) const
Definition: baside2b.cxx:848
void ChangeFontColor(Color aColor)
Definition: baside2b.cxx:1238
virtual void dispose() override
Definition: baside2b.cxx:281
virtual void Command(const CommandEvent &rCEvt) override
Definition: baside2b.cxx:493
FactoryFunction GetUITestFactory() const override
Definition: baside2b.cxx:1413
DECL_LINK(SetSourceInBasicHdl, void *, void)
void SetEditorZoomLevel(sal_uInt16 nNewZoomLevel)
Definition: baside2b.cxx:1296
std::set< sal_uInt16 > aSyntaxLineTable
Definition: baside2.hxx:88
virtual void LoseFocus() override
Definition: baside2b.cxx:977
TextSelection GetLastHighlightPortionTextSelection() const
Definition: baside2b.cxx:727
void HandleProcedureCompletion()
Definition: baside2b.cxx:794
void ImpDoHighlight(sal_uInt32 nLineOff)
Definition: baside2b.cxx:1218
virtual void RequestHelp(const HelpEvent &rHEvt) override
Definition: baside2b.cxx:357
ImplSVEvent * m_nSetSourceInBasicId
Definition: baside2.hxx:84
void DoDelayedSyntaxHighlight(sal_uInt32 nPara)
Definition: baside2b.cxx:1321
void HandleAutoCloseDoubleQuotes()
Definition: baside2b.cxx:773
std::unique_ptr< TextView > pEditView
Definition: baside2.hxx:71
ModulWindow & rModulWindow
Definition: baside2.hxx:75
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate=true) override
Definition: baside2b.cxx:2093
CodeCompleteDataCache aCodeCompleteCache
Definition: baside2.hxx:107
void DoSyntaxHighlight(sal_uInt32 nPara)
Definition: baside2b.cxx:1308
std::unique_ptr< ProgressInfo > pProgress
Definition: baside2.hxx:93
virtual ~EditorWindow() override
Definition: baside2b.cxx:276
ExtTextEngine * GetEditEngine() const
Definition: baside2.hxx:137
virtual void MouseMove(const MouseEvent &rMEvt) override
Definition: baside2b.cxx:457
void HandleCodeCompletion()
Definition: baside2b.cxx:884
void CreateProgress(const OUString &rText, sal_uInt32 nRange)
Definition: baside2b.cxx:1392
OUString GetActualSubName(sal_uInt32 nLine)
Definition: baside2b.cxx:1169
sal_uInt16 nCurrentZoomLevel
Definition: baside2.hxx:100
void SetupAndShowCodeCompleteWnd(const std::vector< OUString > &aEntryVect, TextSelection aSel)
Definition: baside2b.cxx:948
virtual void Resize() override
Definition: baside2b.cxx:429
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: baside2b.cxx:477
VclPtr< CodeCompleteWindow > pCodeCompleteWnd
Definition: baside2.hxx:108
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: baside2b.cxx:464
void ParagraphInsertedDeleted(sal_uInt32 nNewPara, bool bInserted)
Definition: baside2b.cxx:1363
std::unique_ptr< ExtTextEngine > pEditEngine
Definition: baside2.hxx:74
rtl::Reference< ChangesListener > listener_
Definition: baside2.hxx:77
sal_uInt16 GetCurrentZoom()
Definition: baside2.hxx:159
VclPtr< EditorWindow > pEditor
Definition: baside2.hxx:459
Color const & GetBackgroundColor() const
Definition: baside2.hxx:443
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: baside2.cxx:1543
o3tl::enumarray< TokenType, Color > aColors
Definition: baside2.hxx:455
Color const & GetFontColor() const
Definition: baside2.hxx:444
Color const & GetColor(TokenType eType) const
Definition: baside2.hxx:445
void SetActiveEditor(EditorWindow *pEditor_)
Definition: baside2.hxx:441
Color const & GetSyntaxBackgroundColor() const
Definition: baside2.hxx:416
ObjectCatalog & rObjectCatalog
Definition: baside2.hxx:432
virtual void dispose() override
Definition: baside2.cxx:1444
void ShowWatchWindow(bool bVisible)
Definition: baside2.cxx:1510
void ShowStackWindow(bool bVisible)
Definition: baside2.cxx:1516
ModulWindowLayout(vcl::Window *pParent, ObjectCatalog &)
Definition: baside2.cxx:1431
VclPtr< ModulWindow > pChild
Definition: baside2.hxx:428
virtual void Activating(BaseWindow &) override
Definition: baside2.cxx:1463
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: baside2.cxx:1458
Color const & GetSyntaxColor(TokenType eType) const
Definition: baside2.hxx:418
VclPtr< StackWindow > aStackWindow
Definition: baside2.hxx:431
virtual void Deactivating() override
Definition: baside2.cxx:1476
virtual void OnFirstSize(tools::Long nWidth, tools::Long nHeight) override
Definition: baside2.cxx:1522
basctl::ModulWindowLayout::SyntaxColors aSyntaxColors
virtual ~ModulWindowLayout() override
Definition: baside2.cxx:1439
void BasicAddWatch(OUString const &)
Definition: baside2.cxx:1500
virtual void UpdateDebug(bool bBasicStopped) override
Definition: baside2.cxx:1452
VclPtr< WatchWindow > aWatchWindow
Definition: baside2.hxx:430
Color const & GetFontColor() const
Definition: baside2.hxx:417
virtual void GetState(SfxItemSet &, unsigned nWhich) override
Definition: baside2.cxx:1486
void ManageBreakPoints()
Definition: baside2.cxx:601
ModulWindowLayout & GetLayout()
Definition: baside2.hxx:375
BreakPointWindow & GetBreakPointWindow()
Definition: baside2.hxx:368
void BasicToggleBreakPoint()
Definition: baside2.cxx:560
virtual void printPage(sal_Int32 nPage, Printer *pPrinter) override
Definition: baside2.cxx:797
virtual void Activating() override
Definition: baside2.cxx:1215
const OUString & GetModule() const
Definition: baside2.hxx:383
sal_Int32 FormatAndPrint(Printer *pPrinter, sal_Int32 nPage)
Definition: baside2.cxx:808
virtual sal_Int32 countPages(Printer *pPrinter) override
Definition: baside2.cxx:792
BasicDebugFlags BasicBreakHdl()
Definition: baside2.cxx:652
virtual sal_uInt16 StartSearchAndReplace(SvxSearchItem const &, bool bFromStart=false) override
Definition: baside2.cxx:1227
virtual void OnNewDocument() override
Definition: baside2.cxx:1393
virtual bool IsModified() override
Definition: baside2.cxx:1176
ScrollAdaptor & GetEditVScrollBar()
Definition: baside2.hxx:370
StarBASIC * GetBasic()
Definition: baside2.hxx:327
void EditMacro(const OUString &rMacroName)
Definition: baside2.cxx:715
virtual OUString GetHid() const override
Definition: baside2.cxx:1399
virtual void BasicStopped() override
Definition: baside2.cxx:1314
void CheckCompileBasic()
Definition: baside2.cxx:270
BasicStatus m_aStatus
Definition: baside2.hxx:290
SbModuleRef const & XModule()
Definition: baside2.cxx:208
virtual void SetReadOnly(bool bReadOnly) override
Definition: baside2.cxx:1360
virtual void ExecuteGlobal(SfxRequest &rReq) override
Definition: baside2.cxx:1039
SbModuleRef m_xModule
Definition: baside2.hxx:291
virtual void UpdateData() override
Definition: baside2.cxx:771
virtual void StoreData() override
Definition: baside2.cxx:758
void SetModule(const OUString &aModule)
Definition: baside2.hxx:384
void SetSbModule(SbModule *pModule)
Definition: baside2.hxx:330
virtual void dispose() override
Definition: baside2.cxx:239
VclPtr< ComplexEditorWindow > m_aXEditorWindow
Definition: baside2.hxx:289
virtual void GetState(SfxItemSet &) override
Definition: baside2.cxx:1057
void ShowCursor(bool bOn)
Definition: baside2.cxx:1194
BreakPointList & GetBreakPoints()
Definition: baside2.hxx:374
virtual void Deactivating() override
Definition: baside2.cxx:1222
EditorWindow & GetEditorWindow()
Definition: baside2.hxx:367
OUString GetSbModuleName()
Definition: baside2.cxx:1181
virtual EntryDescriptor CreateEntryDescriptor() override
Definition: baside2.cxx:1320
virtual void GetFocus() override
Definition: baside2.cxx:248
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: baside2.cxx:261
virtual ItemType GetType() const override
Definition: baside2.cxx:1403
virtual SearchOptionFlags GetSearchOptions() override
Definition: baside2.cxx:1275
StarBASICRef m_xBasic
Definition: baside2.hxx:287
virtual void ExecuteCommand(SfxRequest &rReq) override
Definition: baside2.cxx:875
void BasicErrorHdl(StarBASIC const *pBasic)
Definition: baside2.cxx:609
void SaveBasicSource()
Definition: baside2.cxx:458
BasicStatus & GetBasicStatus()
Definition: baside2.hxx:357
virtual SfxUndoManager * GetUndoManager() override
Definition: baside2.cxx:1268
virtual void DoScroll(Scrollable *pCurScrollBar) override
Definition: baside2.cxx:1163
TextView * GetEditView()
Definition: baside2.hxx:373
virtual bool HasActiveEditor() const override
Definition: baside2.cxx:1408
void ToggleBreakPoint(sal_uInt16 nLine)
Definition: baside2.cxx:506
virtual bool AllowUndo() override
Definition: baside2.cxx:766
virtual bool IsReadOnly() override
Definition: baside2.cxx:1366
virtual void BasicStarted() override
Definition: baside2.cxx:1294
ScrollAdaptor & GetEditHScrollBar()
Definition: baside2.hxx:371
virtual void DoInit() override
Definition: baside2.cxx:256
ExtTextEngine * GetEditEngine()
Definition: baside2.hxx:372
virtual void Resize() override
Definition: baside2.cxx:265
virtual ~ModulWindow() override
Definition: baside2.cxx:234
void UpdateBreakPoint(const BreakPoint &rBrk)
Definition: baside2.cxx:544
SbModule * GetSbModule()
Definition: baside2.hxx:329
LineNumberWindow & GetLineNumberWindow()
Definition: baside2.hxx:369
virtual OUString GetTitle() override
Definition: baside2.cxx:1189
ModulWindowLayout & m_rLayout
Definition: baside2.hxx:286
void BasicToggleBreakPointEnabled()
Definition: baside2.cxx:577
OUString m_aModule
Definition: baside2.hxx:292
void AssertValidEditEngine()
Definition: baside2.cxx:1209
A docking window that contains a tree of the currently loaded macros.
encapsulates a document which contains Basic scripts and dialogs
std::unique_ptr< weld::Label > m_xTitle
Definition: baside2.hxx:239
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: baside2b.cxx:1890
StackWindow(Layout *pParent)
Definition: baside2b.cxx:1854
virtual void dispose() override
Definition: baside2b.cxx:1882
std::unique_ptr< weld::TreeView > m_xTreeListBox
Definition: baside2.hxx:240
virtual void Resize() override
Definition: baside2b.cxx:1895
virtual ~StackWindow() override
Definition: baside2b.cxx:1877
UnoTypeCodeCompletetor(const std::vector< OUString > &aVect, const OUString &sVarType)
Definition: baside2b.cxx:2886
std::vector< OUString > GetXIdlClassMethods() const
Definition: baside2b.cxx:2912
css::uno::Reference< css::reflection::XIdlClass > xClass
Definition: baside2.hxx:509
std::vector< OUString > GetXIdlClassFields() const
Definition: baside2b.cxx:2926
bool CheckMethod(const OUString &sMethName)
Definition: baside2b.cxx:2959
bool CheckField(const OUString &sFieldName)
Definition: baside2b.cxx:2941
virtual void dispose() override
Definition: baside2b.cxx:1708
DECL_LINK(ExecuteUpdateWatches, void *, void)
std::unique_ptr< weld::TreeView > m_xTreeListBox
Definition: baside2.hxx:204
void UpdateWatches(bool bBasicStopped=false)
Definition: baside2b.cxx:2404
DECL_LINK(EditedEntryHdl, const IterString &, bool)
virtual ~WatchWindow() override
Definition: baside2b.cxx:1703
DECL_LINK(EditingEntryHdl, const weld::TreeIter &, bool)
ImplSVEvent * m_nUpdateWatchesId
Definition: baside2.hxx:206
void RemoveSelectedWatch()
Definition: baside2b.cxx:1793
void AddWatch(const OUString &rVName)
Definition: baside2b.cxx:1773
std::unique_ptr< weld::Label > m_xTitle
Definition: baside2.hxx:201
DECL_LINK(TreeListHdl, weld::TreeView &, void)
DECL_STATIC_LINK(WatchWindow, ButtonHdl, weld::Button &, void)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: baside2b.cxx:1732
void implEnableChildren(const weld::TreeIter &rEntry, bool bEnable)
Definition: baside2b.cxx:2390
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
std::pair< const weld::TreeIter &, OUString > IterString
Definition: baside2.hxx:222
SbxBase * ImplGetSBXForEntry(const weld::TreeIter &rEntry, bool &rbArrayElement)
Definition: baside2b.cxx:2233
WatchWindow(Layout *pParent)
Definition: baside2b.cxx:1656
std::unique_ptr< weld::Container > m_xTitleArea
Definition: baside2.hxx:200
std::unique_ptr< weld::Entry > m_xEdit
Definition: baside2.hxx:202
virtual void Resize() override
Definition: baside2b.cxx:1737
DECL_LINK(RequestingChildrenHdl, const weld::TreeIter &, bool)
OUString aEditingRes
Definition: baside2.hxx:207
DECL_LINK(ActivateHdl, weld::Entry &, bool)
std::unique_ptr< weld::Button > m_xRemoveWatchButton
Definition: baside2.hxx:203
T * get() const
DocumentType eType
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
void setTextEngineText(ExtTextEngine &, std::u16string_view)
Definition: baside2b.cxx:130
OUString getTextEngineText(ExtTextEngine &)
Helper functions to get/set text in TextEngine using the stream interface.
Definition: baside2b.cxx:118
ItemType
Definition: sbxitem.hxx:28
long Long
ConfigurationHints
BasicDebugFlags
SearchOptionFlags
TokenType
bool bVisible