summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KLineEdit.java
blob: bacfdca2cbaa94e359e176dc2f6ecb269c08a693 (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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
//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.TQContextMenuEvent;
import org.kde.qt.TQFocusEvent;
import org.kde.qt.TQMouseEvent;
import org.kde.qt.TQKeyEvent;
import org.kde.qt.TQDropEvent;
import org.kde.qt.TQEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQResizeEvent;
import org.kde.qt.TQLineEdit;

/**

 An enhanced TQLineEdit widget for inputting text.
 <li><b>Detail </b></li>
 This widget inherits from TQLineEdit and implements the following
 additional functionalities: a completion object that provides both
 automatic and manual text completion as well as multiple match iteration
 features, configurable key-bindings to activate these features and a
 popup-menu item that can be used to allow the user to set text completion
 modes on the fly based on their preference.
 To support these new features KLineEdit also emits a few more
 additional signals.  These are: completion( String ),
 textRotation( KeyBindingType ), and returnPressed( String ).
 The completion signal can be connected to a slot that will assist the
 user in filling out the remaining text.  The text rotation signal is
 intended to be used to iterate through the list of all possible matches
 whenever there is more than one match for the entered text.  The
 <code>returnPressed</code>( String ) signals are the same as TQLineEdit's
 except it provides the current text in the widget as its argument whenever
 appropriate.
 This widget by default creates a completion object when you invoke
 the completionObject( boolean ) member function for the first time or
 use setCompletionObject( KCompletion, boolean ) to assign your own
 completion object.  Additionally, to make this widget more functional,
 KLineEdit will by default handle the text rotation and completion
 events internally when a completion object is created through either one
 of the methods mentioned above.  If you do not need this functionality,
 simply use KCompletionBase.setHandleSignals( boolean ) or set the
 booleanean parameter in the above functions to false.
 The default key-bindings for completion and rotation is determined
 from the global settings in KStdAccel.  These values, however,
 can be overridden locally by invoking KCompletionBase.setKeyBinding().
 The values can easily be reverted back to the default setting, by simply
 calling useGlobalSettings(). An alternate method would be to default
 individual key-bindings by using setKeyBinding() with the default
 second argument.
 If <code>EchoMode</code> for this widget is set to something other than <code>TQLineEdit</code>.Normal, 
 the completion mode will always be defaulted to KGlobalSettings.CompletionNone.  
 This is done purposefully to guard against protected entries such as passwords being
 cached in KCompletion's list. Hence, if the <code>EchoMode</code> is not TQLineEdit.Normal, the
 completion mode is automatically disabled.
 A read-only KLineEdit will have the same background color as a 
 disabled KLineEdit, but its foreground color will be the one used 
 for the read-write mode. This differs from TQLineEdit's implementation
 and is done to give visual distinction between the three different modes: 
 disabled, read-only, and read-write.
 <li><b>Usage </b></li>
 To enable the basic completion feature :
 <pre>
 KLineEdit edit = new KLineEdit( this, "mywidget" );
 KCompletion comp = edit.completionObject();
 // Connect to the return pressed signal - optional
 connect(edit,SIGNAL("returnPressed(String)"),comp,SLOT("addItem(String)"));
 </pre>
 To use a customized completion objects or your
 own completion object :
 <pre>
 KLineEdit edit = new KLineEdit( this,"mywidget" );
 KURLCompletion comp = new KURLCompletion();
 edit.setCompletionObject( comp );
 // Connect to the return pressed signal - optional
 connect(edit,SIGNAL("returnPressed(String)"),comp,SLOT("addItem(String)"));
 </pre>
 Note if you specify your own completion object you have to either delete 
 it when you don't need it anymore, or you can tell KLineEdit to delete it 
 for you:
 <pre> 
 edit.setAutoDeleteCompletionObject( true );
 </pre>
 <li><b>Miscellaneous function calls :</b></li>
 <pre>
 // Tell the widget to not handle completion and iteration automatically.
 edit.setHandleSignals( false );
 // Set your own key-bindings for a text completion mode.
 edit.setKeyBinding( KCompletionBase.TextCompletion, Qt.End );
 // Hide the context (popup) menu
 edit.setContextMenuEnabled( false );
 // Temporarily disable signal (both completion & iteration) emitions
 edit.disableSignals();
 // Default the key-bindings back to the default system settings.
 edit.useGlobalKeyBindings();
 </pre>
 See {@link KLineEditSignals} for signals emitted by KLineEdit
		@author Dawit Alemayehu <adawit@kde.org>
 
		@short    An enhanced TQLineEdit widget for inputting text.

*/
public class KLineEdit extends TQLineEdit implements KCompletionBaseInterface {
	protected KLineEdit(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Constructs a KLineEdit object with a default text, a parent,
		 and a name.
			@param string Text to be shown in the edit widget.
			@param parent The parent object of this widget.
			@param name the name of this widget
		     		@short    Constructs a KLineEdit object with a default text, a parent,  and a name.
	*/
	public KLineEdit(String string, TQWidget parent, String name) {
		super((Class) null);
		newKLineEdit(string,parent,name);
	}
	private native void newKLineEdit(String string, TQWidget parent, String name);
	public KLineEdit(String string, TQWidget parent) {
		super((Class) null);
		newKLineEdit(string,parent);
	}
	private native void newKLineEdit(String string, TQWidget parent);
	/**	
		 Constructs a KLineEdit object with a parent and a name.
			@param parent The parent object of this widget.
			@param name The name of this widget.
		     		@short    Constructs a KLineEdit object with a parent and a name.
	*/
	public KLineEdit(TQWidget parent, String name) {
		super((Class) null);
		newKLineEdit(parent,name);
	}
	private native void newKLineEdit(TQWidget parent, String name);
	public KLineEdit(TQWidget parent) {
		super((Class) null);
		newKLineEdit(parent);
	}
	private native void newKLineEdit(TQWidget parent);
	public KLineEdit() {
		super((Class) null);
		newKLineEdit();
	}
	private native void newKLineEdit();
	/**	
		 Sets <code>url</code> into the lineedit. It uses KURL.prettyURL() so
		 that the url is properly decoded for displaying.
		     		@short    Sets <code>url</code> into the lineedit.
	*/
	public native void setURL(KURL url);
	/**	
		 Re-implemented from KCompletionBase for internal reasons.
			 This function is re-implemented in order to make sure that
		 the EchoMode is acceptable before we set the completion mode.
			 See KCompletionBase.setCompletionMode
		     		@short    Re-implemented from KCompletionBase for internal reasons.
	*/
	public native void setCompletionMode(int mode);
	/**	
		 Enables/disables the popup (context) menu.
			 Note that when this function is invoked with its argument
		 set to <code>true</code>, then both the context menu and the completion
		 menu item are enabled.  If you do not want to the completion
		 item to be visible simply invoke hideModechanger() right
		 after calling this method.  Also by default, the context
		 menu is automatically created if this widget is editable. Thus
		 you need to call this function with the argument set to false
		 if you do not want this behavior.
			@param showMenu If <code>true</code>, show the context menu.
		    		@short    Enables/disables the popup (context) menu.
	*/
	public native void setContextMenuEnabled(boolean showMenu);
	/**	
		 Returns <code>true</code> when the context menu is enabled.
		     		@short    Returns <code>true</code> when the context menu is enabled.
	*/
	public native boolean isContextMenuEnabled();
	/**	
		 Enables/Disables handling of URL drops. If enabled and the user
		 drops an URL, the decoded URL will be inserted. Otherwise the default
		 behavior of TQLineEdit is used, which inserts the encoded URL.
			@param enable If <code>true</code>, insert decoded URLs
		     		@short    Enables/Disables handling of URL drops.
	*/
	public native void setURLDropsEnabled(boolean enable);
	/**	
		 Returns <code>true</code> when decoded URL drops are enabled
		     		@short    Returns <code>true</code> when decoded URL drops are enabled
	*/
	public native boolean isURLDropsEnabled();
	/**	
		 By default, KLineEdit recognizes <code>Key_Return</code> and <code>Key_Enter</code> and emits
		 the returnPressed() signals, but it also lets the event pass,
		 for example causing a dialog's default-button to be called.
			 Call this method with <code>trap</code> = <code>true</code> to make <code>KLineEdit</code> stop these
		 events. The signals will still be emitted of course.
				@short    By default, KLineEdit recognizes <code>Key_Return</code> and <code>Key_Enter</code> and emits  the returnPressed() signals, but it also lets the event pass,  for example causing a dialog's default-button to be called.
		@see #trapReturnKey
	*/
	public native void setTrapReturnKey(boolean trap);
	/**	
				@return <code>true</code> if keyevents of <code>Key_Return</code> or
 <code>Key_Enter</code> will be stopped or if they will be propagated.

		@short   
		@see #setTrapReturnKey
	*/
	public native boolean trapReturnKey();
	/**	
		 Re-implemented for internal reasons.  API not affected.
			     		@short    Re-implemented for internal reasons.
	*/
	public native boolean eventFilter(TQObject arg1, TQEvent arg2);
	/**	
			@param create Set this to false if you don't want the box to be created
		               i.e. to test if it is available.
		     		@return the completion-box, that is used in completion mode
 KGlobalSettings.CompletionPopup.
 This method will create a completion-box if none is there, yet.

		@short
	*/
	public native KCompletionBox completionBox(boolean create);
	public native KCompletionBox completionBox();
	/**	
		 Reimplemented for internal reasons, the API is not affected.
		     		@short    Reimplemented for internal reasons, the API is not affected.
	*/
	public native void setCompletionObject(KCompletion arg1, boolean hsig);
	public native void setCompletionObject(KCompletion arg1);
	/**	
		 Reimplemented for internal reasons, the API is not affected.
		     		@short    Reimplemented for internal reasons, the API is not affected.
	*/
	public native void copy();
	/**	
		 Enable text squeezing whenever the supplied text is too long.
		 Only works for "read-only" mode.
			 Note that once text squeezing is enabled, TQLineEdit.text()
		 and TQLineEdit.displayText() return the squeezed text. If
		 you want the original text, use {@link #originalText}.
				@short    Enable text squeezing whenever the supplied text is too long.
		@see org.kde.qt.TQLineEdit
	*/
	public native void setEnableSqueezedText(boolean enable);
	/**	
		 Returns true if text squeezing is enabled.
		 This is only valid when the widget is in read-only mode.
				@short    Returns true if text squeezing is enabled.
	*/
	public native boolean isSqueezedTextEnabled();
	/**	
		 Returns the original text if text squeezing is enabled.
		 If the widget is not in "read-only" mode, this function
		 returns the same thing as TQLineEdit.text().
				@short    Returns the original text if text squeezing is enabled.
		@see org.kde.qt.TQLineEdit
	*/
	public native String originalText();
	/**	
		 Set the completion-box to be used in completion mode
		 KGlobalSettings.CompletionPopup.
		 This will do nothing if a completion-box already exists.
			@param box The KCompletionBox to set
				@short    Set the completion-box to be used in completion mode  KGlobalSettings.CompletionPopup.
	*/
	public native void setCompletionBox(KCompletionBox box);
	/**	
		 Re-implemented for internal reasons. API not changed.
		     		@short    Re-implemented for internal reasons.
	*/
	public native void setReadOnly(boolean arg1);
	/**	
		 Iterates through all possible matches of the completed text or
		 the history list.
			 This function simply iterates over all possible matches in case
		 multimple matches are found as a result of a text completion request.
		 It will have no effect if only a single match is found.
			@param type The key-binding invoked.
		     		@short    Iterates through all possible matches of the completed text or  the history list.
	*/
	public native void rotateText(int type);
	/**	
		 See KCompletionBase.setCompletedText.
		     		@short    See KCompletionBase.setCompletedText.
	*/
	public native void setCompletedText(String arg1);
	/**	
		 Sets <code>items</code> into the completion-box if completionMode() is
		 CompletionPopup. The popup will be shown immediately. 
			@param items list of completion matches to be shown in the completion box.
		     		@short    Sets <code>items</code> into the completion-box if completionMode() is  CompletionPopup.
	*/
	public native void setCompletedItems(String[] items);
	/**	
		 Same as the above function except it allows you to temporarily
		 turn off text completion in CompletionPopupAuto mode.
			 TODO: Merge with above function in KDE 4.
		 TODO: Does that make this or the above @deprecated ?
			@param items list of completion matches to be shown in the completion box.
			@param autoSuggest true if you want automatic text completion (suggestion) enabled.
		     		@short    Same as the above function except it allows you to temporarily  turn off text completion in CompletionPopupAuto mode.
	*/
	public native void setCompletedItems(String[] items, boolean autoSuggest);
	/**	
		 Reimplemented to workaround a buggy TQLineEdit.clear()
		 (changing the clipboard to the text we just had in the lineedit)
		     		@short    Reimplemented to workaround a buggy TQLineEdit.clear()  (changing the clipboard to the text we just had in the lineedit)
	*/
	public native void clear();
	/**	
		 Squeezes <code>text</code> into the line edit.
		 This can only be used with read-only line-edits.
				@short    Squeezes <code>text</code> into the line edit.
	*/
	public native void setSqueezedText(String text);
	/**	
		 Re-implemented to enable text squeezing. API is not affected.
		     		@short    Re-implemented to enable text squeezing.
	*/
	public native void setText(String arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.resizeEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void resizeEvent(TQResizeEvent arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.keyPressEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void keyPressEvent(TQKeyEvent arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.mousePressEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void mousePressEvent(TQMouseEvent arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQWidget.mouseDoubleClickEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void mouseDoubleClickEvent(TQMouseEvent arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.contextMenuEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void contextMenuEvent(TQContextMenuEvent arg1);
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.createPopupMenu().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native TQPopupMenu createPopupMenu();
	/**	
		 Re-implemented to handle URI drops.
			 See TQLineEdit.dropEvent().
		    		@short    Re-implemented to handle URI drops.
	*/
	protected native void dropEvent(TQDropEvent arg1);
	protected native void setCompletedText(String arg1, boolean arg2);
	/**	
		 Sets the widget in userSelection mode or in automatic completion
		 selection mode. This changes the colors of selections.
		     		@short    Sets the widget in userSelection mode or in automatic completion  selection mode.
	*/
	protected native void setUserSelection(boolean userSelection);
	/**	
		 Reimplemented for internal reasons, the API is not affected.
		     		@short    Reimplemented for internal reasons, the API is not affected.
	*/
	protected native void create(long arg1, boolean initializeWindow, boolean destroyOldWindow);
	protected native void create(long arg1, boolean initializeWindow);
	protected native void create(long arg1);
	protected native void create();
	/**	
		 Re-implemented for internal reasons.  API not affected.
			 See TQLineEdit.focusInEvent().
		    		@short    Re-implemented for internal reasons.
	*/
	protected native void focusInEvent(TQFocusEvent arg1);
	/**	
		 Whether in current state text should be auto-suggested
				@short    Whether in current state text should be auto-suggested
	*/
	protected native boolean autoSuggest();
	/**	
		 Completes the remaining text with a matching one from
		 a given list.
		    		@short    Completes the remaining text with a matching one from  a given list.
	*/
	protected native void makeCompletion(String arg1);
	/**	
		 Resets the current displayed text. 
		 Call this function to revert a text completion if the user 
		 cancels the request. Mostly applies to popup completions.
		     		@short    Resets the current displayed text.
	*/
	protected native void userCancelled(String cancelText);
	/** 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();
	/**	
		 Returns a pointer to the current completion object.
			 If the completion object does not exist, it is automatically created and
		 by default handles all the completion signals internally unless <code>hsig</code>
		 is set to false. It is also automatically destroyed when the destructor
		 is called. You can change this default behavior using the 
		 {@link #setAutoDeleteCompletionObject} and {@link #setHandleSignals} member 
		 functions.
			 See also {@link #compObj}.
			@param hsig if true, handles completion signals internally.
				@return a pointer the completion object.
     
		@short    Returns a pointer to the current completion object.
	*/
	public native KCompletion completionObject(boolean hsig);
	public native KCompletion completionObject();
	/**	
		 Enables this object to handle completion and rotation
		 events internally.
			 This function simply assigns a booleanean value that
		 indicates whether it should handle rotation and
		 completion events or not.  Note that this does not
		 stop the object from emitting signals when these
		 events occur.
			@param handle if true, handle completion & rotation internally.
		     		@short    Enables this object to handle completion and rotation  events internally.
	*/
	public native void setHandleSignals(boolean handle);
	/**	
		 Returns true if the completion object is deleted
		 upon this widget's destruction.
			 See setCompletionObject() and enableCompletion()
		 for details.
				@return true if the completion object will be deleted
              automatically
     
		@short    Returns true if the completion object is deleted  upon this widget's destruction.
	*/
	public native boolean isCompletionObjectAutoDeleted();
	/**	
		 Sets the completion object when this widget's destructor
		 is called.
			 If the argument is set to true, the completion object
		 is deleted when this widget's destructor is called.
			@param autoDelete if true, delete completion object on destruction.
		     		@short    Sets the completion object when this widget's destructor  is called.
	*/
	public native void setAutoDeleteCompletionObject(boolean autoDelete);
	/**	
		 Sets the widget's ability to emit text completion and
		 rotation signals.
			 Invoking this function with <code>enable</code> set to <code>false</code> will
		 cause the completion & rotation signals not to be emitted.
		 However, unlike setting the completion object to <code>NULL</code>
		 using setCompletionObject, disabling the emition of
		 the signals through this method does not affect the current
		 completion object.
			 There is no need to invoke this function by default.  When a
		 completion object is created through completionObject or
		 setCompletionObject, these signals are set to emit
		 automatically.  Also note that disabling this signals will not
		 necessarily interfere with the objects ability to handle these
		 events internally.  See setHandleSignals.
			@param enable if false, disables the emition of completion & rotation signals.
		     		@short    Sets the widget's ability to emit text completion and  rotation signals.
	*/
	public native void setEnableSignals(boolean enable);
	/**	
		 Returns true if the object handles the signals.
				@return true if this signals are handled internally.
     
		@short    Returns true if the object handles the signals.
	*/
	public native boolean handleSignals();
	/**	
		 Returns true if the object emits the signals.
				@return true if signals are emitted
     
		@short    Returns true if the object emits the signals.
	*/
	public native boolean emitSignals();
	/**	
		 Returns the current completion mode.
			 The return values are of type KGlobalSettings.Completion.
		 See setCompletionMode() for details.
				@return the completion mode.
     
		@short    Returns the current completion mode.
	*/
	public native int completionMode();
	/**	
		 Sets the key-binding to be used for manual text
		 completion, text rotation in a history list as
		 well as a completion list.
			 When the keys set by this function are pressed, a
		 signal defined by the inheriting widget will be activated.
		 If the default value or 0 is specified by the second
		 parameter, then the key-binding as defined in the global
		 setting should be used.  This method returns false value
		 for <code>key</code> is negative or the supplied key-binding conflicts
		 with the ones set for one of the other features.
			 NOTE: To use a modifier key (Shift, Ctrl, Alt) as part of
		 the key-binding simply simply <code>sum</code> up the values of the
		 modifier and the actual key.  For example, to use CTRL+E as
		 a key binding for one of the items, you would simply supply
		 <code></code>"Qt.CtrlButton + Qt.Key_E" as the second argument to this
		 function.
			@param item the feature whose key-binding needs to be set:
		
			<li>
			TextCompletion the manual completion key-binding.
			</li>
			
			<li>
			PrevCompletionMatch    the previous match key for multiple completion.
			</li>
			
			<li>
			NextCompletionMatch    the next match key for for multiple completion.
			</li>
			
			<li>
			SubstringCompletion  the key for substring completion
			</li>
				@param key key-binding used to rotate down in a list.
				@return true if key-binding can successfully be set.

		@short    Sets the key-binding to be used for manual text  completion, text rotation in a history list as  well as a completion list.
		@see #getKeyBinding
	*/
	public native boolean setKeyBinding(int item, KShortcut key);
	/**	
		 Returns the key-binding used for the specified item.
			 This methods returns the key-binding used to activate
		 the feature feature given by <code>item.</code>  If the binding
		 contains modifier key(s), the SUM of the modifier key
		 and the actual key code are returned.
			@param item the item to check
				@return the key-binding used for the feature given by <code>item.</code>

		@short    Returns the key-binding used for the specified item.
		@see #setKeyBinding
	*/
	public native KShortcut getKeyBinding(int item);
	/**	
		 Sets this object to use global values for key-bindings.
			 This method changes the values of the key bindings for
		 rotation and completion features to the default values
		 provided in KGlobalSettings.
			 NOTE: By default inheriting widgets should uses the
		 global key-bindings so that there will be no need to
		 call this method.
		     		@short    Sets this object to use global values for key-bindings.
	*/
	public native void useGlobalKeyBindings();
	/**	
		 Returns a pointer to the completion object.
			 This method is only different from completionObject()
		 in that it does not create a new KCompletion object even if
		 the internal pointer is <code>NULL.</code> Use this method to get the
		 pointer to a completion object when inheriting so that you
		 won't inadvertently create it!!
				@return the completion object or NULL if one does not exist.
     
		@short    Returns a pointer to the completion object.
	*/
	public native KCompletion compObj();
	/**	
		 Returns a key-binding map.
			 This method is the same as getKeyBinding() except it
		 returns the whole keymap containing the key-bindings.
				@return the key-binding used for the feature given by <code>item.</code>
     
		@short    Returns a key-binding map.
	*/
	// KCompletionBase::KeyBindingMap getKeyBindings(); >>>> NOT CONVERTED
	/**	
		 Sets or removes the delegation object. If a delegation object is
		 set, all function calls will be forwarded to the delegation object.
			@param delegate the delegation object, or 0 to remove it
		     		@short    Sets or removes the delegation object.
	*/
	protected native void setDelegate(KCompletionBaseInterface delegate);
	/**	
		 Returns the delegation object.
				@return the delegation object, or 0 if there is none

		@short    Returns the delegation object.
		@see #setDelegate
	*/
	protected native KCompletionBaseInterface delegate();
}