com.leafdigital.ircui.api
Interface IRCUI

All Superinterfaces:
Singleton

public interface IRCUI
extends Singleton

Access to parts of the IRC user interface, such as chat windows and the like.


Method Summary
 GeneralChatWindow createGeneralChatWindow(PluginContext owner, GeneralChatWindow.Handler h, java.lang.String logSource, java.lang.String logCategory, java.lang.String logItem, int availableBytes, java.lang.String ownNick, java.lang.String target, boolean startMinimised)
          Creates a new chat window.
 MessageDisplay getMessageDisplay(Server s)
          Obtains a MessageDisplay object which can be used to add text to the current window for a given server.
 

Method Detail

getMessageDisplay

MessageDisplay getMessageDisplay(Server s)
Obtains a MessageDisplay object which can be used to add text to the current window for a given server. If there is no window for that server then one will be created if text is added (not otherwise).

Parameters:
s - Server to display messages for (may be null)
Returns:
MessageDisplay that shows messages appropriately for that server

createGeneralChatWindow

GeneralChatWindow createGeneralChatWindow(PluginContext owner,
                                          GeneralChatWindow.Handler h,
                                          java.lang.String logSource,
                                          java.lang.String logCategory,
                                          java.lang.String logItem,
                                          int availableBytes,
                                          java.lang.String ownNick,
                                          java.lang.String target,
                                          boolean startMinimised)
Creates a new chat window. This window is like a message window but has no connection to any particular server and does not automatically display anything. Methods of GeneralChatWindow must be used to make the window display things.

Parameters:
owner - Context that owns window. If this plugin is unloaded, the window will automatically close itself
h - Callback that handles command entry from the window
logSource - Source for log address. Usually a server address but can be something else. Use null to prevent logging
logCategory - Category of thing for log. Logger.CATEGORY_xx constant or custom name
logItem - Item name for log. For Logger.CATEGORY_USER, must be nick; for CATEGORY_CHAN, must be channel. For custom types can be anything appropriate
availableBytes - Number of bytes allowed per line of text (best to include a safe margin), used for auto-wrapping text. Applies only to text not to /-commands which are auto-limited at 400 odd.
ownNick - User's own nick for purposes of this window (display own messages)
target - Target's nick (or other identifier), i.e. where text to this window goes; will be matched up against showOwnText value
startMinimised - True if window should be minimised to start with
Returns:
Interface to the window


Copyright © 2011 Samuel Marshall. All rights reserved.