Main Page   Class Hierarchy   Compound List   File List   Compound Members  

KrButton Class Reference

A super class for more specialized buttons. More...

#include <button.h>

Inheritance diagram for KrButton::

KrWidget KrImNode IKrWidgetListener KrPushButton KrToggleButton List of all members.

Public Methods

void SetTextChar (const std::string &text)
 Set the text of the button. The font used is specified in the Scheme.

void SetIcon (KrSprite *giveSprite)
 Put a sprite on the button, as an icon or "decal" image. More...


Detailed Description

A super class for more specialized buttons.

It's only external method is to set the text of the button.


Member Function Documentation

void KrButton::SetIcon KrSprite   giveSprite
 

Put a sprite on the button, as an icon or "decal" image.

The sprite is passed to the Button, which owns it and will delete it when the Button is deleted. The Frame and Action of the Sprite will be unchanged by the button.

You can change the Frame or Action, but the button will always position and size the icon based on the Frame and Action at the time it was added.

The icon can be changed at any time, and the button will clean up memory and create a new one.


The documentation for this class was generated from the following file:
Generated on Mon Sep 15 12:01:11 2003 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001