Class gtk.Widget
Extends
gtk.Object.
Defined in: jsgtk_merge_for_doc.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Widget is a main base class of all widgets, this widget inherit from gtk.Object.
|
Method Attributes | Method Name and Description |
---|---|
activate()
A method to emit the "activated" signal on the widget
|
|
disable()
A method to disable widget, widget will be no more functioning
|
|
enable()
A method to enable widget, widget will turn to its normal state
|
|
A method to return the name of the signal that is emitted when the widget is activated.
|
|
A method to return the current height to widget
|
|
A method to return the minimum composite height, if the widget contains children,
the minHeight will be the smallest height that the widget and its children can be shrinken
|
|
A method to return the minimum composite width, if the widget contains children,
the minWidth will be smallest with that the widget and its children can be shrinken
|
|
getNode()
A method to return Dom wiget as an object
|
|
A method to get reference of wiget's parent widget
|
|
getSize(The)
A method to return an array of current width and height
|
|
A method to return the minimum width and height of widget
|
|
getTag()
A method to get its tag
|
|
getWidth()
A method to return the current width to widget
|
|
hide()
A method to hide the widget
|
|
A method to hide loading image inside the widget
|
|
A method to hide tooltip
|
|
isHidden()
A method to return true if widget is hidden and vice versa
|
|
refresh()
A method to reload or refresh the contents inside the widget
|
|
A method to reset to default composite height
|
|
resetMinHeight(height)
A method to reset the mininimum height of widget
|
|
resetMinSize(width, height)
Reset the mininimum width and minimum height of widget
|
|
resetMinWidth(width)
A method to reset the mininimum width of widget
|
|
A method to reset to default composite width
|
|
resizeHeightComposite(height)
A method to resize the wiget and its children's heights
|
|
resizeWidthComposite(width)
A method to resize the wiget and its children's width
|
|
setActivateSignal(signal)
A method to set the activate signal name
|
|
setBoldTitle(bold)
A method to set title to bold style
|
|
setEnable(,)
A method to set enabled or disabled
|
|
setHeight(height)
A method to set new height to the widget
|
|
setParent(widget)
A method to store the reference of widget's parent
|
|
setSize(width, height)
A method to set the width and height of widget
|
|
setSizeRequest(width, height)
A method to reset the minimum width and height of widget
|
|
setTag(tag)
A method to set tag onto it
|
|
setTooltip(textMessage)
A method to set tooltip content into its body
|
|
setWidth(width)
A method to set new width to widget
|
|
show()
A method to show the widget
|
|
A method to show the loading image while loading
|
|
showTooltip(isToShow)
A method to show or hide tooltip on widget
|
|
A method to get width and height
|
- Methods borrowed from class gobject.GObject:
- connect, disconnect, emit
Class Detail
gtk.Widget()
Widget is a main base class of all widgets, this widget inherit from gtk.Object.
It is used to create any widget such gtk.Entry, gtk.ComboBox, ... and so on.
Method Detail
{Boolean}
activate()
A method to emit the "activated" signal on the widget
- Returns:
- {Boolean} The boolean value which is true or false
disable()
A method to disable widget, widget will be no more functioning
enable()
A method to enable widget, widget will turn to its normal state
{String}
getActivateSignal()
A method to return the name of the signal that is emitted when the widget is activated.
- Returns:
- {String} The signal name that is registered
{Integer}
getHeight()
A method to return the current height to widget
- Returns:
- {Integer} The height value in pixel of the widget
{Integer}
getMinHeightComposite()
A method to return the minimum composite height, if the widget contains children,
the minHeight will be the smallest height that the widget and its children can be shrinken
- Returns:
- {Integer} The minimum height value in pixel
{Integer}
getMinWidthComposite()
A method to return the minimum composite width, if the widget contains children,
the minWidth will be smallest with that the widget and its children can be shrinken
- Returns:
- {Integer} The minimum width value in pixel
{Object}
getNode()
A method to return Dom wiget as an object
- Returns:
- {Object} The Dom object value to be appended to any HTML element
{Object}
getParent()
A method to get reference of wiget's parent widget
- Returns:
- {Object} The parent object of the widget
{Array}
getSize(The)
A method to return an array of current width and height
- Parameters:
- {Array} The
- array values contains width and height
{Array}
getSizeRequest()
A method to return the minimum width and height of widget
- Returns:
- {Array} The array values of minimum width and height
{String}
getTag()
A method to get its tag
- Returns:
- {String} The tag name of the widget
{Integer}
getWidth()
A method to return the current width to widget
- Returns:
- {Integer} The integer width value of the widget
hide()
A method to hide the widget
- See:
- gtk.Widget#show
hideLoading()
A method to hide loading image inside the widget
hideTooltip()
A method to hide tooltip
{Boolean}
isHidden()
A method to return true if widget is hidden and vice versa
- Returns:
- {Boolean} The boolean value, true or false
refresh()
A method to reload or refresh the contents inside the widget
resetHeightComposite()
A method to reset to default composite height
resetMinHeight(height)
A method to reset the mininimum height of widget
- Parameters:
- {Integer} height
- The new minimum height value in pixel
resetMinSize(width, height)
Reset the mininimum width and minimum height of widget
- Parameters:
- {Integer} width
- The new minimum width value of the widget
- {Integer} height
- The new minimum height value of the widget
resetMinWidth(width)
A method to reset the mininimum width of widget
- Parameters:
- {Integer} width
- The new minimum width value of the widget
resetWidthComposite()
A method to reset to default composite width
resizeHeightComposite(height)
A method to resize the wiget and its children's heights
- Parameters:
- {Integer} height
- The height in pixel value to be set
resizeWidthComposite(width)
A method to resize the wiget and its children's width
- Parameters:
- {Integer} width
- The integer width value in pixel to be set
setActivateSignal(signal)
A method to set the activate signal name
- Parameters:
- {String} signal
- The signal name to be set. And it must be from any conventional name of JSGTK
setBoldTitle(bold)
A method to set title to bold style
- Parameters:
- {Boolean} bold
- The boolean value true is bold and false is not
setEnable(,)
A method to set enabled or disabled
- Parameters:
- {Boolean} ,
- true to set enabled, false to set disabled
setHeight(height)
A method to set new height to the widget
- Parameters:
- {Integer} height
- The integer height value in pixel to be set
setParent(widget)
A method to store the reference of widget's parent
- Parameters:
- {Object} widget
- The parent to be set
setSize(width, height)
A method to set the width and height of widget
- Parameters:
- {Integer} width
- The integer width value to be set
- {Integer} height
- The integer height value to be set
setSizeRequest(width, height)
A method to reset the minimum width and height of widget
- Parameters:
- {Integer} width
- The minimum width value to be set
- {Integer} height
- The minimum height value to be set
setTag(tag)
A method to set tag onto it
- Parameters:
- {String} tag
- The tag name to be set
setTooltip(textMessage)
A method to set tooltip content into its body
- Parameters:
- {String} textMessage
- The content message inside the tooltip to be display
setWidth(width)
A method to set new width to widget
- Parameters:
- {Integer} width
- : new width of widget
show()
A method to show the widget
- See:
- gtk.Widget#hide
showLoading()
A method to show the loading image while loading
showTooltip(isToShow)
A method to show or hide tooltip on widget
- Parameters:
- {Boolean} isToShow
- The boolean value true is to show, false is not
{Array}
sizeRequest()
A method to get width and height
- Returns:
- {Array} The array value contains width and height