Appendix D. Using KCWin for Input/Output Windows

KCWin is a standard plugin distributed with KildClient that allows you to create windows with a terminal for output and an entry box for input. These windows do nothing by themselves, but they can be used by other plugins when they need a window for input and output. The output area supports ANSI colors and thus is like a mini MUD window.

This plugin requires the gtk3-perl bindings. It will fail to run if these bindings are not found.

This plugin is more often used as a helper for other plugins. A plugin that uses KCWin should use $::world->requireplugin('KCWin') in a BEGIN block, as described in Section E.5.1.

Use KCWin->new to create a new window. KCWin derives from Gtk3::Window so you can use all of its methods.

The widgets are accessible for customization. If $kcw is a KCWin, the following widgets are available:

The widgets can be used, and the window can be customized (by adding other widgets, for example). Some common actions have functions in KCWin as a shortcut. These functions will be described in the following sections.

D.1. Changes from Previous Versions

KCWin version 2.x was based on the gtk2-perl bindings, for GTK+ 2.x. KCwin 3.x is based on gtk3-perl, just as KildClient 3.x uses GTK+ 3.x. If your plugin uses GTK+ functions directly, you'll have to convert it to use gtk3-perl.