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 606 607 608 609 610 611 612 613 614 615 616 617 618 619
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>GTK+ Foundation Classes</title>
<link href="gfc.css" rel="stylesheet" type="text/css">
<meta content="The GFC Development Team" name="author">
<meta content="Core Library Reference Manual" name="description">
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(243, 244, 248);"
alink="#000099" link="#000099" vlink="#990099">
<table style="text-align: left; width: 1227px; height: 117px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="text-align: center; background-color: rgb(255, 255, 255); width: 220px; vertical-align: top;"><img
alt="GFC Logo" src="../images/gfc.png"
style="width: 207px; height: 92px;"></td>
<td
style="text-align: center; background-color: rgb(87, 107, 152); vertical-align: middle;"><img
alt="GFC Title Logo" src="../images/gfc-title.png"
style="width: 418px; height: 76px;"><br>
</td>
</tr>
<tr>
<td
style="text-align: center; background-color: rgb(65, 77, 104); vertical-align: middle;"><big><span
style="color: rgb(255, 255, 153); font-weight: bold;">Reference Manual</span></big><br>
</td>
<td
style="text-align: center; background-color: rgb(148, 164, 200); vertical-align: middle;"><small
style="font-family: helvetica,arial,sans-serif;"><a
href="../html/index.html">Main Page</a> | <a
href="../html/namespaces.html">Namespace List</a> | <a
href="classes.html">Alphabetical List</a> | <a
href="../html/annotated.html">Class List</a> | <a
href="../html/files.html">File List</a></small><br>
</td>
</tr>
</tbody>
</table>
<small> </small>
</body>
</html>
<!-- Generated by Doxygen 1.3.8 -->
<h1>GFC::Gtk::EntryCompletion Class Reference</h1>A GtkEntryCompletion C++ wrapper class.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="entrycompletion_8hh-source.html">gfc/gtk/entrycompletion.hh</a>></code>
<p>
<p>Inheritance diagram for GFC::Gtk::EntryCompletion:
<p><center><img src="classGFC_1_1Gtk_1_1EntryCompletion.png" usemap="#GFC::Gtk::EntryCompletion_map" border="0" alt=""></center>
<map name="GFC::Gtk::EntryCompletion_map">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html" alt="GFC::G::Object" shape="rect" coords="0,168,160,192">
<area href="classGFC_1_1Gtk_1_1CellLayout.html" alt="GFC::Gtk::CellLayout" shape="rect" coords="170,168,330,192">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="0,112,160,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="170,112,330,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="0,56,160,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="170,56,330,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="170,0,330,24">
</map>
<a href="classGFC_1_1Gtk_1_1EntryCompletion-members.html">List of all members.</a><h2>Signal Prototypes</h2>
<ul>
<li>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">MatchSelectedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z503_4">match_selected_signal</a>
<dl class="el"><dd class="mdescRight">Match selected signal (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_0">sig_match_selected()</a>). <a href="#z503_4"></a><br></dl><li>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">ActionActivatedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z503_5">action_activated_signal</a>
<dl class="el"><dd class="mdescRight"><a class="el" href="classGFC_1_1Gtk_1_1Action.html">Action</a> activated selected signal (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_1">sig_action_activated()</a>). <a href="#z503_5"></a><br></dl></ul>
<h2>Public Types</h2>
<ul>
<li>typedef sigc::slot< bool,<br>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &, const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & > <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#w0">MatchSlot</a>
<dl class="el"><dd class="mdescRight">Signature of the callback slot to be called the row indicated by the <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> matches a given key, and should be displayed as a possible completion for key. <a href="#w0"></a><br></dl></ul>
<h2>Public Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="anchor" name="z504_0" doxytag="GFC::Gtk::EntryCompletion::EntryCompletion" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z504_0">EntryCompletion</a> ()
<dl class="el"><dd class="mdescRight">Constructs a new entry completion object. <br></dl><li><a class="anchor" name="z504_1" doxytag="GFC::Gtk::EntryCompletion::~EntryCompletion" ></a>
virtual <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z504_1">~EntryCompletion</a> ()
<dl class="el"><dd class="mdescRight">Destructor. <br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<ul>
<li><a class="anchor" name="z505_0" doxytag="GFC::Gtk::EntryCompletion::gtk_entry_completion" ></a>
GtkEntryCompletion * <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z505_0">gtk_entry_completion</a> () const
<dl class="el"><dd class="mdescRight">Get a pointer to the GtkEntryCompletion structure. <br></dl><li><a class="anchor" name="z505_1" doxytag="GFC::Gtk::EntryCompletion::operator GtkEntryCompletion *" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z505_1">operator GtkEntryCompletion *</a> () const
<dl class="el"><dd class="mdescRight">Conversion operator; safely converts an <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> to a GtkEntryCompletion pointer. <br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Entry</a> * <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z505_2">get_entry</a> () const
<dl class="el"><dd class="mdescRight">Gets the entry widget the completion has been attached to. <a href="#z505_2"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">TreeModel</a> * <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z505_3">get_model</a> () const
<dl class="el"><dd class="mdescRight">Gets the model the entry completion is using as a data source. <a href="#z505_3"></a><br></dl><li>int <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z505_4">get_minimum_key_length</a> () const
<dl class="el"><dd class="mdescRight">Gets the minimum key length as set for completion. <a href="#z505_4"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Methods</div></td></tr>
<ul>
<li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_0">set_model</a> (<a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">TreeModel</a> &model)
<dl class="el"><dd class="mdescRight">Sets the model for the entry completion. <a href="#z506_0"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_1">set_match_func</a> (const <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#w0">MatchSlot</a> &slot)
<dl class="el"><dd class="mdescRight">Sets the match callback slot for completion to be <em>slot</em>. <a href="#z506_1"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_2">set_minimum_key_length</a> (int length)
<dl class="el"><dd class="mdescRight">Requires the length of the search key for completion to be at least length. <a href="#z506_2"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_3">complete</a> ()
<dl class="el"><dd class="mdescRight">Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. <a href="#z506_3"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_5">insert_action_text</a> (int index, const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &text)
<dl class="el"><dd class="mdescRight">Inserts an action in completion's action item list at position <em>index</em> with text <em>text</em>. <a href="#z506_5"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_7">insert_action_markup</a> (int index, const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &markup)
<dl class="el"><dd class="mdescRight">Inserts an action in completion's action item list at position <em>index</em> with markup <em>markup</em>. <a href="#z506_7"></a><br></dl><li><a class="anchor" name="z506_8" doxytag="GFC::Gtk::EntryCompletion::delete_action" ></a>
void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_8">delete_action</a> (int index)
<dl class="el"><dd class="mdescRight">Deletes the action at <em>index</em> from completion's action list. <br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_9">set_text_column</a> (int column)
<dl class="el"><dd class="mdescRight">A convenience method for setting up the most used case of this code: a completion list with just strings. <a href="#z506_9"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Signal Proxies</div></td></tr>
<ul>
<li><a class="anchor" name="z507_0" doxytag="GFC::Gtk::EntryCompletion::sig_match_selected" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">MatchSelectedSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_0">sig_match_selected</a> ()
<dl class="el"><dd class="mdescRight">Connect to the match_selected_signal; emitted when a match from the list is selected. <br></dl><li><a class="anchor" name="z507_1" doxytag="GFC::Gtk::EntryCompletion::sig_action_activated" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">ActionActivatedSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_1">sig_action_activated</a> ()
<dl class="el"><dd class="mdescRight">Connect to the action_activated_signal; emitted when an action is activated. <br></dl></ul>
<h2>Protected Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z502_0">EntryCompletion</a> (GtkEntryCompletion *completion, bool <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html#z143_1">owns_reference</a>=true)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> from an existing GtkEntryCompletion. <a href="#z502_0"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A GtkEntryCompletion C++ wrapper class.
<p>
<a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> is an auxiliary object to be used in conjunction with <a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Gtk::Entry</a> to provide the completion functionality. It implements the <a class="el" href="classGFC_1_1Gtk_1_1CellLayout.html">Gtk::CellLayout</a> interface to allow the user to add extra cells to the <a class="el" href="classGFC_1_1Gtk_1_1TreeView.html">Gtk::TreeView</a> with completion matches.<p>
"Completion functionality" means that when the user modifies the text in the entry, <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_9">set_text_column()</a>), but this can be overridden with a custom match function (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_1">set_match_func()</a>).<p>
When the user selects a completion, the content of the entry is updated. By default, the content of the entry is replaced by the text column of the model, but this can be overridden by connecting to the "match_selected" signal and updating the entry in the signal handler. Note that you should return <em>true</em> from the signal handler to suppress the default behaviour.<p>
To add completion functionality to an entry, use <a class="el" href="classGFC_1_1Gtk_1_1Entry.html#z500_7">Gtk::Entry::set_completion()</a>. In addition to regular completion matches, which will be inserted into the entry when they are selected, <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> also allows to display "actions" in the popup window. Their appearance is similar to menuitems, to differentiate them clearly from completion strings. When an action is selected, the "action_activated" signal is emitted.
<p>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="w0" doxytag="GFC::Gtk::EntryCompletion::MatchSlot" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef sigc::slot<bool, const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a>&, const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>&> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#w0">GFC::Gtk::EntryCompletion::MatchSlot</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Signature of the callback slot to be called the row indicated by the <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> matches a given key, and should be displayed as a possible completion for key.
<p>
<b>Example:</b> Method signature for MatchSlot. <div class="fragment"><pre> <span class="keywordtype">bool</span> method(<span class="keyword">const</span> String& key, <span class="keyword">const</span> TreeIter& iter);
<span class="comment">// key: The string to match.</span>
<span class="comment">// iter: A TreeIter indicating indicating the row to match.</span>
<span class="comment">// return: <EM>true</EM> if <EM>iter</EM> should be displayed as a possible completion for <EM>key</EM>. </span>
</pre></div> </td>
</tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="z502_0" doxytag="GFC::Gtk::EntryCompletion::EntryCompletion" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GFC::Gtk::EntryCompletion::EntryCompletion </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">GtkEntryCompletion * </td>
<td class="mdname" nowrap> <em>completion</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>owns_reference</em> = <code>true</code></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [explicit, protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Construct a new <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html">EntryCompletion</a> from an existing GtkEntryCompletion.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>completion</em> </td><td>A pointer to a GtkEntryCompletion. </td></tr>
<tr><td></td><td valign=top><em>owns_reference</em> </td><td>Set false if the initial reference count is floating, set true if it's not.</td></tr>
</table>
</dl>
<br>
The <em>completion</em> can be a newly created GtkEntryCompletion or an existing GtkEntryCompletion (see <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html#z68_0">G::Object::Object</a>). </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z506_3" doxytag="GFC::Gtk::EntryCompletion::complete" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::complete </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key.
<p>
The The completion list view will be updated accordingly. </td>
</tr>
</table>
<a class="anchor" name="z505_2" doxytag="GFC::Gtk::EntryCompletion::get_entry" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Entry</a>* GFC::Gtk::EntryCompletion::get_entry </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the entry widget the completion has been attached to.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The entry widget the completion is attached to. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z505_4" doxytag="GFC::Gtk::EntryCompletion::get_minimum_key_length" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int GFC::Gtk::EntryCompletion::get_minimum_key_length </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the minimum key length as set for completion.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The currently used minimum key length. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z505_3" doxytag="GFC::Gtk::EntryCompletion::get_model" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">TreeModel</a>* GFC::Gtk::EntryCompletion::get_model </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the model the entry completion is using as a data source.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">Gtk::TreeModel</a>, or null if none is currently being used. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z506_7" doxytag="GFC::Gtk::EntryCompletion::insert_action_markup" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::insert_action_markup </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>index</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname" nowrap> <em>markup</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Inserts an action in completion's action item list at position <em>index</em> with markup <em>markup</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>index</em> </td><td>The index of the item to insert. </td></tr>
<tr><td></td><td valign=top><em>markup</em> </td><td>The markup of the item to insert. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z506_5" doxytag="GFC::Gtk::EntryCompletion::insert_action_text" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::insert_action_text </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>index</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname" nowrap> <em>text</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Inserts an action in completion's action item list at position <em>index</em> with text <em>text</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>index</em> </td><td>The index of the item to insert. </td></tr>
<tr><td></td><td valign=top><em>text</em> </td><td>The text of the item to insert.</td></tr>
</table>
</dl>
<br>
If you want the action item to have markup, use <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z506_7">insert_action_markup()</a>. </td>
</tr>
</table>
<a class="anchor" name="z506_1" doxytag="GFC::Gtk::EntryCompletion::set_match_func" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::set_match_func </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#w0">MatchSlot</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>slot</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the match callback slot for completion to be <em>slot</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>slot</em> </td><td>The MatchSlot to use.</td></tr>
</table>
</dl>
<br>
The match slot is used to determine if a row should or should not be in the completion list. </td>
</tr>
</table>
<a class="anchor" name="z506_2" doxytag="GFC::Gtk::EntryCompletion::set_minimum_key_length" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::set_minimum_key_length </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>length</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Requires the length of the search key for completion to be at least length.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>length</em> </td><td>The minimum length of the key in order to start completing.</td></tr>
</table>
</dl>
<br>
This is useful for long lists, where completing using a small key takes a lot of time and will come up with meaningless results anyway (ie, a too large dataset). </td>
</tr>
</table>
<a class="anchor" name="z506_0" doxytag="GFC::Gtk::EntryCompletion::set_model" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::set_model </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">TreeModel</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>model</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the model for the entry completion.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>model</em> </td><td>The <a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">Gtk::TreeModel</a>.</td></tr>
</table>
</dl>
<br>
If the completion already has a model set, it will remove it before setting the new model. </td>
</tr>
</table>
<a class="anchor" name="z506_9" doxytag="GFC::Gtk::EntryCompletion::set_text_column" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::EntryCompletion::set_text_column </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>column</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
A convenience method for setting up the most used case of this code: a completion list with just strings.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>column</em> </td><td>The column in the model of completion to get strings from.</td></tr>
</table>
</dl>
<br>
This method will set up the completion to have a list displaying all (and just) strings in the completion list, and to get those strings from <em>column</em> in the model of completion. It creates and adds a <a class="el" href="classGFC_1_1Gtk_1_1CellRendererText.html">Gtk::CellRendererText</a> for the selected column. </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="z503_5" doxytag="GFC::Gtk::EntryCompletion::action_activated_signal" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">ActionActivatedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z503_5">GFC::Gtk::EntryCompletion::action_activated_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="classGFC_1_1Gtk_1_1Action.html">Action</a> activated selected signal (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_1">sig_action_activated()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">void</span> function(<span class="keyword">const</span> TreeModel& model, <span class="keyword">const</span> TreeIter& iter);
<span class="comment">// index: The index of the activated action.</span>
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="z503_4" doxytag="GFC::Gtk::EntryCompletion::match_selected_signal" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">MatchSelectedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z503_4">GFC::Gtk::EntryCompletion::match_selected_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Match selected signal (see <a class="el" href="classGFC_1_1Gtk_1_1EntryCompletion.html#z507_0">sig_match_selected()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">bool</span> function(<span class="keyword">const</span> TreeModel& model, <span class="keyword">const</span> TreeIter& iter);
<span class="comment">// model: The Gtk::TreeModel containing the matches.</span>
<span class="comment">// iter: A Gtk::TreeIter positioned at the selected match.</span>
<span class="comment">// return: true if the signal has been handled.</span>
</pre></div> </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="entrycompletion_8hh-source.html">entrycompletion.hh</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 24 00:34:39 2004 for GFC-UI by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>
|