summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KFindDialog.java
blob: a923d72a2fe6c06746b28e84eaf61a2753aff11d (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
//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 java.util.ArrayList;
import org.kde.qt.TQShowEvent;
import org.kde.qt.TQWidget;

/**

 @brief A generic "find" dialog.
 <b></b>etail:
 This widget inherits from KDialogBase and implements
 the following additional functionalities:  a find string
 object and an area for a user-defined widget to extend the dialog.
 <b></b>xample:
 To use the basic modal find dialog, and then run the search:
 <pre>
  KFindDialog dlg(....)
  if ( dlg.exec() != TQDialog.Accepted )
      return;
  // proceed with KFind from here
 </pre>
 To create a non-modal find dialog:
 <pre>
   if ( m_findDia )
     KWin.setActiveWindow( m_findDia.winId() );
   else
   {
     m_findDia = new KFindDialog(false,...);
     connect( m_findDia, SIGNAL("okClicked()"), this, SLOT("findTextNext()") );
   }
 </pre>
 Don't forget to delete and reset m_findDia when closed.
 (But do NOT delete your KFind object at that point, it's needed for "Find Next")
 To use your own extensions: see findExtension().
 		@author S.R.Haque <srhaque@iee.org>

		@short    @brief A generic "find" dialog.

*/
public class KFindDialog extends KDialogBase  {
	protected KFindDialog(Class dummy){super((Class) null);}
	public static final int WholeWordsOnly = 1;
	public static final int FromCursor = 2;
	public static final int SelectedText = 4;
	public static final int CaseSensitive = 8;
	public static final int FindBackwards = 16;
	public static final int RegularExpression = 32;
	public static final int FindIncremental = 64;
	public static final int MinimumUserOption = 65536;

	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Construct a modal find dialog
			@param parent The parent object of this widget.
			@param name The name of this widget.
			@param options A bitfield of the Options to be checked.
			@param findStrings The find history, see findHistory()
			@param hasSelection Whether a selection exists
		     		@short    Construct a modal find dialog
	*/
	public KFindDialog(TQWidget parent, String name, long options, String[] findStrings, boolean hasSelection) {
		super((Class) null);
		newKFindDialog(parent,name,options,findStrings,hasSelection);
	}
	private native void newKFindDialog(TQWidget parent, String name, long options, String[] findStrings, boolean hasSelection);
	public KFindDialog(TQWidget parent, String name, long options, String[] findStrings) {
		super((Class) null);
		newKFindDialog(parent,name,options,findStrings);
	}
	private native void newKFindDialog(TQWidget parent, String name, long options, String[] findStrings);
	public KFindDialog(TQWidget parent, String name, long options) {
		super((Class) null);
		newKFindDialog(parent,name,options);
	}
	private native void newKFindDialog(TQWidget parent, String name, long options);
	public KFindDialog(TQWidget parent, String name) {
		super((Class) null);
		newKFindDialog(parent,name);
	}
	private native void newKFindDialog(TQWidget parent, String name);
	public KFindDialog(TQWidget parent) {
		super((Class) null);
		newKFindDialog(parent);
	}
	private native void newKFindDialog(TQWidget parent);
	public KFindDialog() {
		super((Class) null);
		newKFindDialog();
	}
	private native void newKFindDialog();
	/**	
		 Construct a non-modal find dialog
			@param modal set to false to get a non-modal dialog
			@param parent The parent object of this widget.
			@param name The name of this widget.
			@param options A bitfield of the Options to be checked.
			@param findStrings The find history, see findHistory()
			@param hasSelection Whether a selection exists
		     		@short    Construct a non-modal find dialog
	*/
	public KFindDialog(boolean modal, TQWidget parent, String name, long options, String[] findStrings, boolean hasSelection) {
		super((Class) null);
		newKFindDialog(modal,parent,name,options,findStrings,hasSelection);
	}
	private native void newKFindDialog(boolean modal, TQWidget parent, String name, long options, String[] findStrings, boolean hasSelection);
	public KFindDialog(boolean modal, TQWidget parent, String name, long options, String[] findStrings) {
		super((Class) null);
		newKFindDialog(modal,parent,name,options,findStrings);
	}
	private native void newKFindDialog(boolean modal, TQWidget parent, String name, long options, String[] findStrings);
	public KFindDialog(boolean modal, TQWidget parent, String name, long options) {
		super((Class) null);
		newKFindDialog(modal,parent,name,options);
	}
	private native void newKFindDialog(boolean modal, TQWidget parent, String name, long options);
	public KFindDialog(boolean modal, TQWidget parent, String name) {
		super((Class) null);
		newKFindDialog(modal,parent,name);
	}
	private native void newKFindDialog(boolean modal, TQWidget parent, String name);
	public KFindDialog(boolean modal, TQWidget parent) {
		super((Class) null);
		newKFindDialog(modal,parent);
	}
	private native void newKFindDialog(boolean modal, TQWidget parent);
	public KFindDialog(boolean modal) {
		super((Class) null);
		newKFindDialog(modal);
	}
	private native void newKFindDialog(boolean modal);
	/**	
		 Provide the list of <code>strings</code> to be displayed as the history
		 of find strings. <code>strings</code> might get truncated if it is
		 too long.
			@param history The find history.
				@short    Provide the list of <code>strings</code> to be displayed as the history  of find strings.
		@see #findHistory
	*/
	public native void setFindHistory(String[] history);
	/**	
		 Returns the list of history items.
				@short    Returns the list of history items.
		@see #setFindHistory
	*/
	public native ArrayList findHistory();
	/**	
		 Enable/disable the 'search in selection' option, depending
		 on whether there actually is a selection.
			@param hasSelection true if a selection exists
		     		@short    Enable/disable the 'search in selection' option, depending  on whether there actually is a selection.
	*/
	public native void setHasSelection(boolean hasSelection);
	/**	
		 Hide/show the 'from cursor' option, depending
		 on whether the application implements a cursor.
			@param hasCursor true if the application features a cursor
		 This is assumed to be the case by default.
		     		@short    Hide/show the 'from cursor' option, depending  on whether the application implements a cursor.
	*/
	public native void setHasCursor(boolean hasCursor);
	/**	
		 Enable/disable the 'Find backwards' option, depending
		 on whether the application supports it.
			@param supports true if the application supports backwards find
		 This is assumed to be the case by default.
				@short    Enable/disable the 'Find backwards' option, depending  on whether the application supports it.
	*/
	public native void setSupportsBackwardsFind(boolean supports);
	/**	
		 Enable/disable the 'Case sensitive' option, depending
		 on whether the application supports it.
			@param supports true if the application supports case sensitive find
		 This is assumed to be the case by default.
				@short    Enable/disable the 'Case sensitive' option, depending  on whether the application supports it.
	*/
	public native void setSupportsCaseSensitiveFind(boolean supports);
	/**	
		 Enable/disable the 'Whole words only' option, depending
		 on whether the application supports it.
			@param supports true if the application supports whole words only find
		 This is assumed to be the case by default.
				@short    Enable/disable the 'Whole words only' option, depending  on whether the application supports it.
	*/
	public native void setSupportsWholeWordsFind(boolean supports);
	/**	
		 Enable/disable the 'Regular expression' option, depending
		 on whether the application supports it.
			@param supports true if the application supports regular expression find
		 This is assumed to be the case by default.
				@short    Enable/disable the 'Regular expression' option, depending  on whether the application supports it.
	*/
	public native void setSupportsRegularExpressionFind(boolean supports);
	/**	
		 Set the options which are checked.
			@param options The setting of the Options.
		     		@short    Set the options which are checked.
	*/
	public native void setOptions(long options);
	/**	
		 Returns the state of the options. Disabled options may be returned in
		 an indeterminate state.
				@short    Returns the state of the options.
		@see #setOptions
	*/
	public native long options();
	/**	
		 Returns the pattern to find.
		     		@short    Returns the pattern to find.
	*/
	public native String pattern();
	/**	
		 Sets the pattern to find
		     		@short    Sets the pattern to find
	*/
	public native void setPattern(String pattern);
	/**	
		 Returns an empty widget which the user may fill with additional UI
		 elements as required. The widget occupies the width of the dialog,
		 and is positioned immediately below the regular expression support
		 widgets for the pattern string.
		     		@short    Returns an empty widget which the user may fill with additional UI  elements as required.
	*/
	public native TQWidget findExtension();
	public native void showEvent(TQShowEvent arg1);
	protected native void slotOk();
	protected native void slotSelectedTextToggled(boolean arg1);
	protected native void showPatterns();
	protected native void showPlaceholders();
	protected native void textSearchChanged(String arg1);
	/** 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();
}