Class uifcLabel

# include <uifcLabel.h>

class
uifcLabel
: public virtual
uifcText
{
xaideclare(uifcLabel)
...
};


Description
User Guide References:
Methods Inherited from Class uifcComponent::
Methods Inherited from Class uifcText::
Method Summary
void
void
CreateTimer (uifcLabelTimer_ptr timer, xrstring timerName, xbool writeInTrail)
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
StartTimer (xrstring timerName, xint duration)
void
StopTimer (xrstring timerName)
Method Detail
void
SetFrameRectangle
Set the size and screen position of the component, in pixels. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
rect
Returns:
void
DeletePopupMenu
()
Delete a MenuPane from the component.
Returns:
GetFrameOrigin
()
Determine the position of the component, in pixels, relative to its parent.
Returns:
InsertPopupMenu
(uifcComponent_ptr component)
Add a MenuPane to be displayed when the user presses the right mouse button over the component.
Parameters:
component
Returns:
void
SetFrameOrigin
(uifcPoint_ptr value)
Set the screen position of the component, in pixels, relative to its parent. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
value
Returns:
GetTextSize
(xrstring str)
Get the size in pixels of the given text string.
Parameters:
str
Returns:
GetFrameMinimumSize
()
Determine the minimum size of the component, in pixels.
Returns:
GetScreenOrigin
()
Determine the screen position of the component, in pixels.
Returns:
void
SetFrameSize
Set the size of the component, in pixels. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
value
Returns:
GetScreenRectangle
()
Determine the size and screen position of the component, in pixels.
Returns:
GetRectangleOfMonitor
()
Determine the rectangle of the screen upon which the majority of the given component is displayed.
Returns:
GetFrameSize
()
Determine the size of the component, in pixels.
Returns:
GetFrameRectangle
()
Determine the size and position of the component, in pixels.
Returns:
GetImageColor
()
Returns:
The foreground color of the image of the Label, if the image has a depth of 1, as a uifcColor.
void
SetImageColor
(xint value)
Sets the foreground color of the image of the Label, if the image has a depth of 1, as a uifcColor.
Parameters:
value
Returns:
GetImage
()
Returns:
The image of the Label.
This may be a BIF (the .bif extension is optional) file or a JPG, PNG, PCX, GIF, BMP, ICO or CUR file.
void
SetImage
(xrstring value)
Sets the image of the Label.
This may be a BIF (the .bif extension is optional) file or a JPG, PNG, PCX, GIF, BMP, ICO or CUR file.
Parameters:
value
Returns:
GetItemImageBackgroundColorArray
()
Returns:
The background colors of the images of the items of the component, as either a uifcColor or a uifcColor.
void
SetItemImageBackgroundColorArray
(xintsequence_ptr values)
Sets the background colors of the images of the items of the component, as either a uifcColor or a uifcColor.
Parameters:
values
Returns:
GetText
()
Returns:
The label of the Label.
The text may be single or multi-line, and may contain a mnemonic by prefixing the mnemonic character with an ampersand.
void
SetText
(xrstring value)
Sets the label of the Label.
The text may be single or multi-line, and may contain a mnemonic by prefixing the mnemonic character with an ampersand.
Parameters:
value
Returns:
IsStatusBar
()
Returns:
Flag indicating whether the Label has a decorated sunken shadow border.
void
SetStatusBar
(xbool flag)
Sets flag indicating whether the Label has a decorated sunken shadow border.
Parameters:
flag
Returns:
GetTextAlignment
()
Returns:
The justification of the label of the Label if the label is multi-line.
ALIGNMENT_LEFT
Left justified
ALIGNMENT_CENTER
Center justified
ALIGNMENT_RIGHT
Right justified
void
SetTextAlignment
(uifcAlignment value)
Sets the justification of the label of the Label if the label is multi-line.
ALIGNMENT_LEFT
Left justified
ALIGNMENT_CENTER
Center justified
ALIGNMENT_RIGHT
Right justified
Parameters:
value
Returns:
CanWrap
()
Returns:
Flag indicating whether the label of the component should wrap within the available space granted to the component by its parent. Currently this flag is only supported for components which are the children of a MenuPane, where the MenuPane has been assigned a given size by the application code.
void
SetCanWrap
(xbool flag)
Sets flag indicating whether the label of the component should wrap within the available space granted to the component by its parent. Currently this flag is only supported for components which are the children of a MenuPane, where the MenuPane has been assigned a given size by the application code.
Parameters:
flag
Returns:
GetSelectedItemNameArray
()
Returns:
The names of the selected items of the component.
void
SetSelectedItemNameArray
Sets the names of the selected items of the component.
Parameters:
values
Returns:
GetContentArrangement
()
Returns:
The alignment of the image and label of the Label.
This is made up of between 1 and 4 digits which represent the relative locations of the image and label.
The first digit is the image alignment within the bounds of the Label:
1
2
3
4
5
6
7
8
9
The second digit is optional and is the label alignment within the bounds of the Label, using the same scheme as above. If no digit is specified then the label alignment is assumed to be the same as the image alignment.
The third digit is also optional and is the relative position of the image and the label if the first 2 digits are equal. If no digit is specified then the relative position is assumed to be 1.
1
The image to the left of the label
2
The image to the right of the label
3
The image above the label
4
The image below the label
The fourth digit is also optional and is a flag representing whether how the image and label should be displayed. If no digit is specified then then fourth digit is assumed to be 1.
1
Display both the image and label
2
Display only the image
3
Display only the label
void
SetContentArrangement
(xint value)
Sets the alignment of the image and label of the Label.
This is made up of between 1 and 4 digits which represent the relative locations of the image and label.
The first digit is the image alignment within the bounds of the Label:
1
2
3
4
5
6
7
8
9
The second digit is optional and is the label alignment within the bounds of the Label, using the same scheme as above. If no digit is specified then the label alignment is assumed to be the same as the image alignment.
The third digit is also optional and is the relative position of the image and the label if the first 2 digits are equal. If no digit is specified then the relative position is assumed to be 1.
1
The image to the left of the label
2
The image to the right of the label
3
The image above the label
4
The image below the label
The fourth digit is also optional and is a flag representing whether how the image and label should be displayed. If no digit is specified then then fourth digit is assumed to be 1.
1
Display both the image and label
2
Display only the image
3
Display only the label
Parameters:
value
Returns:
GetItemImageArray
()
Returns:
The images of the items of the component.
Each image may be a BIF (the .bif extension is optional) file or a JPG, PNG, PCX, GIF, BMP, ICO or CUR file.
void
SetItemImageArray
Sets the images of the items of the component.
Each image may be a BIF (the .bif extension is optional) file or a JPG, PNG, PCX, GIF, BMP, ICO or CUR file.
Parameters:
values
Returns:
CanTruncateText
()
Returns:
Flag indicating whether to truncate the label of the Label with ellipsis if there is insufficient space to display the entire text string.
void
SetCanTruncateText
(xbool flag)
Sets flag indicating whether to truncate the label of the Label with ellipsis if there is insufficient space to display the entire text string.
Parameters:
flag
Returns:
GetItemImageColorArray
()
Returns:
The foreground colors of the images of the items of the component, as either a uifcColor or a uifcColor.
void
SetItemImageColorArray
(xintsequence_ptr values)
Sets the foreground colors of the images of the items of the component, as either a uifcColor or a uifcColor.
Parameters:
values
Returns:
GetItemNameArray
()
Returns:
The names of the items of the component.
void
SetItemNameArray
Sets the names of the items of the component.
Parameters:
values
Returns:
CanResizeWhenNeeded
()
Returns:
Flag indicating whether the Label should attempt to resize when its contents are changed.
void
SetCanResizeWhenNeeded
(xbool flag)
Sets flag indicating whether the Label should attempt to resize when its contents are changed.
Parameters:
flag
Returns:
GetMnemonicFocusName
()
Returns:
The name of the component which should receive the keyboard input focus when the user presses the mnemonic key combination of the Label.
void
SetMnemonicFocusName
(xrstring value)
Sets the name of the component which should receive the keyboard input focus when the user presses the mnemonic key combination of the Label.
Parameters:
value
Returns:
GetItemTextArray
()
Returns:
The labels of the items of the component.
void
SetItemTextArray
Sets the labels of the items of the component.
Parameters:
values
Returns:
GetImageBackgroundColor
()
Returns:
The background color of the image of the Label, if the image has a depth of 1, as a uifcColor.
void
SetImageBackgroundColor
(xint value)
Sets the background color of the image of the Label, if the image has a depth of 1, as a uifcColor.
Parameters:
value
Returns:
void
AddActionListener
Parameters:
listener
Returns:
void
PushAction
(uifcLabelAction action)
Parameters:
action
Returns:
void
CreateTimer
(uifcLabelTimer_ptr timer, xrstring timerName, xbool writeInTrail)
Parameters:
timer
timerName
writeInTrail
Returns:
void
StartTimer
(xrstring timerName, xint duration)
Parameters:
timerName
duration
Returns:
void
StopTimer
(xrstring timerName)
Parameters:
timerName
Returns:
Was this helpful?