Class GLabel

GObject
   extended by GLabel

The GLabel class is a graphical object whose appearance consists of a text string.


Constructor Summary
GLabel(text)
Creates a new GLabel object initialized to contain the specified string.
GLabel(text, x, y)
Creates a new GLabel object with its baseline origin at the specified position.
 
Method Summary
get_ascent()
Returns the distance this font extends above the baseline.
get_descent()
Returns the distance this font descends below the baseline.
get_font()
Returns the font in which the GLabel is displayed.
get_label()
Returns the string displayed by this object.
set_font(font)
Changes the font used to display the GLabel as indicated by the string str, which is interpreted as a CSS font specification.
set_label(text)
Changes the string stored within the GLabel object, so that a new text string appears on the display.
 
Inherited Method Summary
contains(x, y)
Checks to see whether a point is inside the object.
get_bounds()
Returns the bounding box for this object.
get_color()
Returns the color used to display the text of the GLabel.
get_height()
Returns the height of this object, which is defined to be the height of the bounding box.
get_location()
Returns the location of the GLabel as a GPoint object.
get_size()
Returns the size of the bounding box for this object.
get_width()
Returns the width of this object, which is defined to be the width of the bounding box.
get_x()
Returns the x-coordinate of the object.
get_y()
Returns the y-coordinate of the object.
is_visible()
Checks to see whether the GLabel is visible.
move(dx, dy)
Moves the object on the screen using the displacements dx and dy.
move_polar(r, theta)
Moves the object using displacements given in polar coordinates.
send_backward()
Moves this object one step toward the back in the z dimension.
send_forward()
Moves this object one step toward the front in the z dimension.
send_to_back()
Moves this object to the back of the display in the z dimension.
send_to_front()
Moves this object to the front of the display in the z dimension.
set_color(color)
Sets the color used to display this object.
set_location(x, y)
Sets the location of the GLabel to the point (x, y). For a GLabel, the location is the point on the text baseline at which the text starts.
set_visible(flag)
Sets the visibility status of the GLabel.
 

Constructor Detail

GLabel(text) str)

Creates a new GLabel object initialized to contain the specified string.
Usage: glabel = GLabel(str) 
Parameter: 
str  The initial contents of the GLabel
 


GLabel(text, x, y)

Creates a new GLabel object with its baseline origin at the specified position.
Usage: glabel = GLabel(str, x, y) 
Parameters: 
str  The initial contents of the GLabel
 The x-coordinate of the label origin
 The y-coordinate of the baseline for the label
 

Method Detail

get_ascent()

Returns the distance this font extends above the baseline.
Usage: ascent = glabel.get_ascent() 
Returns: The ascent of this font in pixels
 


get_descent()

Returns the distance this font descends below the baseline.
Usage: descent = glabel.get_descent() 
Returns: The descent of this font in pixels
 


get_font()

Returns the font in which the GLabel is displayed.
Usage: font = glabel.get_font() 
Returns: The font in use by this object
 


get_label()

Returns the string displayed by this object.
Usage: str = glabel.get_label() 
Returns: The string displayed by this object
 


set_font(font)

Changes the font used to display the GLabel as indicated by the string font, which is interpreted in the style of CSS font specification.
Usage: glabel.set_font(str) 
Parameter: 
str  A string specifying the new font
 


set_label(text) str)

Changes the string stored within the GLabel object, so that a new text string appears on the display.
Usage: glabel.set_label(str) 
Parameter: 
str  The new string to display