rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Friends
IlvMessageLabel Class Reference

Gadget class. More...

#include <ilviews/gadgets/msglabel.h>

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

Public Member Functions

 IlvMessageLabel (IlvDisplay *display, const char *message, const IlvRect &rect, IlvAlignment alignment=IlvLeft, IlUShort thickness=0, IlvPalette *palette=0, IlBoolean copy=IlTrue)
 Constructor. More...
 
 IlvMessageLabel (IlvDisplay *display, const IlvPoint &at, const char *message, IlvAlignment alignment=IlvLeft, IlUShort thickness=0, IlvPalette *palette=0, IlBoolean copy=IlTrue)
 Constructor. More...
 
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem f, IlAny arg)
 Applies the specified function to all the items of the holder. More...
 
IlvAlignment getAlignment () const
 Returns the alignment of the message label. More...
 
IlvBitmapgetBitmap () const
 Returns the bitmap associated with the message label. More...
 
IlvBitmapgetInsensitiveBitmap () const
 Returns the insensitive bitmap of the message label. More...
 
const char * getLabel () const
 Returns the label stored in the message label. More...
 
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the orientation of the label. More...
 
virtual IlvPosition getLabelPosition () const
 Returns the position of the label relative to the bitmap of the message label. More...
 
const char * getMessage () const
 Returns the translated message of the message label. More...
 
char getMnemonic () const
 Returns the mnemonic associated with the message label. More...
 
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
IlUShort getSpacing () const
 Returns the spacing between the label and the bitmap of the message label. More...
 
void setAlignment (IlvAlignment alignment)
 Sets the alignment of this message label. More...
 
void setBitmap (IlvBitmap *bitmap)
 Sets the bitmap of the message label. More...
 
void setInsensitiveBitmap (IlvBitmap *bitmap)
 Sets the insensitive bitmap of the message label. More...
 
void setLabel (const char *label, IlBoolean copy=IlTrue)
 Sets the label of the message label. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the orientation of the label. More...
 
void setLabelPosition (IlvPosition pos, IlBoolean redraw=IlTrue)
 Sets the position of the label relative to the bitmap of the message label. More...
 
void setSpacing (IlUShort spacing, IlBoolean redraw=IlTrue)
 Sets the spacing between the label and the bitmap of the message label. More...
 
- Public Member Functions inherited from IlvGadgetItemHolder
virtual IlvGadgetItemcreateItem (const char *label, IlvGraphic *graphic=0, IlvBitmap *bitmap=0, IlvBitmap *selbitmap=0, IlBoolean copy=IlTrue) const
 Returns a new gadget item. More...
 
virtual void drawGadgetItem (const IlvGadgetItem *item, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a specific gadget item. More...
 
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
virtual void reDrawItems ()
 Ends a redraw session. More...
 
void setDragDropTarget (IlvGadgetItem *item)
 Sets the target item of a drag-and-drop operation. More...
 
void setDraggedImage (IlvGraphic *graphic)
 Sets the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
void setDraggedItem (IlvGadgetItem *item)
 Sets the dragged item. More...
 

Friends

class IlvDefaultMessageLabelLFHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvGadgetItemHolder
static IlSymbolAbortDragItemCallbackType ()
 Returns the callback type of the Abort Drag callback. More...
 
static IlSymbolAbortEditItemCallbackType ()
 Returns the callback type of the Abort Edit callback. More...
 
static IlSymbolActivateCallbackType ()
 Returns the callback type of the Activate callback. More...
 
static IlSymbolDragItemCallbackType ()
 Returns the callback type of the Drag Item callback. More...
 
static IlSymbolEndDragItemCallbackType ()
 Returns the callback type of the End Drag callback. More...
 
static IlSymbolEndEditItemCallbackType ()
 Returns the callback type of the End Edit callback. More...
 
static IlSymbolStartDragItemCallbackType ()
 Returns the callback type of the Start Drag callback. More...
 
static IlSymbolStartEditItemCallbackType ()
 Returns the callback type of the Start Edit callback. More...
 
- Protected Member Functions inherited from IlvGadgetItemHolder
virtual void abortDragItem ()
 Is called when a drag-and-drop operation is aborted. More...
 
virtual void abortEdit (IlvGadgetItem *item)
 Is called when the editing of the specified item is aborted. More...
 
virtual void drawDraggedImage (const IlvPoint &point, const IlvTransformer *t)
 Is called to draw the ghost image during a drag-and-drop operation. More...
 
virtual void endDragItem (const IlvPoint &point)
 Is called when a drag-and-drop operation is finished. More...
 
virtual void endEdit (IlvGadgetItem *item)
 Is called after an item has been edited. More...
 
virtual void itemActivated (IlvGadgetItem *item)
 Is called when an item is activated. More...
 
virtual void itemDeSelected (IlvGadgetItem *item)
 Is called when an item is deselected. More...
 
virtual void itemDragged (const IlvPoint &point)
 Is called each time the user moves the mouse during a drag-and-drop operation. More...
 
virtual void itemHighlighted (IlvGadgetItem *item)
 Is called when an item is highlighted or unhighlighted. More...
 
virtual void itemSelected (IlvGadgetItem *item)
 Is called when an item is selected. More...
 
virtual void startDragItem (IlvGadgetItem *item)
 Is called when a drag-and-drop operation begins. More...
 
virtual void startEdit (IlvGadgetItem *item)
 Is called when an item is edited. More...
 

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.

- 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
displayThe connection to the display.
messageThe label of the message label.
rectThe size and position of the message label.
alignmentThe alignment of the message label inside its bounding box.
thicknessThe thickness of the message label.
paletteThe palette used by the message label.
copyA 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
displayThe connection to the display.
messageThe label of the message label.
atThe position of the message label.
alignmentThe alignment of the message label inside its bounding box.
thicknessThe thickness of the message label.
paletteThe palette used by the message label.
copyA 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
funcThe function to be applied.
argThe 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
orientationThe label orientation.
flipA 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
alignmentThe 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
bitmapThe 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
bitmapThe new insensitive bitmap.
See Also
getInsensitiveBitmap, getBitmap
void IlvMessageLabel::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
)

Sets the label of the message label.

Parameters
labelThe new label to be set. 0 is a valid value.
copyA 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
orientationThe label orientation. Valid values are: IlvHorizontal and IlvVertical.
flipA Boolean value specifying whether the label is drawn from top to bottom or from bottom to top.
redrawA 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
posThe new position of the label. Valid positions are: IlvLeft, IlvTopLeft, IlvTop, IlvTopRight, IlvRight, IlvBottomRight, IlvBottom, IlvBottomLeft, IlvCenter.
redrawA 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
spacingThe new spacing.
redrawA Boolean value specifying whether the message label should be redrawn.
See Also
getSpacing, getLabelPosition

© Copyright 2014, 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.