rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMessageLabel Class Reference

Gadget class. More...

#include <ilviews/gadgets/msglabel.h>

Inheritance diagram for IlvMessageLabel:
IlvGadget IlvGadgetItemHolder IlvSimpleGraphic IlvGraphic IlvButton IlvFrame IlvArrowButton

List of all members.

Public Member Functions

 IlvMessageLabel (IlvDisplay *display, const IlvPoint &at, const char *message, IlvAlignment alignment=IlvLeft, IlUShort thickness=0, IlvPalette *palette=0, IlBoolean copy=IlTrue)
 Constructor.
 IlvMessageLabel (IlvDisplay *display, const char *message, const IlvRect &rect, IlvAlignment alignment=IlvLeft, IlUShort thickness=0, IlvPalette *palette=0, IlBoolean copy=IlTrue)
 Constructor.
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem f, IlAny arg)
 Applies the specified function to all the items of the holder.
IlvAlignment getAlignment () const
 Returns the alignment of the message label.
IlvBitmapgetBitmap () const
 Returns the bitmap associated with the message label.
IlvBitmapgetInsensitiveBitmap () const
 Returns the insensitive bitmap of the message label.
const char * getLabel () const
 Returns the label stored in the message label.
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the orientation of the label.
virtual IlvPosition getLabelPosition () const
 Returns the position of the label relative to the bitmap of the message label.
const char * getMessage () const
 Returns the translated message of the message label.
char getMnemonic () const
 Returns the mnemonic associated with the message label.
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item.
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items.
IlUShort getSpacing () const
 Returns the spacing between the label and the bitmap of the message label.
void setAlignment (IlvAlignment alignment)
 Sets the alignment of this message label.
void setBitmap (IlvBitmap *bitmap)
 Sets the bitmap of the message label.
void setInsensitiveBitmap (IlvBitmap *bitmap)
 Sets the insensitive bitmap of the message label.
void setLabel (const char *label, IlBoolean copy=IlTrue)
 Sets the label of the message label.
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the orientation of the label.
void setLabelPosition (IlvPosition pos, IlBoolean redraw=IlTrue)
 Sets the position of the label relative to the bitmap of the message label.
void setSpacing (IlUShort spacing, IlBoolean redraw=IlTrue)
 Sets the spacing between the label and the bitmap of the message label.

Friends

class IlvDefaultMessageLabelLFHandler

Detailed Description

Gadget class.

Library: ilvgadgt

The IlvMessageLabel class displays a message and an optional bitmap. A message label is a character string that can be translated to various languages to create localized applications. Translated strings are stored in a message database that can be associated with the current instance of IlvDisplay. Both sensitive and insensitive bitmaps can be specified for a message label. The insensitive bitmap will be used when the message label is insensitive. The message label can be placed to any position relative to the bitmap. The default IlvMessageLabel position is IlvCenter. This object has no associated default interactor.

IlvMessageLabela.gif

- IlvMessageLabel -

See also:
IlvMessageDatabase, IlvBitmap.

Constructor & Destructor Documentation

IlvMessageLabel::IlvMessageLabel ( IlvDisplay display,
const char *  message,
const IlvRect rect,
IlvAlignment  alignment = IlvLeft,
IlUShort  thickness = 0,
IlvPalette palette = 0,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the IlvMessageLabel class.

Parameters:
display The connection to the display.
message The label of the message label.
rect The size and position of the message label.
alignment The alignment of the message label inside its bounding box.
thickness The thickness of the message label.
palette The palette used by the message label.
copy A Boolean value specifying whether a message should be copied. If the value is IlFalse, then you must allocate some memory for the message because in any case the message characters are deleted from the memory by the IlvMessageLabel.
IlvMessageLabel::IlvMessageLabel ( IlvDisplay display,
const IlvPoint at,
const char *  message,
IlvAlignment  alignment = IlvLeft,
IlUShort  thickness = 0,
IlvPalette palette = 0,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the IlvMessageLabel class. Since only the position of the object is given, its size is computed according to its contents.

Parameters:
display The connection to the display.
message The label of the message label.
at The position of the message label.
alignment The alignment of the message label inside its bounding box.
thickness The thickness of the message label.
palette The palette used by the message label.
copy A Boolean value specifying whether a message should be copied. If the value is IlFalse, then you must allocate some memory for the message because in any case the message characters are deleted from the memory by the IlvMessageLabel.

Member Function Documentation

virtual IlvGadgetItem* IlvMessageLabel::applyToItems ( IlvApplyGadgetItem  func,
IlAny  arg 
) [virtual]

Applies the specified function to all the items of the holder.

Parameters:
func The function to be applied.
arg The argument that will be passed to the function func.
Returns:
The item that stopped the operation. See IlvApplyGadgetItem for details.
See also:
IlvApplyGadgetItem, recomputeAllItems, getItemByName.

Reimplemented from IlvGadgetItemHolder.

IlvAlignment IlvMessageLabel::getAlignment (  )  const

Returns the alignment of the message label.

Returns:
The alignment value used to draw the message label inside its bounding box.
See also:
setAlignment, setLabelPosition
IlvBitmap* IlvMessageLabel::getBitmap (  )  const

Returns the bitmap associated with the message label.

Returns:
The bitmap used by this message label, or 0 if there is none.
See also:
setBitmap, setInsensitiveBitmap
IlvBitmap* IlvMessageLabel::getInsensitiveBitmap (  )  const

Returns the insensitive bitmap of the message label.

The insensitive bitmap is displayed by the message label when it is set to insensitive. If only a sensitive bitmap is provided, and if the message label is set to insensitive, a default insensitive bitmap is automatically computed using the sensitive bitmap.

Returns:
The bitmap used by this message label when set to insensitive or 0 if there is none.
See also:
setInsensitiveBitmap, setBitmap
const char* IlvMessageLabel::getLabel (  )  const

Returns the label stored in the message label.

Returns:
The label stored in the object or 0 if no label has been set.
See also:
setLabel, getMessage
virtual void IlvMessageLabel::getLabelOrientation ( IlvOrientation orientation,
IlBoolean flip 
) const [virtual]

Returns the orientation of the label.

Parameters:
orientation The label orientation.
flip A Boolean value specifying whether the label is drawn from top to bottom or from bottom to top.
See also:
setLabelOrientation

Reimplemented from IlvGadgetItemHolder.

virtual IlvPosition IlvMessageLabel::getLabelPosition (  )  const [virtual]

Returns the position of the label relative to the bitmap of the message label.

Returns:
The position of the label relative to the bitmap.
See also:
setLabelPosition, setAlignment

Reimplemented from IlvGadgetItemHolder.

const char* IlvMessageLabel::getMessage (  )  const

Returns the translated message of the message label.

Returns:
The definition of the message stored in this object translated in the current language or 0 if no label is associated with this message label. If the message stored in this object has no translation in the current language, the method simply returns the message itself.
See also:
getLabel, IlvMessageDatabase
char IlvMessageLabel::getMnemonic (  )  const

Returns the mnemonic associated with the message label.

Returns:
The mnemonic used by this message label or 0 if there is none.
See also:
setLabel
virtual IlvPalette* IlvMessageLabel::getNormalTextPalette (  )  const [virtual]

Returns the default palette used to draw an item.

Returns:
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvMessageLabel::getOpaquePalette (  )  const [virtual]

Returns the opaque palette used to draw opaque items.

Returns:
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

IlUShort IlvMessageLabel::getSpacing (  )  const

Returns the spacing between the label and the bitmap of the message label.

Returns:
The spacing between the label and the bitmap of this message label.
See also:
setSpacing, setLabelPosition
void IlvMessageLabel::setAlignment ( IlvAlignment  alignment  ) 

Sets the alignment of this message label.

Sets the alignment of the whole message label inside its bounding box. Note that the message label is not redrawn.

Parameters:
alignment The alignment of the message label. Valid values are: IlvLeft, IlvCenter, IlvRight.
See also:
getAlignment, getLabelPosition
void IlvMessageLabel::setBitmap ( IlvBitmap bitmap  ) 

Sets the bitmap of the message label.

Allows you to set a bitmap to this message label. If the message label already owns a bitmap, this bitmap is unlocked. The new bitmap is locked. Note that the message label is not redrawn.

Parameters:
bitmap The new bitmap.
See also:
getBitmap, getInsensitiveBitmap
void IlvMessageLabel::setInsensitiveBitmap ( IlvBitmap bitmap  ) 

Sets the insensitive bitmap of the message label.

Allows you to set an insensitive bitmap for this message label. If the message label already owns an insensitive bitmap, this bitmap is unlocked. The new bitmap is locked.

Parameters:
bitmap The new insensitive bitmap.
See also:
getInsensitiveBitmap, getBitmap
void IlvMessageLabel::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
)

Sets the label of the message label.

Parameters:
label The new label to be set. 0 is a valid value.
copy A Boolean value specifying whether a message should be copied. If the value is IlFalse, then you must allocate some memory for the message because in any case the message characters are deleted from the memory by the IlvMessageLabel.
See also:
getLabel, getMessage
void IlvMessageLabel::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse,
IlBoolean  redraw = IlTrue 
)

Sets the orientation of the label.

Parameters:
orientation The label orientation. Valid values are: IlvHorizontal and IlvVertical.
flip A Boolean value specifying whether the label is drawn from top to bottom or from bottom to top.
redraw A Boolean value specifying whether the message label should be redrawn.
See also:
getLabelOrientation
void IlvMessageLabel::setLabelPosition ( IlvPosition  pos,
IlBoolean  redraw = IlTrue 
)

Sets the position of the label relative to the bitmap of the message label.

Parameters:
pos The new position of the label. Valid positions are: IlvLeft, IlvTopLeft, IlvTop, IlvTopRight, IlvRight, IlvBottomRight, IlvBottom, IlvBottomLeft, IlvCenter.
redraw A Boolean value specifying whether the message label should be redrawn.
See also:
getLabelPosition, getAlignment
void IlvMessageLabel::setSpacing ( IlUShort  spacing,
IlBoolean  redraw = IlTrue 
)

Sets the spacing between the label and the bitmap of the message label.

Parameters:
spacing The new spacing.
redraw A Boolean value specifying whether the message label should be redrawn.
See also:
getSpacing, getLabelPosition
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.