• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • app
kateviewspacecontainer.h
1 /* This file is part of the KDE project
2  Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3  Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
4  Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef __KATE_VIEWSPACE_CONTAINER_H__
22 #define __KATE_VIEWSPACE_CONTAINER_H__
23 
24 #include "katemain.h"
25 #include "../interfaces/viewmanager.h"
26 
27 #include <kate/view.h>
28 #include <kate/document.h>
29 
30 #include "katemdi.h"
31 
32 class TDEConfig;
33 class KateMainWindow;
34 
35 class KateViewSpaceContainer: public TQVBox
36 {
37  Q_OBJECT
38 
39  friend class KateViewSpace;
40  friend class KateVSStatusBar;
41 
42  public:
43  KateViewSpaceContainer (TQWidget *parent, KateViewManager *viewManager);
44 
45  ~KateViewSpaceContainer ();
46 
47  inline TQPtrList<Kate::View> &viewList () { return m_viewList; };
48 
49  public:
50  /* This will save the splitter configuration */
51  void saveViewConfiguration(TDEConfig *config,const TQString& group);
52 
53  /* restore it */
54  void restoreViewConfiguration (TDEConfig *config,const TQString& group);
55 
56  private:
61  bool createView ( Kate::Document *doc =0L );
62 
63  bool deleteView ( Kate::View *view, bool delViewSpace = true);
64 
65  void moveViewtoSplit (Kate::View *view);
66  void moveViewtoStack (Kate::View *view);
67 
68  /* Save the configuration of a single splitter.
69  * If child splitters are found, it calls it self with those as the argument.
70  * If a viewspace child is found, it is asked to save its filelist.
71  */
72  void saveSplitterConfig(KateMDI::Splitter* s, int idx=0, TDEConfig* config=0L, const TQString& viewConfGrp="");
73 
77  void restoreSplitter ( TDEConfig* config, const TQString &group, TQWidget* parent , const TQString& viewConfGrp);
78 
79  void removeViewSpace (KateViewSpace *viewspace);
80 
81  bool showFullPath;
82 
83  public:
84  Kate::View* activeView ();
85  KateViewSpace* activeViewSpace ();
86 
87  uint viewCount ();
88  uint viewSpaceCount ();
89 
90  bool isViewActivationBlocked(){return m_blockViewCreationAndActivation;};
91 
92  public:
93  void closeViews(uint documentNumber);
94  KateMainWindow *mainWindow();
95  friend class KateViewManager;
96 
97  private slots:
98  void activateView ( Kate::View *view );
99  void activateSpace ( Kate::View* v );
100  void slotViewChanged();
101  void reactivateActiveView();
102  void slotPendingDocumentNameChanged();
103 
104  void documentCreated (Kate::Document *doc);
105  void documentDeleted (uint docNumber);
106 
107  public slots:
108  /* Splits a KateViewSpace into two.
109  * The operation is performed by creating a KateMDI::Splitter in the parent of the KateViewSpace to be split,
110  * which is then moved to that splitter. Then a new KateViewSpace is created and added to the splitter,
111  * and a KateView is created to populate the new viewspace. The new KateView is made the active one,
112  * because createView() does that.
113  * If no viewspace is provided, the result of activeViewSpace() is used.
114  * The isHoriz, true pr default, decides the orientation of the splitting action.
115  * If atTop is true, the new viewspace will be moved to the first position in the new splitter.
116  * If a newViewUrl is provided, the new view will show the document in that URL if any, otherwise
117  * the document of the current view in the viewspace to be split is used.
118  */
119  void splitViewSpace( KateViewSpace* vs=0L, bool isHoriz=true, bool atTop=false );
120 
121  bool getShowFullPath() const { return showFullPath; }
122 
123  void activateView ( uint documentNumber );
124  void activateView ( int documentNumber ) { activateView((uint) documentNumber); };
125 
127  void slotSplitViewSpaceHoriz () { splitViewSpace(); }
129  void slotSplitViewSpaceVert () { splitViewSpace( 0L, false ); }
130 
131  void slotCloseCurrentViewSpace();
132 
133  void statusMsg ();
134 
135  void setActiveSpace ( KateViewSpace* vs );
136  void setActiveView ( Kate::View* view );
137 
138  void setShowFullPath(bool enable);
139 
140  void activateNextView();
141  void activatePrevView();
142 
143  signals:
144  void statusChanged (Kate::View *, int, int, int, bool, int, const TQString &);
145  void statChanged ();
146  void viewChanged ();
147 
148  private:
149  KateViewManager *m_viewManager;
150  TQPtrList<KateViewSpace> m_viewSpaceList;
151  TQPtrList<Kate::View> m_viewList;
152 
153  bool m_blockViewCreationAndActivation;
154 
155  bool m_activeViewRunning;
156 
157  bool m_pendingViewCreation;
158  TQGuardedPtr<Kate::Document> m_pendingDocument;
159 };
160 
161 #endif

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kate

Skip menu "kate"
  • kate
  • libkonq
  • twin
  •   lib
Generated for kate by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.