summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/Part.java
blob: 179e67b77fb92b31616122748b8ae976f2631abd (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
//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.TQPoint;
import org.kde.qt.TQCustomEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQObject;

/**

 Base class for parts.
 A "part" is a GUI component, featuring:

	<li>
	A widget embeddedable in any application.
	</li>
	
	<li>
	GUI elements that will be merged in the "host" user interface
	 (menubars, toolbars... ).
	</li>
	 <li><b>About the widget:</b></li>
 Note that KParts.Part does not inherit TQWidget.
 This is due to the fact that the "visual representation"
 will probably not be a mere TQWidget, but an elaborate one.
 That's why when implementing your KParts.Part (or derived)
 you should call KParts.Part.setWidget() in your constructor.
 <li><b>About the GUI elements:</b></li>
 Those elements trigger actions, defined by the part (action()).
 The layout of the actions in the GUI is defined by an XML file (setXMLFile()).
 See also ReadOnlyPart and ReadWritePart, which define the
 framework for a "viewer" part and for an "editor"-like part.
 Use Part directly only if your part doesn't fit into those.
  See {@link PartSignals} for signals emitted by Part
		@short    Base class for parts.

*/
public class Part extends TQObject implements PartBaseInterface {
	protected Part(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		  Constructor.
			@param parent Parent object of the part.
			@param name QT-internal name of the part.
		     		@short     Constructor.
	*/
	public Part(TQObject parent, String name) {
		super((Class) null);
		newPart(parent,name);
	}
	private native void newPart(TQObject parent, String name);
	public Part(TQObject parent) {
		super((Class) null);
		newPart(parent);
	}
	private native void newPart(TQObject parent);
	public Part() {
		super((Class) null);
		newPart();
	}
	private native void newPart();
	/**	
		 Embed this part into a host widget.
			 You don't need to do this if you created the widget with the
		 correct parent widget - this is just a TQWidget.reparent().
		 Note that the Part is still the holder
		 of the TQWidget, meaning that if you delete the Part,
		 then the widget gets destroyed as well, and vice-versa.
		 This method is not recommended since creating the widget with the correct
		 parent is simpler anyway.
		     		@short    Embed this part into a host widget.
	*/
	public native void embed(TQWidget parentWidget);
	/**	
				@return The widget defined by this part, set by setWidget().
     
		@short
	*/
	public native TQWidget widget();
	/**	
			 Used by the part manager.
		     		@short
	*/
	public native void setManager(PartManager manager);
	/**	
		 Returns the part manager handling this part, if any (null otherwise).
		     		@short    Returns the part manager handling this part, if any (0L otherwise).
	*/
	public native PartManager manager();
	/**	
		 Returns the part (this, or a child part) at the given global position.
		 This is called by the part manager to ask whether a part should be activated
		 when clicking somewhere. In most cases the default implementation is enough.
		 Reimplement this if your part has child parts in some areas (like in tdehtml or koffice)
			@param widget the part widget being clicked - usually the same as widget(), except in koffice.
			@param globalPos the mouse coordinates in global coordinates
		     		@short    Returns the part (this, or a child part) at the given global position.
	*/
	public native Part hitTest(TQWidget widget, TQPoint globalPos);
	/**	
			@param selectable Indicates whether the part is selectable or not.
		     		@short
	*/
	public native void setSelectable(boolean selectable);
	/**	
		  Returns whether the part is selectable or not.
		     		@short     Returns whether the part is selectable or not.
	*/
	public native boolean isSelectable();
	/**	
		 Set the main widget.
			 Call this in the Part-inherited class constructor.
		     		@short    Set the main widget.
	*/
	protected native void setWidget(TQWidget widget);
	/**	
			     		@short
	*/
	protected native void customEvent(TQCustomEvent event);
	/**	
		 Convenience method which is called when the Part received a PartActivateEvent .
		 Reimplement this if you don't want to reimplement event and test for the event yourself
		 or even install an event filter.
		     		@short    Convenience method which is called when the Part received a PartActivateEvent .
	*/
	protected native void partActivateEvent(PartActivateEvent event);
	/**	
		 Convenience method which is called when the Part received a
		 PartSelectEvent .
		 Reimplement this if you don't want to reimplement event and
		 test for the event yourself or even install an event filter.
		     		@short    Convenience method which is called when the Part received a  PartSelectEvent .
	*/
	protected native void partSelectEvent(PartSelectEvent event);
	/**	
		 Convenience method which is called when the Part received a
		 GUIActivateEvent .
		 Reimplement this if you don't want to reimplement event and
		 test for the event yourself or even install an event filter.
		     		@short    Convenience method which is called when the Part received a  GUIActivateEvent .
	*/
	protected native void guiActivateEvent(GUIActivateEvent event);
	/**	
		 Convenience method for KXMLGUIFactory.container.
				@return a container widget owned by the Part's GUI.
     
		@short    Convenience method for KXMLGUIFactory.container.
	*/
	protected native TQWidget hostContainer(String containerName);
	/**	
		  Internal method. Called by KParts.Part to specify the parent object for plugin objects.
			   		@short     Internal method.
	*/
	public native void setPartObject(TQObject object);
	public native TQObject partObject();
	/**	
		 Set the instance ( TDEInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( TDEInstance) for this part.
	*/
	protected native void setInstance(TDEInstanceInterface instance);
	/**	
		 Set the instance ( TDEInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( TDEInstance) for this part.
	*/
	protected native void setInstance(TDEInstanceInterface instance, boolean loadPlugins);
	/**	
		 Load the Plugins honoring the PluginLoadingMode.
			 If you call this method in an already constructed GUI (like when the user
		 has changed which plugins are enabled) you need to add the new plugins to
		 the KXMLGUIFactory:
		 <pre>
		 if( factory() )
		 {
		   TQPtrList<KParts.Plugin> plugins = KParts.Plugin.pluginObjects( this );
		   TQPtrListIterator<KParts.Plugin> it( plugins );
		   KParts.Plugin  plugin;
		   while( ( plugin = it.current() ) != 0 )
		   {
		     ++it;
		     factory().addClient(  plugin );
		   }
		 }
		 </pre>
		   		@short    Load the Plugins honoring the PluginLoadingMode.
	*/
	protected native void loadPlugins(TQObject parent, KXMLGUIClientInterface parentGUIClient, TDEInstanceInterface instance);
	/**	
		 For a KParts.Part: call this before setInstance().
		 For a KParts.MainWindow: call this before createGUI().
		   		@short    For a KParts.Part: call this before setInstance().
	*/
	// void setPluginLoadingMode(KParts::PartBase::PluginLoadingMode arg1); >>>> NOT CONVERTED
}