GtkButton {RGtk2} | R Documentation |
A widget that creates a signal when clicked on
gtkButtonNew(show = TRUE)
gtkButtonNewWithLabel(label, show = TRUE)
gtkButtonNewWithMnemonic(label, show = TRUE)
gtkButtonNewFromStock(stock.id, show = TRUE)
gtkButtonPressed(object)
gtkButtonReleased(object)
gtkButtonClicked(object)
gtkButtonEnter(object)
gtkButtonLeave(object)
gtkButtonSetRelief(object, newstyle)
gtkButtonGetRelief(object)
gtkButtonGetLabel(object)
gtkButtonSetLabel(object, label)
gtkButtonGetUseStock(object)
gtkButtonSetUseStock(object, use.stock)
gtkButtonGetUseUnderline(object)
gtkButtonSetUseUnderline(object, use.underline)
gtkButtonSetFocusOnClick(object, focus.on.click)
gtkButtonGetFocusOnClick(object)
gtkButtonSetAlignment(object, xalign, yalign)
gtkButtonGetAlignment(object)
gtkButtonSetImage(object, image)
gtkButtonGetImage(object)
gtkButtonSetImagePosition(object, position)
gtkButtonGetImagePosition(object)
gtkButton(label, stock.id, show = TRUE)
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkButton +----GtkToggleButton +----GtkColorButton +----GtkFontButton +----GtkLinkButton +----GtkOptionMenu +----GtkScaleButton
GtkButton implements
GtkBuildable
and AtkImplementorIface.
The GtkButton
widget is generally used to attach a function to that
is called when the button is pressed. The various signals and how to use
them are outlined below.
The GtkButton
widget can hold any valid child widget. That is it can
hold most any other standard GtkWidget
. The most commonly used child is
the GtkLabel
.
GtkButton
gtkButton
is the result of collapsing the constructors of GtkButton
(gtkButtonNew
, gtkButtonNewWithLabel
, gtkButtonNewFromStock
, gtkButtonNewWithMnemonic
) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.
The (widget, user.data)
gtkButtonClicked
signal.
widget
GtkButton
] the object which received the signal.user.data
The (button, user.data)
button
GtkButton
] the object that received the signaluser.data
The (button, user.data)
Deprecated
: Use the ::enter-notify-event
signal.
button
GtkButton
] the object that received the signaluser.data
The (button, user.data)
Deprecated
: Use the ::leave-notify-event
signal.
button
GtkButton
] the object that received the signaluser.data
The (button, user.data)
Deprecated
: Use the ::button-press-event
signal.
button
GtkButton
] the object that received the signaluser.data
The (button, user.data)
Deprecated
: Use the ::button-release-event
signal.
button
GtkButton
] the object that received the signaluser.data
focus-on-click
[logical : Read / Write]Whether the button grabs focus when it is clicked with the mouse. Default value: TRUE
image
[GtkWidget
: Read / Write]Child widget to appear next to the button text.
image-position
[GtkPositionType
: Read / Write]The position of the image relative to the text inside the button.
Default value: GTK_POS_LEFT Since 2.10
label
[character : Read / Write / Construct]Text of the label widget inside the button, if the button contains a label widget. Default value: NULL
relief
[GtkReliefStyle
: Read / Write]The border relief style. Default value: GTK_RELIEF_NORMAL
use-stock
[logical : Read / Write / Construct]If set, the label is used to pick a stock item instead of being displayed. Default value: FALSE
use-underline
[logical : Read / Write / Construct]If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Default value: FALSE
xalign
[numeric : Read / Write]
If the child of the button is a GtkMisc
or GtkAlignment
, this property
can be used to control it's horizontal alignment. 0.0 is left aligned,
1.0 is right aligned.
Allowed values: [0,1] Default value: 0.5 Since 2.4
yalign
[numeric : Read / Write]
If the child of the button is a GtkMisc
or GtkAlignment
, this property
can be used to control it's vertical alignment. 0.0 is top aligned,
1.0 is bottom aligned.
Allowed values: [0,1] Default value: 0.5 Since 2.4
child-displacement-x
[integer : Read]How far in the x direction to move the child when the button is depressed. Default value: 0
child-displacement-y
[integer : Read]How far in the y direction to move the child when the button is depressed. Default value: 0
default-border
[GtkBorder
: Read]Extra space to add for CAN_DEFAULT buttons.
default-outside-border
[GtkBorder
: Read]Extra space to add for CAN_DEFAULT buttons that is always drawn outside the border.
displace-focus
[logical : Read]Whether the child_displacement_x/child_displacement_y properties should also affect the focus rectangle.
Default value: FALSE Since 2.6
image-spacing
[integer : Read]Spacing in pixels between the image and label. Allowed values: >= 0 Default value: 2
inner-border
[GtkBorder
: Read]Sets the border between the button edges and child.
Since 2.10
Derived by RGtkGen from GTK+ documentation
http://developer.gnome.org/doc/API/2.0/gtk/GtkButton.html