![]() |
![]() |
buttonAdds/removes/changes user definable buttons |
|
Syntax | |
|
|
Description | |
Adds a new user defined button with the specified <name>. The button <type> must be one of the constants "toolbar" , "context" and "window". "toolbar" stands for frame-wide toolbar button, "context" stands for irc-context specific toolbar button , "window" stands for window button. The <type> constants may be abbreviated (even to the letters 't','c' and 'w'). The button image is specified by the <image_id>. The optional button text is specified by <label_text>. The <callback_code> will be executed as reaction to a button press. The frame-wide buttons have their callback_code executed in the active window (thus are not bound to any IRC context) and are ALWAYS visible. The irc context specific buttons have their callback_code executed in the console of the irc context that they are bound to, and may be not visible if the irc context is not the current one. If a button with <name> already exists in the current irc context (or frame window for frame wide buttons), its parameters are changed according to the passed values (<image_id>, <label_text> and <callback_code>). The "window" type button can be added only to the windows that have a button container: this actually includes at least console , channels and queries. The button is added to the current window; if you want to add it to a different window , use the standard -r command rebinding switch. The <callback_code> will be executed as reaction to a button press; the code execution will be bound to the window that the button is attacched to. If a button with <name> already exists in the current window, its parameters are changed according to the passed values (<image_id>, <label_text> and <callback_code>). Passing an empty <callback_value> removes the button. The callback parameters $0 and $1 will contain the screen coordinates of the bottom-left corner of the button: this is useful for showing a popup menu in response to the click. If the -q switch is used , this command prints no warnings. The -d switch causes the button to be disabled (grayed). |
|
Examples | |
|
|
See also | |
button |