summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KDockManager.java
blob: b0fa7dacdcbc05a195cd1a7795c9b4e3fd72ee85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQObject;
import org.kde.qt.TQPopupMenu;
import org.kde.qt.TQEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQDomElement;
import org.kde.qt.TQObject;

/**

 The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set).
 More or less a helper class for the KDockWidget class set but of interest for some functionality
 that can be called within a KDockMainWindow or a KDockWidget .
 An important feature is the ability to read or save the current state of all things concerning to
 dockwidgets to KConfig .
 The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found.
 See {@link KDockManagerSignals} for signals emitted by KDockManager
		@author Max Judin (documentation: Falk Brettschneider).
 
		@short    The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set).

*/
public class KDockManager extends TQObject  {
	protected KDockManager(Class dummy){super((Class) null);}
	public static final int Unknown = 0;
	public static final int WrapExistingWidgetsOnly = 1;
	public static final int RestoreAllDockwidgets = 2;

	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructs a dockmanager. Some initialization happen:
		
			<li>
			It installs an event filter for the main window,
			</li>
			
			<li>
			a control list for dock objects
			</li>
			
			<li>
			a control list for menu items concerning to menus provided by the dockmanager
			</li>
			
			<li>
			Some state variables are set
			</li>
				@param mainWindow the main window controlled by this
			@param name the internal TQOject name
		   		@short    Constructs a dockmanager.
	*/
	public KDockManager(TQWidget mainWindow, String name) {
		super((Class) null);
		newKDockManager(mainWindow,name);
	}
	private native void newKDockManager(TQWidget mainWindow, String name);
	public KDockManager(TQWidget mainWindow) {
		super((Class) null);
		newKDockManager(mainWindow);
	}
	private native void newKDockManager(TQWidget mainWindow);
	public native void dumpDockWidgets();
	/**	
		 Saves the current state of the dockmanager and of all controlled widgets.
		 State means here to save the geometry, visibility, parents, internal object names, orientation,
		 separator positions, dockwidget-group information, tab widget states (if it is a tab group) and
		 last but not least some necessary things for recovering the dockmainwindow state.
			@param c the KDE configuration saver
			@param group the name of the section in KConfig
		   		@short    Saves the current state of the dockmanager and of all controlled widgets.
	*/
	public native void writeConfig(KConfig c, String group);
	public native void writeConfig(KConfig c);
	public native void writeConfig();
	/**	
		 Like writeConfig but reads the whole stuff in.
			 In order to restore a window configuration
		 from a config file, it looks up widgets by name
		 (TQObject.name) in the childDock variable of
		 KDockManager. This list in turn contains all
		 KDockWidgets (according to the KDockWidget constructor).
		 So in principle, in order to restore a window layout,
		 one must first construct all widgets, put each of them in a
		 KDockWidget and then call readConfig(). And for all that
		 to work, each widget must have a unique name.
			@param c the KDE configuration saver
			@param group the name of the section in KConfig
		   		@short    Like writeConfig but reads the whole stuff in.
	*/
	public native void readConfig(KConfig c, String group);
	public native void readConfig(KConfig c);
	public native void readConfig();
	public native void setMainDockWidget2(KDockWidget arg1);
	/**	
		 Saves the current dock window layout into a DOM tree below the given element.
		   		@short    Saves the current dock window layout into a DOM tree below the given element.
	*/
	public native void writeConfig(TQDomElement base);
	/**	
		 Reads the current dock window layout from a DOM tree below the given element.
		   		@short    Reads the current dock window layout from a DOM tree below the given element.
	*/
	public native void readConfig(TQDomElement base);
	/**	
		 Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
		 parent of a dockwidget tab group.
		   		@short    Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are  parent of a dockwidget tab group.
	*/
	public native void activate();
	/**	
		 It's more or less a method that catches several events which are interesting for the dockmanager.
		 Mainly mouse events during the drag process of a dockwidgets are of interest here.
			@param object the object that sends the event
			@param event the event
				@return the return value of the method call of the base class method
   
		@short    It's more or less a method that catches several events which are interesting for the dockmanager.
	*/
	public native boolean eventFilter(TQObject object, TQEvent event);
	/**	
		 This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
		 dockwidgets it knows and tells you when one of those dockwidgets covers the given widget.
			@param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
				@return the dockwidget that encapsulates that widget, otherwise 0
   
		@short    This method finds out what a widgets' dockwidget is.
	*/
	public native KDockWidget findWidgetParentDock(TQWidget w);
	/**	
		 Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
			@param w the widget that is encapsulated by a dockwidget that turns to visible.
		   		@short    Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
	*/
	public native void makeWidgetDockVisible(TQWidget w);
	/**	
				@return the popupmenu for showing/hiding dockwidgets
   
		@short
	*/
	public native TQPopupMenu dockHideShowMenu();
	/**	
			@param dockName an internal TQObject name
				@return the dockwidget that has got that internal TQObject name
   
		@short
	*/
	public native KDockWidget getDockWidgetFromName(String dockName);
	/**	
		 Enables opaque resizing. Opaque resizing defaults to KGlobalSettings.opaqueResize().
		 Call this method before you create any dock widgets!
		   		@short    Enables opaque resizing.
	*/
	public native void setSplitterOpaqueResize(boolean b);
	public native void setSplitterOpaqueResize();
	/**	
		 Returns true if opaque resizing is enabled, false otherwise.
		   		@short    Returns true if opaque resizing is enabled, false otherwise.
	*/
	public native boolean splitterOpaqueResize();
	/**	
		 Try to preserve the widget's size. Works like KeepSize resize mode
		 of TQSplitter. Off by default.
		 Call this method before you create any dock widgets!
		   		@short    Try to preserve the widget's size.
	*/
	public native void setSplitterKeepSize(boolean b);
	public native void setSplitterKeepSize();
	/**	
		 Returns true if the KeepSize is enabled, false otherwise.
		   		@short    Returns true if the KeepSize is enabled, false otherwise.
	*/
	public native boolean splitterKeepSize();
	/**	
		 Operate the splitter with a higher resolution. Off by default.
		 Call this method before you create any dock widgets!
		 If high resolution is used all splitter position parameters
		 are percent*100 instead of percent.
		 @note Since KDE 3.5 this is ignored. Internally the splitter always
		       calcualtes in high resolution values. For KDE 4, this will be removed.
		   		@short    Operate the splitter with a higher resolution.
	*/
	public native void setSplitterHighResolution(boolean b);
	public native void setSplitterHighResolution();
	/**	
		 Returns true if the splitter uses the high resolution, false otherwise.
		   		@short    Returns true if the splitter uses the high resolution, false otherwise.
	*/
	public native boolean splitterHighResolution();
	/**	
				@short
	*/
	public native void setSpecialLeftDockContainer(KDockWidget container);
	public native void setSpecialTopDockContainer(KDockWidget container);
	public native void setSpecialRightDockContainer(KDockWidget container);
	public native void setSpecialBottomDockContainer(KDockWidget container);
	public native void removeFromAutoCreateList(KDockWidget pDockWidget);
	public native void finishReadDockConfig();
	public native void setReadDockConfigMode(int mode);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}