| Gtk2-Ex-SearchBox documentation | view source | Contained in the Gtk2-Ex-SearchBox distribution. |
Gtk2::Ex::SearchBox - A simple widget for specifying a search pattern (or a list of search patterns).
A simple widget for specifying a search pattern (or a list of search patterns).
my $searchbox = Gtk2::Ex::SearchBox->new;
$window->add($searchbox->{widget});
The constructor.
my $searchbox = Gtk2::Ex::SearchBox->new;
If you want to allow only one pattern at a time, then you can call the constructor
with 'single' as an argument.
my $searchbox = Gtk2::Ex::SearchBox->new('single');
By default, the dropdown combobox contains the following choices.
[ 'contains', 'doesn\'t contain', 'not equal to', 'equals', ]
But if you want to specify your own set, then you can call the constructor with two arguments.
my $operatorlist = [
'starts with',
'ends with',
'has in the middle'
];
my $searchbox = Gtk2::Ex::SearchBox->new('multiple', $operatorlist);
If you do not want even that combobox to the left, then send undef as the operatorlist.
my $searchbox = Gtk2::Ex::SearchBox->new('single', undef);
Now this is just an $enty with an $ok_button !!
Sets the $model. For example,
$model = [
{'operator' => 'contains', 'field' => 'this pattern'},
{'operator' => 'equals', 'field' => 'that exact pattern'},
]
Returns the $model
For example,
$model = [
{'operator' => 'contains', 'field' => 'this pattern'},
{'operator' => 'equals', 'field' => 'that exact pattern'},
]
This method returns a Gtk2::Ex::PopupWindow. The popup window will contain
a Gtk2::Ex::SearchBox widget.
Converts the $model into an SQL condition so that it can be used directly in
and SQL statement. $fieldname is the fieldname that will be used inside
the SQL condition.
See the SIGNALS section to see the supported signals.
Gtk2::Ex::PopupWindow
Copyright 2005 Ofey Aikon, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
| Gtk2-Ex-SearchBox documentation | view source | Contained in the Gtk2-Ex-SearchBox distribution. |